Posts

Showing posts from August, 2014

HTML ul li width not correct -

HTML ul li width not correct - i trying create drop-down-menu , having problems width of links out of box... check out http://jsfiddle.net/v4cgn/ you can this: http://jsfiddle.net/v4cgn/8/ add together overflow:hidden; #popupbox html html-lists anchor

javascript - Next step for learning asp.net after read book beginning asp.net 4 -

javascript - Next step for learning asp.net after read book beginning asp.net 4 - i'm started larn asp.net , untill finish book origin asp.net 4, should read ? (css - jquery - javascript - ajax - ...) i suggest pick problem give focus (something little such to-do list application) , start writing code. doing highlight gaps have giving basis more research. while webforms 'easy' , handles much of http stack you, agree ed r going downwards asp.net mvc 3 route. javascript jquery asp.net css ajax

java - Android: CountDownTimer skips last onTick()! -

java - Android: CountDownTimer skips last onTick()! - code: public class smh extends activity { public void oncreate(bundle b) { super.oncreate(b); setcontentview(r.layout.main); textview tv = (textview) findviewbyid(r.id.tv); new countdowntimer(10000, 2000) { public void ontick(long m) { long sec = m/1000+1; tv.append(sec+" seconds remain\n"); } public void onfinish() { tv.append("done!"); } }.start(); } output: 10 seconds remain 8 seconds remain 6 seconds remain 4 seconds remain done! problem: how show "2 seconds remain"? time elapsed indeed 10 seconds, lastly ontick() never happens. if alter sec parameter 2000 1000, output: 10 seconds remain 9 seconds remain 8 seconds remain 7 seconds remain 6 seconds remain 5 seconds remain 4 seconds remain ...

ruby on rails - Paperclip resize and crop to rectangle -

ruby on rails - Paperclip resize and crop to rectangle - so expecting series of photos of different sizes , aspect ratios. want able shrink/stretch photo fit much can in 200x100 rectangle , crop rest not fit. want crop happen around center well. possible? confused imagemagick documentation. thanks! paperclip's # alternative want: fit image maximally within specified dimensions crop excess gravity @ center. example: has_attached_file :photo, :styles => { :original => "200x100#" } note: if want maintain original intact , generate additional cropped thumb, alter :original key else, :thumb . reference: http://rdoc.info/github/thoughtbot/paperclip/paperclip/classmethods ruby-on-rails ruby imagemagick paperclip

javascript - Fancybox stops working when invoked twice in the same browser session -

javascript - Fancybox stops working when invoked twice in the same browser session - i have odd problem fancybox. using version 1.2.6 (yes it's old, that's i'm stuck currently), invoke iframe via button click (see screenshot below) everything fine if user selects radio button , submits form. however, if user closes fancybox invokes iframe 1 time again (using same button click before), form not clickable. instead there left , right arrows on iframe if it's trying display image (see screenshot below) the way 'fix' issue reload page or not dismiss fancybox in first place. [update] here how invoke fancybox. dismiss fancybox, have click on "modify address" button. $('#hidden_link').fancybox({ framewidth:400, frameheight:500, hideonoverlayclick:false, hideoncontentclick:false, showclosebutton:false }).trigger('click'); the element #hiddenlink hidden href . <a href="/assets/cnt/index.htm...

php - Opening more than two connections to apache per client -

php - Opening more than two connections to apache per client - bit of odd problem here. we're migrating website new software platform. part of migration, must re-create files 1 amazon s3 bucket another. there hundreds of thousands of files. we must utilize software have (phpfox) this. php framework. the job broken in segments phone call using offset in url. basically: re-create 10 files , update database necessary increment offset 10 rinse, repeat. the api traffic light, load on server sub 1%, however, if open more 2 tabs on 1 machine server, script begins slowing downwards proportionally, if web server (apache) queuing commands instead of running them in parallel. we've found if open 2 tabs on many machines, scales expected. in order either saturate our uplink or set noticeable load on server, need fill room laptops. while comical, highly impractical , pain in ass. there has gotta improve way here. i've tried increasing max spare processes, , ...

symfony2 - symfony 2 sending an object from a template to a controller -

symfony2 - symfony 2 sending an object from a template to a controller - i need send object template controller. in case want send product object. possible send object argument in path ? {% product in products %} <p>{{ product.name }} price: {{ product.price}} <a href="{{ path('shopmyshopbundle_addproduct') }}">add product</a></p> {% endfor %} you can use: {% product in products %} <p>{{ product.name }} price: {{ product.price}} <a href="{{ path('shopmyshopbundle_addproduct', {id : product.id}) }}">add product</a></p> {% endfor %} but improve way using html form: <form action="{{ path('shopmyshopbundle_addproduct') }}" method="post" {{ form_enctype(form) }}> {# hidden fields #} {{ form_widget(form) }} <input type="submit" value="add product" /> </form> symfony2

javascript - How to find which element stands higher in the DOM hierarchy? -

javascript - How to find which element stands higher in the DOM hierarchy? - i mean, how can find of 2 elements belongs node nearest 'document' or 'window'? higher in hierarchy? edit gets job done: function gerarchia(elem) { var i=0; while (elem.parentnode) { elem = elem.parentnode; i++; } homecoming i; } try .parents().length , this: if ( $(element1).parents().length > $(element2).parents().length ) { // lower } else { // higher } javascript dom hierarchy

java - how to count number of array elements that lie between two elements of given array -

java - how to count number of array elements that lie between two elements of given array - i want write method when supplied array of ints following. each pair of array elements combine them , set them list of inner class objects. compare each element in array , check if fit between each pair values. (i.e. have array 0, 2, 4 create illustration pair (0,4) , check value 2 indeed between 0 , 4 counter increase). tried next code returned 0. how prepare or there easier way accomplish that? care homecoming value correct. give thanks you import java.util.*; import java.util.map; import java.lang.*; public class prac1 { public int count(int[] a){ int k = 0; class ptemp{ int first = -1; int sec = -1; public ptemp(int first, int second){ int f = first; int s = second; } } list<ptemp> r = new arraylist<ptemp>(); ...

c# - Is there any way to pass the lambda expression as a variable or argument? -

c# - Is there any way to pass the lambda expression as a variable or argument? - i need pass lambda query parameter, followings code sample , interesting find implement it, there samples: thing this: var expr1 = where(n => n > 6).orderby(n => n % 2 == 0).select(n => n); var expr2 = takewhile((n, index) => n >= index)); and utilize this: public void uselambda<t> (ienumerable<t> source , lambda expr){ var items= expr.compile(source); foreach(var item in items) console.writeline(item.tostring()); } public void main(){ list<int> numbers = new list<int> { 10, 24, 9, 87, 193, 12, 7, 2, -45, -2, 9 }; var expr1 = where(n => n > 6).orderby(n => n % 2 == 0).select(n => n); uselambda(numbers, expr1); } does 1 have thought it? if define linq expressions this: func<ienumerable<int>, ienumerable<int>> expr1 = l => l.where(n => n > 6).orderby(n => n % 2 ...

asp.net mvc 3 - Mutually exclusive search options on MVC 3 view -

asp.net mvc 3 - Mutually exclusive search options on MVC 3 view - i'm working view utilize 2 sets of search options , know if there improve way i'm headed. on right hand side search username, lastname on left hand side search entity type or entity name results should returned grid below search. i've considered may need 2 forms on view not sure if right direction. 2 partial views each own form better? if so, how info returned main view? i'm trying maintain simple posting controller actions , returning views instead of bunch of confusing jquery. currently have model 2 sub-models each define search fields allow user come in info textboxes. what proper way handle in mvc 3? you can utilize 2 partial views if going re-use forms on other views or if want encapsulate view code. suggest 2 forms post different controller actions 'searchperson(model), searchentity(model). both actions can homecoming mutual 'results' view model 'se...

c# - Exclude results from Directory.GetFiles -

c# - Exclude results from Directory.GetFiles - if want phone call directory.getfiles , have homecoming files match pattern *.bin want exclude of files match pattern log#.bin # running counter of indeterminate length. there way filter out results @ step of passing in search filter getfiles or must result array remove items want exclude? you can utilize linq, directory.enumeratefiles() , where() filter - way end files want, rest filtered out. something should work: regex re = new regex(@"^log\d+.bin$"); var logfiles = directory.enumeratefiles(somepath, "*.bin") .where(f => !re.ismatch(path.getfilename(f))) .tolist(); as pointed out directory.enumeratefiles requires .net 4.0. cleaner solution (at cost of little more overhead) using directoryinfo / enumeratefiles() returns ienumerable<fileinfo> have direct access file name , extension without farther parsing. c# .net

c# - Is it possible to check whether the connection to a SQL database exists before opening the connection? -

c# - Is it possible to check whether the connection to a SQL database exists before opening the connection? - is possible check if there connection sql database exists before opening new connection? thats why connection pooling exists for. checks , if not - re-open it. also can check in web.config existing entry,. c# sql

Html Email Content using PHP -

Html Email Content using PHP - i using php code send email here code <?php $message ="<html><head><title>enquiry email</title></head><body>"; $message .= '<div style="float:left"><img src="url" /></div>'; $message .="you got new enquiry next <br/>"; foreach($_post $key =>$value){ if(!empty($value)){ $message.="<strong>".ucwords($key)."</strong>: ".$value."<br/>"; } } $message .= 'test content</body></html>'; //echo $message; exit; //$message=rtrim(chunk_split(base64_encode($message))); $to = 'test@someeamil.com'; $subject = 'new enquiry'; $headers = 'mime-version: 1.0' . "\r\n"; $headers .= 'content-type: text/html; charset=iso-8859-1' . "\r\n"; //$headers . ='content-transfer-encoding: base64'; $headers...

How to enable python interactive mode in cygwin? -

How to enable python interactive mode in cygwin? - i python in interactive mode when on linux. on cygwin, interactive mode doesn't start. don't see ">>>" prompt , whatever come in doesn't result in anything. solved: figured out problem answers below. using windows installation of python , needs -i alternative start in interactive mode. try passing -i flag python. i've experienced same thing, as have others. there seems issue cygwin's ability operate interactively native-windows applications (including python.exe). if can, install cygwin version of python via cygwin's bundle management, doesn't have interactivity problem. python cygwin command-prompt

Calculation error when representing TDateTime (Delphi) as a Java Calendar object -

Calculation error when representing TDateTime (Delphi) as a Java Calendar object - delphi tdatetime epoch december 30, 1899, java calendar uses unix epoch january 1, 1970. next code: calendar epoch = calendar.getinstance(timezone.gettimezone("utc")); epoch.set(1899, 12, 30, 0, 0, 0); epoch.gettimeinmillis(); gives -2206483199054 according manual calculations has -2209161600000. delta 2678400946 (31 days) come from? missing? yes, can operate milliseconds workaround want know error comes from. p.s. epoch instance of java.util.gregoriancalendar . the month field 0-based, dec month 11, not 12. explains why you're off 31 days — wrapped around jan 30, 1900. can phone call setlenient(false) grab kind of error sometimes. the set method sets 6 fields mentioned in arguments; leaves other fields unchanged, including millisecond field, explains why you're off slightly more 31 days. the documentation advises phone call clear() first, may inste...

javascript - Where is the documentation for the "jQuery.event.special" API (for custom events)? -

javascript - Where is the documentation for the "jQuery.event.special" API (for custom events)? - i'm creating fork of textchange jquery plugin, uses jquery.event.special api create own custom events ( textchange , hastext , , notext ). i'm going crazy trying find documentation $.event.special api! i've searched jquery's site , found nil mentions special functionality. i've found several blogs talk api , reference a link it, page not talk @ all. can please point me toward documentation "special" api? i'm interested in jquery's documentation, because want know "official" source of api. update: i looked @ jquery's source, , utilize $.event.special api events (including ready , hover ), it's not obsolete thought. http://benalman.com/news/2010/03/jquery-special-events/ the site seems documented , should have should ever need know jquery special events. javascript jquery-plugins jquery

exception handling - how to implement uncaughtException android -

exception handling - how to implement uncaughtException android - i found android: how auto-restart application after it's been "force closed"? but don't know , how set alarm manager thanks you can grab uncaught exceptions in application extension class. in exception handler exception , seek set alarmmanager restart app. here illustration how in app, log exception db. public class myapplication extends application { // uncaught exception handler variable private uncaughtexceptionhandler defaultueh; // handler listener private thread.uncaughtexceptionhandler _uncaughtexceptionhandler = new thread.uncaughtexceptionhandler() { @override public void uncaughtexception(thread thread, throwable ex) { // here logging of exception db pendingintent myactivity = pendingintent.getactivity(getcontext(), 192837, new intent(getcontext(), myactivity.class), ...

android - Delete Database and re-create it -

android - Delete Database and re-create it - i want every time database deleted,and create new one. code in dbhelper class: public void createentry(string title, string getagonistiki, string getskor, string getgipedo, string date, string getgoal1, string getgoal2, string teliko_skor) { seek { contentvalues cv = new contentvalues(); cv.put(dbhelper.title, title); cv.put(dbhelper.agonistiki, getagonistiki); cv.put(dbhelper.skor, getskor); cv.put(dbhelper.gipedo, getgipedo); cv.put(dbhelper.date, date); cv.put(dbhelper.goala, getgoal1); cv.put(dbhelper.goalb, getgoal2); cv.put(dbhelper.description, teliko_skor); ourdatabase.insert("osfpdb", null, cv); } grab (exception e) { log.e("exception in insert :", e.tostring()); e.printstacktrace(); } } public void ...

How do I call the method in the sub-class in java? -

How do I call the method in the sub-class in java? - i have sub classes , 1 base. base of operations movie , , phone call method in fiction method sub-class. method called other method called (management.java). fiction has own field called typeofmovie , getter , setter method. i'm trying is, phone call getter or setter method. if create like: movie m = new fiction(); i cannot phone call getter or setter method there. way should create abstract method in movie class? could, number of fields getting bigger, thought base of operations class might messy. is way can do? also, field bundle private (default), still cannot access way either can give me advice please? thanks your declaration say's m of type film , can phone call methods declared in film ( if of base of operations class methods overridden in subclass, overridden method code executed ). if want phone call methods in subclass .you have create object fiction f = new fiction(); ...

python - wxPython app No error but still freezes -

python - wxPython app No error but still freezes - i don't errors code after nail spam button freezes , nil happens. see wrong code? import skype4py, wx, time t skype = skype4py.skype() skype.attach() name = "" chat = "" message = "" class skyped(wx.frame): def __init__(self,parent,id): wx.frame.__init__(self,parent,id,"skype chat spammer",size=(300,200)) panel=wx.panel(self) start=wx.button(panel,label="spam!",pos=(140,100),size=(50,20)) stop=wx.button(panel,label="stop!", pos=(200,100),size=(50,20)) self.bind(wx.evt_button, self.spam, start) self.bind(wx.evt_close, self.closewindow) entered=wx.textentrydialog(none, "user spam?", "user", "username here") if entered.showmodal()==wx.id_ok: name=entered.getvalue() entered1=wx.textentrydialog(none, "message?", "message", "me...

javascript - Phonegap store local db -

javascript - Phonegap store local db - i have mass of info in app. need in case app runs offline. currently have in data.js file , utilize jquery data function manage it. there 1800 lines this. ~500kb in total. $.data(db,'aarstraße',['34236:1','34246:2','34270:4','34290:6',...]); is there improve way store data? my main concern performance. not query info app performance in total ram usage , startup time. my recommendation pre-populate sqlite db , on application startup re-create db right location app can access it. there blog post on topic at: http://gauravstomar.blogspot.com/2011/08/prepopulate-sqlite-in-phonegap.html?utm_source=feedburner&utm_medium=feed&utm_campaign=feed%3a+gauravstomarbootstrappingintelligence+%28gaurav+s+tomar+%3a+bootstrapping+intelligence%29 javascript jquery-mobile cordova

windows - Cannot connect to SQL Server using VMWare -

windows - Cannot connect to SQL Server using VMWare - i having problem connecting sql server database on windows 7 sql server management studio on vmware. is there setting must set on or off in windows 7? sql-server windows vmware

java - How to expose an EJB3.0 session ejb for a desktop app in Weblogic 11g -

java - How to expose an EJB3.0 session ejb for a desktop app in Weblogic 11g - since: the @ejb doesn't work on desktop apps, because there's no container, weblogic doesn't expose through jndi names of ejb's (3.0), i didn't find in official documentation few days now, does know how consume ejb desktop app? i got hints have modify web.xml ... web.xml , there's more of them , @ to the lowest degree of them break app. clarification: have weblogic server running, not exposing ejb's within ear hosted on server. specifically, server not exposing names of ejb3.0 session beans, while expose names of other ejb2.1 names. how reference ejb3.0 objects, hosted on server, desktop app? further clarification: weblogic not expose names of ejb3.0 within jndi, because specifications of ejb3.0 don't require it. to reply own question (got after effort), expose ejb3.0 object through remote interface, in weblogic 11g server, these steps must taken: ...

logging - Printing at different levels in Python -

logging - Printing at different levels in Python - i java background. in java can print @ different levels in frameworks. illustration in log4j, have log levels can set debug, info, warn etc. does python have similar out of box? i.e. without having import lbrary. thanks. yep! have @ logging module. here's tutorial. python logging

c++ - QObject connect QSystemDeviceInfo::Profile to QVariant -

c++ - QObject connect QSystemDeviceInfo::Profile to QVariant - i have qml part of application needs know state i'm in. currentprofilechanged function has signal giving me qsystemdeviceinfo::profile want convert qvaraint qml can understand profile number between 0 , 7, function: qobject::connect(deviceinfo, signal(currentprofilechanged(qsystemdeviceinfo::profile)), rootobject, slot(changepower(qvariant(qsystemdeviceinfo::profile)))); gives unusual error: [qt message] object::connect: no such slot qdeclarativeitem_qml_3::changepower(qvariant(qsystemdeviceinfo::profile)) in c:/users/gerhard/qtprojects/raker/main.cpp:142 what doing wrong here? if seek this: qobject::connect(deviceinfo, signal(currentprofilechanged(qsystemdeviceinfo::profile)), rootobject, slot(changepower(qvariant(qsystemdeviceinfo::profile)))); it says this: [qt message] object::connect: no such slot qdeclarativeitem_qml_3::changepower(qsystem...

c - Open-source solutions for creating a cyclical logfile? -

c - Open-source solutions for creating a cyclical logfile? - if (!wheel) { wheel = new wheel(); } // or such my google goggles aren't working today. figured 1 must have been coded gazillion times , looking foss code, couldn't find any. before reinvent spherical axle-surrounding device, can point me @ url? i coding in c embedded scheme (atmel uc3), shouldn't create difference, explain why need cyclical logfile (because of limited storage). i want log events file on sd card , when reaches size want start writing 1 time again @ start. urls that? (fixed entry size ok; otherwise might nasty on wraparound). thanks 1,000,000 in advance! sourceforge has project called cyclic logs may need. if not, it's not hardest thing implement. treat normal cyclic memory space. instead of having resident in memory have reside on disk. ( maintain pointer head of log , end of log ( increment needed )) store headers log or flat file. c logging embedded...

java - how can I persist this complex object to database using hibernate? -

java - how can I persist this complex object to database using hibernate? - there database tables in mysql @ backend corresponding these classes foreign keys defined accordingly. allow me know if need set relations here. class itinerary { airport departure; airport arrival; airline flight; } class airport{ int idairport; string terminal; city city; } class city{ int idcity; string name; } class airline{ int idairline; string flightnumber; } i utilize this: http://pastebin.com/yzymtbg3 build itinerary object. puzzling me, , don't know way handle using hibernate orm. airsegmentbuilder segmentbuilder = new airsegmentbuilder(); segmentbuilder.adddepartureairport("jfk"); segmentbuilder.addarrivalairport("sfo"); i trying add together departure , arrival airport (objects) itinerary here. these objects in turn persist in database as: airport: id | name | terminal 1 | jfk | 1 2 | sfo | b1 ...

php - Select records from 2 tables and ordering them -

php - Select records from 2 tables and ordering them - i have 2 tables , b next records --table a-- id date value 1 09/01/2012 reward 2 09/01/2012 purchase 3 07/01/2012 reward 4 07/01/2012 purchase --table b-- id id_from_a date value 1 1 10/01/2012 generated rewrd 2 3 08/01/2012 generated reward now want result below id date value 1 10/01/2012 generated reward 1 09/01/2012 reward 2 09/01/2012 purchase 3 08/01/2012 generated reward 3 07/01/2012 reward 4 07/01/2012 purchase i know using unions merge these 2 tables how order have mentioned above ? a union can have single order clause specified @ end applies entire, combined result set. select id, date, value table_a union select id, date, value table_b order id, date desc if don...

xpath - XSLT 1.0 Idiom for ternary if? -

xpath - XSLT 1.0 Idiom for ternary if? - this java programme makes utilize of ternary if, map booleans output strings: (a "*" true, empty string false). public class ternary { public static void main(string[] args) { boolean flags[]={true,false,true}; (boolean f : flags) { system.out.println(f?"*":""); } } } so output *, [empty], *. i have input xml document, like: <?xml version="1.0" ?> <?xml-stylesheet type="text/xsl" href="change.xsl"?> <root> <change flag="true"/> <change flag="false"/> <change flag="true"/> </root> and have next xslt template maps true '*' , false '' (it works): <xsl:template match="change"> <xsl:variable name="flag" select="translate(substring(@flag,1,1),'tf','*')"/> <xsl:value-of select="$flag...

.net - How can I get the whole requested url in C#? -

.net - How can I get the whole requested url in C#? - possible duplicate: how url hash (#) server side c# finish url “#” if phone call page http://www.mywebsite.it?param=1 request.url i all. on http://www.mywebsite.it?param=1#1234 i can't whole address. #1234 ignored. how can it? you can't portion starts # since isn't transmitted server. it handled client side. as such, may able utilize javascript extract , transmit server (xhr, hidden field or other technique). c# .net request

c# - DataGridTextColumn Visibility Binding -

c# - DataGridTextColumn Visibility Binding - i'm trying bind column visibility of element this: <window x:class="wpfapplication1.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="mainwindow" height="350" width="525"> <window.resources> <booleantovisibilityconverter x:key="booleantovisibilityconverter" /> </window.resources> <stackpanel> <checkbox x:name="chkcolumnvisible" content="show column" /> <datagrid x:name="mydatagrid" autogeneratecolumns="false"> <datagrid.columns> <datagridtextcolumn header="column1" visibility="{binding elementname=chkcolumnvisible, path=ischecked, converter={staticresource booleantovisibilityconverter}}"/> </datagrid.column...

ruby on rails 3 - How do I skip a observer after_save call while testing in Rspec? -

ruby on rails 3 - How do I skip a observer after_save call while testing in Rspec? - there api calls external services in after_save method in postobserver. don't want invoke after_save while testing rspec. there way that? give thanks you. it's rails 3.1 stub out: postobserver.instance.stub(:after_save => true) ruby-on-rails-3 rspec observer-pattern

ruby on rails - Capybara-webkit raises Capybara::Driver::Webkit::WebkitInvalidResponseError -

ruby on rails - Capybara-webkit raises Capybara::Driver::Webkit::WebkitInvalidResponseError - i got next message webkit driver in rspec: capybara::driver::webkit::webkitinvalidresponseerror: unable load url: http://127.0.0.1:44923/posts few days ago worked. problem save_page method. wrong? i've had similar error messages when page raising error. should check manually not case starting server in testing mode ( rails s -e test ) , accessing page yourself. ruby-on-rails ruby capybara acceptance-testing capybara-webkit

python - Linux Virtual Serial Port for creating a device commuication -

python - Linux Virtual Serial Port for creating a device commuication - i created vsp using socat below command: socat -d -d pty,raw,echo=0 pty,raw,echo=0 where able create serial device (19200,n,8,1) , send , receive info using python. so have same 1 more device config of (19200,even_aprity,hardware flow in python) when throwing below error: traceback (most recent phone call last): file "py2.py", line 163, in <module> buffer += ser.read(1) # block until 1 more char or timeout file "/usr/lib/python2.6/dist-packages/serial/serialposix.py", line 311, in read if self.fd none: raise portnotopenerror serial.serialutil.serialexception: port not open exception systemerror: 'error homecoming without exception set' in <bound method breakhandler.__del__ of <sig_handler.breakhandler instance @ 0xb719338c>> ignored guide me python serial-port virtual virtual-serial-port socat

Can you open stdin as a file on MS Windows in Python? -

Can you open stdin as a file on MS Windows in Python? - on linux, i'm using supbprocess.popen run app. command line of app requires path input file. learned can pass path /dev/stdin command line, , utilize python's subproc.stdin.write() send input subprocess. import subprocess kw['shell'] = false kw['executable'] = '/path/to/myapp' kw['stdin'] = subprocess.pipe kw['stdout'] = subprocess.pipe kw['stderr'] = subprocess.pipe subproc = subprocess.popen(['','-i','/dev/stdin'],**kw) inbuff = [u'my lines',u'of text',u'to process',u'go here'] outbuff = [] conditionbuff = [] def processdata(inbuff,outbuff,conditionbuff): i,line in enumerate(inbuff): subproc.stdin.write('%s\n'%(line.encode('utf-8').strip())) line = subproc.stdout.readline().strip().decode('utf-8') if 'condition' in line: conditionbuff.app...

visual c++ - Not able to print AfxMessagBox() After doModal() method -

visual c++ - Not able to print AfxMessagBox() After doModal() method - bool cmsgboxapp::initinstance() { initcommoncontrolsex initctrls; initctrls.dwsize = sizeof(initctrls); initctrls.dwicc = icc_win95_classes; initcommoncontrolsex(&initctrls); cwinapp::initinstance(); afxenablecontrolcontainer(); setregistrykey(_t("local appwizard-generated applications")); cmsgboxdlg dlg; m_pmainwnd = &dlg; int_ptr nresponse = dlg.domodal(); if (nresponse == idok) { afxmessagebox(l"here",0,0);//this messagebox not getting displayed } else if (nresponse == idcancel) { } homecoming false; } in above code afxmessagebox() not getting displayed. why problem coming? first created modal dialogbox , after homecoming tried provide message box not displayed i'm not sure may afxmessagebox not provide own message pump cdialog::domodal() does. ...

xpath - XSLT 1.0: how to go for the "parent" axis -

xpath - XSLT 1.0: how to go for the "parent" axis - i have question concerning performance of xslt calling "parent" axis in xpath. can phone call parent axis using "::*" or phone call using "::" , name of element parent::*/mvke/item/vmsta='z2' or parent::item/mvke/item/vmsta='z2' does matter performance wise if utilize "*" or if utilize name of node element? both work wondering difference is. can please explain me? thank much help , best regards, peter the first look matches any element parent. sec look matches when parent item element. that's difference. can't imagine important performance impact, since both node tests can performed in constant time. note line xpath 1.0 spec: every node other root node has 1 parent, either element node or root node. in practice means parent::* matches any parent except of root element. to demonstrate, consider simple illustratio...

windows - Audio: How to set the level of the default microphone? -

windows - Audio: How to set the level of the default microphone? - this 1 makes me crazy: on vista+ computer dedicated sound playing/recording application, need application create sure (default) microphone level pushed max. how that? i found core sound lib, found how immdevice default microphone. what? docs lead me think need isimpleaudiovolume interface pointer immdevice, how do that? note i'm interested in any programmatic way set micro level (whether core sound or else). ideally system-wide, application-wide ok. tia, the trick in core audio, recording (aka capture) , rendering devices not considered different (as long don't dive deep of course), opposed former apis such wavexxx there different apis input , output devices. therefore, full example larry osterman sets speaker volume can modified set microphone volume changing erender ecapture in enumerator phone call returns default device. thanks larry! windows winapi audio core-audio

c# - getting text between xmlnodes -

c# - getting text between xmlnodes - how can text between xml nodes <company> <data id="14" />{<data id="15" />document<data id="23" />pet<data id="24" />document<data id="25" /> </company> i need info between id 23 , 25 (i.e pet document) i have loaded xml in xmldoc please suggest you can utilize linq: xdocument doc = xdocument.parse(@"<company>...</company"); string result = string.join(" ", doc.root .nodes() .skipwhile(n => n.nodetype != xmlnodetype.element || (int)((xelement)n).attribute("id") != 23) .takewhile(n => n.nodetype != xmlnodetype.element || (int)((xelement)n).attribute("id") != 25) .oftype<xtext>()); // result == "pet document" c# asp.net xml vb.net

javascript - "InstallTrigger" is not defined -

javascript - "InstallTrigger" is not defined - in html page have code this, have installed extension if browser firefox: if (/firefox[\/\s](\d+\.\d+)/.test(navigator.useragent)) { //relevant code installtrigger.install(installxpi); } it works fine in every browser. when same page used through htmlunit framework , using browserversion.firefox_3_6 argument in webclient. shows error there: com.gargoylesoftware.htmlunit.scriptexception: wrapped com.gargoylesoftware.htmlunit.scriptexception: wrapped com.gargoylesoftware.htmlunit.scriptexception: referenceerror: "installtrigger" not defined. any thought this? this reminder you: don't utilize browser detection, utilize feature detection. issues code: installtrigger feature of gecko engine, not firefox. explicitly looking "firefox" in user agent string , might exclude other browsers based on gecko engine (there e.g. seamonkey, k-meleon, camino). user agent strings can spoof...

r - recursively split list elements -

r - recursively split list elements - i cannot find right incantation of reduce , recall , lapply perform next task. consider next function, bisect.df <- function(d){ n <- ncol(d) if(n%%2) n <- n-1 # drop 1 col if odd number ind <- sample(n)[seq.int(n/2)] # split randomly both parts list(first=d[, ind], second=d[, -ind]) } given data.frame , returns list of 2 children data.frames of equal ncol extracted randomly parent. wish apply function recursively offsprings downwards given level, 3 generations. can trivially 1 generation @ time, bisect.list <- function(l){ unlist(lapply(l, bisect.df), recursive=false) } but how phone call recursively, n=3 times? here's test sample play with d <- data.frame(matrix(rnorm(16*5), ncol=16)) step1 <- bisect.list(list(d)) step2 <- bisect.list(step1) step3 <- bisect.list(step2) str(list(step1, step2, step3)) bisect.list <- function(l,n){ for(i in 1:n) { l <...

ruby on rails - How to inject logic into javascript in HAML? -

ruby on rails - How to inject logic into javascript in HAML? - i'm attempting add together mercury editor , while modifying layout it, suggests add together javascript view layout. next won't quite work, expresses gist of i'm attempting accomplish. you'll want @ section within :javascript filter, on downwards add together - begin if statement mean: ... %body{ :class => "#{controller_name} #{action_name}" } :javascript var saveurl = null; // set url want save given page to. var options = { savestyle: null, // 'form', or 'json' (default json) savemethod: null, // 'post', or 'put', (create, vs. update -- default post) visible: null // if interface should start visible or not (default true) }; //<!-- mix in configurations provided through rails.application.config.mercury_config --> - if rails.application.config.respond_to?(:mercury_config) ...

How to deal with the stored procedure's return value in MVC3? -

How to deal with the stored procedure's return value in MVC3? - i trying homecoming value comes store procedure. sp :csp_storeprocedure returns (int a, int b, int c,) i aleady imported funcion , set homecoming type complex. however, not know how homecoming value store procedure. how can this? try: yourcomplextype somevar = yourcontextname.storedprocname(anyparams); your context name maybe 'whateverentities' - depends named when creating edmx model, etc. stored-procedures

asp.net - Setting next date to devexpress dateedit -

asp.net - Setting next date to devexpress dateedit - i have 1 devexpress dateedit control.i trying provide navigation it.i kept 2 buttons "next" , "prev" when user click next button want alter current date next date illustration if current date 02/feb next date 03/feb that.similarly previous button. how can accomplish using java script. thanks in advance. arasu this example has everthing need , more. asp.net devexpress

c++ - Can't pass pointer to derived class function into base class -

c++ - Can't pass pointer to derived class function into base class - i'm trying pass function derived class base of operations class function expects function pointer, i'm getting compiler error. [bcc32 error] e2034 cannot convert 'void (bar::*)(int)' 'void (foo::*)(int)' i guess designed, there way around doesn't involve unpleasant casting? can boost::bind help me here? #define call_member_fn(object,ptrtomember) ((object).*(ptrtomember)) class foo { public: typedef void (foo::*ffunc)(int i); void test(ffunc f) { call_member_fn(*this,f)(123); } void barf1(int i) {}; }; class bar : public foo { public: void barf2(int i) {}; }; void ffff() { foo f; f.test(foo::barf1); // works bar b; b.test(bar::barf1); // works b.test(bar::barf2); // error } as side note, have working fine using virtual function, obvious approach rather function pointer, i'm trying working way before attempting boost::bind trickery l...

c# exception questions -

c# exception questions - thank helping. this code doesn't produce expect when divisor 1. base of operations class exceptone doesn't called, hyperlink in exceptone doesn't displayed. missing ?! console output is: enter divisor 1 writeline exception 1... writeline exception 2... base of operations ctor2 http : // exc2.com writeline in finally class programme { static void main(string[] args) { seek { byte y = 0; byte x = 10; console.writeline("enter divisor"); string s = (console.readline()); y = convert.tobyte(s); if (y == 1) throw new exceptone(); console.writeline("result {0}", x / y); ; } grab (system.dividebyzeroexception e) { console.writeline("exception occured {0}...", e.message); } grab (exceptone p) { console.writeline(p.m...

ASP.Net Membership Your Thoughts? -

ASP.Net Membership Your Thoughts? - i building project using asp.net 4 , mvc3 using c#. asp.net membership provider integrated framework. role check , identity info have issue. it's limited flexibility. should build new user management scheme ground , lose convenient short codes within controllers ect....? there alternative? worry hashing passwords, caching stuff, session management gives me headache when think building scratch. i utilize asp membership logging-in (only). utilize database-specific tables highly-customized user-features asp membership doesn't accomodate (or @ all). if custom-feature "can" (easily) accomodated asp membership db...then utilize it...but mostly, set custom user-specific functionality in target database (in-question). also... because asp membership functionality can manage many databases @ same time, run separate asp membership database instance (apart) manages. doings has proven clean & friendly me. asp...

xna 4.0 - How to add a start (splash) screen in XNA 4.0? -

xna 4.0 - How to add a start (splash) screen in XNA 4.0? - i want create simple splash screen containing next in menu; " press "enter" start " // "instructions" (obviously when you're in instructions page, there should "click here homecoming main menu option" the game i'm creating 2d racing game (i haven't implemented timing in (dno how to)) i've tried implement in code; http://create.msdn.com/en-us/education/catalog/sample/game_state_management but gave after half hours (too complicated) any help welcome. give thanks you!!! another course of study of action take using enum's store different game states. //don't forget set above game1 class! public enum gamestate { menu, game, credits, etc } initialize it: gamestate gamestate = new gamestate(); gamestate = gamestate.menu; then in you're draw method: if(gamestate == gamestate.menu) { // draw menu, other ...

SPSS Macro: compute by variable name -

SPSS Macro: compute by variable name - i don't think spss macros can homecoming values, instead of assigning value vixl3 = !getlastavail target=vix level=3 figured need this: /* computes lastly available entry of target @ given level */ define !complastavail(name !tokens(1) /target !tokens(1) /level !tokens(1)) compute tmpid= $casenum. dataset re-create tmpset1. select if not miss(!target). compute !name= lag(!target, !level). match files /file= * /file= tmpset1 /by tmpid. exec. delete variables tmpid. dataset close tmpset1. !enddefine. /* compute lastly values */ !complastavail name="vixcl3" target=vixc level=3. the compute !name = ... is problem is. how should done properly? above returns: >error # 4285 in column 9. text: vixcl3 >incorrect variable name: either name more 64 characters, or >not defined previous command. >execution of command stops. when pass tokens macro, interpreted literally. when spec...

How to set value of checkbox in codeigniter and show checked state? -

How to set value of checkbox in codeigniter and show checked state? - i have series of checkboxes in codeigniter , need show checked state , value when form submitted. how can this?? have read documentation of codeigniter website cannot see how set checked state? this code: <?php echo form_checkbox('spa', 'y', false, '') ?> use: echo form_checkbox('spa', 'y', true); //true sets checked see: form_checkbox() in codeigniter user guide codeigniter checkbox

version control - How to adapt this MKS Source Integrity workflow to Git? -

version control - How to adapt this MKS Source Integrity workflow to Git? - please consider next case : currently using mks source integrity (yes, hurts). twice week, developers check in feature (or part of it) development branch. check-ins 1 feature intertwined check-ins of other features. example: rev 1, 3, 5 feature a, rev 2 feature b, rev 4 feature c. once week, validated features checked in production branch. most requires merge out changes non-validated features. example: feature (from above) goes production, not feature b , c, wan't take rev 1, 3, 5 (discard 2 , 4), also, rev 3 might have required merge changes rev 2 when went in development; merge undone. moving git (yay!). workflow respect constraint? i have read lot it, , every workflow seems based on assumption @ time t, feature a, b, , c done. if not, guess t delayed. in case, there no rush finishing features in time, ever. each developer works on 1 or several features. if it's ready, goes produc...

python - How use regular expressions to compare an input with a set? -

python - How use regular expressions to compare an input with a set? - i regular look python code to: 1) take input of characters 2) outputs characters in lower case letters 3) compares output in python set. i no @ regular expressions. why bother? >>> 'foo'.lower() in set(('foo', 'bar', 'baz')) true >>> 'quux'.lower() in set(('foo', 'bar', 'baz')) false python regex

What is the right way to include class files and structure definitions on my .NET website? -

What is the right way to include class files and structure definitions on my .NET website? - i build sites in .net without using visual studio. are virtual includes right way include class definition files? for illustration first few lines of page like: <!--#include file="classdefinition.aspx"--> <!--#include file="anotherclassdefinition.aspx"--> <script language="vb" runat="server"> 'page load sub, etc in classdefinition.aspx, have defined construction outside of class. first few lines of classdefinition.aspx this: <script language="vb" runat="server"> construction logininfo public loginid string public somethingelse string public permissions hashtable end construction i getting type not defined errors when seek declare private fellow member logininfo in anotherclassdefinition.aspx. why happening? you should create ordinary .vb files in app_cod...

c# - How to auto-detect devices connected to COM ports -

c# - How to auto-detect devices connected to COM ports - i want auto observe devices connected com ports of computer. beingness able utilize serialport class allows me list of available com ports easily. i want iterate through them , poll(send command) each port , wait response. seems tutorials suggested utilize datareceived event. lost @ how serial send followed waiting xx amount of seconds till receive response device. the datareceived event nice when need talk devices can send @ unpredictable time. don't have fire thread blocks , waits device send something. but that's opposite of you're trying achieve, do expect receive something. don't utilize datareceived, utilize read() readtimeout property set suitably low value. simple. consider using dsrholding property. true when there's device attached port , powered-up. i should note doing rather dangerous. have no thought kind of devices attached machine, rather tricky send them not des...

Drupal workflow -

Drupal workflow - i need implement workflow in drupal website. have simple workflow: contributer: create nodes in draft status saves new versions of node publisher: same contributer , alter state of draft node published status. i'm confused between maestro, workbench , workflow modules. know 1 appropriate in case? give thanks much. regards. for approach no need contributor module.login admin give create permission normal user(may fall under roles) expect "administer nodes".if disable permission particular role not alternative publish content. drupal workflow

entity framework - One to many relationship without navigation property -

entity framework - One to many relationship without navigation property - public class myentity { public int myentityid { get; set; } public int foo { get; set; } public icollection<myentitydetail> myentitydetails { get; set; } } public class myentitydetail { [key, column(order=0)] public int pk { get; set; } // myentityid myentity [key, column(order = 1)] public int otherpk { get; set; } // manually set public string bar { get; set; } } public class myentitycontext : dbcontext { public dbset<myentity> myentities { get; set; } public dbset<myentitydetail> myentitydetails { get; set; } protected override void onmodelcreating(dbmodelbuilder modelbuilder) { modelbuilder.conventions.remove<pluralizingtablenameconvention>(); } } i think above code explains im trying accomplish entity framework code first 4.2 note myentitydetail doesnt contain navigation property myentity. how associate myentit...

logging - Why time.sleep() breaks syslog-ng in Python -

logging - Why time.sleep() breaks syslog-ng in Python - i have been trying log script output syslog-ng, however, if utilize time.sleep() function in code, breaks syslog-ng , stops logging output of script. here details. // samplescript.py import time while true: print "hello world" time.sleep(5) i utilize pipe it's output syslog-ng, , utilize unix logger tool, i'm calling script this; $ python sampleoutput.py | logger this not generating output log file. code simple, , working. by way, don't thing wrong syslog-ng conf file, since if utilize code below, works expected. // samplescript.py while true: print "hello world" q: why time.sleep() breaking syslog-ng? there equivalence sleep() function might utilize on code? thanks in advance. you need flush buffered stdout-stream: import sys sys.stdout.flush() how flush output of python print? python logging sleep syslog

python - Building and running llvm-py on Mac OS X -

python - Building and running llvm-py on Mac OS X - i trying build llvm-py on mac os x. this tried do, needed download 11vm-2.7, , readme file has comment: create sure '--enable-pic' passed llvm's 'configure' download llvm 2.7. build llvm 2.7: run ./configure --prefix=llvm_directory --enable-pic download llvm-py 0.6. build llvm-py 0.6: run python setup.py build --llvm-config=llvm_directory/bin/llvm-config everything compiles without errors, when tried run test file, got error message. importerror: 'dlopen(/library/python/2.7/site-packages/llvm/_core.so, 2): symbol not found: __ztvn4llvm16extractvalueinste\n referenced from: /library/python/2.7/site-packages/llvm/_core.so\n expected in: flat namespace\n in /library/python/2.7/site-packages/llvm/_core.so' the message error seems there missing function "llvmextractvalueinst" flat namemspace issue. what's wrong this? in llvm 2.7, makefile.rules has line sharedlinkoptions=-wl,...

Can clang generate a call graph for an Xcode project (in Objective-C? -

Can clang generate a call graph for an Xcode project (in Objective-C? - i found this example looks outputs want c++. how can done objective-c code in xcode project? i see mentions of doxygen beingness able create phone call graph, can't find example. (i want know clang better, it's hard started...) absolutely. there couple of tricks need understand, it's not bad. first, need compatible version of opt , since doesn't come llvm apple ships. got mine macports: port install llvm-3.0 then need compile file. working out parameters can bit of pain. easiest way allow xcode build it, go logs , cutting , paste out giant build line. used able hand-hack these, i've gotten lazy.... take out lastly -o parameter (conveniently @ end of compile line), , substitute: -s -emit-llvm -o - | opt-mp-3.0 -analyze -dot-callgraph then, in other example: $ dot -tpng -ocallgraph.png callgraph.dot keep in mind there few functions called a lot in objc n...

jasper reports - A vertical overflow on a band with horizontal print order -

jasper reports - A vertical overflow on a band with horizontal print order - i have study design: there columns called składniki odżywcze (means: nutrients) in report. columns made using info source , horizontal print order. a content of each column made using subreport design: this subreport grows vertically , when have lot of nutrients , don't fit page net.sf.jasperreports.engine.jrruntimeexception: subreport overflowed on band not back upwards overflow. . read it's caused because have horizontal print order , content grows vertically much. what can now? i'd page breaked , rest of nutrients displayed on next page. jasper-reports

ios - AppStore distribution certificate/keys on smartcard? -

ios - AppStore distribution certificate/keys on smartcard? - has done investigation whether apple appstore distribution private key/certificate can stored on smartcard? work big company release several ios applications , we're concerned best way protect our production distribution keys , certificates. possible generate , store these keys/certs on smartcard , utilize smartcard when signing app distribution? particular smartcard vendors work on osx? you should able code sign app given certificate , matching keys available in keychain. smartcard services looks tool need case these assets (cert+keys) stored on smart card. ios security app-store certificate smartcard

MySQL PASSWORD() column: migration to MongoDB -

MySQL PASSWORD() column: migration to MongoDB - i'm looking migrate table of user info shiny new mongodb rig. having problem wrapping head around how handle column of passwords. i'm using mysql's password() function store passwords. when thing constructed didn't see reason ever need reverse encryption, didn't see harm in using password() function. can't transfer passwords is, because (as far know) can't utilize password() same way in mongodb check validity of password. any ideas? you have several options: option 1: lazy migration. keep both mysql , mongodb servers online , connected. when user attempts log in, check password against mongodb. if fails (ie, password never set), check against mysql. if succeeds, hash password , store in mongodb document. downsides: mysql server has remain online forever (or @ to the lowest degree until users migrate). upsides: can replace mysql password format own format (ie, bcrypt hashes or whatnot)...

common.logging - How can I keep nuget from updating dependencies? -

common.logging - How can I keep nuget from updating dependencies? - i'm attempting install nuget bundle has incorrectly specified 1 of it's dependencies. common.logging.log4net requires log4net = 1.2.10 nuget bundle specifies log4net >= 1.2.10. if manually install older version of log4net, nuget upgrades log4net 1.2.11 when install common.logging.log4net. how can nuget bypass dependency resolution or @ to the lowest degree prefer installed packages of sufficient version? in order bypass dependency resolution can utilize -ignoredependencies option: install-package -ignoredependencies thepackagename you should able lock bundle specific version hand-editing packages.config , setting allowedversions attribute indicate version span want allow. <package id="common.logging.log4net" version="1.2.10" allowedversions="[1.2,1.2.10]" /> note not upgrade version of bundle @ when explicitly updating package. s...

jquery - How to keep footer at the bottom even with dynamic height website -

jquery - How to keep footer at the bottom even with dynamic height website - how maintain footer div @ bottom of window when have page dynamically set height (get info database, example) css? if want jquery, came , works fine: set css of footer: #footer { position:absolute; width:100%; height:100px; } set script: <script> x = $('#div-that-increase-height').height()+20; // +20 gives space between div , footer y = $(window).height(); if (x+100<=y){ // 100 height of footer $('#footer').css('top', y-100+'px');// 1 time again 100 height of footer $('#footer').css('display', 'block'); }else{ $('#footer').css('top', x+'px'); $('#footer').css('display', 'block'); } </script> this script must @ end of code; i believe looking sticky footer try this: http://ryanfait.com/sticky-footer/ from article above: layout.css: * { ...

.net - sevenzipsharp file lock. I can't move a file? -

.net - sevenzipsharp file lock. I can't move a file? - i running sevenzipsharp on various archives , if passes test i'd move archive folder. exception saying file in utilize process. can't move either in windows explorer when kill app process can move it. suspect sevenzipsharp has lock on file can't move it. i write using (var extractor= new sevenzipextractor(fn)) { . tried moving file outside using block , still no go. seems after run method few times can move first archive won't able move lastly archive how create no process using file can move archive folder? just dispose() object , don't utilize using(.... ) don't know why(!) method worked me. but if archive not valid, remain locked... suggestion? update: there improve way. can create stream file , close() @ end of code. stream reader=new filestream(filename, filemode.open);//you can alter open mode openorcreate sevenzipextractor extactor= new sevenzipextractor((stream)read...

javascript - stopPropagation does not stop the parent action -

javascript - stopPropagation does not stop the parent action - i'm putting input within a-tag. , want stop link when clicking alter value in input. this html <div id="contain"> <a href="http://www.stackoverflow.com" target="_blank" id="link"> <input id="clickme" type="text" value="1"></input> purchase </a> </div> jquery $('#clickme').focus(function(e){ e.stoppropagation(); }); $('#clickme').click(function(e){ e.stoppropagation(); }); jsfiddle: http://jsfiddle.net/gkvw3/1/ result still goes stackoverflow.com. ideas why is. edit real scenario got markup below. when click anywhere within tr take link href. problem becomes submitting form (not in markup) cause link.. there want explained above , that's why utilize input within link in test. <table> <tr> <td><a hr...

Twitter-like Android Autocomplete Textview -

Twitter-like Android Autocomplete Textview - i want implement twitter-like android autocomplete listview existing android auto-complete textview isn't adding images autocomplete suggestions. need download images , strings server , add together suggestion box. have added reference image. thanks. create filterable listview shown in this thread. extend edittext create command on click opens result new activity edittext command , filterable listview bellow it. add ontextchangedlistener on edit text filter view. add onitemselected listener listview. when item selected close dialog , homecoming selected object on dialog cancel check if entered value match value list if yes homecoming object if not homecoming null. hope helps. android android-layout android-emulator android-widget

android - id class not generated in R.java using eclipse -

android - id class not generated in R.java using eclipse - i installed eclipse , adt plug. when going create new project id class not creating in r.java. want create button , textfields. thanks in advance. you have next things... 1. clean project... regenerate r.java file. 2. if still there error certainly u have error in layout file. android adt

Does anyone know how to successfully install SciPy on Python 3.1? -

Does anyone know how to successfully install SciPy on Python 3.1? - i'm trying install scipy 0.10.0 in python 3.1 virtual environment. know how install scipy python 3.1? i've manually installed numpy successfully, can't seem scipy install properly. i've tried thee methods: easy_install gives error, valueerror: 'build/py3k/scipy' not directory after running setup.py pip gives same error easy_install manual installation: $ cd lib/python3.1/site-packages $ wget http://sourceforge.net/projects/numpy/files/numpy/1.6.1/numpy-1.6.1.tar.gz/download $ tar xvfz numpy-1.6.1.tar.gz $ python setup.py build $ python setup.py install the manual installation seems partly work, error: $ python fatal python error: py_initialize: can't initialize sys standard streams traceback (most recent phone call last): file "io/__init__.py", line 83, in <module> importerror: no module named matlab aborted can help? python python-3.x scipy

Connecting C# and Microsoft Office Application -

Connecting C# and Microsoft Office Application - i'm trying project school. project create presentation software. illustration of microsoft powerpoint. goal mimic use, instead of customizing each slide, user must able upload documents(excel, powerfulness point, , word). after uploading, software must able convert each page "slide". my medium microsoft visual c#. inquire reading material, tutorials or suggestions on how attack project. able text microsoft word , printing out in rtf text box, unfortunately not able preserve format(font style, font size, etc.). although have added microsoft word 12.0 object references in c#, not still know how works. my inspiration project easyworship, presentation software designed church use. software can upload powerfulness point presentations only. i need lot of help. please, , thanks.! i believe going have bit downwards , dirty com interop assemblies available via combination of visual studio w/tools office having...

regex string between two strings -

regex string between two strings - how can text between 2 constant text? example: <rate curr="krw" unit="100">19,94</rate> 19,94 is between "<rate curr="krw" unit="100">" and "</rate>" other example: abcdef getting substring between ab , ef = cd try with: /<rate[^>]*>(.*?)<\/rate>/ however improve not utilize regex html. regex