Posts

python - The exe executable of my application, also opens a console -

python - The exe executable of my application, also opens a console - i create exe executable of application made ​​in pyqt, , went well, when run exe in windows before opening application opens console , while application open console also. i need tell me how create console not come out, or @ to the lowest degree not visible. i've seen answers problem c ++ python have not seen anything the best solution in post linked in comment post, on windows can set property on shortcut starts app, have console minimized. still shows in taskbar, there id need it, can handy in situations(like during dev utilize same script user will, not have bother evrytime start app manually minimize console). in general best utilize pythonw.exe or utilize .pyw extension script. python windows console pyqt exe

java - Extracting some nodes from XML Files -

java - Extracting some nodes from XML Files - i need extract nodes xml file formatted in way: <collection sentiment="negativo"> <comment> <sentiment> ...</sentiment> <chars>...</chars> <words>...</words> <text>blabla</text> <lang>english</lang> </comment> now assume there other <comment> elemente have <lang>spanish</lang> in same xml file. need create 2 separate xml files. first 1 nodes having kid <lang>english</lang> (let's phone call eng.xml) , sec 1 having <lang>spanish</lang> (let's phone call spa.xml) here java code: public void getenglishrows() throws ioexception{ outputstreamwriter f = new outputstreamwriter(new fileoutputstream("c:/eclipse/neg_eng.xml")); bufferedwriter buff; nodelist current_row = doc.getelementsbytagname("comment"); //mette in una lista tutti ...

linux - Cannot run npm as root -

linux - Cannot run npm as root - i trying grunt , running, next this, , cannot much farther first step. able type npm install -g grunt-cli but command fails, giving me advice please seek running command 1 time again root/administrator ok... seek run same command sudo sudo npm install -g grunt-cli and error sudo: npm: command not found which me, sort of weird, because shell able recognize npm without "sudo" thrown in front. how install globally/get sudo recognize npm valid program? i found out reply help of co-worker. basically, there file did not have permissions on, found looking @ error log. sudo'd chmod'd file code of 777, , ran npm install command again, , found worked. thought paste reply in case helps anyone. linux node.js install npm sudo

devforce - Join with distinct - Translating SQL to Linq Query -

devforce - Join with distinct - Translating SQL to Linq Query - i trying translate sql query working linq statement, unfortunately not easy expected. the original sql query looks following: select distinct tt1.artikelid ( select artikelid [dbo].[artsearcheinfachview] feld = 'listungsstatus' , wert = '0' ) tt1 inner bring together ( select artikelid [dbo].[artsearcheinfachview] feld = 'aktiveraktikel' , wert = '1' ) tt2 on tt1.artikelid = tt2.artikelid inner bring together ( select artikelid [dbo].[artsearcheinfachview] feld = 'artikelbezeichnung' , wert '%berentzen%' ) tt3 on tt1.artikelid = tt3.artikelid there more joins later on, build predicate builder later on, page included 2. i tried convert it. using devforce entity manager, unfortunately not working: public async task<int> ladeartikelcounteinfachnew(string sucheingabe) { var query = _artikelcontainer.artsearcheinfac...

Defining the Content-Language header in Rails -

Defining the Content-Language header in Rails - according w3c, viable , preferred way communicate language of intended audience providinga content-language header. relevant part: metadata language of intended audience best declared outside document in http content-language header. how can send such header rails? it'd preferred utilize i18n framework this: response.headers["content-language"] = i18n.locale.to_s read more here: http://guides.rubyonrails.org/i18n.html ruby-on-rails-4

python - How can I open multiple XML documents stored in a single list? -

python - How can I open multiple XML documents stored in a single list? - this python list contains multiple xml files in single list. list_xml = ['hello.xml,'hi.xml','08333.xml'] i want parse hello.xml , store info list. 1 time completed, want read hi.xml . how can this? see pattern of next code. should help you. also, i'd advise go through fundamentals of programming. list_xml = ['a.xml', 'b.xml', ... ] out = [] xml in list_xml: # parse xml here # more code out.append(parsed_data) homecoming python xml-parsing

mysqli - Determine ranking with single mysql query -

mysqli - Determine ranking with single mysql query - i selecting set of items table , determine ranking display on page, code selecting items: `<? $attra_query=mysqli_query($link, "select * table category ='4'"); if(mysqli_num_rows($attra_query)> 0){ while($attra_data=mysqli_fetch_array($attra_query,1)){ ?>` in while loop determine ranking each of items so: select count(mi.location) + 1 rank table m left bring together ( select id,location,country, round(coalesce(total_rating/total_rating_amount,0),10) rating_per_vote table category = '4' ) mi on mi.location = m.location , mi.country = m.country , mi.rating_per_vote > round(coalesce(m.total_rating/m.total_rating_amount,0),10) m.id = '$attra_id'; i figure highly inefficient, there way combine 2 queries single 1 don't have run ranking query each item separately ? //edit sample data: id | location | country | categor...