Posts

Showing posts from February, 2011

batch file - Incorrect *.bat execution from Java -

this question has answer here: changing working-directory of command java 3 answers i have .bat file following content example: mkdir testdir now put folder c:\temp want run using java following: runtime.getruntime().exec("cmd /c start c:\\temp\\test.bat"); i expect folder created in c:\temp when execute file manually, folder being created in workspace wrong. how can fix it? you need specify working directory when run cmd . there overloads of runtime.exec() allow specify working directory. example: runtime.getruntime().exec("cmd /c start c:\\temp\\test.bat", null, new file("c:\\temp")); alternatively, can use processbuilder give rather more explicit control of various aspects of process you're starting.

delphi - RadioButtons in Firemonkey are all checked after scrolled out of view -

Image
i have problem radio buttons in firemonkey. whenever scrolled out of view, checked. the problem seems alone graphical conditional, because remembers button checked. groupname set. some ideas?

How can I secure a Batch file that locks the computer? -

okay, have lock script locks computer, using alt + tab gets around this. there way stop this? also, entering nothing , pressing enter gets around too. the code uses 2 windows, 1 keep window open when closed @echo off powershell -command "& { $x = new-object -comobject shell.application; $x.minimizeall() }" tskill explorer tskill explorer :a start /w lock.bat goto and other actual lock script: @echo off mode 35,10 cls color title locked %username% echo password? set /p password= if %password%==password goto end goto fail :end start explorer exit :fail exit is there way stop these happening? edit i solved blank issue using if [%password%]==[] goto fail windows has screensaver feature asks enter password resume. you launch in batch file.

d3.js - D3 cross tabulation HTML table -

Image
i'm trying create d3 cross tabulation html table (there more interactive features, first step) based on json data. can populate horizontal table header, having trouble vertical headers , data fields. the table should following: my code far ( jsfiddle here ) is: var nested = d3.nest() .key(function(d) { return d._id.env; }) .entries(data.result); console.log(nested); var table = d3.select("#table") .append("table") .style("border-collapse", "collapse") .style("border", "2px black solid"); var thead = table.append("thead"); thead.append("tr") .selectall("th") .data(nested) .enter().append("th") .text(function(d) { return d.key; }); var tbody = table.append("tbody"); var tr = tbody.selectall("tr") .data(nested.values) // not sure how .enter().append("tr"); tr.selectall("td"...

c# - Write to existing xml file without replacing it's contents (XmlWriter) -

i encountered following issue, i first write xml file this: xmltextwriter writer = new xmltextwriter("course.xml", null); writer.formatting = formatting.indented; writer.writestartdocument(); writer.writestartelement("course"); writer.writeattributestring("title", "examle"); writer.writeattributestring("started", "true"); writer.writeendelement(); writer.writeenddocument(); writer.close(); and xml output is: <?xml version="1.0"?> <course title="example" started="true" /> after want write more data xml file use code again: xmltextwriter writer = new xmltextwriter("course.xml", null); writer.formatting = formatting.indented; writer.writestartdocument(); writer.writestartelement("course"); writer.startelement("level"); writer.startelement("module"); writer.endelement(); writer.end...

java - Axis2 vs Apache Cxf -- Soap Webservice Client -

i have communicate soap webservice , consuming through client built using java library axis2, , going well, need migrate client apache cxf because have other clients through apache cxf , when have axis2 , apache cxf in same classpath have conflicts because of different implementations of xmlschema both libraries use. the problem when using apache cxf response being sent in html , not soap can see through stacktrace receiving: javax.xml.ws.soap.soapfaultexception: response of unexpected text/html contenttype. incoming portion of html stream: <html> ... @ org.apache.cxf.jaxws.jaxwsclientproxy.invoke(jaxwsclientproxy.java:157) ... @ org.apache.cxf.interceptor.staxininterceptor.handlemessage(staxininterceptor.java:84) @ org.apache.cxf.phase.phaseinterceptorchain.dointercept(phaseinterceptorchain.java:272) @ org.apache.cxf.endpoint.clientimpl.onmessage(clientimpl.java:835) @ org.apache.cxf.transport.http.httpconduit$wrappedoutputstream.handleresponseinternal(httpconduit.java:...

javascript - How can I keep the parent from displaying when the child is filtered out? -

Image
here repeater: <div ng-controller="eventcontroller"> <div class="input-group" id="search"> <label>search:</label><input type="text" id="searchfield" class="form-control" ng-model="search" /><br /> <select id="searchbydate" class="form-control" ng-model="datefilter"> <option value="">filter month</option> @{ foreach (datetime month in viewbag.months) { <option value="@month.tostring("yyyy-mm")">@month.tostring("mmmm yyyy")</option> } } </select> </div> <div class="row" style="margin: 0; padding: 0" ng-repeat="datebegin in events|groupby:'datebegin'|filter: datefilter"><br /> ...

3d-printing an inherently nonorientable surface -

Image
i'm trying print 3d models of nonorientable surfaces : klein bottle, kuen surface, boy surface, etc. from surface's parametric representation (x,y,z functions of u , v) compute triangular mesh, repairable printable form tools such meshlab, netfabb, , 3dedit pro. however, these tools can't restore orientability , required 3d printing. (the printer must know inside is, know deposit material!) @ line of self-intersection, 2 sheets of nonorientable surface disagree side "outside." in meshlab, 1 sheet black. in netfabb, red. triangles called flipped; normals reversed. what approaches reasonable? resolve orientability calculating lines of self-intersection, separate sheets, each sheet own "shell" in 3d-printing-ese. print not surface enclosing solid volume, rather surface lattice . (does beg question, because extrusion "into interior" becomes vanishingly thin @ lines of self-intersection?) print model , "inverse" (rever...

java - Replacing a text box with DateChooserCombo in org.eclipse.swt.layout.GridData -

i had dialog created in swt using griddata having: label1: combobox label2: textbox1 label3: textbox2 checkbox1 label4 checkbox2 label5 based on comobox selected value, need replace textbox2 datechoosercombo or datechoosercombo textbox2. below class implementation method createtextbox create textbox2 when loading dialog. setdatepicker called on change of combo box value. please provide assistance on implementation in below class on how can achieve it. in advance. public class confgelementinsertdialog extends dialogex { private text typename; private text defaultvaluetext; private combo templatetype; private button iskeycheckbox; private button iseditablecheckbox; private button todisplaycheckbox; private button okbutton; private boolean isinstanceconfig; private list<string> configelementname; private boolean iskey = false; private boolean todisplay = false; private boolean iseditable = false; private string ...

bit manipulation - How can I efficiently zero out the last 32 bits of a double in java? -

how can 0 out last 32 bits of double, in java, efficiently possible? try this. private static final long zero_out_last_32_bits = 0xffffffff00000000l; public static void main(string[] args) { double number = 2.5; long numberbits = double.doubletolongbits(number); double result = double.longbitstodouble(numberbits & zero_out_last_32_bits); } it zeroes out last 32 bits of binary representation of double using binary and operation. however, make sure know , why doing - @ least expect explaining comment next code this.

sql - Derby Column names get cut off when using ij -

when type "describe [sometable];" column names long columns (over 20 characters) cut off, , & symbol used. example have 2 columns appear named wowthisisaverylongc&. when run select * statement column names truncated because data in them 2 or 3 characters long. tried using system calls table , select export data csv, not give me header info. maximumdisplaywidth changes width data displayed. can not find way figure out correct names of these columns. database inherited, i'm bit stuck. any , appreciated. try using command in ij. should point maximumdisplaywidth command there ij.maximumdisplaywidth property

javascript - Undefined HTTP GET Request Interpreted by Node.js Server -

i having issue node.js application sending http request through ajax call client-side, receiving request server-side, , trying use data sent through request. issue server says request undefined. have absolutely no idea why case doing other similar requests on other pages , work fine. here error message: /var/www/html/adminextension/extension/extension/node_modules/find/index.js:35 throw err; ^ error: enoent, lstat '/path/to/project/undefined' the "undefined" bit supposed rest of path retrieved request. here relevant app.js code: var express = require('express'); var memorystore = require('connect').session.memorystore; var app = express(); app.set('port', process.env.port || 3333); app.set('views', __dirname + '/views'); app.set('view engine', 'ejs'); app.set('view options', {layout: false}); app.use(require('morgan')('dev')); app.use(require('...

google app engine - GAE Logs API (Python) - Requests to Static Handler Do Not Show Up -

i have python google app engine app , wish query server logs insight requests handled static file handler. that is, have static handler serving images folder called /static: from app.yaml: handlers: - url: /static/* static_dir: static/ for purpose trying logs using logservice class (logs api), documented nicely here . long story short, bit of code fetches logs: start_time = time.time() - 86400 end_time = time.time() req_log in logservice.fetch(end_time=end_time, start_time=start_time, offset=none, minimum_log_level=none, include_app_logs=true): app_log in req_log.app_logs: result += ('<br />message: %s<br />' % app_log) the thing is, getting logs requests generated dynamic content handler. while able see logs static requests in gae logs dashboard, , these requests accounted when download logs using appcfg, not returned logservice.fetch metohd. is...

how to get selected value for Kendo DropDownList -

i can't figure out how determine item selected in kendo dropdownlist. view defines it's model as: @model kendoapp.models.selectorviewmodel the viewmodel defined as: public class selectorviewmodel { //i want set selected item in view //and use set initial item in dropdownlist public int encselected { get; set; } //contains list if items dropdownlist //selectiontypes contains id , description public ienumerable<selectiontypes> enctypes } and in view have: @(html.kendo().dropdownlist() .name("encountertypes") .datatextfield("description") .datavaluefield("id") .bindto(model.enctypes) .selectedindex(model.encselected) ) this dropdownlist contains values expect need pass selected value controller when user clicks submit button. works fine except don't have access item selected controller...

signals - Activate a workflow transition from wizard in OpenERP 7.0 -

Image
i've set wizard in openerp 7.0 updating fields correctly , working fine. send signal workflow wizard after user submits information check if there transition taken. my wizard code following: from openerp.osv import osv openerp.osv import fields openerp.tools.translate import _ class ref_generic_request(osv.osv_memory): _name='ref.generic.request' _columns = { 'reformulation_info': fields.text('reformulation instructions', help='instructions requestor justification reformulation needs'), } def save_info(self, cr, uid, ids, context=none): if 'active_id' in context: info=self.browse(cr,uid,ids)[0].reformulation_info self.pool.get('generic.request').write(cr,uid,context['active_id'],{'reformulation_info' : info, 'needs_reformulation': 1}) return { 'type': 'ir.actions.act_window_close', } ref_...

r - how to delete the end of "}" and append three rows contents -

a.txt contents: {\aaa {\bbb\ccc} {\aaa \bbb \ccc } } i can load text in r using readlines (or scan). want know how delete end of "}" , append 3 rows contents: \ddd \eee \fff then save new file. thank you. i'm assuming want add new lines main block. if that's case, lines<-scan(what=character(), text="{\\aaa {\\bbb\\ccc} {\\aaa \\bbb \\ccc } } ") morelines<-append(lines, c("\\ddd","\\eee","\\fff"), after=length(lines)-1) writelines(morelines, "out.txt") should work.

crash - Excel 2013 PowerPivot add-in crashes -

running serious problem little on solving issue. time try doing dax or opening excel application, excel crashes , gives me following errors: error #1 excel running problems 'microsoft office powerpivot excel 2013' add-in. if keeps happening, disable add-in , check available updates. want disable now? error #2 we couldn't load powerpivot add-in. first try office repair fix issue. error below should if doesn't work. not load file or assembly 'microsoft.office.interop.excel, version=15.0.0.0, culture=neutral, publickeytoken=71e9bce111e9429c; or 1 of dependencies. system cannot find file specified. things i've tried: -office repair; quick , online -'fix it' application; re-install office 365 proplus renaming os.dll os.dll.old; restarting application -restart computer -renaming os.dll os.dll.old; restarting application

gpu - What is BaseMosaic (NVidia/X11) -

i see references basemosaic in nvidia x server settings applet, , in xorg.conf, can't find description of it. it, , do? mosaic way nvidia handles multiple gpus , monitors. basemosaic when using separate gpus without sli, there sli mosaic. see mosaic , sli mosaic more detailed information

java - Add graphic using a JLabel -

is correct use jlabel when need insert graphic or other way? im using swing. imageicon icon = new imageicon("icon.png"); jlabel label = new jlabel(icon); panel.add(label); http://docs.oracle.com/javase/tutorial/uiswing/components/icon.html there's more 1 way insert graphic. depends on how want use graphic. if icon simplest , fastest way.

android - Getting ListView item click position outside of getView() method -

Image
i have listview : ..and i've been using code handle incoming click events start/stop music playback : @override public view getview(final int position, view convertview, viewgroup parent) { ... previewbtn.setonclicklistener(new onclicklistener() { @override public void onclick(view view) { boolean istoggled = ((togglebutton) view).ischecked(); mp3file music = getitem(position); if (!istoggled) { callbackactivity.onmusicpreviewstopped(); ((togglebutton) view).setchecked(false); } else { callbackactivity.onmusicpreviewrequested(music); } } }); ... which works fine tbh. have habit of making class implements required interface instead of creating new 1 every view created. it'd pretty straight-forward if choose ignore position of item...

RequireJS/CodeMirror (sql mode) - how to make it work -

Image
i'm starting out codemirror (4.1) , using requirejs. (i'm using reactjs i'm pretty sure not problem) i have not got configured correctly. grateful if point out error. my config looks this require.config({ deps: ["main"], paths: { ... codemirror: "../../external/codemirror/codemirror-4.1/lib/codemirror", cmsql: "../../external/codemirror/codemirror-4.1/mode/sql/sql" }, shim: { ... codemirror: { exports: "codemirror" }, cmsql: { deps: ["codemirror"], exports: "cmsql" } } }); and module instantiating follows : define(['jquery', 'react', 'codemirror', 'cmsql'], function ($, react, codemirror) { return react.createclass({ render: function () { console.log("render-editarea"); return ( <textarea id="editarea"> -- comment here select id [patient...

ruby on rails - Pluralized many-to-many but still uninitialized constant -

as per below think setup fine: class location < activerecord::base has_many :traders has_many :servicelocations has_many :services, through: :servicelocations end class service < activerecord::base has_many :servicelocations has_many :locations, through: :servicelocations end class servicelocation < activerecord::base belongs_to :location belongs_to :service end class trader < activerecord::base belongs_to :location end the problem still getting uninitialized constant error . i have noticed created model servicelocation, funky rails magic created service_location.rb unsure if a) problem , b) how fix if is. i believe error came this class service < activerecord::base has_many :servicelocations has_many :locations, through: :servicelocations end these should this class service < activerecord::base has_many :service_locations has_many :locations, through: :service_locations # notice underscore end your...

visual studio - Clang+LLVM static library linking error on Windows - Why would the symbols be different? -

after compiling clang , llvm following instruction on llvm website try linking built static libs in test app. code built v110 of vs toolset. im getting linker errors of type "error lnk2001" , "error lnk2019". the app appears put libs in bucket symbol resolution. verbose linker output can see being dismissed: 1> unused libraries: ... 1> c:\sdk\llvm\debug\lib\clangtooling.lib ... digging little deeper have found symbols in error message , ones in libs not quite same. -here example- linker error => *unresolved external symbol "public: int __cdecl clang::tooling::clangtool::run(class clang::tooling::toolaction )" (?run@clangtool@tooling@clang@@qeaahpeavtoolaction@23@@z) referenced in function main ...giving " ?run@clangtool@tooling@clang@@qeaahpeavtoolaction@23@@z " symbol name. now using "dumpbin /symbols" on built version of clangtooling.lib => *fda 00000000 undef notype () external | ?run@cla...

php - Adding items to shopping basket using sessions -

this shopping basket , user can click add basket passing action=add variable across , selected switch statement. first time add item causes error (bottom). occurs first time leads me believe because session[cart] has not been created. the variables set here: if(isset($_get['id'])) { $item_id = $_get['id'];//the product id url $action = $_get['action'];//the action url } else { $action = "nothing"; } <?php if(empty($_session['user_loggedin'])) { header ('location: logon.php'); } else { switch($action) { //decide case "add": $_session['cart'][$item_id]++; //add 1 quantity of product id $product_id break; case "remove": $_session['cart'][$item_id]--; //remove 1 quantity of product id $product_id if($_session['cart'][$item_id] == 0) unset($_session['cart'][$item_id]); //if quantity zero, remove (using 'unset' function) ...

python print next word in a file -

i have error on code here print next word/string contained on file for in cursor.fetchall(): keywords.append(i[0]) open('qwer.txt','r') file: line in file: key in keywords: if key in line: line = line.split(". ") j in range(len(line)): <----error(str obj not callable) print line[key(j+1)] <----error print line[key(j+1)] is attempt call key single argument j+1 . however, key string can't called. think meant use index key[j+1] , won't integer attempt index line fail. i think want is: line[line.index(key) + 1] really should checking key in line after split: with open('qwer.txt','r') file: line in file: line = line.split() key in keywords: if key in line: print line[line.index(key)+1]

make virtualenvwrapper to work with different python versions -

fix: sorry, fine, error because of no module installed in new environment, jinja2 . first time using virtualenvwrapper little confused. setup went fine, read docs, still don't understand few things. in .bashrc file i've set: # virtualenvwrapper export workon_home=$home/.virtualenvs export project_home=$home/snakepit source /usr/bin/virtualenvwrapper.sh i have project files, thougt should following: go ~/snakepit/ directory, run mkvirtualenv -p /usr/bin/python2 [ envname ] (i need specific version project), , saw created in ~/.virtualenvs/ dir. my command promt changes showing me new environment [ envname ] . when now: python -v , shows using version 2.7 of python, well! but when move now, project files snakepit directory, , try running program python myprogram.py shows me errors because still tries run program python 3 . how possible when python -v shows version 2.7 ? error not python version being run, instead module missing in newly ...

android - Where do I find database panel for SQLite in IntelliJ 13.0? -

i using intellij 13.0. googled sqlite, did not find database option @ view > tool window. is missing in intellij idea 13.0? there no database support in free community edition . part of commercial ultimate edition.

api - Can I write to the Description field of a Google Calendar event? -

i'm trying write description-field of google calendar event using google calendar api. know it's possible where-field ( https://chrome.google.com/webstore/detail/location-autocomplete-for/kofcojkjfdobdmnijbkabkjijkdkpnla ) i'm not sure it's doable description-field. i've read whole google calendar api , can't find anything. know if can write description field? the description field called "description" , represents long textual description in event's body. see https://developers.google.com/google-apps/calendar/v3/reference/events#resource there "title" short title of event.

pandas - How to use the merge function to merge the common values in two DataFrames? -

i have 2 dataframes, want merge on column "id" df1 : id reputation 1 10 3 5 4 40 df2 : id reputation 1 10 2 5 3 5 6 55 i want output be: dfoutput : id reputation 1 10 2 5 3 5 4 40 6 55 i wish keep values both df s merge duplicate values one. know have use merge() function don't know arguments pass. you concatenate dataframes , groupby id , , aggregate taking first item in each group. in [62]: pd.concat([df1,df2]).groupby('id').first() out[62]: reputation id 1 10 2 5 3 5 4 40 6 55 [5 rows x 1 columns] or, preserve id column rather index, use as_index=false : in [68]: pd.concat([df1,df2]).groupby('id', as_index=false).first() out[68]: id reputation 0 1 10 1 2 5 2 3 5 3 4 40 4 6 55 [5 rows x 2 columns] karld. suggest...

android - How to use user input to search a website through an app -

i want make app asks user input , it'll search website , have display results. i know i'm gonna have web scraping make app display results thing i'm stuck on how searching. want if user using search function on website itself. example, if user types app's search bar "chairs", app show wikipedia's results "chairs" using wikipedia example, it's straight forwards. send request wikipedia site, , return correct page. requests use parameters appended end of url, take en.wikipedia.org/w/index.php?search= and append query chairs , http://en.wikipedia.org/w/index.php?search=chairs with wikipedia, need replace spaces + symbol. if wanted search musical chairs , be en.wikipedia.org/w/index.php?search=musical+chairs the url different each site, should easy find if @ html, or looking @ url in browser after search on site

how to avoid the type of field not be changed with create table as select command in sqlite3? -

i found data type of field changed when use command such create table select * ; c:\users\root>sqlite3 g:\\test.db sqlite version 3.8.3.1 2014-02-11 14:52:19 enter ".help" instructions enter sql statements terminated ";" sqlite> create table test1 (day datetime); sqlite> insert test1 (day) values(20101001); sqlite> pragma table_info(test1); 0|day|datetime|0||0 sqlite> create table test2 select * test1; sqlite> pragma table_info(test2); 0|day|num|0||0 the field day datetime type in test1,when use command create table test2 select * test1; the field day type in test2 changed num type. how can make field day not changed ?how fix ? create table test2 select * test1; the documentation says: the declared type of each column determined expression affinity of corresponding expression in result set of select statement in other words, data types of original table not copied (in same way constraints, default values, o...

c# - Error on adjusting jpeg quality: Value cannot be null.Parameter name: structure -

i have method take image, make copy resizing, , return byte array. have attempted add ability adjust quality of image per doc: http://msdn.microsoft.com/en-us/library/bb882583(v=vs.110).aspx image image = image.fromfile(_filepath); image newimage = new bitmap(newwidth, newheight); using (graphics graphicshandle = graphics.fromimage(newimage)) { graphicshandle.interpolationmode = interpolationmode.highqualitybicubic; graphicshandle.drawimage(image, 0, 0, newwidth, newheight); } memorystream memstream = new memorystream(); encoderparameters myencoderparameters = new encoderparameters(1); imagecodecinfo encoder = imagecodecinfo.getimagedecoders().singleordefault(c => c.mimetype == contenttype); system.drawing.imaging.encoder myencoder = system.drawing.imaging.encoder.quality; encoderparameter myencoderparameter = new encoderparameter(myencoder, 50l); newimage.save(memstream, encoder, myencoderparameters); return memstream.toarray(); when call newimage.save() , err...

ssis - Excel modifed date is changing when running package -

i have problem when loading data excel source(excel 2010). when ever run package, excel file modified date changing current date. if change excel connection properties also, file modified date changing. how can resolve issue? using dataflow task , excel source. i not find other solution setting read-only attribute on excel , powerpoint files avoid excel (2010, 2007, 2003) , powerpoint (2010, 2007, 2003) modify binary data stream of file without changing last modification date on opening file reading , closing without making change , therefore without explicit save. i see on comparing binary files (*.xls, *.pps) before , after viewing excel/powerpoint file last modification date unchanged, byte stream changed (powerpoint) or without (excel) change of file size, 2 applications microsoft office package record in file name of user last opened file, when file not modified @ all. microsoft word (2010, 2007, 2003) not modify byte stream of *.doc files on opening document read...

c - How to pass linmath.h matrices to glsl shader? -

i'm learning linmath.h library, i'm having trouble passing matrices made in main program vert shader: #include "linmath.h" … glint mat_uniform_handle = glgetuniformlocation(shade_program_handle, "matrix"); … mat4x4 m; mat4x4_identity(m); gluniformmatrix4fv(mat_uniform_handle, 1, gl_false, m); but of course gives me type error because linmath matrices have type float (*)[4] , gluniformmatrix4fv takes type const glfloat * . i tried writing own converter concated columns of matrix single array, returned pointer first element, didn't work. am missing function of linmath.h conversion me? if not, how convert linmath.h matrix opengl matrix? it's pathetic didn't try before asking here, here's solution, straight cast.: gluniformmatrix4fv(mat_uniform_handle, 1, gl_false, (glfloat *)m); hope helps someone.

Python Pickle Module and OOP -

in example below pickle crashes every attempt save instance file. why happen? how avoid it? how around it? class base(dict): def __init__(self): super(base, self).__init__() class classa(base): def __init__(self): super(classa, self).__init__() def setinstb(self, instb): self['instb']=instb class classb(base): def __init__(self): super(classb, self).__init__() def setinsta(self, insta): self['insta']=insta insta=classa() instb=classb() insta.setinstb(instb) instb.setinsta(insta) import pickle pickle.dump( insta, open( "save.p", "wb" ) ) posted later. if base(dict) class not declared subclass of built-in dict problem goes away. running code posted below raises no pickle errors. still want know why pickle fails , how make work classes inheriting dict . class base(object): def __init__(self): super(base, self).__init__() class classa(base): def __in...

c++ - Windows: open a named document -

i'm trying extend existing app called drax edits metadata of mp4 movie files.. want able drag-n-drop files onto it, not support. i've gotten far enough able decode "clipboard" data when dropped, , filter accept file (extensions) can handle. ( like so know next no winapi/c++ it's cargo-culted.) but want trigger opening document, (file) name have in tchar. , i'm stuck. how trigger same sort of action file>open dialog would, when know name of file drag/drop operation? normally, file -> open dialog not anything allow user choose file name. returns file name you, programmer, with. but, in case, you're modifying existing application, code has been written. find it, need search method(s) display file -> open dialog. see file name(s) returned open dialog. all logic opening file crammed same method 1 displays file -> open dialog. if so, refactor code, have separate method like void openfile(cstring pszfilename, /* other impo...

C# How to Dynamically Load .Dll of 3rd party (.net) under windows mobile -

i have commercial problem in company have project wavenis product give sdk (dll files) application running under compact framework 3.5 windows mobile 6.1 used dll file 1- right click on references 2- add reference 3- browse , select needed dll 4- copy dll output now company doesn't need make sdk available used google , got use using system.reflection; assembly classlibrary1 = null; classlibrary1 = assembly.loadfrom(filename); foreach (type type in classlibrary1.gettypes()) if (type.getinterfaces() != null) return activator.createinstance(type) iclass1; doesn't work me if have idea please me i read thread compact framework c# loading dll dynamically didn't me the first question have why isn't add references enough? if have file @ design time, should using mechanism. mt second question "it doesn't work" mean? exception? type of exception? message? normally these un...

java - How can I start Tomcat Remotely on Windows -

is there way start tomcat remotely moving start.bat? for example. tomcat installed c:\"program files"\tomcat , want able copy , paste start.bat directory (c:\tools\server). c:...server want able double-click on start.bat , automatically start tomcat. would have edit specific line or multiple lines? which lines have edit? have edit line 25? (set "current_dir=%cd% ....) create batch script starts it. all need change relative location of tomcat directory in script.

c++ - Iterating through an STL list -

this question has answer here: how iterate backwards through stl list? 5 answers for computer science class, doing assignment on depth first search , need access adjacent vertices (which contained in list within struct). need use reverse iteration go through list teacher states in specifications: "there several ways this, , for (it=x.end(); it!=x.begin(); it--) not 1 of them." any suggestions? you use reverse iterator for(auto it=x.rbegin(); != x.rend(); it++){...} use crbegin()/crend() if want const iterators.

html - How can I set up a CSS style for min and max width for responsive website? -

i have problem code. because trying create responsive website using min , max width using media queries. parts of queries fine there element doesn't read css media query. i have navigation sidebar in left side. , want resize using media queries. if resized it. doesn't read min-width include in media query. when check code. color property working. when debug using developer tools in chrome. read css other css file named 'product.css' , not 'responsive.css'. what should do? here's simple css responsive.css @media screen , (max-width: 1603px) { #searchhandler { color: red; min-width: 310px; } } here's css product.css #searchhandler { width: 20%; display:none; min-width: 316px; } i newbie in css that's why having hard time part. ok solved problem. not media query links inluding css file in header. my old code this <link rel="stylesheet" type="text/css" href=...

Grails Email Confirmation Plugin Assumes Context Path -

i'm trying use grails email confirmation plugin , application designed run @ root application context. runs @ localhost:8080/ rather @ localhost:8080/appname . plugin sends confirmation link looks localhost:8080/appname/confirm/ybl4drwapjjf... . when remove /appname , link works perfectly. does know of way either configure plugin not include appname in link or map /appname/confirm/{id} /confirm/{id} this isn't favorite solution (see comments in original question). i added following url mapping... class urlmappings { static mappings = { ... "/appname/confirm/$id?"(controller: "user", action: "confirm") ... } } then in user controller, added following method... @secured(["role_user","role_anonymous"]) def confirm (string id) { redirect(uri: "/confirm/$id") }

c# - Trigger the Alarm in Windows Phone 8.1 Universal Store App? -

Image
this seems work fine in windows 8.1 universal store app not in windows phone 8.1 universal store app. can tweaked work windows phone windows tablet? xml file: <toast duration="long" launch="alarm(eb6c47a8-e5e2-40d0-bc4e-3aa957f36484)"> <visual> <binding template="toastimageandtext04"> <text id="1">alarm app</text> <text id="2">alarm test</text> <text id="3">time wake up!</text> </binding> </visual> <audio loop="true" src="ms-winsoundevent:notification.looping.alarm2" /> <commands scenario="alarm"> <command id="snooze" /> <command id="dismiss" /> </commands> </toast> notification class: public class notification { public async task createnotification() { storagefo...