Posts

java - Intellij generated Ant Build File, doesn't build jar -

i trying create jar using intellij generated ant build. i using intellij 12.1.4 i using java 1.6.0_51 (default on mac). when create ant build using following options: generate single-file ant build overwrite generated files use jdk definitions project files inline runtime classpaths i run following command on command line ant -f buildfile.xml it looks works on command line. there few notes, no errors. when finishes says build successful. .jar never created. i found link: ant build doesn't make jar file seems problem. however, can't seem figure out how create "release" build file intellij. copied current ant build file , renamed "build.xml" , ran command ant release. when ran command got following error: build failed target "release" not exist in project "myproject" any further or ideas next steps great. i able figure out. i had go open project settings (f4) , went artifacts. allowed me se...

css - @viewport, @media and LESS -

i've converted css less use .net application (i using dotless .net, http://www.dotlesscss.org/ compile less @ runtime). the compiler falling down on these 2 blocks of code: @viewport { width: device-width; } /* add min-width ie 8 , lower */ @media \0screen\,screen\9 { body { min-width: 960px; } } just reference, media query above hacky way of targeting ie how can "less-ify" these blocks of code? in less >= 1.4.0 can define variable , use in media query: @iehack: \0screen\,screen\9; @media @iehack { body { min-width: 960px; } } in older versions of less (<=1.3.3) might want use string string interpolation in variable: @iehack: ~'\0screen\,screen\9'; this should give desired output. but if want go hacky way in css can go hacky way in less too: @themedia: ~"@media \0screen\,screen\9 {"; @aftermedia: ~"} after"; @{themedia} { body { min-width: 960px; } } @{af...

javascript - HTML file won't find JS and CSS files -

Image
my page should show single google map. if throw code in jsfiddle, works fine. all of files in same directory. tested in chrome , firefox, both don't show map. think there must way calling access javascript , css. html <html> <head> <link rel="stylesheet" type="text/css" href="bob.css"> <script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script> </head> <body> <h1>my heading</h1> <div id="map"></div> <p>my paragraph.</p> <script type="text/javascript" src="bob.js"></script> </body> </html> bob.js var mapoptions = { center: new google.maps.latlng(37.7831,-122.4039), zoom: 12, maptypeid: google.maps.maptypeid.roadmap }; new google.maps.map(document.getelementbyid('map'), mapoptions); bob...

acrobat - pdf /F font size size is not real size? -

i'm adding text visible signature. text that: bt 1 0 0 1 0 1 tm /f1 5 tf (hello world)tj et 5 font size. how calculated? i've check width of text it's not same: affinetransform affinetransform = new affinetransform(); fontrendercontext frc = new fontrendercontext(affinetransform,true,true); font font = new font("myfont", font.plain, 5); int textwidth = (int)(font.getstringbounds(text, frc).getwidth()); in pdrectangle, size 5 big. ideas? how 5 calculated? @stanlyf quoted how font size meant interpreted. observe the nominal height of lines you seem have misconception widths. mentioned in my answer former question , widths of string depends on the font metrics, character widths of characters involved, the font size, the current character spacing value, the current word spacing value, the horizontal scaling, the current text matrix, and the current transformation matrix. for details read specification .

android - Java Thread Concurrent Read and Write -

i have arraylist store data received , transmit asynchronously on bluetooth. i have write thread , read thread access arraylist. trying simulate bluetooth echo (the bluetooth echo send). private class readthread extends thread { @override public void run() { super.run(); while(!isinterrupted()) { try { byte[] buffer = new byte[64]; if (minputstream == null) return; size = minputstream.read(buffer); if (size == 64) { if (bufferlist.isempty()){ log.i("aok fail","nothing aok"); } if (comparebyte(buffer,bufferlist.get(0) == true) // compare data in 2 byte array bufferlist.remove(0); } } catch (ioexception e) { e.printstacktrace(); return; } } } } private class writethread extends thread { @override...

c# - WCF DataService throws ConnectionString exception on insert -

my wcf data service works great when fetch data it. when try insert new data, following exception: the connectionstring property has not been initialized the thing modified use partial class tells use connection string name: public myextentities(string connectionstring) : base(connectionstring) { ... } : base(connectionstring) { ... } and overrode createdatasource , have proper context: protected override myextentities createdatasource() { myextentities entities = null; try { entities = new myextentities ("name=myextentities"); ... return entities; and can believe, config file contains key: add name="myextentities " connectionstring="metadata=res://*... the stack shows core system running, nothing methods: system.data.entityclient.entityconnection.open() at: system.data.objects.objectcontext.ensureconnection() at: system.data.objects.objectcontext.savechanges(saveoptions options) ...

Running Access VBA sub from Batch -

i have 8 subs inside access file run externally batch file. i have little experience batch not entirely sure start writing this, know if possible or provide code take at? struggling find info online. thanks, simon google: access command line get, example, this: http://support.microsoft.com/kb/209207