Posts

Showing posts from March, 2013

java - GCTaskThread JVM Crash -

my jvm (7.0_21-b11) crashing randomly (sometimes after 1 day , sometime after 1 month). using api makes jni calls. based on quick search seems happens either because of faulty jni calls or faulty ram / disk. running tests , enabled -xcheck:jni can eliminate both of above point. are there other reasons can cause jvm crash in these circumstances. these top few lines hs_err_pid log file. **# jre version: 7.0_21-b11 # java vm: java hotspot(tm) 64-bit server vm (23.21-b01 mixed mode windows-amd64 ) # problematic frame: # v [jvm.dll+0x31e6ec] # # core dump written. default location: c:\app\bin\hs_err_pid9099.mdmp --------------- t h r e d --------------- current thread (0x0000000001cdc000): gctaskthread [stack: 0x0000000000000000,0x0000000000000000] [id=90672] siginfo: exceptioncode=0xc0000005, reading address 0x0000000000000220** you using old version of java jdk7 update 21. crash occured in gc. gc issue caused bug corrupts heap memory. issue gc, compiler, bad native

angularjs - Angular Route with multiple slashes override folder path -

i have angular app using ngroute module along html5 mode pushstate cleaner url. app.config(function($routeprovider, $locationprovider){ $locationprovider.html5mode(true); $routeprovider //route home page .when("/", { templateurl: "templates/main.html", controller: "imagecontroller", }) //route page .when("/me", { templateurl: "templates/me.html", controller: "imagecontroller", }) //404 error .when("/404", { template: "", controller: "imagecontroller", title: "404 error", }) //default route / .otherwise({ redirectto: "/404", }); }); i have changed .htaccess file rewrite trailing slashes ("/"). rewriteengine on rewritebase / # don't rewrite files or directories rewritecond %{request_filename} -f [or] rewritecond %{request_filename} -d rewrite

python - Django Biginner - How to connect my algorithm code in django -

this might simple, i'm quite new django. want build app make user upload csv file, run algorithm on it, , make output file available downloaded user. started uploading file thing , looks it's working, , have algorithm code ready, however, i'm not sure how connect algorithm code, not sure how make function include that, , need new url each uploading,running algorithm , downloading? 1 url displays 3 of them. here project files , app, model.py : from django.db import models django.forms import modelform class upload(models.model): pic = models.filefield("csv file", upload_to="images/") upload_date=models.datetimefield(auto_now_add =true) # fileupload form class. class uploadform(modelform): class meta: model = upload fields = '__all__' # or list of fields want include in form view.py: from __future__ import division django.shortcuts import render uploader.models import uploadform,upload io import textiowrappe

java - What should I use to store data for a program I am working on -

should use arraylist, vectors, hashmp or there else should use store data bank program working on. trying store user information in 1 of them , send file, should use? thank you. to decide between using arraylist/vector or hashmap depends on whether have key-value pairs or simple list of elements. key-value pairs hashmap go-to option (e.g name - person object). if have objects no real keys (a list of trees in forest) arraylist or vector better. the difference between vector , arraylist more subtle. if want more information on difference between 2 can read this article. article 2001, information isn't newest. in cases, arraylist better choice , vector pretty considered deprecated nowadays. biggest difference between 2 is, vector synchronized while arraylist isn't, in cases, makes vector slower arraylist creates unnecessary overhead. more information can @ question: why java vector class considered obsolete or deprecated?

javascript - programmatically close select onorientationchange -

i can't seem close select element when rotating ios device. i've tried blur() (both native , jquery versions), setting style display:none, calling hide(), triggering focus events on other elements, triggering click events on on both select , other elements, disabling select, hiding options, etc. etc. i know webkit doesn't let close selects blur(). have anymore suggestions? i guessing here since have no way test it, seems if put anchor in page this: <a id="myanchor"></a> and add jquery: $(window).on("orientationchange",function(){ $('#myanchor').focus(); }); it should focus on anchor , close select... maybe?

Testing android implementation of cordova plugin -

i have created cordova plugin has android implementation. java code has calls sdk interfaces specific hardware mobile device connected to. write unit tests java code , mock calls sdk can run tests during ci. when looking this, found cordova-plugin-test-framework , can tell, tests write against javascript code, not actual platform implementations. i'm sure use , write tests, require mobile device connected hardware, , don't want have actual calls sdk. in other words, don't have way of mocking sdk calls using this. i thought maybe run junit command line java code, getting errors because couldn't find org.apache.cordova.callbackcontext . tried faking own object, continued, found more dependencies code in isolation doesn't know about. next figured best test within android project under /platforms in ionic mobile app, since dependencies visible @ point. i'm able run ./gradlew test ( https://developer.android.com/studio/test/command-line.html ) here, can&#

stored procedures - How can I supply report parameters to ancillary reports from a "base" SSRS report? -

Image
i need have several (four) reports identical except value of particular parameter. don't want user have enter parameters manually, though. when enter following parameters: beatles ------- begdate: 1962 enddate: 1970 unit: beatles i want 4 reports run, using these parameters: lennon ------ begdate: 1962 enddate: 1970 unit: john lennon mccartney --------- begdate: 1962 enddate: 1970 unit: paul mccartney harrison -------- begdate: 1962 enddate: 1970 unit: george harrison starr ----- begdate: 1962 enddate: 1970 unit: ringo starr so when user enters 3 parameters, first 2 ("date") parameters , appropriate-for-the-ancillary-report "unit" parameter ("john lennon" first, "paul mccartney" second, etc.) passed. the report "robot" says after person enters "beatles" unit: "oh, entered 'beatles'! i'll pass 'john lennon' unit parameter first report, 'paul mccartney' unit parameter secon

gcc - Generating Control Flow Graph for c++ code -

i want analyzes c++ programs. trying generating control flow graph, run tests, , mark vertexes hit. know gcc gives ability generate cfg compiled code -fdump-tree-cfg. generated file hard read , have no idea how parse file. have questions here. how parse generated cfg file gcc? how mark vertexes hit running tests? i found many related questions , answers, no 1 satisfies questions. idea appreciated. thanks

sql - How to Select Count for every user within a table -

i have table named "calls". table's columns organized as callcounter, assignedempid, completedbyempid 1 200 200 2 200 200 3 201 200 4 200 200 5 201 201 6 201 200 7 200 200 8 200 200 9 200 201 10 201 201 ... how create select sql query return following data. ideally complete entire sql query in 1 query. employee # calls assigned # calls completed 200 6 7 201 4 3 i have tried following queries select assignedempid, count(callcounter) calls select count(*) calls first need define list of employees. can subquery , union if don't have employees table join with. then use conditional aggregation : select t.empid, sum(case when t.empid = c.assignedempid 1 else 0 end) a

python - Removing Item From List - during iteration - what's wrong with this idiom? -

as experiment, did this: letters=['a','b','c','d','e','f','g','h','i','j','k','l'] in letters: letters.remove(i) print letters the last print shows not items removed ? (every other was). idle 2.6.2 >>> ================================ restart ================================ >>> ['b', 'd', 'f', 'h', 'j', 'l'] >>> what's explanation ? how re-written remove every item ? some answers explain why happens , explain should've done. i'll shamelessly put pieces together. what's reason this? because python language designed handle use case differently. the documentation makes clear: it not safe modify sequence being iterated on in loop (this can happen mutable sequence types, such lists). if need modify list iterating on (for example, duplicate selected items) must it

html - how to not let nav bar push div down -

in site have responsive nav bar header @ top of page. when nav bar opened, div header pushed down it. how possible nav bar go on top of div without pushing down. link website thanks in advance. nice name vlad. style = 'position:absolute;' make dimensions/position of element attach not affect elements other children. mozilla dev reference

delphi - cxGrid : instead of "go to next cell on enter" using "enter" do that with the arrow keys -

Image
is there way can achieve cxgrid's functionality "go next cell on enter" using arrow keys on keyboard instead of hitting "enter" ??? right can navigate arrow keys cells move not selected (blue color). if edit cell in column , move cell beneath (with arrow key) , grid jumps other random record in grid,which annoying. is question of settings or must program functionality ? edit : simple temporary table use gather data. has no indexed fields or autoinc field : procedure tform3.cxbutton1click(sender: tobject); begin datamodule2.acrquery2.close; datamodule2.acrquery2.sql.clear; datamodule2.acrquery2.sql.text :='insert temp select company_id,member_id,surname,name members company_id =:a1'; datamodule2.acrquery2.params.parambyname('a1').value :=cxlookupcombobox2.text; datamodule2.acrquery2.execsql; datamodule2.acrquery3.close; datamodule2.acrquery3.sql.clear; datamodule2.acrquery3.sql.text :='update temp set month=:a1,year=:a2'; data

r - RStudio on a Server: ROAuth no longer used in favor of httr? [Twitter API] -

i'm running r studio on aws "ubuntu server 12.04.2 lts" , accessing r studio via browser. when try authenticate @ twitter api using package roauth code: credential<-oauthfactory$new(consumerkey="xxxxx", consumersecret="xxxxx", requesturl="https://api.twitter.com/oauth/request_token", accessurl="https://api.twitter.com/oauth/access_token", authurl="https://api.twitter.com/oauth/authorize") credential$handshake() registertwitteroauth(credential) i error after registertwitteroauth(credential) saying error in registertwitteroauth(credential) : roauth no longer used in favor of httr, please see ?setup_twitter_oauth however can't find further explanation.. apparently twitter package changed right before posted this, new way authenticate is setup_twitter_oauth(customer_key, cu

php - How to get Apigility working correctly? -

i working on installing apigility on linux web server. shared hosting account inmotion hosting. using instructions @ https://apigility.org/documentation/intro/installation . easy install, running syntax error can't figure out. parse error: syntax error, unexpected 'class' (t_class), expecting identifier (t_string) or variable (t_variable) or '{' or '$' in /home/amlcon5/public_html/websites/dev/apigility/vendor/zendframework/zend-servicemanager/src/servicemanager.php on line 281 here function servicemanager.php error is. /** * set factory * * @param string $name * @param string|factoryinterface|callable $factory * @param bool $shared * @return servicemanager * @throws exception\invalidargumentexception * @throws exception\invalidservicenameexception */ public function setfactory($name, $factory, $shared = null) { $cname = $this->canonicalizename($name); if (!($factory inst

javascript - Left/Right position a div -

Image
so, i've navigation bar , <div> tag class="container-fluid" , id="scrollable" css property below. #scrollable { position: absolute; overflow-y: scroll; top: 60px; bottom: 0; } but, when problem is, page not taking entire width on right side. how make right position value 0, 72.406 okay so, i've made following changes id #scrollable { position: absolute; overflow-y: scroll; top: 60px; bottom: 0; right: 0; left: 17.5%; } and solves problem.

jsf 2 - When to name a converter in JSF -

i've been working converters in primefaces selectonemenu objects. work fine if tell class converter referring to: @facesconverter(forclass = descriptorvo.class) public class descriptorvoconverter implements converter { ... } this way, don't have explicitly tell jsf component converter should used when populated objects of class descriptorvo . however, made page used p:selectmanycheckbox , couldn't life of me know why wasn't calling converter. gave name, so: @facesconverter(forclass = rolevo.class, value = "rolevoconverter") public class rolevoconverter implements converter { ... } and passed 1 of component's properties <p:selectmanycheckbox id="cbx_roles" required="true" converter="rolevoconverter" requiredmessage="at least 1 role must selected." value="#{userview.selectedroles}" layout="responsive"> <f:selectitems value="#{userview.roles}" var="

Drawing rectangle on python Tkinter canvas that covers the entire canvas does not show border on top and left -

i'm trying create rectangle inside tkinter (python 2.7) canvas same dimension canvas. here relevant part of code: self.canvas = canvas(self, width=100, height=100, backround="yellow") self.canvas.create_rectangle(0,0,100,100) this draws rectangle can't see left , top border of rectangle. if start rectangle let's 5,5 instead of 0,0 can see border of rectangle. ideas why happens, , how can around it? unfortunately, canvas border included in drawable region. try setting borderwidth , highlightthickness attributes 0 on canvas. you'll want adjust coordinates of rectangle end @ 99, since counting starts @ 0 (if width 100, coordinates go 0 99).

ruby on rails - Git Bash stuck in master -

Image
i new rails development , tried connect github using gitbash , shell stuck in master. run windows , cannot run rails commands in mode. how can revert default git bash shell? i start rails server using "rails s" after messed around github stuff. master tag there , helper options come instead! you might need t git bash rails bash scripts, don't need bash simple git commands. unzip portablegit-2.8.4-64-bit.7z.exe anywhere want, add bin folder %path% in regular cmd session, cd repo. then can git clone/pull/fetch command want. in separate windows, can call bash , , in bash session, try rails command.

c# - Listbox causing a separate postback for the textbox -

step replicate problem first, type in text in textbox not type enter. then, select different index in listbox. finally, view both id ( listbox , textbox ) show @ eventtarget. expected result 1 id show @ eventtarget, 1 initialize = listbox onselected index change. here's code: <textbox id="textbox1" runat="server" autopostback="true"></asp:textbox> <listbox id="listbox1" runat="server" autopostback="true" onselectedindexchanged="listbox1_selectedindexchanged"> <asp:listitem text="0" value="0"></asp:listitem> <asp:listitem text="1" value="1"></asp:listitem> <asp:listitem text="2" value="2"></asp:listitem> </listbox> protected void page_load(object sender, eventargs e){ if (ispostback) { string target = request["__eventtarget"] string; system.windows.forms.messagebox.show(&q

javascript - How is constrain.js and kimbo.js documentation generated? -

i've come across 2 examples of documentation i'd try , implement: http://kimbojs.com/api http://cjs.from.so/api the kimbo source code seems have css references cjs , thought perhaps being generated cjs , can't see connection yet. the cjs repo has references docco.css , dox.js , seem related different documentation solutions: https://jashkenas.github.io/docco https://github.com/tj/dox so @ point got confused. question how constrain.js , kimbo.js documentation generated? other research in case people suggest alternatives, have come across attractive documentation solutions - ideally, i'd produce multi language documentation source (javascript, python, css, mongodb): http://daux.io http://tripit.github.io/slate https://readme.io http://www.mkdocs.org https://github.com/danielgtaylor/aglio http://www.doctant.com https://github.com/danielgtaylor/aglio http://documentation.js.org http://apidocjs.com http://dokkerjs.c

javascript - Why this is referring the outside variable? -

this question has answer here: how access correct `this` inside callback? 6 answers this should refer object in following code why it's behaving differently? var x = 4, obj = { x: 3, bar: function() { var x = 2; settimeout(function() { var x = 1; alert(this.x); }, 1000); } }; obj.bar(); why alert 4 instead of 3 ? inside settimeout callback this refers window object, it's retrieving variable defined in global context. you can make working binding context using function#bind method . var x = 4, obj = { x: 3, bar: function() { var x = 2; settimeout(function() { var x = 1; alert(this.x); }.bind(this), 1000); } }; obj.bar(); or use local variable cache reference this ,

Using Docker for local development replacing Vagrant -

i know there ton of hits on topic, , have spend time looking @ them, can not make decision. i work on windows machine, , use vagrant development. start server, edit files in mounted /vagrant directory, hit f5 , see changes. when done developing upload code server. problem is, want have infrastructure of server in "code" solution docker docker-compose. not know if there way work work vagrant. seems have keep rebuilding containers for changes apply. i don't know if doing wrong, or docker product use ready go code. i want have infrastructure of server in "code" solution docker docker-compose. seems have keep rebuilding containers for changes apply. as long docker-compose mounting host folder code is, wouldn't need rebuild container "for changes apply": container see code changes immediately, without having restart it.

visual studio - Basic while loop c# -

i have problem work out in 2 hypothetical oppenents dueling rpg style. asked give them hp , each round of loop hp lost respectiviely oppenent has hit them for. i've got basic understanding numbers keep on repeating. working on visual studios 15. in advance! /*fighter 1 charlie unicorn *fighter 2 nyan cat *fighter 1 has 100 hp *fighter 2 has 150 hp *fighter 1 can hit hard 15hp each turn *fighter 2 can hit hard 10hp each turn */ //who wins fight int fighteronehealth = 100; int fightertwohealth = 150; random randomizer = new random(); while (fighteronehealth > 0 || fightertwohealth > 0) { int fonerandomhit; int ftworandomhit; fonerandomhit = randomizer.next(0, 15); ftworandomhit = randomizer.next(0, 10); int fightonehploss = fighteronehealth - ftworandomhit; int fighttwohploss = fightertwohealth - fonerandomhit; console.writeline("after attack: charlie unicorn hp: {0}, nyan cat hp: {1}", fightonehploss, fighttwohploss); }

javascript - offcanvas Nav with extra white space -

Image
i making offcanvas div following code: apologies code... kinda new @ stackoverflow. live nav bar found here: http://inkfndry.webflow.io/artist-dashboard/artist-dash a screenshot of white space html <div id="container"> <div id="canvas"> <div id="nav"> <a href="#" class="toggle-nav" id="bars"><i class="fa fa-bars"></i></a> </div> </div> </div> css #container { width: 100%; height: 100vh; position: relative; overflow: hidden; } #canvas { width: 100%; height: 100%; position: relative; -webkit-transform:translatex(0); -moz-transform:translatex(0); -ms-transform:translatex(0); -o-transform:translatex(0); transform:translatex(0); -webkit-transition:.5s ease all; -moz-transition:.5s ease all; -o-transition:.5s ease all; transition:.5s ease all; } #nav { width: 20%; height: 100%; background: #ffffff; position: absolu

wix - Replicate Behavior of a Batch File in a Custom Action -

i'm creating wix installer @ work, , need able replicate behavior of batch file in custom action: start /d "c:\program files (x86)\remindex" instsrv.exe remindexnp "c:\program files (x86)\remindex\srvany.exe" i trying create service using normal windows application, srvany.exe can do. batch file runs fine normally, can't seem custom action same thing. have tried this: <customaction id="runnp" filekey="file_installfolder_instsrvexe" execommand="remindexnp [installfolder]srvany.exe" execute="commit" return="ignore"/> this custom action doesn't cause errors can see in log file, don't think instsrv.exe accepting parameters i'm passing in execommand. know instsrv.exe , srvany.exe exist because i'm running custom action before installfinalize. anyone know what's wrong custom action? i prefer not include actual batch file in install folder, have no reason the

javascript - SocketIO 400 Bad Request Error -

i'm pretty new web-dev , have been struggling bug multiple days have no clue how resolve/have no idea causing it. @ point i've exhausted think causing problem, insights appreciated! i running apache webserver through flask python framework. client-side js (app2.js) follows: // set basic variables app var socket; $(document).ready(function() { socket = io.connect('https://' + document.domain + ':' + location.port+'/main'); console.log(document.domain); console.log("document ready"); socket.on('disconnect', function() { console.log("disconnecting..."); }); console.log("simple logging"); }); further have reduced .html page loads above script following: <!doctype html> <html> <body> <h1>my first heading</h1> <p>my first paragraph.</p> </body> <script type="text/javascript" src="//cod

javascript - toggle row with specific attribute in jquery datatable on click -

i'm new jquery datatable. what i'm trying achieve is, toggle(hide/show) row of datatable having attribute named status_id value 9 13 on button click. i have tried number 9, it's not working. var dtable = $('#tbl_tasklist').datatable(); $(document).on('click', '.hide-tasks', function (e) { e.preventdefault(); var row = dtable.row($(this).attr('status_id')); if(row === '9') { dtable.row().hide(); } }); there no hide() feature rows. trying specialized filter, create custom filter achieve want. here example of toggleable filter hide or shows <tr> 's status_id 9 or 13 : $('#hide-tasks').on('click', function (e) { //is checkbox checked? if ($(this).is(':checked')) { //add filter $.fn.datatable.ext.search.push(function( settings, data, dataindex ) { //always go through api when working datatables! var status_id = parseint(table.row(d

user interface - R Is Run in GUI or Not? -

i note following, click here : i ask same question, in sense need know whether r environment has been run terminal, or in gui type environment. the motivation question, produce number of .pdf reports, and, if user has called functions produce reports under gui, want open reports using system default .pdf program, if script has been run command line, or via session commenced @ commandline, should suppressed. in rstudio, if run interactive() , result true , , if open r session @ terminal , run same command, result true , so, question essentially, how can differentiate? running macosx, answer relevant mac, unix , windoze. cheers, commandargs() output command line launched r session , .platform$os.type report os so: switch(.platform$os.type, windows = if (grepl("rterm", commandargs())) cat("terminal\n") else cat("gui\n"), ...fill in each other operating system... )

What are some ideas for when "Inspect Element" in Chrome shows the expected behavior of CSS but actual result is different? -

i have run couple of times - coded or modified css template specific thing in mind, yet browser displays differently intended. when use "inspect element" in chrome, shows attributes intended associated element, yet browser showing different. possible options here far figuring out issue/getting site how want? before had issue can't remember didn't display correctly in chrome (but chrome developer tools showed intended), did display in browser. now, having issue multiple pages on same site have different fonts same menu although css showing in inspect element correct - behavior consistent between chrome , safari (haven't checked other browsers yet). you check !important on lower down lines. think happened me once, , don't think put line through style being overidden. (it may have though long time ago happened.) way around if that's case , if !important necessary add !important rule want overwrite with. (try avoid using importants where

loops - Dynamic data exporting using R -

mybrowser$navigate("http://bitcointicker.co/transactions/") > <- mybrowser$findelement(using = 'css selector',"#transactionscontainer") > [1] "remotedriver fields" $remoteserveraddr [1] "localhost" $port [1] 4444 $browsername [1] "firefox" $version [1] "" $platform [1] "any" $javascript [1] true $autoclose [1] false $nativeevents [1] true $extracapabilities list() [1] "webelement fields" $elementid [1] "0" i trying web scrape live data using rselenium , rvest. planning create control loop timer run every minute struggling dynamic exporting of data folder on computer. ideal create output file , r update rows automatically on 1 file although not sure if possible using r.

Orientdb delete empty cluster automatically -

is there way delete in orientdb (distributed) empty cluster automatically keep small amount of files , db more clean? according documentation, there seems nothing automatic responds needs. maybe way try it, might write java function checks clusters empty, , deletes them. function performed or hands every few time or scheduled scheduler.

c++ - Lua DLL Library Dependencies -

i created lua module windows, dll, has number of dependencies. these dependencies required module dll function correctly, of these dependencies c++ runtime libraries (libstdc+-6.dll , libgcc_s_seh-1.dll among others). trying load module using package.loadlib call: init = assert(package.loadlib("c:\\path\\to\\my\\module.dll", "luaopen_mymodule")) init() the dependencies , module dll located in folder main executable's dll. because of this, seems package.loadlib cannot find dependencies of module. works fine when path these dependencies added path variable, not allowed modify path on machines lua module used, neither can link dependencies statically. is there way specify search path dependencies lua? lua used on windows systems, solution may platform dependent. if have no way statically include dependencies or modify path affect dll search, can try option: load dependencies directly using same package.loadlib call before load module.dll . use

java - Recursive implementation of a method -

i'm new java , still trying wrap head around recursion.the function below returns true @ first intersection between 2 sorted lists list x , list y. public static boolean checkintersection(list<integer> x, list<integer> y) { int = 0; int j = 0; while (i < x.size() && j < y.size()) { if (x.get(i).equals(y.get(j))) { return true; } else if (x.get(i) < y.get(j)) { i++; } else { j++; } } return false; } now i've been trying implement using recursion instead, , know there should base case empty list in case , try reduce list excluding 1 element @ time , feed same recursive function, can't work out how check intersection pass rest of list on , over. public static boolean recursivechecking(list<integer> x,list<integer> y) { if(x.size() == 0){ return false; } else { return recursivechecking(x.sublist(1, x.size()-1), y)

javascript - Run function when another function finishes jQuery -

when page done refreshing, jquery event launched: $(#id).trigger('reloaded'); 'reloaded' custom event; how set listener , such that, when done 'reloading' , run function: i thinking this: $(#id).on('reloaded',function(ev) { alert("launch function"); }); but doesnt work you missing quote in alert() it should this: $('#id').on('reloaded',function(ev){ alert("launch function"); }); edit: quotes in selector @pinocchio

How to show image from server into Glide in android -

i want load image server json , show imageview glide library, write below codes not show me image in imageview !! issue use log.d , toast show image link (image link on server) , show me image link in imageview not image!! datamodel : public class datamodel implements serializable { private static final long serialversionuid = 1l; private int id; private string title; private string description; private string image; private string category; private string date; private string price; public datamodel(int id, string title, string description, string category, string date, string image) { this.id = id; this.title = title; this.description = description; this.category = category; this.date = date; this.image = image; } public string getprice() { return price; } public void setprice(string price) { this.price = price; } public string getdate() {

How can I get a table in markdown without column headers? -

i'm trying generate in markdown table without column headers, every sample found on internet uses column headers. table want m x 2 . vanilla markdown doesn't support tables - instead, gruber recommends using html tables inside markdown page (see example on page). that's 1 option. if you're using kind of extended markdown syntax (multimarkdown, kramdown, markdown extra, etc.), depends on you're using. according documentation markdown extra , multimarkdown , , presumably, other extensions based on php markdown extra, tables without headers aren't possible, , have write such table in raw html in vanilla markdown. can't find syntax documentation mou, guess doesn't support headerless tables. however, in kramdown , creating table without header row works: | a1 | b1 | | a2 | b2 | you wouldn't able use separator line, cause kramdown misinterpret above separator header, should able create simple tables in way. another option use empty-ce

qt - QML - Opacity of stacked elements -

Image
i have 2 items stacked. both items have semi-transparent background. circle shows the rounded rect below. is there way can hide part of long rounded rect overlaps circle? maybe changing parent, background of circle pulled ancestor higher up, , therefore ignoring rect below it? here code: item { id: choice1 width: 300 height: 100 rectangle { id: choicelabel1 width: 0 height: parent.height / 1.5 radius: parent.height * 0.5 color: "#88808080" anchors { verticalcenter: choice1.verticalcenter left: choice1.left leftmargin: choiceicon1.width / 2 } border { width: 2 color: "red" } } rectangle { id: choiceicon1 width: choice1.height height: choice1.height radius: width * 0.5 color: "#88808080" anchors { vert

C - Printing out a char pointer in hex is giving me strange results -

so writing small , simple program takes number input, converts hex, , prints out 2 characters @ time. for numbers, prints out ffffff in front of output. this code: //convert input unsigned int unsigned int = strtoul (argv[1], null, 0); //convert unsigned int char pointer char* c = (char*) &a; //print out char 2 @ time for(int = 0; < 4; i++){ printf("%02x ", c[i]); } most of output fine , looks this: ./hex_int 1 01 00 00 00 but numbers output looks this: ./hex_int 100000 ffffffa0 ffffff86 01 00 if remove f's conversion correct, cannot figure out why doing on inputs. anyone have ideas? you're mismatching parameters , print formats. default argument promotions cause char parameter ( c[i] ) promoted int , sign extends (apparently char signed type). told printf interpret argument unsigned int using %x format. boom - undefined behaviour. use: printf("%02x ", (unsigned int)(unsigned char)c[i]); instead.

gssapi - Exporting GSSCredential to byte array and vice versa -

i implementing s4u protocol using gss in java. since java 7 not support protocol, plan write jni wrapper on gss api methods in c not have equivalent in java. as part of writing jni on gss_acquire_cred_impersonate_name described in http://k5wiki.kerberos.org/wiki/projects/services4user#gss_acquire_cred_impersonate_name . this method takes populated input credential handle (gss_cred_id_t) , populates output credential handle. in java code have gsscredential created need pass c function in form of gss_cred_id_t , convert output credential handle gss_cred_id_t gsscredential further use. how can export gsscredential object byte array , vice versa in order communicate c function ? thanks you should rather java 8 code, has built-in support. export cred custom extension gss-api , therefore not available. globus jgss implementation support extension.

ajax - Img Animation with Javascript -

why timeout don't work? if work without function sleep, return me undefined data.. function work without sleeping time, go directly last image.. :-/ function sleep(value, data, i) { document.getelementbyid(value).src = data[i]; } function imganimation(value){ var img = document.getelementbyid(value).src; $.ajax({ type: "post", url: "static/cercathumbs.php", data: 'id=' + value, datatype: 'json', success: function (data) { var elements = object.keys(data).length; (var = 0; < elements; i++) { if(i == elements){i = 0;} settimeout(sleep(value, data, i), 300); } } }); } you need pass function settimeout . you're calling function sleep , passing result . settimeout(function() { sleep(value, data, i); }, 300); but still won't work, because you're setting bunch of timeouts @ same time, they'll trigger 300ms la

android - better structuring the Java code -

i have written piece of code assignment , want well-factored. basically, part of simple old-school calculator perform addition, subtraction, multiplication, division (when performing division, reminder should shown). required have separate classes each operation (addition, subtraction, multiplication, division have introduced 1 more - reminder). have advice or see gaps in understanding of concept of java generics? public class logic implements logicinterface { private final int addition = 1; private final int subtraction = 2; private final int multiplication = 3; private final int division = 4; /** * reference activity output. */ protected activityinterface mout; /** * constructor initializes field. */ public logic(activityinterface out){ mout = out; } /** * perform @a operation on @a argumentone , @a argumenttwo. */ public void process(int argumentone, int argume

excel - How to getElementsByClassName from IE to XL -

i errors using getelementsbyclassname in code, , hints doing wrong. using getelementbyid, classname gives errors me. set objexplorer = createobject("internetexplorer.application") website = "http://charting.nasdaq.com/ext/charts.dll?2-1-14-0-0-512-03na000000abt-&sf:1|8|27-sh:8=200| 27=10-bg=ffffff-bt=0-wd=635-ht=395--xtbl-" wscript.sleep 1000 objexplorer .navigate2 website .left=5 .top=5 .height=1000 .width=700 .addressbar = 0 .visible = 1 .toolbar = 0 .statusbar = 0 wscript.sleep 3000 end set xl = createobject("excel.application") xl.visible = true set wb = xl.workbooks.open("c:\users\user\documents\ci\testauto.xlsx") set ws = wb.sheets("sheet1") wscript.sleep 2000 ws.range("g9").value = objexplorer.document.getelementsbyclassname("drilldowndata").innertext wscript.sleep 1000 objexplorer.quit

Git interactive rebase - any way to instruct git to resolve conflicts keeping the HEAD version? -

tried variations of git rebase -i -xours master still conflicts shown , have resolve them manually. plus it's not entirely clear happens non conflicting changes in case of conflicting commit - kept ? use case: temp rebase old branches on master see if there such changes in branches (not in master @ all), keeping version of code in master conflicting changes (horrible, horrible conflicts) $ git --version git version 2.6.1.windows.1 git ls-files -u | cut -f2- | uniq | git checkout-index --stdin --stage=all \ | while read base ours theirs path; git merge-file --ours \ -l "$path" -l o/"$path" -l b/"$path" \ -- $ours $base $theirs mv $ours "$path" rm $base $theirs done

linux - Can't compile CUDA + OpenGL program on Mac OS X El Capitan -

i writing program includes opengl , cuda codes @ university , can run ubuntu linux. program has got many dependencies use makefile , when i'm @ university linux have no problems. yesterday tried running on macbook @ home , didn't run. set libraries paths properly, when try compile using makefile following lines: mbp-di-nicolo:matrix_test nico$ make /developer/nvidia/cuda-7.5/bin/nvcc -ccbin g++ -m64 -xcompiler -g -xcompiler -arch -xcompiler x86_64 -g -g -xlinker -rpath -xlinker /developer/nvidia/cuda-7.5/lib -xlinker -framework -xlinker glut -o matrix_test my_utils2.o matrix_test.o matrix.o -l/system/library -l/system/library/frameworks/opengl.framework/libraries -lgl -lglu ../../common/lib/darwin/libglew.a -l. -lrt nvlink fatal : not find fatbin in 'my_utils2.o' nvlink fatal : elflink internal error make: *** [matrix_test] error 1 mbp-di-nicolo:matrix_test nico$ here's makefile: progname = matrix_test #progname2 = read_file cc = g++ includ

swift - didSelectRowAtIndexPath only working on long press if embedded in container view -

Image
this question has answer here: uitableview need long press select row 4 answers i'm creating prototype app uses exact same uitableviewcontroller class file 2 different scenarios. the first scenario displaying list of newly created "project" items. in scenario using regular table view controller in storyboard. the second scenario allows user select existing "project" items in different view. in scenario have regular view controller has container view . container view uses embedded tableview controller display selectable list. to clear, here how second scenario looks: remember, both using exact same class file. first scenario works while second scenario calls didselectrowatindexpath on long press, taps don't work @ all. override func tableview(tableview: uitableview, didselectrowatindexpath indexpath: nsindexpath) { p