Posts

Showing posts from January, 2011

c++ - std::bad_alloc when inserting into std::unordered_map? -

i'm getting std::bad_alloc following code: typedef std::unordered_map<chash, block_extended_info> map_type; map_type m_foo; // transgressor: auto r = m_foo.insert(map_type::value_type(id, bei)); it happens of time while running test cases use method containing line, , other times doesn't. had changed code use m_foo[id] = bei , caused stop happening 1 compilation, when recompiled again failed, changed above, continued fail. issue deeper that. i sure it's not matter of running out of memory since have top running while test cases running , doesn't anywhere near filling memory. what may causing std::bad_alloc? in details of chash , block_extended_info may causing this? objects of types copied , passed around on place in other parts of code , doesn't cause issues. here's definition of chash : class chash { char data[32]; }; and following required define block_extended_info : class csignature { chash c, r; }; enum foob { /* ... ...

sublimetext2 - Replace characters by key binding in sublime text 2 -

how write key binding replace specific character one? for example want replace "[" , "]" empty string "". unfortunately, make custom key binding need write plugin in python finding , replacing, there no built-in commands doing so. however, want accomplished using find -> replace... dialog. make sure regular expressions button selected, put \[|\] in find what: box, , nothing in replace with: box (it's best put cursor in there , delete everything, in case there invisible characters such spaces or tabs there). hit replace replace characters 1 @ time, or replace all replace of them in 1 go.

java - Change property file located in src/test/resources -

i'm exploring apache common configuration , want make test read/write properties from/to xml file located in src/test/resources test. far, i'm reading no problems cannot write file. if change location of file scr/test/resources location in file system (example: c:/test), works fine. can please me ? edit here had tried far: @test public void test() throws configurationexception { //first data.xml located in src/test/resources xmlconfiguration config = new xmlconfiguration("data.xml"); list<object> rows = config.getlist("user.username"); system.out.println(rows); //this not working config.setproperty("user.username", "fromtest"); config.save(); // second data.xml in different location xmlconfiguration config = new xmlconfiguration("c:/temp/data.xml"); list<object> rows = config.getlist("user.username"); system.out.println(rows); //th...

r - Unwanted rows in data.frame -

i want write function checks number of files name id .csv , return number of rows no na s. here wrote: complete <- function(directory, id) { setwd(directory) my_list <- list.files(getwd(), pattern="*.csv", full.names=true) my_id <- numeric() my_output<-data.frame() my_count<-numeric() for(integer in id){ my_data <- read.csv(my_list[integer]) my_subset <- subset(my_data, sulfate !=0 & nitrate !=0) my_count[integer]<-length(my_subset[[1]]) my_id[integer] <- integer } my_output<-cbind(my_id, my_count) my_output } complete("/home/jpasquier/téléchargements/specdata", c(1,3)) but here result: > complete("/home/jpasquier/téléchargements/specdata", c(1,3)) my_id my_count [1,] 1 117 [2,] na na [3,] 3 243 so don't understand why there unwanted row numbe...

Replacing entire string when a single word is in the string R -

i wondering if had come across solution problem when cleaning data in r. idea have list of strings example: strings = c("hello world", "goodbye all", "help appreciated", "hello sam") then go through list of strings , whenever word found entire string replaced. therefore if looking word "hello" replaced "math" so output looking be: "math", "goodbye all", "help appreciated", "math". any or ideas appreciated. just use grepl : strings = c("hello world", "goodbye all", "help appreciated", "hello sam") > strings[grepl("hello",strings)] <- "math" > strings [1] "math" "goodbye all" "help appreciated" "math"

c# - Static field initialization order with partial classes -

is there way force static field initialization order in partial classes? let's in helloworld1.cs have: partial class helloworld { static readonly string[] = new[] { "hello world" }; } elsewhere in helloworld2.cs have: partial class helloworld { static readonly string b = a[0]; } if initialized before b fine if b initialized before throws an. healthy way use static constructor i'm curious if there's way force or predict initialization order when fields classes in different files of same partial class. when fields present in same file, textual order defines execution of initialization: 10.5.5.1 variable initializers - static field initialization the static field variable initializers of class correspond sequence of assignments executed in textual order in appear in class declaration . if static constructor (§10.12) exists in class, execution of static field initializers occurs prior executing static constructor. otherwise, static ...

php - Using Goutte with Symfony2 in Controller -

i'm trying scrape page , i'm not familiar php frameworks, i've been trying learn symfony2. have , running, , i'm trying use goutte. it's installed in vendor folder, , have bundle i'm using scraping project. question is, practice scraping controller ? , how? have searched forever , cannot figure out how use goutte bundle, since it's buried deep withing file structure. <?php namespace ontf\scraperbundle\controller; use symfony\bundle\frameworkbundle\controller\controller; use goutte\client; class thingcontroller extends controller { public function somethingaction($something) { $client = new client(); $crawler = $client->request('get', 'http://www.symfony.com/blog/'); echo $crawler->text(); return $this->render('scraperbundle:thing:index.html.twig'); // return $this->render('scraperbundle:thing:index.html.twig', array( // 'something' => $something // ...

c# - my class gives no value back that I can use -

this how try print worthwhile site using class, when try write class not find @ all. i can not find worth return worthwhile user. the problem can not find @ class. my class: public class abonnementsid { public int indhold { get; set; } } public abonnementsid hentabonnementsid() { abonnementsid abonnementsidreturn = new abonnementsid(); abonnementsidreturn.indhold = 0; sqlconnection conn1 = new sqlconnection(configurationmanager.connectionstrings["connectionstring"].tostring()); sqlcommand cmd1 = conn1.createcommand(); cmd1.connection = conn1; int brugerid = convert.toint32(httpcontext.current.session["id"]); cmd1.commandtext = @"select abonnementsid brugere id = @id"; cmd1.parameters.addwithvalue("@id", brugerid); conn1.open(); sqldatareader readerbrugera = cmd1.executereader(); if (readerbrugera.read()) { abonnementsidreturn.indhold = convert.toint32(readerbrugera["a...

memory - How are interfaces represented in Go? -

Image
i'm reading through 2 articles right , little confused. this article - http://blog.golang.org/laws-of-reflection says > var r io.reader tty, err := os.openfile("/dev/tty", os.o_rdwr, 0) if err != nil { return nil, err } r = tty r contains, schematically, (value, type) pair, (tty, *os.file). notice type *os.file implements methods other read; though interface value provides access read method, value inside carries type information value. this other article, says in terms of our example, itable stringer holding type binary lists methods used satisfy stringer, string: binary's other methods (get) make no appearance in itable. it feels these 2 in opposition. according second article, variable r in first extract should (tty, io.reader), static type of r. instead, article says *os.file type of tty. if second example right, diagram in first example should have of methods implemented binary type. where going wrong? the 2 ...

javascript - JQuery UI: Multiple sliders with different css for handles -

i have twelve sliders on single page , wish address handles individually use different colors. i'm using .each build sliders. //jquery sliders $(function() { $("#eq > span").each(function() { $( ).empty().slider({ orientation: "horizontal", animate: true, value: 10, min: 0, max: 10, step: 1, slide: function( event, ui ) { var val = $(this).attr('id'); weights[val] = ui.value; updatesvg(); if (typeof areaselected !== 'undefined') {showpiechart(areaselected); } } }); }); }); in html looks this. each span has id: <div id="eq"> <span id="sl11"></span> </div> however, don't think can use id change colors of slider itself. have found solutions ( http://jqueryui.com/demos/slider/#colorpicker ) each slider build individually , colors adjusted, n...

osx - Mouse pointer hard to see in Mac Terminal -

i use osx , prefer dark bg , light text in terminal. problem mouse pointer invisible. i shaped pointer, black extremely faint white glow. can't see pointer is. if terminal not have focus , i'm hovering mouse pointer on terminal window can see fine. once terminal has focus pointer practically disappears. please note, i'm asking mouse pointer not terminal keyboard cursor, customisable. holding down alt key on mac osx changes cursor black cross has white border makes far easier spot default text bar.

windows - Is there any reason to not use KEY_WOW64_64KEY? -

according microsoft key_wow64_64key , key_wow64_32key forces application operate on 64-bit or 32-bit registry, respectively. there risks using key_wow64_64key? if convert 32-bit application 64-bit in future, can rely on registry keys being in same place if user installs update. when should use 32-bit registry instead? guess if wanted support installing both 32-bit , 64-bit versions of application side-by-side, wouldn't want that. there 2 main reasons option: the first if upgrade application x86 x64; if don't explicitly pass registry in options (which older applications won't), x64 build won't able retrieve registry keys set x86 build. the second reading information system registry keys. there os information isn't exposed winapi , exists in 1 registry or other. if you're writing new application, it's not issue; can explicitly use 1 registry or other , not worry.

ember.js - Manipulating data from AJAX call in Ember js -

i'm new ember js , i'm having difficulty seeing why isn't working. i'm sending request server , giving me array. take array display contents. app.js app.testroute = ember.route.extend({ model: function(){ return app.test.findall(); } }); app.test = ember.object.extend(); app.test.reopenclass({ findall: function() { var dummyarray = []; $.ajax({ type: 'get', url: 'myurl', headers: {'myheader'}, success: function(data){ data.dummyarray.foreach(function (item){ dummyarray.push(app.test.create(item)); }); return dummyarray; }, error: function(request, textstatus, errorthrown){ alert(errorthrown); console.log(); } }); } }); when test page action should fire , array should returned model data can grabbed populat...

ios - Playing music from a SKAction -

i trying add background music game. have switch mute music , when tap again play music. code play music var backgroundmusic = skaction.playsoundfilenamed("background.wav", waitforcompletion: true) runaction(skaction.repeatactionforever(backgroundmusic), withkey: "music") i know waitforcompletion should set false stop music when tap switch. when have set false music doesn't play static sound. self.removeactionforkey("music") that code used stop music. wonder if can mute music until track finished or there way play music forever in spritekit. i recommend using objectal instead of spritekit background music. or here simple method use background music, borrowed skutils : -(avaudioplayer*)setupsound:(nsstring*)file volume:(float)volume{ nserror *error; nsurl *url = [[nsbundle mainbundle] urlforresource:file withextension:nil]; avaudioplayer *s = [[avaudioplayer alloc] initwithcontentsofurl:url error:&error]; s....

java - Android index php file does not register the user -

Image
i'm following this tutorial android hive on how create login , registration system using php , mysql; however, i'm having difficulties registering user. edit: problem whenever register button clicked returns "required tag missing" , not store data should. i have tried using advanced rest client extension google chrome, didn't provide me useful information. the index.php file contains functions storing , getting data of users database: <?php //this file has role fo accepting requests , giving json responses. // accepts post , requests if (isset($_post['tag']) && $_post['tag'] != ''){ //get tag $tag = $_post['tag']; //include database handler require_once 'login_api/db_functions.php'; $db = new db_functions(); //reponse array $response = array("tag" => $tag, "error" => false); //check tag type if ($tag == 'login'){ //r...

php - Using Guzzle to fetch xml simple_xml_load returns strange result - large file -

$res = $client->get( 'https://****', ['auth' => ['****', '****']] ); $statuscode = $res->getstatuscode(); // check res successful. if ($statuscode >= 200 && $statuscode < 300) { $xml = $res->xml(); //save feed file $xml->asxml('myfile.xml'); } //load contents of file again $xml = simplexml_load_file('myfile.xml'); file has xml in , 6mb pretty print r prints out only simplexmlelement object ( [@attributes] => array ( [generation-date] => 2015-03-16t23:56:26.972+01:00 [error-occurred] => false ) ) any idea problem is? $xml->children() nothing. the problem didn't include namespace when looped through e.g. doing foreach ($xml->children() $item){ //... } but needed do foreach ($xml->children('namespace-url-info-here') $item){ //... } the namespace info in root element of xml.

javascript - I am having trouble with a Js code for a parallax effect -

i trying make parallax effect landing page image stays still body paragraph below comes , on image. have works image still moves , white space shows on top. js: function scrollfooter(scrolly, heightfooter) { console.log(scrolly); console.log(heightfooter); if(scrolly >= heightfooter) { $('footer').css({ 'bottom' : '0px' }); } else { $('footer').css({ 'bottom' : '-' + heightfooter + 'px' }); } } $(window).load(function(){ var windowheight = $(window).height(), footerheight = $('footer').height(), heightdocument = (windowheight) + ($('').height()) + ($('footer').height()) - 20; $('#scroll-animate, #scroll-animate-main').css({ 'height' : heightdocument + 'px' }); thanks again help! $('header').css({ 'height' : windowheight + 'px', 'line-height' : windowheight + ...

sql - How to Truncate table in DB2? Error: Not a valid Command Line Processor command -

running following statement in db2 clp (command window) db2 "truncate table myschema.tablea immediate" db21034e command processed sql statement because not valid command line processor command. during sql processing returned: sql0969n there no message text corresponding sql error "-20356" in message file on workstation. error returned module "sqlnqbe2" original tokens "myschema.tablea". can please tell me i'm doing wrong or i'm missing? i'm trying truncate single table , i'm getting following error message. not sure i'm doing wrong. i've tried with/without quotes, with/without schema, with/without immediate. i've tried in command editor (remove db2 , quotes) , still not working. i'm using: db2/aix64 9.7.9 also, have delete privilege able delete records want truncate. thanks in advance! the version of db2 client you're using doesn't seem match of server, why cannot see actual er...

algorithm - Why the space complexity of heapsort is `O(1)` with a recursive heapify procedure? -

when reading space complexity of merge sort, got space complexity of o(n+logn) . o(logn) calculated when consider stack frame size of recursive procedures. but heapsort utilizes recursive procedure, heapify procedure. why space complexity of heapsort o(1) ? and code reading is ```java public class heapsort { public void buildheap(int array[]){ int length = array.length; int heapsize = length; int nonleaf = length / 2 - 1; for(int = nonleaf; i>=0;i--){ heapify(array,i,heapsize); } } public void heapify(int array[], int i,int heapsize){ int smallest = i; int left = 2*i+1; int right = 2*i+2; if(left<heapsize){ if(array[i]>array[left]){ smallest = left; } else smallest = i; } if(right<heapsize){ if(array[smallest]>array[right]){ smallest = right; } } if(smallest != i){ int temp; temp = array[i]; array[i] = array[sma...

c# - How to insert an XML collection to table from a single insert statement? -

i have table structure in sql server table-a aid int (pk)--> set autoincrement name varchar(200) table - b bid int pk --> not set auto increment aid int pk fk number1 int holographic decimal(16,2) the relationship between a , b 1 : m . c# app table-b data send xml following structure. <tableb> <record> <binid>23</binid> <number1>123</number1> <holographic>2345.12</holographic> </record> <record> <binid>3</binid> <number1>346233</number1> <holographic>12.345</holographic> </record> </tableb> in sql , first insert name record table-a , insert table-b . obtain aid must first insert table-a . there way save xml records @ once aid value? { because xml not have aid value in it} you can create stored procedure that. don't know how insert name first table, here's how sp can insert records: create procedure insertsomet...

javascript - Building web applications with tools that last -

i began web designer spend more , more time learning front end web development. enjoy javascript , work. interested in creating web applications unfortunately find javascript frameworks change quickly. began learning angular 1.3 find release of 2.0 kill interest. worry learning frameworks not skill developer framework user. makes me want develop modular vanilla. what recommendations have creating web applications problem in mind? appreciate comments. one of best things can learn developer find solution before creating one. yes, vanilla javascript surely has it's place, progress developer, want write own javascript. i got mean stack development, , can if try write of hand, if not expert, nightmare, if not impossible/impractical. i understand craving / desire, have it. start code , feel wizards when can conjure neat program build ourselves. have realize there little bit of reasoning behind utilizing frameworks, take perspective, taking mean stack example, right...

ruby on rails - jQuery how to loop a function after itself? -

i have done ton of googling can't seem find answer obvious question! i have 5 images stacked on top of eachother. using .fadeto(1000,0) fadeout 1st image in 1000ms , show 2nd underneath. fade out 2nd show 3rd, until reaches 5th. .fadein(0,1) images can repeat function. $(document).ready(function(){ setinterval(function (){ $('.map1').delay(1000).fadeto(1000, 0); $('.map2').delay(2000).fadeto(1000, 0); $('.map3').delay(3000).fadeto(1000, 0); $('.map4').delay(4000).fadeto(1000, 0); $('.map4').fadeto(0, 1); $('.map3').fadeto(0, 1); $('.map2').fadeto(0, 1); $('.map1').fadeto(0, 1); },5000) }); the problem slideshow/animation doesn't correctly loop in order! jump map1 map2 , map1, continue map3..etc know there better way this, far attempts @ .animate , .slideshow (plugin) have failed. can please me or...

html - Border table row not working before adding td in IE11 -

i trying make border around html table , both <tr> before adding <td> . border not working either <table> or <tr> . gives me problem in internet explorer 11. html: <table style="width:500px;height:250px;outline:1px solid black;position:absolute;"> <tr id="1" style='outline:thin solid black;'></tr> <tr id="2" style='outline:thin solid black;'></tr> <tr id="3" style='outline:thin solid black;'></tr> <tr id="4" style='outline:thin solid black;'></tr> </table> demo by default, there area number of rules associate various table elements . try using css change display type table rows, perhaps adding tr { display: table-cell; } css of fiddle or (as @surreal dreams suggests above), adding content rows display. if you're trying achieve sort of formal, grid-like display area, might better usin...

How to get date from sql server in user specified format -

i want date sql server in user specified format using getdate() function. if give query select getdate() then displating output date in format 2015-03-17 07:29:58.377 but want output . 2015-03-17 what statement should added query result. me problem. just use convert() : select convert(varchar(10), getdate(), 121)

java - How does Spring start this app? -

i'm parsing through inherited code of java app deployed war file in jboss, , uses spring, jms, , hornetq. i'm trying figure out, lack of better phrase, makes app "go". of spring examples i've seen include application main() method, imperatively acts on beans provided spring context in way. application has no main(). far can tell, what's happening: the war file's web.xml uses listener launch spring when application starts in jboss, , passes config file <listener> <listener-class>org.springframework.web.context.contextloaderlistener</listener-class> </listener> <context-param> <param-name>contextconfiglocation</param-name> <param-value>classpath:application-context.xml</param-value> </context-param> spring processes application-context.xml file, includes snippet: <bean id="jmscontainer" class="org.springframework.jms.listener.defaultmessagelistenerconta...

php - Lavarel REST API "Status 404 Not Found" -

currently have laravel rest api system running inside linux server running apache, php , remote database sql server. superiors asked me create same system instead using windows, iis, , php. i've followed installation instructions in net , arrived @ laravel 5 screen page. when transferred laravel files , installed in windows did not have error in process. imported .htaccess config iis. when made request api returning http status 404 error. here .htaccess file <ifmodule mod_rewrite.c> <ifmodule mod_negotiation.c> options -multiviews </ifmodule> rewriteengine on # redirect trailing slashes... rewriterule ^(.*)/$ /$1 [l,r=301] # handle front controller... rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^ index.php [l] </ifmodule> <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webserver> <directorybrowse...

Creating a bash script to compile a c++ -

i have program i've written in c++ outputs simulation results .csv excel file. according instructions need create simple bash script run .cpp file given command "$ run_program" ($ not part of command). i've looked on stackoverflow , other sites have not found concrete answer me. appreciate if answer can take time explain parameters mean. thank you. how should make bash script run c++ program? this 1 of links i've looked at, not make heads or tails out of this. i dont know command using compile c++ program might you. create file ".sh" extension , open favorite text editor. paste code (change compiling line line using compile progam) #!/bin/bash #run in terminal #+ command compile c++ program. here used common 1 g++ filename.cpp -o anyname exit 0 now need run script, open terminal chmod u+x scriptname.sh then run script ./scriptname.sh compile program.

Creating a shell script to traverse a file system and hash every file -

i need create shell script traverse entire file system, hash each file, , write text database. i doing on ubuntu 12.04 , using md5sum and, if being honest here, don't know begin. , appreciated! this may take time compute: find / -type f -exec md5sum {} + >my_database.md5 how works find find utility can traverse entire filesystems / this tells find start @ root of filesystem. -type f this tells find find regular files -exec md5sum {} + this tells find run md5sum on each of files found. >my_database.md5 this tells shell redirect output command file.

asp.net mvc - MVC AuthenticationManager.SignOut() is not signing out -

my project based on mvc 5 project template visual studio 2013 (individual user account option). have been relying on default sign in , sign out method users. i'm not sure did, @ point, users cannot sign out anymore, can sign in user. this default logoff method of account controller [httppost] [validateantiforgerytoken] public actionresult logoff() { authenticationmanager.signout(); return redirecttoaction("index", "home"); } private iauthenticationmanager authenticationmanager { { return httpcontext.getowincontext().authentication; } } this default _loginpartial.cshtml view shows user's username. @using microsoft.aspnet.identity @if (request.isauthenticated) { using (html.beginform("logoff", "account", formmethod.post, new { id = "logoutform", @class = "navbar-right" })) { @html.antifo...

php - CloudStorageTools::createUploadUrl redirecting to incorrect url on upload -

i have wordpress multi-site install running on gae, works great part. i want users upload files via front-end custom file handler @ {customdomain.com}/app/client/{client_id}/upload_profile_image/ (i'm using rewrite rules) this works on non-app-engine setup (apache/php) when using gcs uploader seem redirected main site domain @ url: {maindomain}/wp-signup.php?new= this code based on code wp google-app-engine plugin: $url = site_url('/app/client/' . $client->id . '/upload_profile_image/'); require_once 'google/appengine/api/cloud_storage/cloudstoragetools.php'; $options = [ 'gs_bucket_name' => get_option('appengine_uploads_bucket', ''), 'url_expiry_time_seconds' => 60 * 60 * 24, // 1 day maximum ]; $wp_maxupsize = wp_max_upload_size(); // set max_bytes_per_blob option if max upload size positive int if (is_int($wp_maxupsize) && $wp_maxupsize > 0) { ...

Universal image loader give error image can't be decoded android -

i use universal image loader in girdview. of videos fine change image , not work , give error that, 03-17 12:49:52.287: d/skia(21755): --- skimagedecoder::factory returned null 03-17 12:49:52.287: e/imageloader(21755): image can't decoded [file:////storage/sdcard0/movies/naruto episodes 55.mp4_270x270] here code in main class. displayimageoptions defaultoptions = new displayimageoptions.builder() .cacheondisc(true).cacheinmemory(true) .imagescaletype(imagescaletype.exactly) .displayer(new fadeinbitmapdisplayer(300)).build(); imageloaderconfiguration config = new imageloaderconfiguration.builder( getapplicationcontext()) .defaultdisplayimageoptions(defaultoptions) .memorycache(new weakmemorycache()) .disccachesize(100 * 1024 * 1024).build(); imageloader.getinstance().init(config); here code in adpater, string url = "/storage/sdcard0/movies/naruto episodes 55.mp4...

php - collect data from multiple tables with count and sum -

select sum(amount) amount , count(userid) total table1 userid='1111' union select sum(amount) amount, count(userid) total table2 userid='1111' union select sum(amount) amount, count(userid) total table3 userid='1111' union select sum(amount) amount, count(userid) total table4 userid='1111' union select sum(amount) amount, count(userid) total table5 userid='1111' i found somewhere not working me . proposed solution: the other option data tables separately , display . question: i want data multiple tables single query. amount added , userid counted tables. additional notes: should gather info user id = 1111 , save in 2 varibables. userid= 1111 , may not present in tables. expect out this: your total : $total | , amount : $amount based on suggestions. here have acheieved far , how trying display it. displays nothing without errors: if use single query, results displayed fine. <?php $sqltotal=mysql_query("...

java - Implementing multiple JOINS in HQL -

i'm trying implement hql query. i've been able implement in sql - i'm little more familiar with. keep getting hung on inner joins. the classes implemented this... class item class component extends item private item parentitem; class assembly extends item so far, have hql... select item.blah, comp.blah, assembly.blah component comp left outer join comp.parentitem item, assembly assembly item.parentitem = assembly this works - except need last 3 lines left outer join rather mutually exclusive condition. i've tried implement in number of ways - keep running mapping problems. <hibernate-mapping> <class lazy="false" name="com.kcp.common.domain.inventory.item" table="w_inv_inv_item" where="deleted=0"> <joined-subclass lazy="false" name="com.kcp.common.domain.inventory.component" table="w_inv_inv_component"> <key> <colu...

android - Error: Error parsing XML: unbound prefix in XML -

i trying use cardview in project, while creating xml file cardview, keep getting error error: error parsing xml: unbound prefix but if take out cardview widget, works. looked @ other questions , tried responses isn't working. see wrong code? <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" > <android.support.v7.widget.cardview android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="8dp" card_view:cardcornerradius="2dp" > </android.support.v7.widget.cardview> </linearlayout> <?xml version="1.0...

Opening the unused port & system call open("/dev/tty", ...) writev(7, [{"*** glibc detected *** ", 23} -

i using linux platform (3.12.13 & 2.6.35.3),& imx5x series processor. in program using 2 serial port read write operation /dev/ttymxc2 & /dev/ttymxc1 .after duration /dev/tty open system call executes not part of program & error comes open("/dev/tty", ...) writev(7, [{" * glibc detected * ", 23}. please suggest solution ,the port not using in code still system call executed open /dev/tty/ . these strace log . open("/dev/ttymxc2", o_rdwr|o_noctty|o_nonblock) = 4 nanosleep({0, 200000000}, null) = 0 ioctl(4, tcflsh, 0x2) = 0 ioctl(4, sndctl_tmr_timebase or sndrv_timer_ioctl_next_device or tcgets, {b9600 opost -isig -icanon -echo ...}) = 0 ioctl(4, sndctl_tmr_start or sndrv_timer_ioctl_tread or tcsets, {b9600 opost -isig -icanon -echo ...}) = 0 open("/dev/ttymxc0", o_rdwr|o_nonblock) = 5 ioctl(5, sndctl_tmr_timebase or sndrv_timer_ioctl_next_device or tcgets, {b115200 opost -isig -icanon -echo ......

javascript - When step am I missing from moving a premade code from Codepen into my Brackets project? -

here codepen i'm trying working: http://codepen.io/bounasser-abdelwahab/pen/ruiky here head of index.html file in brackets project: <head> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> <link type="text/css" rel="stylesheet" href="css/style.css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> </head> when try run this, runs 90% correctly, it's not complete match. menu misaligned, , can see bullet points weren't there before, , padding wrong. how can complete replication of codepen code own project? edit: here image of how mine coming out: http://i.imgur.com/f3o0yqf.png edit 2: here modified html. problem persisting. <!doctype...

angularjs - asynchronous script timeout -

i new protractor & using protractor-net. getting "asynchronous script timeout: result not received in 0 seconds" exception when running protractor-net scripts. https://github.com/bbaia/protractor-net does mean parameter passing identify angular element wrong? found solution solve - https://github.com/angular/protractor/issues/117 how achieve same in protractor-net? you need set async timeout increase timeout if don't want 0 , wherever driver instantiated. it particularly essential due nature of angular's asynchronous behavior. [setup] public void setup() { //driver = new phantomjsdriver(); driver = new chromedriver(); //setscripttimeout asysn script timeout driver.manage().timeouts().setscripttimeout(timespan.fromseconds(5)); } see this

angularjs - Expanding tiles layout using Angular in responsive layout -

i'm developing angular single-page app responsive layout. current page i'm working on uses tile-based layout auto wraps tiles next row. html below and, in responsive layout, can show 1, 2, or 3 tiles per row depending on width of row (it positions them using floats). <div class="tiled_panel"> <div class="tile_1">...</div> <div class="tile_2">...</div> <div class="tile_3">...</div> <div class="tile_4">...</div> <div class="tile_5">...</div> ... </div> now each tile given "learn more" button. design calls block expand between row of selected tile , row below . block full width of row , closed when user closes or clicks on different learn more button. my first thought arrange html below using ng-if hide or display expander divs can't figure out css needed have display between rows. <div class="...