Posts

Block Reference Hyperlink property in AutoCAD 2014 with VBA? -

i have .dwg file has hundreds of block references. trying create hyperlink pdf file of block references. pdf on d drive. for example, names of block refernece are: '2:test', '26:test', '234:test' . hyperlink each point be: '2:test' hyperlink d:\reports\file-002.pdf ; '26:test' hyperlink d:\reports\file-026.pdf ; '234:test' hyperlink d:\reports\file-234.pdf . from block references number before ':', , matching pdf 'file-' followed number before ':' in 3 digits. there lot of these hands, , think can program this. i have enough basic programming knowledge manipulate string number , convert in 3 digits. question have and/or need how cycle through each block reference(for loop) on file , able write hyperlink property? possible? before coming here kind of looked @ these links did not prove helpful: link1 ; link2 ; link3 thanks hints update private sub commandbutton1_click() dim readdata string ...

HTML Form with input type 'Image' not responding to click -

in 1 of cells in table, have image. idea when user clicks on image, php script supposed run. image displays (as else), there no response click event. <td id="btn_delete" <form action="delete_item.php"> <input type="image" src="images/delete.png"> </form> </td>" i'm thinking maybe there no onclick event here??? read documentation, seems there is. doing wrong or there using image in form won't allow click event? if so, how can accomplish this? thanks! one issue see missing right arrow on first td: <td id="btn_delete" should be: <td id="btn_delete">

javascript - return highlighted cells to php -

so using example code link select cells on table dragging build grid of numbers 1-192 part works great, curious how return "highlighted" cells php? <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title></title> <style type="text/css" media="screen"> table td { width:50px; height:50px; text-align:center; vertical-align:middle; background-color:#ccc; } table td.highlighted { background-color:#999; } </style> </head> <body> <form action='test.php' method='post'> <table cellpadding="0" cellspacing="1" ...

java - Creating a room by reading from a file (for a game) -

basically have make game , need create room reading file, one: # # 0 d room0.txt 0 # 1 e room1.txt 0 # wwww0wwwww w w w w w w w w w w w w w w w w w w w 1 wwwwwwwwww the "#" means can skip lines(they're information) , "w" places need put wall, numbers doors , blank spaces floor. i figured best way create room create method receives file , reads , put "information" string[10][10], , create method(or in main) receives string[10][10] created , creates room(adds images room), having difficulties reading file if guys me part thankful. the error when run program on line: if(r[x][y].equals("w")) if guys need class, image of game should or else forgot show please let me know , help. public void generateroom(file file){ if(file.exists()){ scanner sc = null; string[][] r = new string[10][]; int row = 0; try { sc = new scanner(fi...

css - Cherry Framework 4 - Change footer bootstrap settings -

i have wordpress website uses cherry framework 4 , wonder how theme works. in footer see this: <footer id="footer" class="site-footer wide" role="contentinfo"> <div id="static-area-footer-top" class="footer-top static-area"> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-5 col-md-5 col-lg-5 static-footer-menu"></div> <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 static-footer-logo"></div> </div> </div> </div> <div id="static-area-footer-bottom" class="footer-bottom static-area"> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-5 col-md-5 col-lg-5 static-footer-info"></div> ...

bash - exit code from ssh command -

i'm trying retrieve code return script: #!/bin/bash echo "cm 1" ssh -i key/keyid.ppk user@x.x.x.x " grep blabla ddd if [ ! $? -eq 0 ]; exit 1; fi " echo $? but last command echo $? returns 0 instead of 1. and if try run separately (not script) : the ssh command: ssh -i key/keyid.ppk user@x.x.x.x grep blabla ddd => msg "grep: ddd: no such file or directory" then: if [ ! $? -eq 0 ]; exit 1; fi then: echo $? => returns 1 expected do have idea why doesn't work in script ? thank you this code ssh -i key/keyid.ppk user@x.x.x.x " grep blabla ddd if [ ! $? -eq 0 ]; exit 1; fi " evaluates $? in shell , not in remote one, because $ not escaped in single quotes. should escape reach desired behaviour. once avoid evaluation in local shell, second time avoid evaluation when passed bash on remote side. or rather put command single quotes: ssh -i key/keyid.ppk user@x.x.x.x ' grep blabla ddd if [ ! $? -eq ...

c++ - cocos2d-x: writing words on screen in multiple lines -

in cocos2d-x when use cclabelttf writes words in consecutive order. there class in cocos2d-x gets place,width, height , string inscribe in rectangle on screen , if string's length bigger rectangle's size, breaks in multiple lines? what method of cclabelttf class? bool initwithstring (const char *string, const char *fontname, float fontsize, const ccsize &dimensions, cctextalignment halignment, ccverticaltextalignment valignment)

jquery - I'm trying to add a small javascript piece to a web page, but it just displays the code on the page -

like title says, i'm trying add small javascript piece web page, keeps glitching , shows code, can help? (for want know, here's javascript piece): var draw = function() { background(0,0,0); strokeweight(10); stroke(0,255,0); ellipse(mousex,mousey,350,350); strokeweight(5); fill(0,0,0); stroke(0,255,0); ellipse(mousex,mousey,300,300); strokeweight(1); stroke(0,255, 0); fill(0,0,0); ellipse(mousex,mousey,250,250); ellipse(mousex,mousey,155,155); ellipse(mousex,mousey,145,145); ellipse(mousex,mousey,135,135); ellipse(mousex,mousey,125,125); ellipse(mousex,mousey,115,115); ellipse(mousex,mousey,105,105); ellipse(mousex,mousey,95,95); ellipse(mousex,mousey,85,85); ellipse(mousex,mousey,75,75); ellipse(mousex,mousey,65,65); ellipse(mousex,mousey,55,55); ellipse(mousex,mousey,45,45); ellipse(mousex,mousey,35,35); ellipse(mousex,mousey,25,25); ellipse(mousex,mousey,15,15); ellipse(mousex,mousey,5,5); line(200,0,mousex,mousey-150); line(0,200,mousex-150,mousey); l...

node.js - How can i see my mongodb datebase content in browser using NodeJS -

i have database created mongodb, have connected wiht nodejs, works, donn't know how can see database content in web browser. can me thanks here nodejs code: var url = 'mongodb://localhost:27017/mydb'; var mongodb = require('mongodb'); var mongoclient = mongodb.mongoclient; mongoclient.connect(url, function(err, db) { if (err) { console.log('unable connect.error: ',err); } else {console.log('connection established to',url); } }) have @ mongo-express . it's full-blown mongodb web ui, written in node.js

PHP/MySql Determining age/Elapsed Time of inserted data -

i have no idea on how explain this, if @ http://www.gw2lfg.com , elapsed time column trying do, determine if minute old, 2 minutes old, etc. help your looking time elapse can following. unix_timestamp('2012-12-01 12:12:12') - unix_timestamp(curtime()); you can convert seconds , minutes.

android - Persistent error -Execution failed for task ':app:transformClassesWithJarMergingForDebug' -

i trying add microsoft azure mobile services existing android app. after adding .jar files in folder. getting error: execution failed task ':app:transformclasseswithjarmergingfordebug. for various file annotation.class , gson$5.class , can see in error file shows apijsonoperationcallback.class . have tired lot of things(such ./gradlew clean , ./gradlew clean assemble) have been running deadends everywhere. this gradle file apply plugin: 'com.android.application' android {compilesdkversion 23 buildtoolsversion "23.0.2" defaultconfig { applicationid "com.example.jino.navigationplacepicker" minsdkversion 17 targetsdkversion 23 versioncode 1 versionname "1.0" } defaultconfig { multidexenabled true } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } buildscript { repositories...

git - Intellij IDE can't import project from gitHub -

i can't seem import project github. error message saying: "clone failed: unable access ' https://github.com/mygithubusername/projectname.git/ ': error setting certificate verify locations:" i've heard people have error before, key difference intellij doesn't specify locations. console pasted above ctrl+a, i'm 100% sure didn't miss text. doesn't problem is. when try checkout vcs on intellij start screen, test url , response "repository test has failed". what's causing problem? i have git installed , email set in git-bash. i'm running intellij 2016.1.1 your certificate outdated, that's why. the easiest solution switch ssh protocol ( git:// ) after setting ssh keys. once setup keys , after adding them github account change clone protocol , able clone , work.

asp.net mvc - routing issue in mvc4 -

i have issue in routing in mvc 4 my url goes http://localhost:portnumber/session/view?id=918&pid=186 i want url this http://localhost:portnumber/session/view/918/186 i have view @html.routelink("more..", "default", new {controller="session",action="view",id=e.id,pid=e.pid }) routes.maproute( name: "sessionview", url: "{controller}/{action}/{id}/{pid}", defaults: new { controller = "session", action = "view", id = urlparameter.optional, pid = urlparameter.optional } ); the problem you're not referring correct route. in routing table, you've added route name "sessionview", in @html.routelink, refer route called "default". the correct call should be: @html.routelink("more..", "sessionview", new {controller="session",action="view",id=e.id,pid=e.pid })

javascript - Iframe border issue in IE8 -

i trying add iframe in page. working fine in browser except ie8. i have checkout stackoverflow.com . many of suggestion frameborder="0" . scenario dont have access edit line . tried using java script setattribute unfortunately not working in ie8 . function removeborder() { document.getelementbyid("myframe").frameborder="0"; } is there possibility create dynamic attribute ? could please me ? in advance. this proper way create attribute in js var att=document.createattribute("frameborder"); att.value = "0"; document.getelementbyid("myframe").setattributenode(att); source : w3s advice : read more dom elements , how manipulate them

python - Bilinear upsample in tensorflow? -

i want simple bilinear resize (not integer factor) in tensorflow. example, starting (32,3,64,64) tensor, (32,3,96,96) tensor, each 64x64 has been rescaled factor of 1.5 using bilinear interpolation. best way that? i support arbitrary factors > 1, not 1.5 specifically. note: operation on each 64x64 same skimage.transform.rescale (scale=1.5, order=1) does. tf.image.resize_images should need. accepts both 3d (single image) , 4d (batch of images) tensors, arbitrary depth (number of channels). should work: # it's height, width in tf - not width, height new_height = int(round(old_height * scale)) new_width = int(round(old_width * scale)) resized = tf.image.resize_images(input_tensor, [new_height, new_width]) bilinear interpolation default don't need specify it. use resize_bilinear directly.

surfaceview - Android: Application lost the surface when recording to dynamic object -

i in bit of pickle. trying display camera feed while view launched background service. getting runtime error 04-19 15:00:31.872 31125-31442/csce483.vbox e/recorder: starting prepare 04-19 15:00:31.872 31125-31442/csce483.vbox e/mediarecorderjni: application lost surface 04-19 15:00:31.872 31125-31442/csce483.vbox e/recorder: starting record 04-19 15:00:31.872 31125-31442/csce483.vbox e/mediarecorder: start called in invalid state: 4 when use dynamically created view. , static view not compatible window manager. in oncreate(): try { mcamera = camera.open(); } catch (exception e) { e.printstacktrace(); } msurfaceview = (surfaceview) view.inflate(getbasecontext(),r.layout.camera,null); //msurfaceview = (surfaceview) findviewbyid(r.id.surfaceview); mholder = msurfaceview.getholder(); mholder.addcallback(this); mholder.settype(surfaceholder.surface_type_push_buffers); msurfaceview.setvisibility(view.invisible); yourbr = new myreceiver(); yourbr.setmainactivityhandler(t...

Natural deduction for predicate logic -

i've been stuck on particular predicate logic problem (using coq) long time. i've solved 30-40 predicate logic problems 1 can't figure out. this problem: ~all x, (p(x) / (q(x) -> t(x))) -> ~all x, t(x). or in box form can send me in right direction? thanks! edit: this coq code problem: variables p q t : d -> prop. theorem pred_015 : ~all x, (p(x) \/ (q(x) -> t(x))) -> ~all x, t(x). proof. imp_i h. qed. it looks me using old version of coq. after adding missing declaration d , , replacing all forall , statement not provable. however, if had set of parentheses, goal provable. see following code: variable d : set. variables p q t : d -> prop. theorem pred_015 : (~forall x, (p(x) \/ (q(x) -> t(x)))) -> ~forall x, t(x). proof. now, don't think should giving solution here, in public, it's quite easy if remember ~h defined h -> false .

android - Disable ActionBarDrawerToggle's drawer indicator, but keep the hamburger icon -

in main activity i'm getting references drawerlayout , toolbars this: //set toolbar toolbar = (toolbar) findviewbyid(r.id.toolbar); setsupportactionbar(toolbar); //set navigation drawer drawer = (drawerlayout) findviewbyid(r.id.drawer_layout); hamburger = new actionbardrawertoggle( this, drawer, toolbar, r.string.navigation_drawer_open, r.string.navigation_drawer_close); drawer.setdrawerlistener(hamburger); hamburger.syncstate(); in 1 of fragments, want disable 1) swiping open nav drawer , 2) hamburger/toggle button toggle nav drawer opening currently, i'm doing this: mainactivity = (mainactivity)getactivity(); mainactivity.drawer.setdrawerlockmode(drawerlayout.lock_mode_locked_closed); mainactivity.hamburger.setdrawerindicatorenabled(false); mainactivity.hamburger.syncstate(); swiping correctly handled - no longer opens drawer. the hamburger icon has disappeared though. ideally, want hamburger icon remain on screen, ...

C# regex to find all spaces which are not behind a specified word -

i'm having trouble create .net-regex finds spaces not behind word pi. this given string "y + pi + s + 1 = x" i tried "(?!pi\s)\s" finds every space , didn't exclude 1 after "pi". used .net regey tester any appreciated the issue regex it's looking double-space*: \s in look-behind makes "a space preceded 'p' , 'i' , '' , not space preceded 'p' , 'i' the fix straightforward - remove \s lookbehind: (?<!pi)\s note regex skip spaces preceded longer words ending in pi well, such principi . if not want these matches, add \b in front of pi : (?<!\bpi)\s * note syntax lookbehind wasn't correct because of missing < . assume typo.

metaprogramming - Remove a const qualifier from a variable in D -

i want create non-const copy of variable. doing inside templated function, has in ref input, type ( t ) has const set. see constof function in https://dlang.org/phobos/std_traits.html cannot find inverse can non-const type t . you might interested in std.traits.unqual . note gives type all qualifiers removed, not const .