Posts

Showing posts from April, 2012

javascript - How to print the pop up window content with the main content -

i want print content of page. contain popup. need display pop window content in main page contain button name details. when click button pop show. when click print button.only show main content. particular field pop displaying window blank (details button) i'm using window.print(); print button=> 'onclick="printpage()"' function function printpage() { $('#hiddendiv').html($('#view_popup_descriptive_index').html()); $('#hiddendiv').show(); window.print(); $('#hiddendiv').hide(); } any method display popup content. you may try appending html popup page before printing. $("#print").on('click', function(){ //find html var $popupcontent = $('.popup').html(); //console.log($popupcontent); //see popup //create div before button , put popup content there $(this).before($('<div />', { 'class': 'created', 'html

java - Why are some @Enable* annotations picked up without @Configuration? -

i have following classes in different packages: @enablewebmvc public class actuatorconfig { // empty // needed rest can hit actuator endpoints } @component // remove line? @enablebatchprocessing public class batchconfig { // empty } @component @configuration public class schedulejob { @autowired private jobbuilderfactory jobbuilder; @bean protected jobexecutionlistener schedulejoblistener() { return new schedulejoblistener(); } } (edit: added application class) @springbootapplication public class afxapplication { public static void main(string[] args) { springapplication.run(afxapplication.class, args); } } the first class turns on actuator features. don't need other annotations. however, if remove @component batchconfig noted above, boot won't start because can't find dependency on jobbuilderfactory needs in order populate @autowired schedulejob.jobbuilder. the exception: caused by: org.sp

python 2.7 - How to get a clean result when scraping a data from website using scrapy -

i new in python , trying scrape data yellow pages. able scrape messed result. this result got: 2013-03-24 20:26:47+0800 [scrapy] info: scrapy 0.14.4 started (bot: eyp) 2013-03-24 20:26:47+0800 [scrapy] debug: enabled extensions: logstats, telnetconsole, closespider, webservice, corestats, memoryusage, spiderstate 2013-03-24 20:26:47+0800 [scrapy] debug: enabled downloader middlewares: httpauthmiddleware, downloadtimeoutmiddleware, useragentmiddleware, retrymiddleware,defaultheadersmiddleware, redirectmiddleware, cookiesmiddleware, httpcompressionmiddleware, chunkedtransfermiddleware, downloaderstats 2013-03-24 20:26:47+0800 [scrapy] debug: enabled spider middlewares: httperrormiddleware, offsitemiddleware, referermiddleware, urllengthmiddleware, depthmiddleware 2013-03-24 20:26:47+0800 [scrapy] debug: enabled item pipelines: 2013-03-24 20:26:47+0800 [eyp] info: spider opened 2013-03-24 20:26:47+0800 [eyp] info: crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)

mysql - sql query to modify the selected value from database -

i have table number(int value). if want add or subtract value, how should proceed? ex: value 30. want subtract 7 make 23. should query like? update table1 set numberfield = numberfield - 7 if numberfield 30, numberfield = 30 - 7, difference new value of field

running the cmd commands from node.js program -

i want run command "node main.js project1" js file used child_process.exec(command[, options][, callback]) function. worked out successfully.now want run 2 commands "node main.js project1" , "node main.js project2" 1 after other using function. tried following code first command runs.please me in doing so for(var i=0;i<2;i++) { if(i==0) { var exec = require('child_process').exec, child; child = exec('node main.js project1', function (error, stdout, stderr) { console.log('stdout: ' + stdout); //console.log('stderr: ' + stderr); if (error !== null) { console.log('exec error: ' + error); } }); } if(i==1) { var exec = require('child_process').exec, child; child = exec('node main.js project2', function (error, stdout, stderr) { console.log(

roslyn - 'Expected Global Line.' exception while loading solution -

iworkspace workspace = workspace.loadsolution(solutionpath); var documents = workspace.getprojectby(projectname); getting exception in 1st line. checked link [ 'expected global line.' exception while loading solution using roslyn ]. didnt me. have latest code analysis dll , no space issue in solution path. please me finding missing here. you using old nuget packages before renamed them. latest packages named microsoft.codeanalysis should not have bug.

php - result of while loop showing differently -

Image
in first page of site user suppose see categories, under each category there sub-categories. fetching these categories , sub-categoires database. there 2 tables in database called "category" , "subcategory" , have tried merge these 2 tables. ouput should this but getting ouput here code <?php $host="localhost"; $user="root"; $pass=""; $db="doc"; $conn=mysqli_connect($host,$user,$pass,$db); $show=mysqli_query($conn,"select distinct a.id, a.category_name, b.subcat_name, b.cat_name category a, subcategory b a.category_name = b.cat_name"); ?> <html lang="en"> <head> <title>home</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4

c# - UI Scrollbar Scroll Sensitivity For Mouse Wheel Scroll -

Image
i trying adjust scrollbar scroll speed because slow. found on web. don't know how use it. ui.scrollrect.scrollsensitivity i trying create text contains information (like what's new in unity 5.3? ) i think know problem, , hope solution it. you trying set value of ui.scrollrect.scrollsensitivity without instance of scrollrect object. to set sensitivity need instance of , set this: public scrollrect scroll; void start() { scroll.scrollsensitivity = 27f; } also can set directly inpsector:

Awk: What wrong with CJK characters? #Korean -

given .txt files space-separated words such as: but esope holly bastard 생 지 옥 이 군 지 옥 이 지 옥 지 我 是 你 的 爸 爸 ! 爸 爸 ! ! ! 你 不 會 的 ! and the awk function : cat /pathway/to/your/file.txt | tr ' ' '\n' | sort | uniq -c | awk '{print $2" "$1}' i following output in console invalid korean words (valid english , chinese space-separated words) 생 16 bastard 1 2 esope 1 holly 1 2 1 2 不 1 你 2 我 1 是 1 會 1 爸 4 的 2 how works korean words ? note: have 300.000 lines , near 2 millions words. edit: used answer: $ awk '{a[$1]++}end{for(k in a)print a[k],k}' rs=" |\n" myfile.txt | sort > myfileout.txt a single awk script can handle , far more efficient current pipeline: $ awk '{a[$1]++}end{for(k in a)print k,a[k]}' rs=" |\n" file 옥 3 bastard 1 ! 5 爸 4 군 1 지 4 2 會 1 你 2 1 是 1 不 1 이 2 esope 1 的 2 holly 1 2 생 1 我 1 2 if want store results file can use redirection like: $ awk '{a[$1]++}end{for

html - Does using pixels for the root font size discard user preferences? -

i want use rem font-size, user can have scalable font-size paragraphs through browser settings. chose fontsize=10px root, easy coversion of photoshop font-sizes. using pixels root font size discard user preferences? have set root element in percentage oder in pixels? html { font-size: font-size: 10px;; } p { font-size: 1.2rem; /* 12px } does using pixels root font size discard user preferences? yes, discards base font size preference specifically. font size still affected browser zoom, separate thing entirely. browsers ship default preferred font size of 16px. if want base font size 10px, still allow scaling based on user's preferred font size, can set root font size 62.5%.

html - IE mobile only uses half of the screen -

so, when testing project on windows phone stumbled across problem have not seen yet, neither know how gets there nor how fix it. image of problem here so problem specify has use 100% of width , height. that, overflow hidden there never scroll bar. now when @ page in portrait mode, not use 100% of screen @ all. (see image) then when rotate mobile see landscape view, stays same size zoomed in. causes there scroll bar since page larger height of mobile. page still not full width of browser. i can not reproduce problem in edge's emulator. neither have problem in other browser. add head section <meta name="viewport" content="width=device-width, initial-scale=1">

python - Openstack - Nova client - Retrieve servers for particular tenant -

i need list of servers available particular tenant. that consider tenant_id of tenant follows: ee13ef5e10644f3782179bbfac1cdab5 now need server available particular tenant. i have tried code follows: i unable result. it showing me empty list when tried same. from novaclient import client import json kwargs = { "tenant_name":'admin', "auth_url":'http://127.0.0.1:5000/v2.0', "username":'admin', "password":'password', } # establish connection keystone keystone = client.client('2', 'admin', 'sop52maw', 'admin', 'http://127.0.0.1:5000/v2.0') server_list = keystone.servers.list(search_opts={'tenant_id':'ee13ef5e10644f3782179bbfac1cdab5'}) print server_list someone have , guide me sort 1 out. by default nova returns instances associated tenant makes call, , in case admin tenant. inform nova return instances tenants ca

java - How do I Iterate Tree data? -

Image
i have data structure like when query data base using list<textualreq> textualreqlist = session.createquery("from textualreq parent null").list(); here textualreq object @id @generatedvalue( generator = "increment" ) @genericgenerator( name = "increment", strategy = "increment" ) @column(name="id") private int id; @manytoone @joincolumn(name="parent") private textualreq parent; @onetomany( mappedby = "parent", cascade = cascadetype.all, fetch = fetchtype.eager ) @column(name="children") private set<textualreq> children = new hashset<textualreq>(); @column(name="data") private string data; i 2 records in "textualreqlist". needs iterate , show data i think should it! public void displaydata(){ display(n

python - numpy ValueError shapes not aligned -

so trying adapt neural network michael nielson's http://neuralnetworksanddeeplearning.com/chap1.html i modified network.py work on python 3 , made small script test few 15x10 pictures of digits. import os import numpy np network import network pil import image black = 0 white = 255 cdir = "cells" cells = [] cell in os.listdir(cdir): img = image.open(os.path.join(cdir,cell)) number = cell.split(".")[0][-1] pixels = img.load() pdata = [] x in range(img.width): y in range(img.height): pdata.append(1 if pixels[x,y] == white else 0) cells.append((np.array(pdata), int(number))) net = network([150,30,10]) net.sgd(cells,100,1,3.0,cells) however have error: file "network.py", line 117, in backprop nabla_w[-l] = np.dot(delta, activations[-l-1].transpose()) valueerror: shapes (30,30) , (150,) not aligned: 30 (dim 1) != 150 (dim 0) i tried boolean , without problem, seems issue numpy on py

Transpose table in different sheet in excel -

Image
i have 3 sheet in ms. excel. example sheet sheet b, , sheet c. in sheet have table can input 1 or o. in sheet b input conditional formatting formula ='sheet a'!i548=1, if in sheet cell i548 have value 1 cell input formula have green color, else if input of cell i548 o cell in sheet b fill grey color using formula ='sheet a'!i548=o. in sheet c want transpose table in sheet b, table did not transpose, , cell green fill , grey fill did not appear. how solve problem? sheet b sheet c as far can see it, table in sheet b ranges column column h. if case, use =transpose() function in excel. note range select inside brackets array. example, transpose row "r" sheet b sheet c, following: since there 8 columns in table in sheet b, select 8 rows cell in sheet c (for example, select range "b27:b34") press "=" sign , type (without quotes): "transpose(" once opened bracket, see prompt, saying choose array. array in case &qu

java - Where I can find the system out prints in RCP Product? -

i have rcp application, inside have added system.out.println() statements. now, have exported project product, can please tell me these system.out.println() output? since not using logger framework, output not printed default workspace/.metadata/.log file. you can start product console though, adding following parameters productname.ini (e.g. eclipse.ini) file in installation directory: -console -consolelog the ini file should this: -startup plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417 -console -consolelog the output printed in console window. edit if error message after starting application: could not find bundle: org.eclipse.equinox.console you need add following bundles productname.product file ('contents' tab) , export new product: org.eclipse.equinox.console org.apache.felix.gogo.runtime org.apache.felix.gogo.command org.

node.js - Meteor SEO render and subscriptions -

i'm working on seo of web application using meteor. on website during subscription data use template show loading circle. when use googlebot view how google indexes page, able see layout , loading circle. i notice, when circle appear, browser icon loaded. it's if googlebot doesn't wait subscriptions in template. i have no problem subscription in iron-router. anyone has informations ? ps : use spiderable package , think it's problem reactiv var notice subscriptions ready.

css - Styling Atom Text Editor -

so i've opened atom stylesheets named : styles.less , made changes stylesheet looks : tree-view { background-color: #101; } // style background , foreground colors on atom-text-editor-element atom-text-editor { color: white; background-color: #101; } // style other content in text editor's shadow dom, use ::shadow expression atom-text-editor::shadow .cursor { border-color: red; } i'm trying change colour of panels @ top , maybe few other things. there anyway can find out class / id names elements in atom me style? one way open atom's developer tools. on osx -> view - developer - toggle developer tools where can inspect elements , find need. also see how make developer tools appear?

javascript - How to access header information on node js? -

how can read cookie on node js ?? var socket = require( 'socket.io' ); var express = require('express'); var app = express(); var server = require('http').createserver(app); var io = socket.listen( server ); var port = process.env.port || 8000; var mysql = require('mysql'); function parsecookies (request) { var list = {}, rc = request.headers.cookie; rc && rc.split(';').foreach(function( cookie ) { var parts = cookie.split('='); list[parts.shift().trim()] = decodeuri(parts.join('=')); }); return list; } http.createserver(function (request, response) { // read cookie var user_id= cookies.realtimeid; console.log(user_id); }); server.listen(port, function () { console.log('server listening @ port %d', port); var cookies = parsecookies(); console.log(cookies); }); i new on node , socket. have read cookie value set codeignter.

php - Action is not executed -

guys creating auth module , inside authcontroller have 3 methods: 1. loginaction() 2. autheticateaction() 3. logoutaction() problem when submit form autheticate() method not executed : $form->setattribute('action', $this->url('login/process',array('action' => 'authenticate', ))); the exception says 'i must have view action': zend\view\renderer\phprenderer::render: unable render template "auth/auth/authenticate"; resolver not resolve file i need method process submiting data!!! inside loginaction() return form , messages render , autheticationaction processing data: public function loginaction() { //if login, redirect success page if ($this->getauthservice()->hasidentity()){ return $this->redirect()->toroute('success'); } $form = $this->getform(); return array( 'form' => $form, 'messages' =>

android xml parsing of sub to subtag and store in hashmap -

hello new xml parsing i have 1 xml this <tagmain> <type>this data</type> <sucesscodde>0</sucesscodde> <sucesscoddemessage>success</sucesscoddemessage> <anothersubtag> <entry> <number>1234567</number> <mobileno>12345555555</mobileno> <total>1.00</total> <transactionstatus>success</transactionstatus> </entry> <entry> <number>234555</number> <mobileno>17777777</mobileno> <total>1.00</total> <transactionstatus>success</transactionstatus> </entry> </anothersubtag> </tagmain> i have parse public hashmap<string, string> parse(final element e) { hashmap<string, string> responsemap = new hashmap<string, stri

Rails import database on heroku -

i trying import database computer heroku keep on saying unknown command that.even confuse command use .i have postgre sql database.i want know how import database push source_database remote_target_database remote_target_database must empty. source_database must either name of database existing on localhost or qualified url of remote databas remote_target_database ??? , need specify full path source database ? try following. heroku pg:push your_app_name_development database_url

vba - Excel - activating a previous workbook after leaving it -

i working on current workbook in excel. in vba, have done following : sheets("upload file").select cells.select selection.copy workbooks.add selection.pastespecial paste:=xlpastevalues, operation:=xlnone, skipblanks _ :=false, transpose:=false so now, "book1" new workbook. once i've done need on there, need activate original workbook, 1 have vba etc. i close "book1" : activewindow.close but in next sub in process, can't call of sheets within active workbook : sheets("upload file").range("a1:ab65536").clearcontents as "subscript out of range" error due workbook "upload file" sits in not being activated again. thank taking time @ this. the best way deal work object model: declare objects workbooks need keep track of , assign workbooks them. such objects don't depend on what's "active" or "selected". example: dim wkboriginal excel.workbook dim wkbne

windows store apps - How to change VisualState Setter property via code in C#? -

i have following visualstate setter properties in uwp app. <visualstatemanager.visualstategroups> <visualstategroup x:name="visualstategroup"> <visualstate x:name="desktop"> <visualstate.statetriggers> <adaptivetrigger minwindowwidth="800" /> </visualstate.statetriggers> <visualstate.setters> <setter target="desktopads.visibility" value="visible" /> <setter target="desktopads.(grid.row)" value="0" /> <setter target="desktopads.(grid.column)" value="4" /> <setter target="desktopads.(grid.columnspan)" value="1" /> <setter target="mainscrollviewer.(grid.row)" value="0" /> <set

mod jk - Setting up Apache mod_jk in ssl VirtualHost -

i'm having problems moving apache mod_jk configuration form own virtualhost configuration main ssl virtualhost configuration. tomcat working ok using own domain using mod_jk , virtualhost configuration - working config.... loadmodule jk_module /etc/httpd/modules/mod_jk.so jkworkersfile /etc/httpd/conf.d/workers.properties jkshmfile /var/log/httpd/mod_jk.shm jklogfile /var/log/httpd/mod_jk.log jkloglevel info jklogstampformat "[%a %b %d %h:%m:%s %y] " <virtualhost *:80> servername <my cname> documentroot /opt/appserver/webapps/root directoryindex index_page.jsp <directory /> options followsymlinks allowoverride none </directory> <directory /opt/appserver/webapps/root> allowoverride none options followsymlinks order allow,deny allow </directory> jkmount /* ajp13 </virtualhost>

java - Transparent Eclipse Splash Screen in Deployable Feature -

i want customize splash screen of eclipse deployable feature installed. i not want export rcp - deployable feature . setting splashscreen-image works fine, long file called "splash.bmp" within "product"-plugin (where i'm trying handle branding stuff). unfortunately, bmp file format not support transparency. i went through lots of examples , documentations, without success yet. possible?

php - Merging flat array with itself to build a multidimensional array recursively -

trying multidimensional array flat data available raw data this raw data ist available me. need build multidimensional array children stored within respective parents. array ( [index] => array ( [slug] => index [parent_slug] => ) [praxis-und-team] => array ( [slug] => praxis-und-team [parent_slug] => ) [leistungen] => array ( [slug] => leistungen [parent_slug] => praxis-und-team ) [partner-und-netzwerk] => array ( [slug] => partner-und-netzwerk [parent_slug] => ) [notfall] => array ( [slug] => notfall [parent_slug] => ) [impressum] => array ( [slug] => impressum [parent_slug] => leistungen ) ) needed data it's slug/parent_slug pairing. there might more sublevels , has recursive until parent_slug == '' reached @ topmost level. output sho

php - Doctrine returns different responses array/object -

Image
i have 2 doctrine queries so: fetchbookrepository: public function fetchbook($id) { try { $book = $this->em->getrepository('booksapibookbundle:booksentity') ->find($id); var_dump($book);die(); } catch (\exception $ex) { $this->em->close(); throw new queryexception('003', 502); } return $book; } fetchallbooksrepository: public function allbooks() { try { $book = $this->em->getrepository('booksapibookbundle:booksentity') ->findall(); var_dump($book);die(); } catch (\exception $ex) { $this->em->close(); throw new queryexception('003', 502); } return $book; } they both work expected, when closely investigate data returned noticed fetchbookrepository returns object , fetchallbooksrepository returns array of objects. why happening return depend on , there way standardise return...?

Create json in python for Openrefine -

Image
i'm scraping resources in python , want make json file, using in openrefine clean data. here's code: import json import codecs = xpath b = xpath c = xpath d = xpath codecs.open('info2.json', 'a', 'utf-8-sig') f: json.dump({'a': a, 'b': b, 'c': c, 'd': d}, f, sort_keys=true, indent=4, ensure_ascii=false) it's right until i'll upload file in openrefine: can't click on right node, on specific element. here's example: i think there's error producing json python, tryed putting 2 {{}} gives me "dict" error, tryed putting elements arrays nothing worked. as request, here part of json: p.s. i'm using codecs because there non-latin characters to make node selectable in openrefine import need enclose array in node - e.g. { "distribution": [ "jhu", "123" ], "immagine": { "immaginelist": [ &qu

php - How to install composer on app service? -

Image
i new using microsoft azure. application requires composer installed on server, how can have installed on system of app services service? application in php. you can install composer extension in manage portal of app services. login on azure account @ https://portal.azure.com click "tools" button, select "extensions" bar in list on right. click "add" button, open extension list allowed install in app services. can choose "composer" there. after installing, can install visual studio online extension or leverage kudu console site handle or run commands of apps.

sql - Formulating a query for people not in a relationship -

i have model users can play multiple games (many many), , each user can in 1 or many teams (many many). each team associated particular game. i'd extract people not in particular team particular game e.g. not in team 2, , can play game 5 the model looks like... player id player_game player_id game_id game game_id team id game_id team_player team_id player_id i've played around sql 1/2 day now, , not getting anywhere fast. appreciated. using example have given, use following statement; select p.id , pg.game_id , tp.team_id player p inner join player_game pg on p.id = pg.player_id inner join team_player tp on p.id = tp.player_id tp.team_id != 2 --!= donates not equal change team id strip out teams out of search , pg.game_id null --if player not in game value not set i have made couple of assumptions in regards model, if person not in game game id value null. if incorrect solution not work th

node.js - find according to refferenced objectid -

i have schema: var scheme = schema({ name: { type: string, required: true }, deleted: { type: boolean, default: false }, user: { type: objectid, ref: 'user' }, created: {type: date, default: date.now}, modified: {type: date, default: date.now}, eventinfo: { type: string, required: false }, street: { type: string, required: false }, city: { type: string, required: false }, country: { type: string, required: false }, postalcode: { type: string, required: false }, usecurrentlocation: { type: boolean, required: false }, schedule_agenda_html: { type: string, required: false }, gspsetup_html: { type: string, required: false }, evdropboxstat: { type: boolean, required: false }, evsponsors_html: { type: string, required: false }, evexhibitors_html: { type: string, required: false }, floorplan_html: { type: string, required: false }, social_media_fb: { type: string, required: false }, s

css - Select the after pseudo element of the li first child -

i attempting target first list item's pseudo element ":after". of other li's have dropdowns , have little arrow after text. there way target pseudo of pseudo? resort becuase it's wordpress menu , i'm unsure of how add class specific li. far have tried: #menu-primary-menu>li>a:first-child:after{ //some css } thanks in advance advice! not long after posting figured out. had target first li (li:first-child) , after element of link (a:after) , path required was: #menu-primary-menu li:first-child a:after apologies asking question , answering myself. i'm going leave here in case else stumbles accross.

c++ - Why is this object considered an rvalue? -

why object i'm passing classa 's constructor considered rvalue (temporary)? i'm aware setting parameter const make error go away want understand what's going on. this behavior works fine function call not constructor? #include <iostream> using namespace std; class classa { public: classa() {} classa(classa&) {} }; void f(classa&) {} int main() { classa a; // invalid initialization of non-const reference of type 'classa&' // rvalue of type 'classa' classa b = classa(a); // works fine f(a); return 0; } the rvalue here classa(a) expression. classa b = classa(a); that copy-initialization, attempt call copy constructor of classa result of classa(a) , rvalue. have declared copy constructor take classa& , can't bind rvalues, error. the best fix is, point out, add const copy constructor can bind rvalues, use direct-initialization, or copy-initialization without type conversio

javascript - Change background image on hover with AngularJS -

i have scope of 's background images, can't figure out how make them change. tried several variants, none of them has passed. here's code: <div ng-controller="maincontroller" class="main"> <div ng-repeat="land in lands" class="col-md-9" ng-style="{ 'background-image': 'url({{ land.cover }})'}"> <p>{{ land.name }}</p> </div> </div> javascript: app.controller('maincontroller', ['$scope', function($scope) { $scope.lands = [ { cover: 'img/norway.jpg', cover1: 'img/norway1.jpg', name: 'norway' }, { cover: 'img/sweden.jpg', cover1: 'img/sweden1.jpg', name: 'sweden' }, { cover: 'img/denmark.jpg', name: 'danmark' }, {

c++ - Wrong coverage data for unit tests of a library -

i want test complex shared library (cxsc) of cmake. after lot of trial , error managed create html coverage report lines test, boost testing framework, still red. this script use create coverage report: rm -fr build_coverage mkdir build_coverage cd build_coverage cmake \ -dcmake_build_type=coverage \ .. make cd ../tests make clean make cd ../build_coverage make cxsc_coverage the cmake part coverage report gets created: # cleanup lcov command ${lcov_path} --zerocounters --directory ${cmake_current_source_dir}/build_coverage/cmakefiles/cxsc.dir/src command ${lcov_path} --capture --initial --no-external --directory ${cmake_current_source_dir}/build_coverage/cmakefiles/cxsc.dir/src --output-file ${_outputname}.before # run tests command ld_library_path=${cmake_current_source_dir}/build_coverage ${_testrunner} ${argv3} # capturing lcov counters , generating report command ${lcov_path} --capture --no-checksum --no-external --directory ${cmake_current_source_dir}/build_c

javascript - Meteor.js Summernote editor. Reading data from a database MongoDB -

i installed "summernote: summernote" in "mpowaga:autoform-summernote". data entered in editor summernote writes in collection of data using "simpleschema "in form: content: { type: string, label: "treść wydarzenia", autoform: { affieldinput: { type: 'summernote', class: 'editor', placeholder: 'please add content...', settings:{ height: 150 } } } }, this example given in database: "content" : "<div>beginning autoform 4.0, there advanced support input types, including ability add custom input types (aka form controls or \"widgets\"). input type definition small template containing markup plus function tells autoform how obtain input value template.</div><div><br></div><div>by default, autoform still automatically selects appropriate input type based o

javascript - nested transition end events -

i'm trying several css transitions after 1 another. thing is, inner event listener fire when first transition ends, not wait assigned event run. have capturing? can't figure out what's reason behavior. //do somehting on elem1 triggers css transitionend elem1.addeventlistener("transitionend", function() { //do on elem2 elem2.addeventlistener("transitionend", function (){ //do }); }); to give example: want pop element sizing transition , then, completion, fade in content object transition.

jquery - SVG Path detection from a file -

i have following html 5 code ... <!doctype html> <html> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script> <style type="text/css"> path#selection{ fill: black; } path#selection:hover{ fill:blue; } </style> </head> <body> <object data="america" type="image/svg+xml" id="test"></object> </body> </html> the svg file i'm using exported gimp ... <?xml version="1.0" encoding="utf-8" standalone="no"?> <!doctype svg public "-//w3c//dtd svg 20010904//en" "http://www.w3.org/tr/2001/rec-svg-20010904/dtd/svg10.dtd"> <svg xmlns="http://www.w3.org/2000/svg" width="38.2361in" height="19.4444in" viewbox="0 0 2753 1400"> <path id="selection" fill="black" stroke="black

linker - How does referencing work when have two .c files with global variables of same symbols but different types? -

c say have following c modules: module 1 #include <stdio.h> int x; int main(){ foo(); printf("%i\n",x); return 0; } module 2 double x; void foo(){ x = 3.14; } my question is: linker in case? in textbook i'm reading says compiler chooses 1 of 2 weak global variables linker symbol table. of these 2 chosen? or both chosen? if so, why? thanks. c says undefined behavior. (c99, 6.9p5) "if identifier declared external linkage used in expression (other part of operand of sizeof operator result integer constant), somewhere in entire program there shall 1 external definition identifier; otherwise, there shall no more one" being undefined behavior means linker can abort linking process in presence of multiple external object definitions. now linkers nice (or evil , can choose) , have default extensions handle multiple external object definitions , not fail in cases. if using gcc , ld binutils, you'll error if 2 objec

ios - Why UIPageController on clear color returns black? -

i want change uipagecontroller background color , next: let appearance = uipagecontrol.appearance() appearance.backgroundcolor = uicolor.clearcolor() but returns me black color. how can make transparent?

Simple, intuitive, Git-ish way to back up a Git stash? -

i making changes on branch aren't ready commit yet. need work on else while, i've stashed them. question: want stash changes in case machine dies. what's least painful way this? found the second answer question , looks bit frightening. right i'm thinking of adding temporary commit called 'work in progress' branch , pushing it. after finishing work, i'll roll temporary commits, erase history, , proper atomic tested commits. keeps safe. but, it's horrible. is there simple, intuitive, safe git way solve problem?

c - I do not understand this stu[en-11] line of code. How exactly does accessing a structure member work? -

#include<stdio.h> #include<conio.h> struct student { int enroll; char name[50]; }stu[2] = { {11, "rj"}, {12, "ay"} }; int main() { int en; printf("enter enroll: "); scanf("%d", &en); if(en==11 || en==12) { printf("%s", stu[en-11].name); printf("\t%d", stu[en-11].enroll); } else printf("wrong"); return 0; } stu[2] array of structure should use loop accessing each members of structure, or stu[0].name , stu[1].name , in code below can access members using stu[en-11] . please help. how work? the correct index stu in case 0 , 1. so, en value has either 11 or 12 valid access. you'll needing or operator || instead of , operator && . change if(en==11 && en==12) to if(en==11 || en==12) coming stu[en-11] part, you've asked, index value has int , , expre

ElasticSearch: How can I get all child objects of different types using parent/child inner hits -

i have problem "inner hits" feature. can 1 type of child objects, because i have specify type of child objects query. for example, can parent objects , "childa" objects using following code { "query": { "has_child": { "type": "childa", "query": { "match_all": {} }, "inner_hits": {} } } } is possible childa , childb objects simultaneously? you can combine multiple has_child queries inner_hits using bool query. example, if wanted find parents had either "childa" or "childb" , return children have (whether childa or childb or both), this: "query": { "bool": { "should": [ { "has_child": { "type": "childa", "query": { "match_all": {} }, "inner_hits": {}

angularjs - How to configure redirects Glassfish4 Maven Webapp -

i developing webapp using glassfish 4. have rest backend, developed in java using jersey, , angularjs frontend. contained in maven jersey-quickstart-webapp. now, problem have when people query url app: http://localhost:8080/myapp/ it works fine, , sends appropriate index.html user. however, if user types url 'should' handled apps routing, like: http://localhost:8080/myapp/search it gives 404 error. however, url can reached within in app if start /myapp/ route, because index.html served angularjs stuff able understand , control routing. essentially problem face need set appropriate redirects necessary places should return index.html. so, when hit of following urls should send user index.html, , let angularjs figure out routing eg. http://localhost:8080/myapp/search ----> index.html http://localhost:8080/myapp/results ----> index.html http://localhost:8080/myapp/browse ----> index.html unfortunately, being thick here, don't know how confi

asynchronous - C Glib GIO - How to list files asynchronously -

i creating simple file viewer using gtk, , want load new directory asynchronously, prevent hanging whole program while loading. in gio api there g_file_enumerator_next_files_async function, allows asynchronously load files in blocks. how can tell, when directory listing finished? here code sample of i'm came with: static void add_file_callback(gobject *direnum, gasyncresult *result, gpointer user_data){ gerror *error = null; glist *file_list = g_file_enumerator_next_files_finish( g_file_enumerator(direnum), result, &error); if( file_list == null ){ g_critical("unable add files list, error: %s", error->message); } glist *next; gfileinfo *info; gtktreeiter iter; dirlist *list = (dirlist*)user_data; while(file_list){ ...add file list } } int read_dir(const gchar *path, dirlist *list){ g_assert(list != null && list-

boolean - How to query mysql without a table? -

i wonder if can simple boolean check mysql. mean can like select date(`2013-03-25 01:22:26`) = curdate() to return true or false? or php equivalent of case work, want learn this. using mysql such goal unnecessary ? just remove where clause , use single quote around date. select date('2013-03-25 01:22:26') = curdate() sqlfiddle demo

json - MongoDb get only value but not key using php -

i using mongodb , query returns key value following format of var_dump <pre>array (size=471) 0 => array (size=1) 'sno' => string '162230' (length=6) 1 => array (size=1) 'sno' => string '165333' (length=6) 2 => array (size=1) 'sno' => string '181312' (length=6) 3 => array (size=1) 'sno' => string '181313' (length=6) 4 => array (size=1) 'sno' => string '181314' (length=6) 5 => array (size=1) 'sno' => string '181315' (length=6) 6 => array (size=1) 'sno' => string '181316' (length=6) 7 => array (size=1) 'sno' => string '181317' (length=6) 8 => array (size=1) 'sno' => string '181318' (length=6) 9 => array (size=1) 'sno' => string '181319

python - Screen resizing pygame -

i trying resize game menu stuck. trying scale size of screen menu has when click on new game. have idea on how fix since cant find else. import pygame import runpy import webbrowser, os game import * pygame.init() class option: hovered = false def __init__(self, text, pos): self.text = text self.pos = pos self.set_rect() self.draw() def draw(self): self.set_rend() screen.blit(self.rend, self.rect,) def set_rend(self): self.rend = menu_font.render(self.text, true, self.get_color()) def get_color(self): if self.hovered: return (255,255,255) else: return (100,100,100) def set_rect(self): self.set_rend() self.rect = self.rend.get_rect() self.rect.topleft = self.pos def onselect(self): if self.text == "quit": pygame.quit() quit() if self.text == "instructions":

javascript - jquery - Click event not working for dynamically created button within a table -

i have looked though historic answers question nothing seems working me when button clicked on page , div box becomes visible , table added $('#newparentitem').click(function() { innertable = "<table width='90%' bgcolor='#cccccc' align='center' >" innertable += "<tr height='12px'> " innertable += "<td width='2%'></td> " innertable += "<td width='68%' style='text-align:center' > <input type='text' name='item' placeholder='main item name' size='12'> </td> " innertable += "<td width='30%'> <button type='button' id='newparentsubmit' value='generate new element' >enter </button> </td> " innertable += "</tr> </table>" displayunidiv(160,200,50,200) // display div box $('#unidivhead').html("add new m