Posts

Showing posts from April, 2012

In bash, how can cmd1 | cmd2 return cmd1's status code, when cmd1 fails? -

simple example: user:/$ find /garbage | wc -l find: '/garbage': no such file or directory 0 user:/$ echo $? 0 find fails, wc executes , $?=0 . rather abort, , $? set find 's status code. this seems work user:/$ find /garbage 2> /dev/null && if [ ! $? -eq 0 ]; exit $?; fi | wc -l user:/$ echo ? 3 but it's clunky , feels there's cleaner, more bashonic solution. taken man bash : the return status of pipeline exit status of last command, unless pipefail option enabled. if pipefail enabled, pipeline's return status value of last (right‐ most) command exit non-zero status, or 0 if commands exit successfully. if reserved word ! precedes pipeline, exit status of pipeline logical negation of exit status described above. shell waits commands in pipeline terminate before returning value. to set it: set -o pipefail

JQuery to Parse XML file in Electron -

i have following xml file: test.xml <page> <checkbox> <label>works</label> </checkbox> </page> i have electron set , have jquery implemented correctly. when say: var xml = "<page><checkbox><label>works</label></checkbox></page>"; var doc = $.parsexml(xml); var $xml = $(doc); var $checkbox = $xml.find("checkbox"); $checkbox.each(function(){ var label = $(this).find('label').text(); $(".ntbk-container" ).append('<input type=checkbox class=checkbox>'+label+"</input>"); }); the page renders correctly , checkbox. want read file, did i've seen many people do: var file $.get(file_path,function(data){ file = data; },'text') var xml = file; ...(the rest of prevoious code) then no result. how able this?

c - Return argument doesn't work — gives me weird error -

this simple program should create substring string, should return substring can printed out. it's exercise , substring function can changed. problem can't find return type doesn't spark kinds of warnings , errors. how should change return type? static void panic(const char *serror) { printf("%s", serror); exit(1); } static void *xmalloc(size_t size) { void *ptr; if (size == 0) panic("size 0!\n"); ptr = malloc(size); if (!ptr) panic("no mem left!\n"); return ptr; } static char *substring(const char *str, off_t pos, size_t len) { char out [len]; int index; for(index = 0; index < (pos + len); index++) { if(index >= pos && index < (pos + len)) { out[index - pos] = str[index]; } } return out; } int main(int argc, char **argv) { char *foo = "nicht\n"; char *bar = substring(foo, 2, 3); printf("%s...

javascript - How do I properly show/hide elements after an AJAX call using jQuery? -

what i'm using requires 2 clicks each action: first click: logs nothing, nothing second: logs doesn't exist , element displays third: (2) exists , element doesn't toggle fourth: (5) exists , element toggles fifth: (9) exists , element doesn't toggle sixth: (14) exists , element toggles what's causing weird behavior? # views/articles/description.js.erb $(function() { return $("#link-<%= @article.id %>").on("click", function(e, data, status, xhr) { e.preventdefault(); var description = '<p class="article__description"><%= j @article.description %></p>'; if ($("#article-<%= @article.id %> .article__description").length) { console.log("exists"); $("#article-<%= @article.id %> .article__description").toggle(); } else { console.log("doesn't exist"); $("#article-<%= @ar...

connecting django app with python script in my LAN -

i have local script collects info tasks of printers in lan, , have django app holds general info work. thing want know how put info generated local script in django database hosted in pythonanywhere?. i use python 2.7 , django 1.8.4 registration-redux package. any useful? thanks

html - why does bootstrap carousel take margin on its left and right side automatically? -

Image
i trying make carousel full screen. means need carousel 100% wide literally. leaving place on left , right side. other elements working fine. here image: my code is: <div class="container-fluid"> <div id="mycarousel" class="carousel slide" data-ride="carousel"> <div class="carousel-inner" role="listbox"> <div class="item active"> <img src="images/slide-1.jpg" alt="" /> </div> <div class="item"> <img src="images/slide-2.jpg" alt="" /> </div> <div class="item"> <img src="images/slide-3.jpg" alt="" /> </div> </div> </div> <div style="width: 100%; height: 300px; background: #990000;">&nbs...

Why does Twitter Bootstrap 3.1.0 wastes horizontal space on wide screens? -

twitter bootstrap 3.1.0 comes rules waste horizontal space on wide screens. when remove them nothing seems break, breaking. know if break or why these included? thank you! @media (min-width: 768px) { .container { width: 750px; } } @media (min-width: 992px) { .container { width: 970px; } } @media (min-width: 1200px) { .container { width: 1170px; } } from why bootstrap 3 force container width sizes? , the official answer bootstrap folks: what boils down designing specific breakpoints easier (in mind) designing unlimited, unknown sizes. alternative mention isn't wrong or bad, different. i'd rather maintain tiers specific ranges bootstrap's grid system makes more feasible method. there shouldn't breaking if find other spacing issues continue digging, might reason.

android - How to click a button or checkbox on a HTML page and reload the page AUTOMATICALLY -

i make android function analyze web content , automatically click submit button , reload page updating. have on webview , find line of button. not know next. got ideas? try adding button js html file: <button onclick="myfunction()">reload page</button> <script> function myfunction() { location.reload(); } </script>

java - Failed to connect smtp server -

it showing following error :: exception in thread "main" java.lang.runtimeexception: javax.mail.messagingexception: not connect smtp host: localhost, port: 587, response: 421 @ sendmail.main(sendmail.java:54) caused by: javax.mail.messagingexception: not connect smtp host: localhost, port: 587, response: 421 @ com.sun.mail.smtp.smtptransport.openserver(smtptransport.java:2088) @ com.sun.mail.smtp.smtptransport.protocolconnect(smtptransport.java:699) @ javax.mail.service.connect(service.java:388) @ javax.mail.service.connect(service.java:246) @ javax.mail.service.connect(service.java:195) @ javax.mail.transport.send0(transport.java:254) @ javax.mail.transport.send(transport.java:124) @ sendmail.main(sendmail.java:49) java result: 1 build successful (total time: 2 seconds) and code is: `public class sendmail { public static void main(string[] args) throws exception{ final string smtp_host = "smt...

php - Laravel 5.2 could not open laravel.log -

Image
i know there lot of questions on topic issues weird that's why decided post. have error in /var/logs/apache/error.log [tue mar 01 07:26:51.435312 2016] [:error] [pid 8837] [client 127.0.0.1:37843] php fatal error: uncaught exception 'unexpectedvalueexception' message 'the stream or file "/var/www/personale/librarie-cor/storage/logs/laravel.log" not opened: failed open stream: permission denied' in /var/www/personale/librarie-cor/vendor/monolog/monolog/src/monolog/handler/streamhandler.php:87\nstack trace: \n#0 /var/www/personale/librarie-cor/vendor/monolog/monolog/src/monolog/handler/abstractprocessinghandler.php(37): monolog\\handler\\streamhandler->write(array) \n#1 /var/www/personale/librarie-cor/vendor/monolog/monolog/src/monolog/logger.php(289): monolog\\handler\\abstractprocessinghandler->handle(array) \n#2 /var/www/personale/librarie-cor/vendor/monolog/monolog/src/monolog/logger.php(565): monolog\\logger->addrecord(400, object(sym...

ruby - AzureOperationError in 'acquire_token' while using Azure::Arm for creation of resource group or virtual machine -

the following error face in authentication objects while creating resource group or new virtual machine azure-ruby-sdk. though used same authentication procedure reference github - https://github.com/azure/azure-sdk-for-ruby/tree/db80afe9220e0e72348ff152069ea2e33a455169/resource_management/azure_mgmt_compute . using proper tenantid, clientid , , client.

docker - Not able to connect to cassandra from host machine -

i have configured cassandra node on mac book pro using docker follows vboxmanage modifyvm "default" --natpf1 "tcp-port7191,tcp,,7191,,7191" vboxmanage modifyvm "default" --natpf1 "tcp-port7000,tcp,,7000,,7000" vboxmanage modifyvm "default" --natpf1 "tcp-port7001,tcp,,7001,,7001" vboxmanage modifyvm "default" --natpf1 "tcp-port9160,tcp,,7160,,7160" vboxmanage modifyvm "default" --natpf1 "tcp-port9042,tcp,,9042,,9042" (restart machine) docker run --name c1 -v /users/myprojects/scripts/:/script -d cassandra:latest -p "7191:7191" -p "7000:7000" -p "7001:7001" -p "9160:9160" -p "9042:9042" i can do docker exec -it c1 cqlsh it says connected test cluster @ 127.0.0.1:9042. [cqlsh 5.0.1 | cassandra 3.0.1 | cql spec 3.3.1 | native protocol v4] use help. now ip address of virtual box vm using docker-machine env default i can...

Math.random javascripts with php variable -

i use php variable in javascript. have , working fine: <?php $test = '"test1","test2",test3"'; ?> <script type="text/javascript"> var values = [<?php echo $test; ?>], valuetouse = values[math.floor(math.random() * values.length)]; alert(valuetouse); </script> however, if use values retrieved database, code not work. both variables contain same values , string type. <?php $test = 'test1,test2,test3'; ?> <script type="text/javascript"> var values = <?php echo $test; ?>; values=values.split(","); valuetouse = values[math.floor(math.random() * values.length)]; alert(valuetouse); </script> your problem test variable sting if call javascript split function on string turns , separated list javascript array

javascript - Adding values to object in js -

Image
so, have following js object structure: i trying add value this, example, "234324" after "ewerewr". i tried obj["d7vi"] = new_value; but gets rid of previous values. any help? make it obj["d7vi"].push(newvalue); you need add array rather replace existing values.

winforms - Change text position on Infragistics UltraCheckbox -

i'm using infragistics netadvantage winforms. default, text on checkbox appears right of checkbox. possible text display left of checkbox? cannot find property controls text position. the property need use called checkalign , should set 1 of these values: middleright topright bottomright

java - Is it possible use HashMultimap to create spring bean? -

xml: <bean id="mybean" class="com.google.common.collect.hashmultimap"> <constructor-arg index="0" value="200"/> <constructor-arg index="1" value="2"/> </bean> is correct? when try inject bean in like: <property name="mybean" ref="mybean"/> i received error: cannot apply property values null instance try this <bean id="mybean" factory-method="create" class="com.google.common.collect.hashmultimap"> <constructor-arg index="0" value="200" /> <constructor-arg index="1" value="2" /> </bean>

dataframe - R: Creating and saving a table to a data frame -

this such simple sounding problem, , yet can't find solution problem. have created table previous data.frame in order organize data differently (see below) section of dataframe1 below score pred 0.966 noise 0.95 noise 0.964 noise 0.924 call 0.838 noise 0.982 call 0.934 noise organizing data table using following: dataframe1_sorted <- with(dataframe1, table(score, pred)) this creates table following: want have count of how many "call"s , how many "noise"s there in each score category. score pred call noise 0 0 402 0 0.002 0 207 0 0.004 0 120 0 0.006 0 83 0 0.008 0 59 0 0.01 0 48 0 now, when try save table using df<-data.frame(dataframe1) , changes columns, , headings "score, pred, freq" . want save table dataframe is. what can do? try unclassing table: df<-data.frame(unclass(dataframe1)) i think that's looki...

python - Regex to split a sentence into simple English words -

i have sentence , wish extract words it. define word [a-za-z] word may contain apostrophe. apostrophe on own not word. programming python3. input text: don't-thread 0 '' ' 'on \r\nme! should give: don't thread on me with regard regex splitting. translate follows using python: don't -> dont thread -> thread on -> on me -> me more input: ''kay', said. 'what're goin' do?' regex split , python translation should give: ''kay' -> kay -> said -> said 'what're -> whatre -> goin' -> going -> -> here's use: \b(\s+)\b which matches lot more i'm interested in. update: words can begin apostrophe. such "get 'em!" you can try regex: [a-za-z]+(?:'[a-za-z]+)* which should work on regex engines. of groups can shortened depending on specifics of regex engine, that's more general reg...

Clojure Protocol Implementation not Found for Record Type in other namespace -

we having few issues records , protocols in different namespaces. we have protocol in namespace foo.proto. (ns foo.proto) (defprotocol proto (do-stuff [this x y])) i have record recorda in namespace foo.record: (ns foo.record (:require [foo.proto :as proto])) (defrecord recorda [bar]) ;; recorda implements protocol: (extend-type recorda proto/proto (do-stuff [this x y] (* x y (:bar this)))) this works fine long in repl. if on otherhand make uberjar , run code get: no implementation of method: :do-stuff of protocol: #'foo.proto/proto found class if on other hand implement protocol in type declaration so: (defrecord recorda [bar] proto/proto (do-stuff [this x y] (* x y (:bar this)))) we no longer error (which took time figure out). if move declaration of proto same ns recorda not error either. my questions: what difference between implementing in declaration , in extend-type or extend-protocol? why work if move record , protocol de...

apache pig - I would like to transform a map into a field in a Pig Latin script -

the description of tuples of relation (a) follows: {a: int, b: int, c: map[]} map contains 1 chararray key not predictable. example, sample of tuples is: (1, 100, [key.152#hello]) (8, 110, [key.3000#bonjour]) (5, 103, [key.1#hallo]) (5, 103, []) (8, 104, [key.11#buenosdias]) ... i transform relation (a) b relation b description be: {a: int, b: int, c: chararray} with sample, give: (1, 100, hello) (8, 110, bonjour) (5, 103, hallo) (8, 104, buenosdias) ... (i want filter empty maps too) any ideas? thank you. though writing udf right solution, if want hack quick following solution using regex might help. a = load 'sample.txt' (a:int, b:int, c:chararray); b = foreach generate a, b, flatten(strsplit(c, '#', 2)) (key:chararray, value:chararray); c = foreach b generate a, b, flatten(strsplit(value, ']', 2)) (value:chararray, ignore:chararray); d = filter c value not null; e = foreach d generate a, b, value; store e 'output/e'; ...

javascript - JQuery change event only fire when the page is not fully loaded and fail to fire when page is fully loaded -

my webpage uses quite number of jquery scripts, pre-populating location field based on input in state input field , using some of alert ensure on change event fires. noticed event fires while web page loading , not after page loaded. this url's : http://mmarket.vas2nets.com/request.php , http://mmarket.vas2nets.com/register.php am guessing there confliction in scripts, appreciated. note: please not mind long script, it's enable through @ it. <head> //load jquery script , test function. <script src='http://code.jquery.com/jquery-latest.min.js'></script> <script type='text/javascript'> $(document).ready(function(){ $("div.span3 #state").change(function(){ var data = $("div.span3 #state").serialize(); alert(data); $.ajax({ url : 'populatelocation.php', type : 'post', data : data, success:function(data){ $('#location').html(data)...

How do I pass data from c# to jquery/javascript? -

i have function i'd run when page loads, either in document.ready or pageload. using jquery, i'll trigger function using class name in document.ready var span = $('.linkify'); span.html(texttolinks(span.html())); elsewhere function texttolinks(text) { var exp = /(my text)/ig; return text.replace(exp, "<a class='link' href='http://www.bbc.co.uk' target='_blank' >$1</a>"); } now works simple test data, need work out how expand functionality. i have list of terms in c# app, along relevant url. i'm thinking of passing data string, , splitting in, javascript knowledge has lot of holes. so suppose have 3 questions: how string function when page loaded? is string right type or can pass other dictionary object? how iterate through each of terms passed efficiently? thanks in advance. @anand correct saying can use jquery ajax retrieve server-side data. however, depending on want do...

c - Why does this program gives no output for float and double datatypes? -

why program gives no output float , double datatypes. however, result when same code replaced loop?? # include <stdio.h> int main() { float x=1.1; while (x==1.1) { printf("%f\n",x); x=x-0.1; } return 0; } float x=1.1; while (x==1.1) float , double variables not capable of storing exact value of 1.1, close approximation. exact value in float , double different due difference in precision. 1.1 double value. storing 1.1 double float alter value. compare double value 1.1 not quite equal , never enter condition. for work need write 1.1f ensure working same data type everywhere. in addition i'm sure else explain why comparing floating point values exact equality bad idea.

internet explorer - JavaScript Compile Error -

i noticed strange thing when writing js code. compile error seems happen across multiple browsers (tested: chrome, ie, safari). in no hurry solution not figure out why code won't compile: function foobar1()//compiles { return { x: 0, y: 1 }; } function foobar2()//compiles { return {x: 0, y: 1}; } function foobar3()//compiles { return { x: 0 }; } function foobar4()//does not compile { return { x: 0, y: 1//uncaught syntaxerror: unexpected token : }; } this due javascript's automatic semicolon insertion "feature". i put word "feature" in quotes because it's -- it's frankly bit of disaster; 1 of worst design decisions know of in language. basically, js language designed have statements ending semi-colon, original language design made allowances coders forgo...

c++ - Template class name with <> mark -

template<int32_t id= 0, class id_type = int32_t> class event { public: typedef id_type type; typedef event<id, id_type> event_obj_type; ..... } about code, " event<id, id_type> " mean? class name <>, never seen before. enlighten me? thanks event template : pattern creating similar classes @ compile time. if @ places of code make : event<0, int32_t> a; event<3, char> a; two classes defined template. 1 id = 0, id_type = int32_t , other id = 3, id_type = char . [edit] if decompose first one, class definition : class event { public: typedef int32_t type; typedef event event_obj_type; ..... }

Pin several images at touch points - Android -

am trying place pins wherever user touches on imageview. assume map (like google maps) & user touches point, point a, , pin drawn @ point. then, user touches point b, pin (not same previous pin relocated!) needs drawn @ point b , on. right now, able draw pin @ point user touches on screen : @override public void ondraw(canvas canvas) { .... bitmap marker = bitmapfactory.decoderesource(getresources(), r.drawable.icon_locationmarker); canvas.drawbitmap(marker, mlasttouchx, mlasttouchy, null); .... canvas.restore(); } however, don't want relocate 1 pin across screen wherever user touches (which above code doing). want put several pins @ points wherever user touches. new android. please help. eluvatar right, needs create list store mark. here's sample of code. remember, add list when motionevent either action_up or action_down only. otherwise, there full of point. public arraylist<coordinate> pointslist; @override public void o...

excel - Is there away to call Multiple Items from single cell -

Image
i wondering if possible call out several items single cell? limited in space having 1 cell information great benefit. example if had single cell had "dog,2,5,8" program run program tell meant , run calculation? thank in advance. as @tim williams said, split() want. sub splitcell() dim teststring string teststring = cstr(range("a3").value) dim testarray() string testarray() = split(teststring, ", ") msgbox (testarray(0) & vbnewline & testarray(1) & vbnewline & testarray(2) & vbnewline & testarray(3)) end sub macro give message box: now can iterate through testarray() loop , logic. see msdn documentation here and here post

Android Studio can't find my device -

Image
when try compile on android studio got message: usb device not found my phone htc 1 x cyanogenmod 10.1.3-rc2 i have htc sync manager v2.1.77.0 installed when try connect htc computer didnt recognize phone the usb debug check when type adb devices got no device. in device manager on windows android usb devices recognize i have try adb kill-server adb start-server , adb devices didn't work someone have advice ? thanks lot. i found solution this, find id of device in device manager like usb\vid_xxxxpid_0cd6&rev_xxxx&mi_00 and add android_winsub.inf ( sdk\extras\google\usb_driver ) like this: [google.ntx86] ;your phone name %singleadbinterface% = usb_install, usb\vid_xxxxpid_xxxx&rev_xxxx&mi_00 %compositeadbinterface% = usb_install, usb\vid_xxxx&pid_xxxx&mi_00 [google.ntamd64] ;your phone name %singleadbinterface% = usb_install, usb\vid_xxxxpid_xxxx&rev_xxxx&mi_00 %compositeadbinterface% ...

css - how to select last element in the page? -

is there way select last appear of specific element css? this example: demo i tried last-child not want. used class: html: <ul> <li><span>test</span></li> <li> <span>test</span> <span>test</span> </li> </ul> <div> <span>test</span> <span>test</span> </div> <p> <span>test</span> <span>red</span> </p> css: span:last-child{ color:red; font-weight:bold; } i want last span "red" content red. how can css ? update: there solution last-of-type elements same parents. different parents ? try this: ( you should aware of parent wrapper element ) body > *:last-child > span:last-child{ color: red; } working fiddle

ios - Why can't I drag images? -

i working off of http://www.raywenderlich.com/33806/how-to-make-a-letterword-game-with-uikit-part-2 , , says in reference view add following implementation: int _xoffset, _yoffset; for initializer: self.userinteractionenabled = yes; it gives 3 methods implement handle dragging: #pragma mark - dragging tile -(void)touchesbegan:(nsset *)touches withevent:(uievent *)event { cgpoint pt = [[touches anyobject] locationinview:self.superview]; _xoffset = pt.x - self.center.x; _yoffset = pt.y - self.center.y; } -(void)touchesmoved:(nsset *)touches withevent:(uievent *)event { cgpoint pt = [[touches anyobject] locationinview:self.superview]; self.center = cgpointmake(pt.x - _xoffset, pt.y - _yoffset); } -(void)touchesended:(nsset *)touches withevent:(uievent *)event { [self touchesmoved:touches withevent:event]; } nothing seems happen, though, when touch 1 of images , try drag around. seems never move. there more work do; want specific based on dragge...

c# - Enterprise Pattern and Practise: configure Sql Azure transient fault Configuration -

i trying implement sql azure transient fault configuration in asp.net application. trying following: http://msdn.microsoft.com/en-us/library/hh680899(v=pandp.50).aspx though didn't find block on how can configure in config file. getting the type retrymanager not have accessible constructor. error in code. read in forum should configure using config file, how question. thanks. edit : using enterprise lib 5.0 here's sample configuration: <?xml version="1.0" encoding="utf-8"?> <configuration> <configsections> <section name="retrypolicyconfiguration" type="microsoft.practices.enterpriselibrary.windowsazure.transientfaulthandling.configuration.retrypolicyconfigurationsettings, microsoft.practices.enterpriselibrary.windowsazure.transientfaulthandling, version=5.1.1209.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="true" /> <section name="typeregist...

android - Why does one app launch faster than the other? -

i'm curious this. have app called gosms pro , app called contacts+ installed in phone. both popup alert notification when text message received. however, gosms pro beats contacts+'s popup. wondering how happening in programming perspective? there way give app more preference other. from security , permission side every app google play has similar privilege, if not signed certificate of device manufacturer. means none of app preference. some time app many type of checking/initialization/loading before showing ui , when type of things happens apps take longer period load or display ui. most common things people do creating , initializing database reading database. user validation (reading file) device state scanning(network) most common case database access. wonder if app reading content provider before showing ui might take long time depending on device hardware , number of contacts. key strategy showing ui right way , load data in background. andro...

ruby on rails - Twilio api asking for 'FROM' number each time -

using twilio ruby gem , i'm passing params 'to' , 'body' form view helper within :message , defaulted , set 'from' number within code, each time run , i'm getting: twilio::rest::requesterror in messagescontroller#create a 'from' phone number required. class messagescontroller < applicationcontroller (other methods in here well) def create user = user.find(params[:user_id]) @account_sid = '******' @auth_token = '**********' = '+1347*****' body = params[:message][:body] = params[:message][:to] = '+1347******' @client = twilio::rest::client.new(@account_sid, @auth_token) # sends sms message @client.account.sms.messages.create(body => :body, => :from, => :to) # saves form message in model message user.messages.create(body => :body, => :from, => :to) redirect_to '/' end your hashes seem backwards user.messages.create(body => :body, =...

css - jQuery UI addClass method not animating visibility? -

one of helpful features of jquery ui hijacking of jquery addclass method, adding animation support including second 'duration' parameter, so: $('div').addclass('someclass', 1000); for incoming css properties color , background-color , width , height etc, works fine. but transitions visibility:hidden -> visibility:visible , display:none -> display:block not gracefully fade in expect them to. wait until duration complete , appear when class added. i'm sure, in past, i've seen graceful transitions these css types in jquery ui. else know if is/has been possible? i'm aware of fadein , fadeout methods, along animate method, i'm looking give more precedence stylesheets, instead of having overload scripts style animation logic. i know css3 transitions well, i'm looking better-supported approach. display , visibility not have transitionable states - either on (you can see element) or off (you can't see ele...

AngularJS isolated scope variable in directive not being set -

i have directive looks this: return { restrict: 'a', replace: true, scope: { personid: '@', relationshipid: '@', relationshipcolumnsshown: '@', personcolumnsshown: '@' }, templateurl: 'app/views/communication/displaylist.html', controller: controller, require: ['$scope', 'communicationlogdataservice'] }; you can see there property called personid, setting in parent directive using above directive this <div data-display-communication-log="" data-personid="currentperson.id" data-relationship-columns-shown="true" data-person-columns-shown="false"> </div> you can see personid being set currentperson.id property parent directive. in child directive have watch setu...

android - What does 'stack' in fingerprint tell me? -

in android's fingerprint, information 'stack' part of fingerprint contains? 'backtrace' shows function app calls when crashes happen. 'stack' tell us? thank you. in example, have '5f10868c 40157f45 /system/lib/libc.so (free+12' in 'stack'. question if callilng 'free' in stack, why not showing in backtrack? i/debug ( 1405): build fingerprint: 'brcm/java/java:4.2.2/jdq39/523b73aa:eng/test-keys' i/debug ( 1405): revision: '0' i/debug ( 1405): pid: 3910, tid: 3932, name: thread-190 >>> com.mycompany.myapp <<< i/debug ( 1405): signal 11 (sigsegv), code 1 (segv_maperr), fault addr 0000000c d/java.hwcomposer( 1407): fbdevice::post called 32 times [0 0 2 6 19 1 0 0] d/java.hwcomposer( 1407): fbdevice::vsync called 60 times i/debug ( 1405): r0 00000000 r1 5faec3f8 r2 5faec400 r3 000018b0 i/debug ( 1405): r4 5de3a480 r5 5fb23880 r6 5f10871c r7 50f30490 i/debug ( 1405): ...

php - insert delete button of specific row from a database displayed in table -

hello have following code displaying database results, in 3th td of table insert delete button delete table record of data next button, should code in 3th td of tabe delete button ? <?php $con=mysqli_connect("localhost","table","password","database"); if (mysqli_connect_errno()) { echo "failed connect mysql: " . mysqli_connect_error(); } $result = mysqli_query($con,"select * recetas_galletas"); echo "<table border='1'> <tr> <th>title</th> <th>description</th> </tr>"; while($row = mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['title'] . "</td>"; echo "<td>" . $row['description'] . "</td>"; echo "<td>" . delete button "</td>"; echo "</tr>"; } echo "</table>...

c++ - parsing the structure and passing as a pointer argument -

i have structure struct ptc_configurationh20 { float period ; ptc_configurationh20probe probe[2] ; uint32_t padding ; }ptc_pack; struct ptc_configurationh20probe { uint32_t probeserialnumber; uint8_t probetype; uint8_t range; uint8_t mode; uint8_t padding1; ptc_h20pidparameters pid; uint32_t padding; }; i read above ptc_configurationh20 structure data as h20::ptc_configurationh20* tempconfiguration = reinterpret_cast<h20::ptc_configurationh20*>(message->getdata()); i need pass pointer object pid probe[0], function bool setpidconfiguration(uint8_t probenumber, const h20::ptc_h20pidparameters& calib, ptc_return* ret); please help i need pass pointer object pid probe[0], function given: h20::ptc_configurationh20* tempconfig; and given setpidconfiguration takes 2nd argument const reference ...

javascript - How to get screen resolution with node.js -

i need screen resolution node.js, following code don't work. var w = screen.width; var h = screen.height; this don't work. var w = window.screen.width; var h = window.screen.height; someone know how screen resolution node.js ? thank you. there screenres module via npm: https://www.npmjs.com/package/screenres currently os x only, author has instructions adding cross-platform support should inclined.

java - match_parent, fill_parent makes swipeview stop working -

so have been either webview or swipeview me while coding, can't both work @ same time. swipeview work webview doesn't show webpage. when set <android.support.v4.view.viewpager xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/pager" android:layout_width="match_parent" android:layout_height="match_parent"> <webview android:id="@+id/webview" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="0.9" /> </android.support.v4.view.viewpager> to <android.support.v4.view.viewpager xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/pager" android:layout_width="match_parent" android:layout_height="match_parent"> <webview android:id="@+id/webview" android:layout_width="match_parent" android:layout...