Posts

Showing posts from February, 2010

Eclipse RCP e4 + Tycho Maven + separate Target Platform -

Image
i have e4 rcp project, built tycho my projects consist of: aggregator, parent, product, rcp, , target - learnt in vogella tutorials the target platform points eclipse update sites, , it's loaded eclipse default platform. the app plugin based. don't want add feature nothing. the catch is, build of product fails because multi-platform plugins org.eclipse.core.filesystem.hpux.ia64_32 org.eclipse.swt.carbon.macosx org.eclipse.swt.motif.aix.ppc etc. missing. also, these plugins missing product file "contents" tab well. actually... missing start, when project created. shouldn't these grabbed target platform automatically? along 4.5, there's no delta pack anymore. there's update sites. how build multi-platform app? how choose want build windows? (ie other configs necessary other environments section in parent pom)

css3 - CSS: transition on ease-out not working -

i image effects on main page fade out on mouse-out on mouseover. i have changed all 1s ease; to: 1s ease-in-out; still not fading out on mouse-out jumps. site: http://wolf-photoart.witconsult.de/ here example of current css: #mainportraits img, #mainart img, #maincomics img { max-width: 56vw; } #mainportraits img:hover, #mainart img:hover, #maincomics img:hover{ -webkit-filter: grayscale(50%) contrast(1.2) blur(3px) brightness(0.8); -moz-filter: grayscale(50%) contrast(1.2) blur(3px) brightness(0.8); -o-filter: grayscale(50%) contrast(1.2) blur(3px) brightness(0.8); -ms-filter: grayscale(50%) contrast(1.2) blur(3px) brightness(0.8); filter: grayscale(50%) contrast(1.2) blur(3px) brightness(0.8); -webkit-transition: 1s ease-in-out; -moz-transition: 1s ease-in-out; -ms-transition: 1s ease-in-out; -o-transition: 1s ease-in-out; transition: 1s ease-in-out; } #mainportraits:after{ content: 'portraits'; z-index: 9999; -we

windows - Where can I get the latest libjingle? -

i latest version of libjingle source code (especially use on windows). google code stopped service. i found http://libjingle.googlecode.com/svn/trunk unfortunately code gone. checking out via git gives hint: libjingle has moved https://code.google.com/p/webrtc/ , can found here: https://code.google.com/p/webrtc/source/browse/#svn%2ftrunk%2ftalk but following link not show source code. who knows, can it? see here: http://webrtc.org/native-code/development/ -- actual git repository located @ https://chromium.googlesource.com/external/webrtc/ things have moved around quite bit recently.

css - Restricting certain elements from being printed -

Image
i trying print elements javascript. example, when link clicked open print dialog window. however, wish have elements of table not printed , headers on 1 line instead of breaking multiple lines. i want rid of edit , delete table cells , put table headers on 1 line. here current javascript code have in place: $('#print').on('click', function() { var content = document.getelementbyid("sample_editable_2"); var holderwindow = window.open(""); holderwindow.document.write(content.outerhtml); holderwindow.print(); holderwindow.close(); }); sorry if unclear, i've never attempted before. appreciate can given. edit: here css file @media print { .h_edit { display: none; } .h_delete { display: none; } .b_edit { display: none; } .b_delete { display: none; } .order-issue { white-space: nowrap; } .sub-shipping-issue { white

javascript - flot multiple line graph animation -

i have multiple series on graph , animate them not working. using flot , animator plugin. https://jsfiddle.net/shorif2000/l0vtrgc2/ var datasets = [{"label":"it","curvedlines":{"apply":true},"animator":{"start":0,"steps":7,"duration":3000,"direction":"right"},"idx":0,"data":[{"0":1433156400000,"1":"095.07"},{"0":1435748400000,"1":"097.80"},{"0":1438426800000,"1":"096.72"},{"0":1441105200000,"1":"097.62"},{"0":1443697200000,"1":"097.68"},{"0":1446379200000,"1":"098.49"},{"0":1448971200000,"1":"098.59"},{"0":1451649600000,"1":"098.69"}]},{"label":"network","curvedlines":{"apply":true},&q

ios - Appcelerator Bouncy Keyboard Toolbar Bug -

appcelerator bouncy keyboard toolbar bug hi trying find fix bouncy keyboard toolbar appcelerator here video of issue cannot find fix on various forums there animate set false fix didnt seem work. https://www.youtube.com/watch?v=cd95w1lvnxk&feature=youtu.be $.pinone.keyboardtoolbar = titanium.ui.ios.createtoolbar({ barcolor : alloy.globals.device.grey, tintcolor : "#fff", items : [cancelone, titanium.ui.createbutton({ systembutton : titanium.ui.iphone.systembutton.flexible_space }), doneone] }); any suggestions? watched video 3 times , i'm still not sure expecting or trying fix. not sure mean bouncy... maybe give better description of you're trying fix.

javascript - Creating multiple event listeners using a loop -

trying create multiple listeners loop. how make work? var buttons = ['one', 'two', 'tree']; $.each(keys, function(key, value) { $(value).click(function() { // }); }); also, there shortcut not writing key, value when need value? you better off putting delegated event listener on parent instead of iterating through every button. example, if place <button> elements inside of <div> id #container , can write listener this: $('#container').on('click', 'button', function() { // something; }); now, every time button element clicked within div, callback invoked. can use class selector in place of 'button' listen elements have class.

java - ComboBox Items via Scene Builder? -

<combobox fx:id="schaltung" layoutx="347.0" layouty="50.0" prefheight="63.0" prefwidth="213.0"> <items> <fxcollections fx:factory="observablearraylist"> <string fx:id="reihe" fx:value="reihenschaltung" /> <string fx:id="parallel" fx:value="parallelschaltung" /> </fxcollections> </items> </combobox> i added fxml file because couldnt figure out add items combobox in scenebuilder. possible add items via scenebuilder, or have manually? you can't add items combobox through scenebuilder. either can add through fxml file did or through controller given below. @override public void initialize(url location, resourcebundle resources) { combobox.getitems().removeall(combobox.getitems()); combobox.getitems().addall("option a

python - Using numpy's function loadtxt() to read a two column file then using polyfit() to return an array -

afile given file, , z degree of polynomial. been breaking head on while, frustrating how i'm given 0 instructions on how proceed. this thought should like: import numpy np def newfile(afile,z): x,y = np.loadtxt(afile) d= np.polyfit(x,y,z) return d i have attempted as data = np.loadtxt(afile) x = data[0:] by printing "data" i'm given format: [[ 2. 888.8425] [ 6. 888.975 ] [ 14. 888.1026] [ 17. 888.2071] [ 23. 886.0479] [ 26. 883.3316] [ 48. 877.04 ] [ 99. 854.3665]] by printing "x" in case gives me whole list (i'm thinking issue lies in lack of comma). in case i'd want x array of left column. i suppose getting error when unpacking in statement: x,y = np.loadtxt(afile) you should replace this: x, y = zip(*np.loadtxt(afile)) the rest should work

sql - How to get query to work with Declare @Lookup table -

i need following code work, however, giving me error @ last select statement. error receiving is: incorrect syntax near keyword 'select'. could please assist in resolving issue? thank you. declare @lookup table( id int identity(1, 1) , songtitle nvarchar(512) ) insert @lookup(songtitle) select * ( values('deuce') , ('strutter') , ('black_diamond') , ('parasite') , ('strange_ways') , ('rock_bottom') , ('god_of_thunder') , ('love_gun') , ('she') , ('i_stole_your_love') ) select albums.albumname , songs.songtitle , songs.writers , songs.vocals , songs.sid , songs.thetime albums inner join songs s on a.aid = s.aid inner join @lookup l on l.songtitle = s.songtitle order l.id you need provide alias derived tables insert @lookup(songtitle) select * (

ios - SpriteKit - How can I catch the event when the touch moves over a sprite, but didn't actually begin on the sprite -

in spritekit, want catch event when touch moves on sprite, hasn't started on sprite, on piece of skscene. i can catch touchesbegan inside skspritenode if touch starts on , dragged on it, not when touch started on node - b - , dragged on node - a. knows how catch one, because think doing wrong here. try this: sorry swift.. can same thing in obj c import spritekit class gamescene: skscene { let sprite = skspritenode(color: skcolor.redcolor(), size: cgsizemake(100, 100)) var startedoutsidesprite = true override init(size: cgsize) { super.init(size: size) sprite.position = cgpointmake(size.width/2, size.height/2) addchild(sprite) } override func touchesbegan(touches: set<uitouch>, withevent event: uievent?) { if let touch = touches.first { let location = touch.locationinnode(self) if !sprite.containspoint(location) { startedoutsidesprite = true } }

Embed XML in JSON POST to PHP-CURL -

i have requirement post rest call in following json formt. note payload variable xml. i'm using php 5 curl. looking i'm doing wrong. thanks { "processdefid":"testing~simpleapplication!1.0~simpleprocess", "servicename":"simpleprocess.service", "operation":"start", "payload":"<payload><formarg><p0:webform1 xmlns:p0=\"http://www.frevvo.com/schemas/_n5j6ibuoeewgf4k8gssana\"/></formarg></payload>", "action":"submit" } constructed following not getting response nor seeing actioned on called application. try { echo '<br>curl start<br>'; echo file_put_contents($log, "start \n", file_append); $curl = curl_init(); curl_setopt($curl, curlopt_url,"http://192.168.56.151:7003/bpm/api/3.0/processes"); curl_setopt($curl, curlopt_returntransfer, true); curl_setop

Python 3.5.1 - read multiple inputs into an array -

i'm using python 3.5.1 , running file through command prompt on windows. arguments being passed after program run; ie program prompts input based on generated list. i'm looking read in multiple numbers on same line separated spaces. python 2.x wouldn't have been issue raw_input proving challenge. selection = list(map(int,input("enter items archive (1 2 etc):").split(","))) if enter 2 different numbers on same line: enter items archive (1 2 etc):29 30 traceback (most recent call last): file "g:\learning\python\need_to_watch.py", line 15, in selection = list(map(int,input("enter items archive (1 2 etc):").split(","))) file "", line 1 29 30 ^ syntaxerror: unexpected eof while parsing i gave on single line , tried doing in loop different error data=[] while true: entry = int(input('item number : ')) data.append(entry) if entry == &#

linux - how to send a email with cron bash? -

hi far not send email cron, let me explain current problem : i have next bash script : # when script starts send email notification echo "subject: work completed > /tmp/msg echo "from: admin@automated" >> /tmp/msg echo >> /tmp/msg echo "the work has finished" >> /tmp/msg echo "some variables here ... " >> /tmp/msg sendmail mypersonalemail@gmail.com < /tmp/msg ## here script execute things ## , when finished send email notify this, , other email has more variables so when executed script manually works, mean send mail email account without issues, try automated task send automatically mail time cron, have comment cron works fine other scripts particularly looks cron not able send email , dont know why, investigating apparently specific problem :(. not needs cron automated task, other utility know :) my os ubuntu 14.04.03 lts other question here, know why "sendmail" not works in ubuntu 15.10 or how

javascript - AngularJS - CSS animations are only working one way -

i'm trying animate element height: 20px height: 0 , not working. however, transition 0 20 work. i'm using angular add/remove items array: angular.module('app', []) .controller('ctl', ctl); ctl.$inject = ['$timeout']; function ctl($timeout) { var self = this; self.newitemtext = ''; self.deleteitem = function(id) { self.items[id].class = 'hidden'; }; self.additem = function() { var newitem = { id: self.items.length, class: 'hidden', text: self.newitemtext }; self.items.push(newitem); self.items[self.items.length - 1].class = 'visible'; self.newitemtext = ''; } self.items = [{ id: 0, class: 'visible', text: 'one' }, { id: 1, class: 'visible', text: 'two' }, { id: 2, class: 'visible', text: 'three' }, { id: 3, clas

javascript - Bootstrap modal doesn't load properly -

Image
i'm creating website in asp.net (framework 4.0). a master page has required bootstrap files & jquery files added in it. files <link href="../assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <script src="../styles/js/jquery-1.11.2.min.js" type="text/javascript"></script> <script src="../styles/js/bootstrap.min.js" type="text/javascript"></script> bootstrap modal doesn't work on button click. on child page button click should work. child page code. (page1.aspx.cs) protected void button1_click(object sender, eventargs e) { lblmodal2.text = "please add item cart"; scriptmanager.registerstartupscript(page, page.gettype(), "warning","$('#warning').modal();", true); } child page (page1.aspx) bootstrap modal code follows. <div class="modal fade" id="warning" ta

jquery - multiple dynamic instances of form using python, javascript, or ajax -

i accomplish following within single webpage: prompt user enter amount of days. based on number enter, multiple instances of form created. if enter 5 days, there may 5 buttons appear , click on each button , fill each form , when done entering values hit submit when done of forms. i appreciate insight on best approach accomplishing this. i'm doing back-end code in python , using javascript front-end, , did reading , feel might accomplished ajax...that if understanding articles correctly. thank you.

gcc undefined reference with reference paths defined in makefile -

i learning gcc , have undefined reference errors when running make. using makefile did not create, while troubleshooting these undefined reference errors went through each line of makefile understand happening , try fix problem haven't been successful although did learn lot syntax used in makefile. here undefined reference output when using make: /usr/bin/arm-none-eabi-gcc -o0 -g -mcpu=cortex-m3 -mthumb -i/home/np/stmbook -i/home/np/stm32f10x_stdperiph_lib_v3.5.0/libraries/cmsis/cm3/devicesupport/st/stm32f10x -i/home/np/stm32f10x_stdperiph_lib_v3.5.0/libraries/cmsis/cm3/coresupport -i/home/np/stm32f10x_stdperiph_lib_v3.5.0/libraries/stm32f10x_stdperiph_driver/inc -i. -dstm32f10x_md_vl -duse_stdperiph_driver -duse_full_assert -i/home/np/stmbook/library/ff9/src -i/home/np/stmbook/library -t/home/np/stmbook/stm32f100.ld -mthumb -mcpu=cortex-m3 blinklight.c -o blinklight /usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol re

laravel - Pass array to the command bus -

i'm trying understand how use laravel 5.0 command bus, struggling right, i'm looking few questions: i'd dispatch array of memberids run through loop inside handle function of command. $members: array:2 [ 0 => "147" 1 => "148" ] this array sent this: $this->dispatch(new sendmail($members)); how access array in handle method of sendmail command? haven't found many examples, of them pass $command handler. public function handle($command) { //this doesn't work foreach($command->members $memberid){ $contractor = contractor::find($memberid); } do need return handler in order continue running other logic inside of original function? since trying inject $members array job's constructor method, need handle there. then you'll able use array in hanle method. // in job class protected $members; public function __construct($members) { $this->members = $members } public function handle (

c++ - how to parse component types of a member pointer non-type template argument -

in example code below class b has 3 template arguments. wonder if first 2 arguments can inferred third one, on opinion contains necessary information. right using macro, avoid tediously repeating same names multiple times in various combination. think there should better way. in main show ideally write. the goals class b are: 1) variable member pointer should explicitly non-type template argument of class 2) should work different classes (e.g. a1, a2) , member variables of different types. how can class b rewritten achieve goals above , allow defined 1 template argument? #include <iostream> struct a1 { int m_n; a1() : m_n(10) {} }; struct a2 { double m_x; a2() : m_x(2.1) {} }; #define xxx(cls, member) cls, decltype(cls::member), &cls::member // b have last template argument template <typename c, typename t, t c::*p> struct b { b(c& cls) : m_c(cls), m_v(cls.*p) {}; void set(t v) { m_v = v; } void save() { m_c.*p = m_v; }

ios - How To Make Splash Screen Sizes For iPad Using Objective C? -

Image
i trying create splash screen iphone , ipad programmatically. here below have added code using , output screen ipad2 simulators showing half screen. need make full screen size ipad devices. my code below: // device ipad , ipad mini running ios 3.2 or later. cgsize result = [[uiscreen mainscreen] bounds].size; if(result.height == 1024) { // ipad, ipad 2, ipad mini splashimage.frame = cgrectmake(0, 0, 768,result.height); [splashimage setimage:[uiimage imagenamed: @"default-portrait.png" ]]; activityindicator.frame=cgrectmake(145, 240, 30, 30); } if(result.height == 2048) { // ipad air, ipad mini retina splashimage.frame = cgrectmake(0, 0, 1536,result.height); [splashimage setimage:[uiimage imagenamed: @"default-portrait.png" ]]; activityindicator.frame=cgrectmake(145, 240, 30, 30); } ipad splash ipadimage-

mysql - Python MySQLdb variables as table names -

i have syntax error in python which stops mysqldb inserting database. sql insert below. cursor.execute("insert %s (description, url) values (%s, %s);", (table_name.encode("utf-8"), key.encode("utf-8"), data[key].encode("utf-8"))) i following error in stack trace. _mysql_exceptions.programmingerror: (1064, "you have error in sql syntax; check manual corresponds mariadb server version right syntax use near ''four' (description, url) values ('', 'http://imgur.com/a/v8sdh')' @ line 1") i appreciate assistance cannot figure out. edit: fixed following line: cursor.execute("insert " + table_name + " (description, url) values (%s, %s);", (key.encode("utf-8"), data[key].encode("utf-8"))) not sophisticated, hope use jumping off point. it looks sql statement: cursor.execute("insert %s (description, url) values (%s, %s);", (table_name

jsp - Sitemesh mapping multiple decorators won't work as expected -

i trying decorate page multiple decorators using sitemesh 3. problem occurs when add more pages, of pages gets decorated decorator leading not decorated page. here trying do: decorate / , /login 2 decorators decorate /welcome 2 different decorators the sitemesh3.xml far: <?xml version="1.0" encoding="utf-8"?> <sitemesh> <mapping> <path>/</path> <decorator>/decorator1.jsp</decorator> <decorator>/decorator1-2.jsp</decorator> </mapping> <mapping> <path>/login</path> <decorator>/decorator1.jsp</decorator> <decorator>/decorator1-2.jsp</decorator> </mapping> <mapping> <path>/welcome</path> <decorator>/decorator2.jsp</decorator> <decorator>/decorator2-2.jsp</decorator> </mapping> </sitemesh> the pro

Mongodb multiple date ranges -

i have collection below { "email" : "gg@gmail.com", "start" : isodate("2015-11-09t12:00:00.000-06:30") }, { "email" : "aa@gmail.com", "start" : isodate("2015-11-09t12:00:00.000-06:30") }, { "email" : "adjkj@gmail.com", "start" : isodate("2015-08-03t12:00:00.000-06:30") }, { "email" : "gg@gmail.com", "start" : isodate("2016-01-15t12:00:00.000-06:30") } i want fetch emails 90 days old today's date doesn't exists in last 30 days.so in above collection below 2 documents 90 days old { "email" : "gg@gmail.com", "start" : isodate("2015-11-09t12:00:00.000-06:30") } { "email" : "aa@gmail.com", "start" : isodate("2015-11-09t12:00:00.000-06:30") } however "email" : "gg@gmai

unable to parse the json in my java program -

i trying decode json objects multiple strings.i dont know how parse json object. here json string {"page_1":"{\"city\":\"bangalore\",\"locality\":\"battarahalli\",\"name_of_person\":\"xxx\",\"user_email_address\":\"xxx@gmail.com\",\"user_phone_number\":\"\",\"sub_locality\":\"\",\"street_name\":\"7th cross road, near reliance fresh, t.c palya,\",\"home_plot_no\":\"45\",\"pin_code\":\"560049\",\"project_society_build_name\":\"sunshine layout\",\"landmark_reference_1\":\"\",\"landmark_reference_2\":\"\",\"no_of_schools\":20,\"no_of_hospitals\":20,\"no_of_metro\":0,\"no_of_mall\":11,\"no_of_park\":10,\"distance_of_schools\":1.55,\"distance_of_hospitals\":2.29,\&

html - how can i make this menu display, like as per in the image using media query? -

Image
how can make menu display, per in image using media query this done codepen link <div class="container"> <div class="row"> <div class="col-md-12"> <div class="menu-tags"> <ul> <li><a href="#">all</a></li> <li><a href="#">starter</a></li> <li><a href="#">breakfast</a></li> <li><a href="#">lunch</a></li> <li><a href="#">dinner</a></li> <li><a href="#">deserts</a></li> </ul> </div> </div> </div> </div> make li display:inline-block; , add text-align:center ul .

linux - Setup central MySQL server for local environment -

we have group of developers , designers, want create single database server use better collaboration. running windows , linux machines. please give me suggestions how can build this. you can run mysql on either of types of machines. go mysql website , download installer. download mysqlworkbench setup after installation. should in short time.

sql - Xquery SUM after value has been rounded -

i want sum quantity of products/product/quantity after value has been rounded. my xml looks like: <products> <product> <externalid>116511</externalid> <price>2.99 </price> <quantity>1.500 </quantity> <netvalue>4.08 </netvalue> </product> <product> <externalid>116510</externalid> <price>2.99 </price> <quantity>1.500 </quantity> <netvalue>4.08 </netvalue> </product> <product> <externalid>116512</externalid> <price>1.99 </price> <quantity>10.000 </quantity> <netvalue>18.09 </netvalue> </product> <product> <externalid>329245</externalid> <price>59.99 </price> <quantity>1.000 </quantity> <netvalue>54.53 </netvalue> </product> </products> the above xml st

java - Why revision # different between show log and svn update? -

when take update on 1 svn folder shows latest revision @ update taken completed @ revision:116 but when show log on folder shows latest revision number 100 in history. my question why both revision numbers not in synch ? for information :- when execute below command see if there change b/w revision 100 , 116, see diff.txt created no content svn diff -r 100:116 > diff.txt subversion revisions global per repository log subtree of repo show revisions, affected subtree (and ignore outside tree) explanation example \branches>svn updating '.': ... updated revision 5. repository head r5 branches>svn log -q ------------------------------------------------------------------------ r2 | lazybadger | 2013-11-28 00:13:01 +0600 (Чт, 28 ноя 2013) ------------------------------------------------------------------------ r1 | www-data | 2013-11-27 18:13:32 +0600 (Ср, 27 ноя 2013) ----------------------------------------------------------------------

Running CRON jobs on Amazon ec2 -

another answer posted here said running cron jobs on ec2 (linux) same on 'nix server. i'm confused: how 1 manage cron jobs there multiple instances of application server? have thought there's kind of shared cron... reddis cron jobs. what 1 make sure 1 instance running cron jobs? i use ' rcron ' this. helps managing cron jobs in cluster of instances. instance execute job if it's active. relies on heartbeat or keepalived check whether other instances active or not. it's important go through principles section of rcron, doesn't lot of things might necessary. (like failure of job on 1 instance doesn't automatically start on other instance.) and yes, it's same group of linux machines , not ec2 instances.

asp.net web api - how to bind json data to DHTMLxgrid? -

i have return json wcf service list , json result in client. how can bind json dhtmlxgrid?how load dhtmlxgrid json data? mygrid.parse(data, "json"); here can find article available formats of json data can loaded grid: http://docs.dhtmlx.com/grid__data_formats.html#jsonformat

playframework - Slick orm for scala how can I retrieve a database column value -

i new slick orm using version 3.1.1 , in examples plain sql did not see how can retrieve value of database column http://slick.typesafe.com/doc/3.1.1/sql.html . simple example def listfollowing() = action.async { val selectq=sql"""select model,id carsdb id=17""".as[(string,int)] // value of model , put in var // var model= model database.run(selectq).map {finished=> // value of model , put in var // var model= model ok(finished.tostring()) } } how can value of column model so put in var or val ? when do: database.run(selectq).map {finished=> ... } finished vector[(string,int)] . if sure returns 1 row (because of "... id=17" ) can take headoption() , check if there value in (it none if there no record id 17) , if there -> return else return error. code this: def listfollowing() = action.async { val selectq = sql"""select model,id carsdb id=17""

python 2.7 - Customize Allure Report using pytest-allure-adaptor -

i want customize allure test report using pytest adaptor . e.g adding environment details on overview page. changing report name on overview screen. i tried adding environment details in conftest.py suggested in documentation, not work me def pytest_configure(config): allure.environment(test_server='testserver', report='my test report') i tried adding environment.properties in allure-report folder didn't work. please let me know if doing wrong here , how can resolve problem. better late never, said in documentation pytest_configure is called after command line options have been parsed , plugins , initial conftest files been loaded. each plugin has own pytest_configure method, , happens here pytest_configure of conftest.py called before pytest_configure of allure plugin. an easy fix ask pytest_configure executed late possible (preferable last one) adding @pytest.hookimpl(trylast=true) header. @pytest.hookimpl(trylast=true) def

php - CKEditor not displaying data in CakePHP -

i using ckeditor plugin in cakephp : $this->element('ckeditor', array( 'name' => 'body', 'description'=>$body, 'id' => 'description', 'width' => 628, 'height' => 250 )); but unable see content on page load. $instructiondetails['instruction']['body'] contains html data. tried static data , displaying in not html data. on changing language able see content since using: ckeditor.instances.description.setdata(data); in javascript change event. there way use setdata in $this->element('ckeditor') other params? you need tell ckeditor open in default mode. mode load @ editor startup depends on plugins loaded. default, "wysiwyg" , "source" modes available. use this ckeditor.config.startupmode = 'source' ckeditor.instances.config.startupmode = 'source' what open data source you.

android - Jsoup - extract html from element -

i want extract html code div element using jsoup html parser library. html code: <div class="entry-content"> <div class="entry-body"> <p><strong>text 1</strong></p> <p><strong> <a class="asset-img-link" href="http://example.com" style="display: inline;"><img alt="img_7519" class="asset asset-image at-xid-6a00d8341c648253ef01b7c8114e72970b img-responsive" src="http://example.com" style="width: 500px;" title="img_7519" /></a><br /></strong></p> <p><em>text 2</em> </p> </div> </div> extract part: string content = ... content of html above document doc = jsoup.parse(content); element el = doc.select("div.entry-body").first(); i want result el.html() whole html div tab entry-body: <p><strong>text 1</strong&g

c# - How to add test cases to microsoft test manager through program -

i have set of test cases in excel file. need import microsoft test manager through c# program/or scripting languages. searched web of answers pointing towards using "test case migrator plus". using test case migrator import test cases excel tfs (team foundation server) , not mtm. need done through program. can use test case migrator using c# program? or there way add test cases mtm? thank help. also, have checked posts similar upload test cases excel microsoft test manager 2013 , me, failed in addressing problem. you can use tfs api create test cases. here sample code blog post explains process. itestcase testcasecore = testmanagementteamproject.testcases.create(); currenttestcase = new testcase(testcasecore, sourcetestcase.itestsuitebase, testplan); currenttestcase.itestcase.area = sourcetestcase.area; currenttestcase.itestcase.title = sourcetestcase.title; currenttestcase.itestcase.priority = (int)sourcetestcase.priority;

c# - MongoDB - document is adding with luuid -

i have problem add document collection c#. i have model in program public class object { public guid id { get; set; } public long starttimestamp { get; set; } public long endtimestamp { get; set; } } and problem in database. documents saveing luuid no csuuid , cannot eg. find id try use string type c# object, serialization attribute: using mongodb.bson; using mongodb.bson.serialization.attributes; public class object { [bsonrepresentation(bsontype.objectid)] public string id { get; set; } public long starttimestamp { get; set; } public long endtimestamp { get; set; } }

Program gets terminated abruptly in Visual C++ -

whwenever try execute block of code abruptly shuts down if dont use getch() function. have tried different combinations of accepting , printing string gets() , puts() etc. question causes error , how can remove error? void main() { char str[100]; printf("enter string\n"); fgets(str,100,stdin); printf("%s",str); getch(); } void main() { char str[100]; printf("enter string\n"); fgets(str,100,stdin); printf("%s",str); getch(); } you have many problems small program. you using getch(); requires #include <conio.h> you using printf() family functions. requires #include <stdio.h> the function prototype main() has int main(void) in case in conclusion, fixed code: #include <stdio.h> #include <conio.h> int main(void) { char str[100]; printf("enter string\n"); fgets(str,100,stdin); printf("%s",str); getch(); return 0; } run cmd.exe command line wi

connect to mysql database using php on different port -

my connection string is: $connection = mysql_connect("localhost", "root", "") or die("could not connect db: ".mysql_error()); but on computer have installed iis server first localhost:80 reserved changed port 8080 changing httpd.conf file in apache folder. now should change in connection string connect database. using xampp . should tried writing these: 1: $connection = mysql_connect("localhost:8080", "root", "") or die("could not connect db: ".mysql_error()); 2: $connection = mysql_connect("localhost,8080", "root", "") or die("could not connect db: ".mysql_error()); but not working please. thank you default port number mysql server uses 3306 web servers default port 80 web server , mysql server independent. do not change api connect mysql

c# - Notification in Visual Studio -

i need troubleshoot project automatically when project built. i.e: have referred assemblies in project.i need refer assemblies in other part of project such web.config file. if missed reference there need notified visual studio while compilation. ways achieve this? how notify visual studio dynamically? take @ this article . in prebuild, can add script checks existence of file. if doesn't find it, call exit 1, halts build. accompany echo of sort , have makings of simple check , notification in visual studio during build.

Migrate SQL Server CE to Azure -

i have finished first complete orchard cms website, developed locally in sql server ce. want publish azure, having difficulty webmatrix migrate function. i have sql server instance in azure blank orchard database there (i want use replace option late in migration nuke existing db). have added ip server firewall rule. in webmatrix 3 can connect azure database using: server: myserver.database.windows.net database: orchard-db username: admin@myserver password: mypassword i can view tables in webmatrix. when select ce sdf file (orchard.sdf) , click migrate button , enter exact same details following (can provide full stack trace if needed): we unable connect using connection details provided. microsoft.sqlserver.management.common.connectionfailureexception: failed connect server . ---> system.data.sqlclient.sqlexception: network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible.

Why am i getting stackoverflow error in android-pageradapter? -

i want inflate 1 xml file , show in viewpager pages. lll logcat: fatal exception: main java.lang.stackoverflowerror @ android.graphics.drawable.bitmapdrawable.setalpha(bitmapdrawable.java:406) @ android.graphics.drawable.drawablecontainer.jumptocurrentstate(drawablecontainer.java:179) @ android.widget.compoundbutton.jumpdrawablestocurrentstate(compoundbutton.java:319) @ android.view.viewgroup.jumpdrawablestocurrentstate(viewgroup.java:5158) @ android.view.viewgroup.jumpdrawablestocurrentstate(viewgroup.java:5158) @ android.view.viewgroup.jumpdrawablestocurrentstate(viewgroup.ja

c++ - Runtime error while adding printf statement -

why giving runtime error while adding printf statement in last? , after removing printf statement, no error. #include <stdio.h> #define mod 1000000007 #define max 44721 int main() { long long int test, i, j, store[1000009], n, m, x, a[1000006]; scanf("%lld", &test); (i = 0; < 1000006; i++) { store[i] = 1ll; } a[0] = 1; (j = 1; j < 1000006; j++) { (i = 1; < max; i++) { if (i % 2 == 0) { store[i] = (store[i - 1] + store[i]) % mod; } } a[j] = store[max - 1]; } printf("%lld", a[1]); return 0; } first of should pick language c different c++. code c solution in c too. running code under valgrind cleary shows experiencing stack overflow. size of arrays on stack big. valgrind output: ==14228== invalid write of size 4 ==14228== @ 0x100000dc7: main (prova.c:6) ==14228== address 0x1038c062c on thread 1's stack ==14228=

android.view.InflateException: Binary XML file line #1: Error inflating class android.widget.GridLayout -

this error comes when running app. java.lang.runtimeexception: unable start activity componentinfo : android.view.inflateexception: binary xml file line #1: error inflating class android.widget.gridlayout <gridlayout 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:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" android:paddingbottom="@dimen/activity_vertical_margin" tools:context="com.example.ankur.shop.homeactivity" android:background="@drawable/gradient7"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content"