Posts

Showing posts from May, 2015

excel vba - VBA: Get name of variable -

is there function or property variables name? something like msgbox myvariable.name or msgbox nameofvariable(myvariable) that returns "myvariable" when defined e.g. myvariable = "whatever" ? google brings questions variable referencing... a possible class approach following (commented): add class module in vba ide click insert-> class module click view -> property window enter (name) property textbox , type in "variable" (or whatever may prefer consistent in following steps) enter following code in class code pane option explicit 'declare fields attached every instance of class public name string '<--| store name of variable you'll set object of class public value variant '<--| store value associated variable you'll set object of class 'declare `method` write `value` of object in named range named after `name` field sub writerange(optional wb variant) '<--| can pass referen...

jquery - Prevent "content script runtime.onMessage: tabupdate" on firefox -

in project using bootstrap modals , tables. found requests page showing error content script runtime.onmessage: tabupdate on file moz-extension://cda0358a-3bec-4b1f-bb1c-3b6865f041e2/javascripts/content_script.js i can't understand why showing , how prevent it( it showing in mozilla firefox only ). , didn't find suitable also. is possible prevent error? any appreciatd. duplicated how disable content_script.js in firefox..? . the console messages being caused awesome screenshot addon. disable , they'll stop.

insert in database in fragment by button in android studio -

my app contain fragment class , db class , mainactivity class .......when click insert button show "data not inserted",,,,,,i not understand......where problem...........this code: mainactivity class: package ir.hashem.navfragtest; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); toolbar toolbar = (toolbar) findviewbyid(r.id.toolbar); setsupportactionbar(toolbar); floatingactionbutton fab = (floatingactionbutton) findviewbyid(r.id.fab); fab.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { snackbar.make(view, "replace own action", snackbar.length_long) .setaction("action", null).show(); } }); drawerlayout drawer = (drawerlayout) findviewbyid(r.id.drawer_layout); actionbardrawertoggle toggle = new actionbardrawertoggle( ...

Gwt Super Dev Mode on IE8 - "Dev Mode On button -

i trying use super dev mode on ie8, cant understand how add "dev mode on" button, tried import chrome failed. maybe working differently on ie? what version of gwt using ? buttons aren't needed anymore since pretty long time (something 2 years).

c# - Sorting a list by parent/child relations ship so I have definitely processed a parent before I try to process the child -

i have system people can sent me list<productcategory> . i need mapping system , save these database. the incoming data in format: public string externalcategoryid { get; set; } public string externalcategoryname { get; set; } public string externalcategoryparentid { get; set; } the incoming list in no particular order. if externalcategoryparentid null top level category. parent child relationship can depth - i.e. technology > tvs > samsung > 3d > 40" > etc > etc when i'm saving need ensure i've saved parent - can't save tvs until have saved technology. externalcategoryid int has no relevance on parent child relationship (a parent can have higher or lower id child). how can order list can loop through , child, have processed it's parent. the way can think of externalcategoryparentid == null externalcategoryparentid in "top level" list, next set of children... etc. can't best solution. i'd prefer sort f...

javascript - I want to spin the icons currectly on click on corresponding icon -

in html code have tried rotate icon 180 degree on click on corresponding icon , return when click on other icon or outside. the problem here that first icon not return when click on second , second not return either click on first icon or click on outside.i want fix it. how can fix problem?. function rotate(e){ document.getelementbyid("me").classname="spinner in fa fa-caret-down"; e.stoppropagation(); } function resetrotation(){ document.getelementbyid("me").classname="spinner out fa fa-caret-down"; } document.addeventlistener('click', resetrotation); function rotatea(e){ document.getelementbyid("you").classname="spinner in fa fa-caret-down"; e.stoppropagation(); } .spinner { transition: 0.5s linear; } .spinner.in{ transform: rotate(180deg); } .spinner.out{ transform: rotate(0deg); } <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/b...

asp.net - Trying to fill a textbox depending on the selected value on my dropdownlist -

im new asp.net mvc. , ive been searching 2 hours , cant seem it. have dropdownlist of products database. want fill textbox description on realtime depending on selected item on dropdownlist. here have far: populate dropdown list public actionresult index() { ienumerable<selectlistitem> items = db.products.select(i => new selectlistitem { value = i.productname, text = i.productname } ); viewbag.productitems = items; return view(); } my dropdown list @using (ajax.beginform("getdescriptionbyproductname", "purchaseorder", new ajaxoptions{ insertionmode = insertionmode.replace,updatetargetid = "description"})) { @html.dropdownlist("productitems", (selectlist)viewbag.values, new { onchange = "this.form.submit();" }) } here actionresult in controller [httppost] public actionresult getdescriptionbyproductname(string...

android - Amazon Fire TV Appstore not showing my App as compatible with my device -

Image
i have published application fire tv appstore after live testing. before publishing, working live testing after publishing, saying not compatible devices. i bit surprised because same version works great in live testing. with documentation, have added below things in manifest.xml <uses-feature android:name="android.hardware.touchscreen" android:required="false" /> <uses-feature android:name="android.software.leanback" android:required="true" /> <uses-feature android:name="android.hardware.nfc" android:required="false"/> <uses-feature android:name="android.hardware.usb.accessory" android:required="true"/> <uses-feature android:name="android.hardware.usb.host" android:required="true"/> <uses-feature android:name="android.hardware.wifi" android:required="true"/> <uses-configuration android:reqnavigation=...

regex - Capture two digit pairs from a text -

i want capture 2 digits following header file: #define keymap( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ k40, k41, k42, k45, k49, k4a, k4b, k4c, k4d \ ) so want list containing 00,01,02.....4d. tried using select-string cmdlet: gc 'y:\keyboard.h' | sls 'k' but doesnt give me expected result i use static regex::matches method: $content = get-content 'y:\keyboard.h' -raw [regex]::matches($content, '\bk(..),') | foreach { $_.groups[1].value } output: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 40 41 42 45 49...

Laravel modal datatables update -

Image
in view there button called 'add/edit product' ,when click , input values in qty fields below 'add/edit product' button table created. my view: i want change/update data in modal qty value when change in table. did little bit change 1 page in modal: i used yajra data-table in modal. modal view: <!-- modal --> <div class="modal fade" id="productmodal" role="dialog"> <div class="modal-dialog prod_dia"> <!-- modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title">add /edit product</h4> </div> <div class="modal-body"> <section class="panel panel-primary"> <div...

python - How to put pickle dict value into an object -

i using pickle dump dictionary object txt file. need grab dictionary file , extract values , put them inside of object string. my dictionary looks this: obj_dict = { 'name': 'myid', 'value': 'usdf23444', 'name': 'myid2', 'value' : 'asdfh3479' } part of dilemma have there 2 'name' , 2 'value' in dictionary , need grab each separately. here code using: import pickle filepath = file.txt output = open(filepath, 'rb') obj_dict = pickle.load(output) in obj_dict: newstring = "value1=" + i['value1'] + "value2=" + i['value2'] print(newstring) i know code doesn't work, i'm more showing need end result need each value put string can use later. how can reference 'value1' , 'value2 ' correctly? getting error when trying 1 'value': typeerror: list indices must integers or slices, not str edit comment 2 ...

reactjs - ReactNative case sensitivity ignored when sending custom headers through fetch request -

i using react native 0.23.1 (also tried using 29) on mac. during fetch request react ios, when send custom header (eg 'api-version' : '0.1' ) server receives in lower case ('api-version':'0.1').the standard of writing header using camel case, don't have control on server code request fails expecting headers in camelcase.when checking server log found out other non custom headers come camel case while custom headers come lowercase. i tried using different http clients such frisbee , axios still same. doing same request using chrome console successful. following fetch code fetch(properties.uris.base + properties.uris.getbusinessdetails.replace("{businessid}", properties.appid).replace("{timezone",this.gettimezone()), { method: "get", headers: { 'accept': 'application/json', 'content-type': 'application/json', 'user-agen...

java - Moving Body using force in Libgdx based off of touch input -

what trying take in inputted user touch down, convert camera coordinates of touch down world coordinates, create vector use in order apply force body. have that: vector3 worldpos = new vector3(newx, newy, 0); gamescreen.gamecam.unproject(worldpos); newx = worldpos.x; newy = worldpos.y; vector2 direction = new vector2(); direction.set((newx - xpos), (newy - ypos)); if (newx <= xpos){ direction.set((xpos - newx), (ypos - newy)); } b2body.applyforcetocenter(direction, true); i know isn't right @ far creating vector goes, coordinates being converted properly. so question is, how can accurate vector, in negative direction, when have both world coordinates of body , touch down? i have tried doing research better understanding of of having bit of trouble. appreciated, thank time. if have on newx, newy screen touch coordinates , next change world coords can direction subtraction touchworldpos currentobjectpos: vecto...

jsf - Primefaces tabview language menu -

im having problem primefaces simple language menu. it's tabs consists of 2 elements. english , spanish. the issue have when flags appear giant blank space appears right next flags. the white space on right side of flags i see no problem in code. wanted know if knows how solve it. code: <ul> <h:form> <li> <h:commandbutton action="#{localebean.changelanguage('en')}" value="english" image="/resources/modena-layout/images/us.png" /> </li> <li> <h:commandbutton action="#{localebean.changelanguage('es')}" value="spanish" image="/resources/modena-layout/images/es.png" /> </li> </h:form> </ul> instead of commonbutton, maybe should try this: <p:commandlink action="#{localebean.changelanguage('en')}" <div id="englishflag" class="englishflagclass" /> <...

javascript - Access variable on child from parent in react.js -

i trying access variable "name" in child class parent class. using react routers on project. i've been using react few days, open suggestions or refactoring. child class: import react 'react'; import reactdom 'react-dom'; import { link } 'react-router'; export default react.createclass({ render: function() { return ( <ul classname="list"> {this.props.business.map(function(business, i) { let name = object.keys(business).length - 1; return ( <li key={business.id}> <link to="/" classname="inner"> <div classname="li-img"> <img src={business.image} alt="image alt text" /> </div> <div classname="li-text"...

cordova - Read text file on Android with Phonegap -

i trying read text file on android phonegap. have looked @ of examples , don't see difference in code. file has lines of text. onloadend results in length of 0. there no errors. missing here? function readtextfile(filename) { window.requestfilesystem(localfilesystem.temporary, 5*1024*1024, successcallback, errorcallback); function successcallback(fs) { fs.root.getfile(filename, {}, function(fileentry) { fileentry.file(function(file) { var reader = new filereader(); reader.onloadend = function(e) { console.log("text file length: " + this.result.length); }; reader.readastext(file); ...

python - Pymel: How do I extract these vector floats from a complex .TXT file? -

i having trouble wrapping head around how extract float values complex text file in pymel. not programmer, artist, in need of creating script specific workflow process , have beginner level knowledge of python. my goal: create objects in 3d space (x,y,z) coordinates parsed specific text file program. ex. of text file: point 1 8.740349 -4.640922 103.950059 point 2 8.520906 3.447561 116.580496 point 3 4.235010 -7.562914 99.632423 etc., etc there's more space in text file between point #'s , vector floats. i want create dictionary use create objects in 3d program. for example, mydictionary = {(point 1),[8.740349,-4.640922,103.950059]), etc. }. this code snippet far: def createlocators(): global filepath global markernum global markercoord print "gettin...

javascript - How can I run uglify then strip-debug in one task using gulp -

what want minify js in index.html remove console.logs i tried 2 options: i tried merge uglify executed // command: gulp useref gulp.task('useref', function(){ var _uglify = gulp.src('app/index.html') // .src function similar locating or searching on file or folder .pipe(useref()) // minifies if it's javascript file .pipe(gulpif('*.js', uglify())) // minifies if it's css file .pipe(gulpif('*.css', cssnano())) .pipe(gulp.dest('app/')) // .dest location produce output // set app/, automatically change index , there's no need move files var _strip_debug = gulp.src('app/assets/js/scripts.js') .pipe(stripdebug()) .pipe(gulp.dest('app/assets/js')); return merge(_uglify, _strip_debug); }); i tried returning 2 uglify executed: gulp.task('useref', function(){ return gulp.src('app/index.html') // .src function similar locating or searchin...

python - Volume Slider using Tkinter -

i'm new coding, , attempting create juke box school project, i'm struggling create slider edit volume. i'm unsure start volume change move slider. i'm using vlc lib. import vlc import random tkinter import * import threading song = "" instance = vlc.instance() def get_songs(): global song global x global songs songs = filedialog.askopenfilenames() x = 0 song = songs[x] print(songs) commence(song) def pause_resume(): player.pause() def commence(song): global player global x player = instance.media_player_new() media = instance.media_new(song) player.set_media(media) player.play() def next_song(): if x >= len(songs): print("error: can't go further") x = 0 return player.stop() song = songs[x] commence(song) window = tk() window.geometry("600x600") window.title('jukebox') #pause_button = button(window, text =...

html - Javascript large array hangs -

i've been working on project class , i've completed theoretically has problems not execute fast i'd like. task follows: have 10x10 board make moves on. go up, down, left or right randomly. if move takes off board skip it. until 1,000,000 steps taken or reach top right of board. supposed count max number of steps single tile received , same minimum. have done using 2d array , counts , output takes multiple button clicks output. i'm not sure if memory allocation error related how accessing 2d array keep track of number of steps or not. relatively new javascript don't know if way efficient. code <!doctype html> <html> <head> </head> <body> <h1>path game</h1> <!-- starts game --> <button onclick="dogame()">click here start game</button> <p id="maxsteps"></p> <p id="minsteps"></p> <p id="totalsteps"></p...

inspect - How I can configure StatementInspector in Hibernate? -

https://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/interceptor.html says onpreparestatement(string sql) deprecated. supply statementinspector instead, if wish inspect , alter sql statements. but not clear how can configure statementinspector in hibernate @ application level (i don't want set @ each hibernate session level). don't ) you need 2 things: add property persistence.xml: property name="hibernate.session_factory.statement_inspector" value="full-qualified class name" write listener class implementing interface org.hibernate.resource.jdbc.spi.statementinspector. profit!

java - Half the widgets in Android Studio not working -

i've been learning android development , first noticed check boxes not work, played around bit , noticed half widgets not work. straying 'drag , drop' interface , writing code doesn't work. i've tried uninstalling , reinstalling , still same error: exception raised during rendering: binary xml file line #-1: error inflating class android.widget.checkbox details: java.lang.nosuchmethoderror: android.graphics.drawable.vectordrawable_delegate.ncreatetreefromcopy(jj)j @ android.graphics.drawable.vectordrawable.ncreatetreefromcopy(vectordrawable.java) @ android.graphics.drawable.vectordrawable.access$400(vectordrawable.java:204) @ android.graphics.drawable.vectordrawable$vectordrawablestate.createnativetreefromcopy(vectordrawable.java:837) @ android.graphics.drawable.vectordrawable$vectordrawablestate.<init>(vectordrawable.java:812) @ android.graphics.drawable.vectordrawable.mutate(vectordrawable.java:268) @ android.graphics.d...

javascript - Get accurate scroll position before 'domready' in Internet Explorer when scroll position is restored from back button navigation or reload? -

i created minimal test case (and logged bug microsoft references it): https://dennishall1.github.io/pageyoffset-test/ but maybe out there has encountered , solved this? (i tried standard window.pageyoffset , tried few of 'older ways' -- document.documentelement.scrolltop , example, , didn't provide accurate scroll position sooner, maybe there's way.) please try below code document.body.scrolltop

jquery - Using SVG to animate and flip a hexagon -

i have never used svgs reading tutorials , tested stuff. learning how make shapes hexagon need make flip down on vertical axis , expanding in size while keeping bottom of non flipped hexagon top of new flipped hexagon. my code here: <html> <style> #test:hover { fill: yellow; } </style> <body> <div class="viewbox"> <h1>svg testing</h1> <svg height="900" width="400" version="1.1" xmlns="http://www.w3.org/2000/svg" style="background-color: gray;"> <path d="m0 86.60254037844386l50 0l150 0l200 86.60254037844386l150 173.20508075688772l50 173.20508075688772z" fill="green" id="test"></path> </svg> </div> </body> </html> what next steps? do use library this? you can use snap, have tagged question that.. snap('#test').animate({ transf...

mongodb - Not able to find a document When I insert a Ensure index query -

i create document db.duplicate.ensureindex ({"a": 1}, {"unique": "true"}) to create unique index on a when search document don't find value ( db.duplicate.find() ) ideally should create document _id & = 1 ? approach right? the ensureindex function creates index collection, not document . increase performance when querying documents a index. for creating documents, try insert : db.duplicate.insert({'a': 1})

cmake - How to use FindGDAL on Windows? -

our program needs gdal, got it, , compiled using directions. such, c:\warmerda\bld\include has .h files, c:\warmerda\bld\lib has gdal.lib , gdal_i.lib, , on. i have in cmakelists.txt: set(gdal_dir c:/warmerda/bld) find_package(gdal required) however, when run cmake, this: $ cmake . -g"visual studio 14 2015 win64" -- boost version: 1.59.0 cmake error @ c:/program files (x86)/cmake/share/cmake-3.5/modules/findpackagehandlestandardargs.cmake:148 (message): not find gdal (missing: gdal_library gdal_include_dir) call stack (most recent call first): c:/program files (x86)/cmake/share/cmake-3.5/modules/findpackagehandlestandardargs.cmake:388 (_fphsa_failure_message) c:/program files (x86)/cmake/share/cmake-3.5/modules/findgdal.cmake:116 (find_package_handle_standard_args) main/cmakelists.txt:31 (find_package)

Google Trends monthly data export -

if write following url in browser, csv file weekly data google trends: www.google.com/trends/trendsreport?q=searchterm&export=1 in past, file have been same 1 obtained manually clicking "export csv" button on google trends page. now, instead, using button data file monthly data. does know whether possible obtain monthly file using url similar above-mentioned one? you use date parameter request www.google.com/trends/trendsreport?q=searchterm&export=1&date=01/2010 37m some pages recommend use more 36 months, tried 140 months , returns weekly data. check page more reference, https://github.com/generalmills/pytrends also, check how call url https://www.google.com.mx/trends/api/widgetdata/multiline/csv?req=%7b%22time%22%3a%222004-01-01%202016-10-07%22%2c%22resolution%22%3a%22month%22%2c%22locale%22%3a%22es-419%22%2c%22comparisonitem%22%3a%5b%7b%22geo%22%3a%7b%7d%2c%22complexkeywordsrestriction%22%3a%7b%22keyword%22%3a%5b%7b%22type%22%3a%2...

android - Failed to update existing theme for activity -

i see error when execute code: e/instantrun: failed update existing theme activity com.example.android.getup.mainactivity@1ebe5a1 java.lang.nosuchfieldexception: no field mtheme in class landroid/content/res/resources$theme; (declaration of 'android.content.res.resources$theme' appears in /system/framework/framework.jar) @ java.lang.class.getdeclaredfield(native method) @ com.android.tools.fd.runtime.monkeypatcher.monkeypatchexistingresources(monkeypatcher.java:374) @ com.android.tools.fd.runtime.server.restart(server.java:523) @ com.android.tools.fd.runtime.server.access$600(server.java:61) @ com.android.tools.fd.runtime.server$socketserverreplythread.handle(server.java:318) @ com.android.tools.fd.runtime.server$socketserverreplythread.run(server.java:190) @ com.android.tools.fd.runtime.server$socketserverthread.run(server.java:158) @ java.lang.thread...

most efficient way in c# to parse a large Xml string (to expand DTD references, add new lines etc) -

i have interface provides large xml strings valid xml may not in standard form (say missing prefix default namespace specified) or without line-endings or need expansion of entities in in-lined dtd. need parse these strings standard xml parser can handle in-lined dtd definitions. string data can anywhere few characters giga bytes. at present using following code (and such simple parsing seems able fix issues mentioned above): xdocument doc = xdocument.parse(largexmlstring); var settings = new xmlwritersettings(); settings.indent = true; settings.encoding = encoding.unicode; //more settings stringbuilder parsedoutput = new stringbuilder(); using (xmlwriter xmlwriter = xmlwriter.create(parsedoutput, settings)) { doc.writeto(xmlwriter); } while easy use, not sure how good/bad compared ...

Git Error When Pushing to GitHub -

Image
i'm new git, sourcetree, , version control in general please forgive ignorance. i had project on github couple dozen commits master branch, never made other branches there commits master , nothing else. using sourcetree, pulled down project , checked out older version of project intending work on version , discard of newer commits. at point, project branches work on older version of project little bit , go commit work. commit goes smoothly when go push project github server shows error message says head detached hash. mean , how fix it? dialog box pushed from. thank time looking @ this. edit: i'm wanting push master branch, while duplicate question wanting else detached head. you've made commit detached head means don't have branch refers head , not allowed push github. commit should in master . so should do: 0) open bash , go project directory. 1) stash uncommitted changes keep safe. git stash 2) rebase commits onto master . git r...

Running Tika through tika-python in Windows produces encoding errors -

i have python code extracts text pdf files using tika server through tika-python. stores resulting output in individual json files. the command run execute script python extraction.py <full path local directory> i'm using python 3.5 it works perfect in different macbookpro computers. doesn´t work expected in windows, using up-to-date windows 10. some pdf files processed, others produce error such as: 'charmap' codec can't encode characters in position 3648-3649: character maps <undefined> i have tried changing code page 65001 , changing console font lucida console, based on other questions posted on stack overflow, including 388490 ( unicode characters in windows command line - how? ) , 14109024 ( how make unicode charset in cmd.exe default? ) , 1259084 ( what encoding/code page cmd.exe using? ). i tried installing conemu ( http://conemu.github.io/en/unicodesupport.html ) , changing default encoding consoles. other references mention w...

Realtime team sync for Android Studio -

i'm starting project team , thought using git cooperate, anyway we're looking in more automatic solution (eg. may mention "saros" eclipse) automatic sync our project on android studio how can achieve that? i don't know source control, have dropbox file hooked the project file in c:/users/androidstudioprojects/projectname. , push dropbox online jenkins code compiler make sure it's error free. it's still hands on, other dropbox portion, helps keep version control of apps , make sure error free. hope of info helps.

Django: display object's another field from template tag? -

i have objects in database, each object has 2 values(fields): 'id' , 'name'. i want request model template tags display field of object, when first 1 given. example. model: fruits objects: name:banana id:1 name:apple id:2 name:orange id:3 how make request template tag ask like: 'display name of object id=1' or 'display id of object named orange' ? dos here: a shortcut: get_object_or_404() .i made modifications make easier understand. from django.shortcuts import get_object_or_404, render .models import question # ... def detail(request, question_id): # object here question = question.objects.all() return render(request, 'polls/detail.html', {'question': question}) and in templetes {% qu in question %} <li><a href="/polls/{{ question.id }}/">{{ question.question_text }}</a></li> {% endfor %}

python - Using pyplot pcolor for a heatmap, need to add subtotals -

Image
i have pandas data frame values: [[7.86, 0.25, 2.87, 1.09, 27.09] [ 0.54, 0.0, 0.44, 0.49, 2.03], [ 5.34, 0.79, 2.32, 0.54, 3.76], [ 2.22, 0.49, 0.79, 0.2, 0.3 ], [31.98, 0.89, 2.62, 0.15, 4.94]] i'm calling matplotlib with: plt.figure(figsize=(7, 6)) plt.title(title) plt.xlabel(xlabel) plt.ylabel(ylabel) plt.yticks(np.arange(0.5, len(d.index), 1), d.index) plt.xticks(np.arange(0.5, len(d.columns), 1), d.columns) c = plt.pcolor(d, cmap="pubu") show_values(c) plt.tight_layout() plt.autoscale() plt.show() and getting result: what need do, , can't find documentation, show subtotals each row , column of matrix on axes. don't know if there's specific option or if need add 10/11 annotations it.

python - Sphinx: list local sections first, linked pages last in TOC -

let's have following index.rst : some global topic ===================== .. toctree:: :glob: nested/index global topic introduction ------------------------ and nested/index.rst : some sub-topic ============== i want toc like: some global topic global topic introduction some sub-topic instead, following: some global topic some sub-topic global topic introduction how make local sections appear first, , linked pages after them? it's not perfect solution, how about .. contents:: :local: .. toctree:: :glob: nested/index that give you: some global topic global topic introduction some sub-topic

c++ - NMAKE fatal error U1077 in Qt build with webkit -

i trying build qt 4.8.6 x64 static library visual studio 2013 sp5 webkit included, error after few minutes of running nmake: generating code... lib /nologo /out:..\..\lib\qtdeclarative.lib @c:\users\siavash\appdata\local\temp\nm3ea3.tmp qdeclarativeevents.obj : warning lnk4221: object file not define undefined public symbols, not used link operation consumes library qlistmodelinterface.obj : warning lnk4221: object file not define undefined public symbols, not used link operation consumes library cd src\3rdparty\webkit\source\ && c:\msvs2013\vc\bin\nmake.exe -f makefile.webkit microsoft (r) program maintenance utility version 12.00.21005.1 copyright (c) microsoft corporation. rights reserved. cd javascriptcore\ && c:\msvs2013\vc\bin\nmake.exe -f makefile.webkit microsoft (r) program maintenance utility version 12.00.21005.1 copyright (c) microsoft corporation. rights reserved. c:\qt\4.8.6\bin\qmake.exe -o makefile.webkit java...

android - Navigation View Item Action Error -

Image
i want use array menu items in navigation view. create menu on left side. when click item want show name of item. makes error. tried using variable. (for example determine variable instead of "i" (int counter)" gave error before.) thank help.thank you. /androidruntime: fatal exception: main process: com.technotalkative.navigationviewdemo, pid: 28374 java.lang.arrayindexoutofboundsexception: length=4; index=4 @ com.technotalkative.navigationviewdemo.mainactivity$3.onmenuitemclick(mainactivity.java:290) @ android.support.v7.view.menu.menuitemimpl.invoke(menuitemimpl.java:148) @ android.support.v7.view.menu.menubuilder.performitemaction(menubuilder.java:957) @ android.support.design.internal.navigationmenupresenter$1.onclick(navigationmenupresenter.java:318) @ android.view.view.performclick(view.java:5198) @ android.view.view$perf...

linux - Second recv call doesn't receive data, halts the execution in C -

this client program requests files server: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <strings.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #define server_port 5959 #define max_line 512 void setstring(char *str){ str[max_line-1]='\0'; } int main(int argc, char * argv[]){ file *fp; struct hostent *hp; struct sockaddr_in sin; char *host; char filename[max_line],buf[max_line],reply[max_line],rec_line[max_line]; int s; char msg[max_line]; int len,new_len,rec_file; if (argc==2) { host = argv[1]; } else { fprintf(stderr, "usage: simplex-talk host\n"); exit(1); } /* translate host name peer's ip address */ hp = gethostbyname(host); if (!hp) { fprintf(stderr, "simplex-talk: unknown host: %s\n", host); exit(1); } else ...