Posts

Showing posts from July, 2012

java - Spring Integration Inbound Email -

i have spring application ,i need add functionality of receiving emails our email server application, googled , find out spring inbound email adapter way it. referred below link. http://blog.solidcraft.eu/2011/04/read-emails-from-imap-with-spring.html . if use above code gives 890 email response. want email send or outlook, whenever user send new email mail needs come in system.i not know, how that. can give me prefect example of mail inbound-channel-adapter. save day. please help.

Selenium WebDriver: How to handle prompt box/Authetication on a website just appear after entering URL. Event website is not loaded -

selenium webdriver: how handle prompt box on website appear after entering url. event website not loaded. browser renedering load website website asking authetication. pfa enter image description here

android - Communicate with default Email client (AIDL) -

is possible add existing email account default android emaill app application? in repository can see aidl files here , can't see method addaccount . also, every release aidl files little bit different. can somehow add account email client? or there application allows developer using aidl ? has support pop, imap , eas(activesync).

VB6 - Send and Receive SMS Messages without GSM Modem (To use Android Mobile Phone/Device as GSM Modem?) -

there requirement field force send sms messages data employee code, time-in, time-out, etc. the sms message received needs parsed , saved database create reports. basically, have no access gsm modem nor able procure 1 in time project. query : can android phone substitute this? (gsm modem) what needed : create vb6 application capture , parse sms message database table. as, send sms message field force personnel confirmation sms received or if there errors on format. sounds you're looking sms gateway use vb6. first hit in google: http://www.vianett.com/en/developers/api-code-examples/vb-6 first hit sms gateway free: http://smstools3.kekekasvi.com/ also, ask admins if there's gateway in use @ company, use 1 nagios or zabbix or alike.

Android Studio: Buildtools 24.0.1 requires Java 1.8 or above. -

Image
i'm trying setup android dev environment on mac. my starting point java 1.7 believe. installed android studio , opened project i'd build. , says: error:buildtools 24.0.1 requires java 1.8 or above. current jdk version 1.7. so went , download java 1.8 u101 , installed that. no luck. removed android studio , re-installed , re-installed sdk , still no luck. my java control pannel says: java 8 update 101. output of /usr/bin/java : java version "1.8.0_101" java(tm) se runtime environment (build 1.8.0_101-b13) java hotspot(tm) 64-bit server vm (build 25.101-b13, mixed mode) output of /usr/bin/javac javac 1.8.0_101 what have done wrong? make sure jdk version through project structure you can add in gradle section compileoptions { sourcecompatibility javaversion.version_1_8 targetcompatibility javaversion.version_1_8 }

android - PagerAdapter returns wrong position for Multi View Pager -

Image
i implementing caurosel view pager adjusting page margin. able implement below but facing problem pageradapter @override public object instantiateitem(viewgroup container, int position) { view view= inflater.inflate(r.layout.mylayout, null); // button btn=(button)view.findviewbyid(r.id.button1); btn.settag(position); btn.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { log.e("position",v.gettag()+""); } } return imgview; } though setting tags, able correct position center page (selected item), when click on left side page's button returns wrong value. i have searched issue lot, not find solution far. looking help. thanks you can use recyclerview linearlayoutmanager layoutmanager = ... recyclerview.setlayoutmanager(layoutmanager); //when want horizontal layoutmanager.setorientation(context,linearlayoutmanager.horizontal,false); //whe...

calendar - How to set an Alarm in an Android App based on a server's current time? -

i building android application sets alarm based on application's server time. by comparing gmt , application server time trying create alarm. for example: gmt = 10.30 , server time = 4.30 am, need set alarm after 1hour/2hour server time. example code: calendar calender=calendar.getinstance(timezone.gettimezone("gmt")); calender.set(calendar.hour,-6); // server running time less 6 hours of gmt time. calender.set(calendar.minute,0); calender.set(calendar.second,0); can has idea on how set alarm how set alarm? from understand, here need do. get calendar object gmt timezone. get current time. set current time calendar object. finally, add 1 hour calendar object. here how can achieve this: calendar calendar = calendar.getinstance(timezone.gettimezone("gmt")); long currenttime = system.currenttimemillis(); calendar.settimeinmillis(currenttime); calendar.add(calendar.hour, 1); hope helps!

javascript - Summernote event for switch from code view to editor -

i use google caja html sanitizer prevent script executions on client side. need put event on switch code view editor, , in event clean html. since there no event switch wrote this: $('#newfeaturesview .note-editor .btn-codeview').click(function () { if (!$(element).hasclass('active')) { var html = $('#summernote').summernote('code'); var sanitizedhtml = html_sanitize(html, urltransformer, classidtransformer); $('#summernote').summernote('code', sanitizedhtml); } }); but if html dirty , contains example script alert, alert executed before html cleaned , pasted html editor. how force function clean trigger first?

Java: Converting 12 hour time to 24 hour time -

this question has answer here: java string date conversion 13 answers is there simple function convert time that's this: 10:30pm 17 aug 2016 nzst 2016-8-17-2230 import java.text.simpledateformat; import java.util.date; public class main { public static void main(string [] args) throws exception { simpledateformat displayformat = new simpledateformat("yyyy-mm-dd-hhmm"); date date = new date();//current date system.out.println(displayformat.format(date)); } } see java documentation http://docs.oracle.com/javase/1.5.0/docs/api/java/text/simpledateformat.html

sonarqube - Is there any way to link project analysis results (running Sonar Scanner) to developers? -

indeed, have found developer cockpit plugin commercial one. know there alternative simple features (none commercial) apply? use scm plugin (e.g. git plugin ) , you'll benefit auto-assign feature : if committer of line issue matches sonarqube user account, issue automatically assigned user (who can see issues user account ). not mention issue filtering can author .

raspberry pi3 - how to route forwarding on respberry -

this respberry 3 wlan0 built-in network card link web enxe84e0638ecb6 external network adapter route forwarding wlan0 ieee 802.11bgn essid:"pandorabox_00166c" mode:managed frequency:2.412 ghz access point: 20:76:93:00:16:68 bit rate=13 mb/s tx-power=1496 dbm retry short limit:7 rts thr:off fragment thr:off power management:on link quality=49/70 signal level=-61 dbm rx invalid nwid:0 rx invalid crypt:0 rx invalid frag:0 tx excessive retries:0 invalid misc:0 missed beacon:0 enxe84e0638ecb6 unassociated nickname:"<wifi@realtek>" mode:auto frequency=2.412 ghz access point: not-associated sensitivity:0/0 retry:off rts thr:off fragment thr:off power management:off link quality:0 signal level:0 noise level:0 rx invalid nwid:0 rx invalid crypt:0 rx invalid frag:0 tx excessive ...

indexing - Find query using $and operator cannot using index in MongoDB -

i have documents structured below, each array element contains "n" , "v" key , value different types of data. (collection name doc) { "_id" : 1, "logs" : [ { "n" : "facility", "v" : 26 }, { "n" : "num", "v" : 6 }, { "n" : "ip", "v" : "137.68.151.104" }, { "n" : "protocol", "v" : "55902/udp" }, { "n" : "port", "v" : "53" } ] }, { "_id" : 2, "logs" : [ { "n" : "facility", "v" : 26 }, { "n" : "num", "v" : 6 }, { "n" : "ip", "v" : "137.68.160.51" }, { "n" : "protocol...

java - Transaction Management in Orient DB -

i using using below logic start transaction in orient db. graphfactory.getdatabase().begin(type); observing if transaction not closed inside method, auto available other method, seems leak me. try explain scenario below: public <t> void addvertextodb(t data){ graphfactory.getdatabase().begin(otransaction.txtype.optimistic); //logic fetching data , adding vertex //i neither calling rollback nor commit here } i have method update public <t> void updatevertextodb(t data){ //not starting transaction explicitly , doing write operation //logic fetching data , adding vertex //i neither calling rollback nor commit here } the graph factory has below property set graphfactory.setautostarttx(false); graphfactory.setrequiretransaction(true); expectation: updatevertextodb should throw otransactionexception e current behavior: gets transcation started save , working fine. so wanted know how can achieve behavior if method not start...

java - SWT browser issue -

i using eclipse swt embed browser , load webpage same. the problem facing site load in swt has api calls (java api) in it, when load site first time apis being called , data getting loaded in embedded browser. but after update api new (updated) data not getting reflected in embedded browser of swt. the workaround same either go ie , open page in data updated, after data getting reflected in swt browser or clear caches(website data) in ie. is there way swt loads data without doing above workarounds?

unity3d - How to create dynamic table in Unity -

Image
i want create dynamic table. in pictures i can add or delete rows this. but, how add or delete column in unity. possible? please give me hand. ok i'm going explain how create dynamic vertical list. there can use create table. here ui object setup use holder object(this has image , scrollrect component) 1.1 vieportobject(this has image , mask component, use object define size of vieport) 1.1.1 contentobject(you spawn elements children of object , holds vertical list script) and here actual script use: using unityengine; using system.collections; using unityengine.ui; public class verticallist : verticallayoutgroup { public override void calculatelayoutinputvertical() { base.calculatelayoutinputvertical(); recttransform.sizedelta = new vector2(recttransform.sizedelta.x, minheight); } } here screenshot of how hierarchy looks like. edit: need prefab layout element component instantiate chil...

random - How do I represent the smallest ever possibility in JavaScript? -

Image
i want design function return true of time theoretically return false . so far, i've come (with comments added, due confusion): function true(seed) { // poop, can't `seed` math.random()! return math.random() !== math.random(); } // if had seed, , math.random() seedable, // make function return false. however, runs few limitations. math.random() implementation not seedable therefore calling random number generator twice in row (with no other entropy) never return same number twice. math.random() return value between 0.0000000000000000 , 0.9999999999999999, sixteen digits of precision. according binomial distribution probability of true not being true (1/9999999999999999)^2. or 1.0 e-32. what trying build return false in probability of 1/ some integer grows larger , larger . purely thought experiment. there no constraint on space , time, although if answer has considered that's bonus. edit: guess, here way ask question. take @ plunker. https://...

regex - PHP: split string based on array -

below data i'm trying parse: 50‐59 1high300.00 avg300.00 90‐99 11high222.00 avg188.73 120‐1293high204.00 avg169.33 the first section weight range , next count , followed highprice , ending avgprice . as example, need parse data above array like [0]50-59 [1]1 [2]high300.00 [3]avg300.00 [0]90-99 [1]11 [2]high222.00 [3]avg188.73 [0]120‐129 [1]3 [2]high204.00 [3]avg169.33 i thought creating array of possible weight ranges can can't figure out how use values of array split string. $arr = array("10-19","20-29","30-39","40-49","50-59","60-69","70-79","80-89","90-99","100-109","110-119","120-129","130-139","140-149","150-159","160-169","170-179","180-189","190-199","200-209","210-219","220-229","230-239","240-249","250-259...

html - How to get my iframe code to display correctly in django cms? -

Image
i using django cms create website , google calendar. however, when added code, comes plain code , won't display calendar. here link site: http://138.68.6.151:8000/en/events can explain how fix this? after going site , using browser's console inspect iframe, found iframe tag improper (like text in quotes) , therefore not rendering properly. in paragraph tag, iframe tag should in following way: <p><iframe frameborder="0" height="500" scrolling="no" src="https://calendar.google.com/calendar/embed?height=500&amp;amp;wkst=1&amp;amp;bgcolor=%23ffffff&amp;amp;src=6uemf0u3aqg89knqb4ndic0n04%40group.calendar.google.com&amp;amp;color=%23853104&amp;amp;ctz=america%2fchicago" style="border-width:0" width="500"></iframe></p> to verify this, after playing @ front-end level got following results. previous state (also notice html code on right) after making...

python - Django 1.9 + Photologue: no such column -

i using django 1.9+ photologue 3.x build photo gallery web app. when trying add photo or gallery, returns 'no such column exception' request method: request url: http://127.0.0.1:8000/admin/photologue/gallery/ django version: 1.9.5 exception type: operationalerror exception value: no such column: photologue_gallery.slug exception location: //anaconda/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py in execute, line 323 python executable: //anaconda/bin/python python version: 2.7.12 then have checked model file , view file. in model.py @python_2_unicode_compatible class gallery(models.model): date_added = models.datetimefield(_('date published'), default=now) title = models.charfield(_('title'), max_length=250, unique=true) slug = models.slugfield(_('title slug'), unique=true, ...

javascript - How do I remove the last item of an array inside of an array -

how remove last item of array inside of array. in case, want remove null @ end of array inside of array. here's code function chunkarrayingroups(arr, size) { // break up. var arrwithsubarr = []; for(var = 0; < arr.length / size; i++){ arrwithsubarr.push([]); } var index = 0; var whichsubarr = 0; for(whichsubarr = 0; whichsubarr < arr.length / size; whichsubarr++){ for(i = 0; < size; index++){ arrwithsubarr[whichsubarr].push(arr[index]); i++; } } return arrwithsubarr; } chunkarrayingroups([0, 1, 2, 3, 4, 5], 4); i believe ultimate goal split original array number of arrays each equal or less size specified (in case last sub array not equal size ). rather removing undefined values added in loop easier prevent them getting inserted @ all. function chunkarrayingroups(arr, size) { // break up. var arrwithsubarr = []; var whichsubarr = 0; // using math.ceil returns smallest integer greater or equal number ...

Where to put a base html template in Django -

i have 6 apps share common base html (base.html) template. question should contain base.html? or should project template directory contain base.html? using django version 1.10. best way put in project's templates directory.

iis - appcmd to check a config exists? -

i can run command add custom log: .\appcmd.exe set config -section:system.applicationhost/sites /+"[name='mywebsite'].logfile.customfields.[logfieldname='originalip',sourcename='x-forwarded-for',sourcetype='requestheader']" /commit:apphost what command use see if config has been set? there no appcmd.exe config -section... try like appcmd.exe list config -section:system.applicationhost/sites /text:* depending on want check for, have parse output. for more information, run appcmd.exe /? config

c++ - Sending a struct with accidental wrong bytes between two computers -

i sending struct byte stream using tcp socket 1 system another. both systems little-endian , struct not have floating number. in summary structs in both systems have same size (the same padding/alignment done them both). when receive byte stream, store in buffer , re-construct struct waveshortmessage following: // receiving side waveshortmessage tmp; memcpy(&tmp, &buffer, sizeof(tmp)); everything works expected , can extract different variables of struct. question is, how can make sure byte stream in buffer belongs struct. in other words, there safety check program notifies user if received byte stream not belong waveshortmessage struct. particularly interested solution not involve changing source code in sender side. there's nothing hidden in arbitrary sequence of bytes specifies these bytes "belong" to. a sequence of bytes that: sequence of bytes. 8 bits in each byte. given number of bytes, in sequence. raw data. if formal specifications...

in app purchase - android: google play promotion code for inapp billing -

Image
i have used promotioncode buy in-app product during tests of app in-app product purchase flow. although promotion code detected, application cannot detect purchased. this: inside implementation of iabhelper.queryinventoryfinishedlistener have method: @override public void onqueryinventoryfinished(iabresult result, inventory inventory) { ... ... purchase activationpurchase = inventory.getpurchase(sku_activation); boolean activated = (activationpurchase != null && verifydeveloperpayload(activationpurchase)); } however activationpurchase read google play this: purchaseinfo(type:inapp): { "packagename":"my.package.name", "productid":"activation", "purchasetime":1471991353652, "purchasestate":0, "purchasetoken":"a-real-token" } and see in picture application watch, developer payload shown empty string "", purchase not validated ...

php - Upgrade from Laravel 5.2 to Laravel 5.3 -

i want update laravel latest version 5.3. i'm checking official guide , don't see how upgrade code through composer. when try update composer.json file point laravel/framework 5.3.*. i get: your requirements not resolved installable set of packages. problem 1 - laravelcollective/html v5.2.4 requires illuminate/view 5.2.* -> satisfiable laravel/framework[v5.2.44], illuminate/view[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.6, v5.2.7]. - laravelcollective/html v5.2 requires illuminate/view 5.2.* -> satisfiable laravel/framework[v5.2.44], illuminate/view[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.6, v5.2.7]. - laravelcollective/html v5.2.1 requires illuminate/view 5.2.* -> satisfiable laravel/framework[v5.2.44], illuminate/view[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2...

xinput - Any way to block while reading an XBox 360 controller other than HID API? -

i'm trying read xbox 360 controller without polling it. (to precise, i'm using logitech f310, windows 10 pc sees xbox 360 controller.) i've written rather nasty hid code uses overlapping i/o block in thread on 2 events, 1 indicates there report ready read hid device, other indicating ui thread has requested hid thread exit. works fine, hid driver behaves differently xinput does. in particular, consolidates 2 triggers single value, passing difference (on curious claim games expect hid values 0x80 when player's finger off control). xinput treats them 2 distinct values, big improvement. also, xinput reports hat switches 4 bits, means can ten states out of it: unpressed, n, ne, e, se, s, sw, w, nw, , all-down (that last might hard use successfully, @ least it's there if want it; i've been using exit polling loop). the downside, me, of xinput there appears no way block on read request until controller changes 1 of values or buttons. hid device, readfile call bl...

javascript - Differences between require() and passing an object via prop or context -

Image
what's difference between require() ing singleton, , passing down via react prop or context? what use cases each? if require() (or import ) module, same object in component. use modules code component depends on : other components ( button ). utility functions ( gettextcolor ). global data storage ( commentstore ). the upside of importing module it’s extremely easy do, , need once. the downside of importing module you can’t override points to . so, example, can’t swap out commentstore or gettextcolor modules in testing, or in “living design guide”. depending on use case, may or may not problem. passing prop means can pass different thing every time. use props inputs components need customizable: data ( comment ). event callbacks ( onclick ). ui properties ( color ). the upside of using props they’re explicit , customizable. they’re primary mechanism of passing data down in react when in doubt, use props . the downside of using props migh...

How to migrate cassandra cluster column change -

we have use case change cassandra table column (change type int long), since not supported changing int varint supported , fine that. but in of tables column cluster column , have no way of changing this. i curious best way handle case. you can not alter clustering column in cassandra - you'll need make new table , load data table using third party application (cqlsh copy being simplest, or spark). if you're unable tolerate change in table's name, you'll need backup data, drop old table, , recreate proper types.

Combine file IO for -replace and Set-Content in PowerShell -

i have following script: $allfiles = get-childitem "./" -recurse | { ($_.extension -eq ".ts")} foreach($file in $allfiles) { # find , replace dash cased contents of files (get-content $file.pspath) | foreach-object {$_ -replace "my-project-name", '$appnamedashcased$'} | set-content $file.pspath # find , replace dash cased contents of files (get-content $file.pspath) | foreach-object {$_ -replace "myprojectname", '$appnamecamelcased$'} | set-content $file.pspath # find , replace dash cased contents of files (get-content $file.pspath) | foreach-object {$_ -replace "myprojectname", '$appnamepascalcased$'} | set-content $file.pspath } it takes file , replacing, saves file. takes same file , more replacing saves file again. 1 more time. this works, seems inefficient. is there way replacing , save file once? (if pos...

javascript - How to add new defined routes in express js dynamically? -

in express app, i'm trying add new defined routes dynamically during runtime. here code: app.post('/new-user', function(req,res){ var temp = { name: "joe-bloggs", age: 20 }; users.push(temp); // users global variable defined earlier var path = '/' + temp.name; app.get(path, function(req,res){ res.send('welcome localhost:3000/joe-bloggs'); }); }); so if user tried visit localhost:3000/joe-bloggs, they'll confronted welcome message, keep getting 404 not found because express telling me route hasn't been defined. just use req.params made scenario. no need add additional routes each individual user. app.get('/:username', function(req, res) { res.send('welcome localhost:3000/' + req.params.username); });

javascript - Fancybox left and right arrow button on the right-bottom of sliding picture -

just trying figure out how change options of fancybox buttons snap them on right bottom corner of sliding images. fancybox template example http://fiddle.jshell.net/t91p3g7s/?utm_source=website&utm_medium=embed&utm_campaign=t91p3g7s arrows position want achieve: buttons right-bottom corner you can force on css. it's simple. just add css: .fancybox-next { bottom: 10px; top: auto; width: 30px; height: 30px; } .fancybox-prev { bottom: 10px; top: auto; width: 30px; height: 30px; right: 60px; left: auto; } .fancybox-next span, .fancybox-prev span{ visibility: visible !important; display: block !important; } or click here. http://fiddle.jshell.net/t91p3g7s/6/ :)

ios - Public chatroom with radius using Firebase (Suggestions Requested) -

i want integrate public chatroom within app clueless how create backend. i use firebase app , setup simple between 2 users or group of users. create private room based on reference point in firebase allows users in group access messages. now lets in la, want users able chat other users within 1 mile radius location (lat/lng). know possible there app can found @ https://itunes.apple.com/sg/app/popcorn-messaging/id718416705?mt=8 . only read following if want know i've tried. may bit confusing. one way thought doing creating chatroom throughout world mile spacing. example, start lat:0, lng:0 , move mile right, mile right, etc. more harm good. have millions of chatrooms , not used. second way thought can implement create chatroom if doesn't exists within users radius. if i'm in la, , there no chatrooms, create 1 @ location , lets if person goes la because chatroom created within 1 mile location, load chatroom user. any suggestions appreciated. if you...

c# - 'Newtonsoft.Json.Linq.JArray' does not contain a definition for -

i have following json: { "ok": true, "resp": [ { "aaa": 111, "bbb": "xyz", "ccc": [ {...}, { "ddd": "hello", "eee": 666, }, {...} ], "read": false }, {...}, {...} ] } and c# code: dynamic my_obj = jsonconvert.deserializeobject(json); var resps = my_obj.resp; var x = ((ienumerable<dynamic>)resps).cast<dynamic>() .where(p => p.ccc.eee == 666).count(); and below error: 'newtonsoft.json.linq.jarray' not contain definition 'eee'. i know, iterate through elements in 'resps' , count elements, element 'ccc.eee' equals 666, possible in 1 line linq? since ccc array, need iterate on it. count ...

OpenGL ES 2.0 can't render to framebuffer object (FBO) on android -

i'm trying make finger drawing program android using xamarin (c#). got myself stuck problem regarding opengl. not quite it, have little experience directx (not mobile) not opengl. so issue - i'm trying draw fbo created, thing seems work glclear() call. created framebuffer object , attached color texture it. have 2 shaders, 1 drawing framwbuffer itself, part works fine. other 1 simple make it. vs: gl_position = a_position; fs: gl_fragcolor = vec4(0.0f, 1.0f, 1.0f, 1.0f); //< sky blue shader works ok, if use on screen, when try render onto framebuffer's color texture, nothing. tried different things turning off depth buffers explicitly. calling glflush(), glfinish() , on nothing seems work. framebuffer's texture affected glclear() statement. if don't clear see texture loaded on initialization. use same drawing routine , data (vertex buffer + index buffer) draw quads both rendering texture , rendering texture. position on screen alway kind of in center o...

performance - C++ int comparison efficiency -

is there difference in performance of following code snippets? 1 performs best , why? int = 1000000000; while(i != 0) { i--; } or int = 1000000000; while(i) { i--; } or int = 1000000000; while(i > 0) { i--; } i see lot of people use first example , wonder why. easier read? is there difference in performance of following code snippets? no. first 2 equivalent, , 3 can optimized same assembly. i see lot of people use first example , wonder why. easier read? it requires reader know fewer language rules second one. in particular, second program requires knowledge conditional expression converted bool , , conversion int has same result inequality zero. note if i replaced floating point number, or if decrement modified have more complexity (for example: decrement 2), third option easiest prove correct. integers , single decrement, there no difference.

javascript - Node.js readdir callback called twice -

there have been @ least 2 posts here in past: nodejs readdir() function being run twice readfile() callback called twice both have answers effect readdir called twice, no mystery. case different, illustrated code: console.log('calling readdir'); fs.readdir(folder, function (err, files) { console.log('readdir callback'); // ... deal files } ); which results in output: calling readdir readdir callback readdir callback this not happen folders. workaround, set flag: let wascalled; ... wascalled = false; console.log('calling readdir'); fs.readdir(folder, function (err, files) { if (!wascalled) { console.log('readdir callback'); wascalled = true; // ... deal files } } ); which avoids processing in second call: calling readdir readdir callback i can't see i'm doing wrong, since logging indicates in first case there 2 callbacks single call readdi...

html - How CSS with Master Page and new content page with own css that should not override masterpage header and footer? -

i have asp.net 4.5 website uses master page. link css page used throughout site. added new page uses master page , page has it's own css content area cause used active reports viewer. when go new page active reports viewer, it's css overriding css master page header , footer not want do. any recommendations on allowing new css file affecting contentarea of new page. unfortunately, can't limit scope of css content; applies entire page. can give different name class in stylesheet content page , assign header , footer sections. eg. .contentpage-custom { background-color: red; } <asp:content id="content2" contentplaceholderid="contentplaceholder1" runat="server"> <header class="contentpage-custom"> content page </header> </asp:content>

swift - self.image.frame.width = 20 give get only property error -

i tried change width of image view 20 @iboutlet weak var image: uiimageview! using code in viewdidload self.image.frame.width = 20 give me error cannot assign property: width property. mean?? sorry new swift not know mean.please get-only means can read property (for example compare something), not change. set width need this: self.image.frame.size.width = foo

dplyr - R: transform a dataframe into a visnetwork -

Image
i new user of "visnetwork" package in r, , wondering way transform long data.frame visnetwork i have kind of dataframe: data<-data.frame(link=c("a","a","b","b","c","c","d","d","e","e"),node=c("alpha","beta","gamma","delta","alpha","delta","gamma","beta","alpha","beta"), sign=c(1,-1)) link node sign 1 alpha 1 2 beta -1 3 b gamma 1 4 b delta -1 5 c alpha 1 6 c delta -1 7 d gamma 1 8 d beta -1 9 e alpha 1 10 e beta -1 and goal transform in "visnetwork" one: library(visnetwork) nodes <- data.frame(id = c("alpha","beta","gamma","delta"), label=c("alpha","beta","gamma","delta")) edges ...

sockets - How to install ZeroMQ for C++ using VS2015 community -

i trying learn networking in windows in c++ (specifically making simple mmo server). i reading cross-platform-ness , socket complexity , came accross both protobuf , zeromq quite lot. after reading zeromq decided makes sense mmo server. so went on zeromq website , downloaded msi installer. ran it, , i'm stuck. i don't quite understand msi did... did plop zeromq.dll in system32? di still need c++ binding? basically, how install zeromq c++? p.s. points if shows me how nuget. guess that's why don't know how install libraries manually, use nuget... thanks. nuget have package zeromq, seems c# currently. the msi installed contains python binding zeromq, , installed selected python version in installer. for c++, have pre-build binaries on download page . however, these libraries build older version of visual studio, not compatible visual studio 2015. if want use zeromq, i'm afraid going have build library self. when have build zeromq, can ...

git - Win7 : plink.exe: No such file or directory -

i can git add. git commit -m "first commit" but cannot push git push -u origin master error: cannot spawn c:\users\seb\downloads\plink.exe: no such file or directory fatal: unable fork first ensure have installed plink.exe. recommend install program files because folder c:\users\seb\downloads\ bad place. then check environment variable git_ssh . should like: git_ssh=%programfiles(x86)%\putty\plink.exe or git_ssh=%programfiles%\putty\plink.exe this error happened when there space in git_ssh environment variable.

c# - UWP: Resource file for languages is not deployed correctly -

Image
i have problem universal-windows-app: i'm giving user option change language of app. for propose i've created each language "ressources.resw" file , xaml-code referes via x:uid= part resources. language changed via primarylanguageoverride working fine in environment. however, if deploy app via store->create app packages , try sideload app on (different) windows-10 machines language change not reflected correctly. example date-format changing properties pointing resources file not changing correctly. but: if user has corresponding windows-language-pack installed, app working fine. guess is, windows check language-resource file deploy installed languages on system: how can avoid this? however, if deploy app via store->create app packages , try sideload app on (different) windows-10 machines language change not reflected correctly. but: if user has corresponding windows-language-pack installed, app working fine. guess is, windows c...

C# accessing a property of a generic class T -

i need accessing property of generic class t have method in class generic public t calcuste(t obj) { calcaulte testobj= new calcaulte () var t = getvalue(obj); // type of class example calcaulte class testobj.id = obj.id;// need accessing property of t obj } try following code. public t calcuste(t obj) { calcaulte testobj= new calcaulte (); calcaulte obj_calcaulte = obj calcaulte; if(obj_calcaulte != null) { testobj.id = obj_calcaulte .id; } } you need control null since obj may null or may belong different class.

sql - copy a field from one data source to other in tableau -

Image
i wanted rid off 1 data source in tableau, that's why instead of using 2 different data source 1 dashboard, wanted copy relevant fields 1 data source other. there way in tableau, can copy-paste tos field 1 other data source? in attached screenshot, wanted copy advisor sales field in data source biadvisorsalesmonth24 bitransactionpartnerday365 : you cannot make schema or structure changes table / datasource within tableau. if advisor sales not in bitransactionpartnerday365 data source, have keep both data sources in workbook , join them together. now, if familiar datasets , know necessary table layout, write custom sql command , use sql command retrieve desired data single data source.

php - Want to save content from a textarea server sided (in a file on the server permanent) -

how's going? i'm relatively new php scene don't know everything. latest project file-/imageviewer . i've got basic script give out files, images , can open them also. yesterday programmed area editing textfiles (such .md, .txt, .pdf,..). haven't seen solution save content on files permanent (server sided). file_put_contents() , fputs() content gets saved client sided every time refresh page "new" content away. has idea fix or thinks knows how different way? important thing is, can edit .pdf files, other files supposed feature. here's site i'm working on (i'm german, don't wonder ...^^): http://florian.thomasgoetzrath.de/pdfviewer/viewer.php thanks fast , constructive helpers :^), f9lke

javascript - How to add rotation event to an ember highchart graph? -

in highchart site, have example of draggable scatter box in can 3d rotation http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/3d-scatter-draggable/ i able create 3d graph using ember-highchart , have yet figure out how add event of rotation in ember. best way ? here component containing ember-highchart threed-graph.hbs {{high-charts mode=mode chartoptions=chartoptions content=content}} threed-graph.js chartoptions: ember.computed('array', function(){ return { chart: { renderto: 'container', margin: 100, type: 'scatter', options3d: { enabled: true, alpha: 10, beta: 30, depth: 250, viewdistance: 5, fittoplot: false, frame: { bottom: { size: 1, color: 'rgba(0,0,0,0.02)' }, back: { size: 1, color: 'rgba(0,0,...

centos7 - Vundle Vim not installing plugins -

i working vundle vim on centos 7 , having issues cannot seem install plugins have worked on other pcs , cannot seem remember how fix issue. removed .vim , .vimrc , re git cloned vundle git. so when start vim receive: error detected while processing /home/abarkley/.vimrc: line 24: e117: unknown function: vundle#begin line 26: e492: not editor command: plugin 'vundlevim/vundle.vim' line 27: e492: not editor command: plugin 'ekalinin/dockerfile.vim' line 28: e492: not editor command: plugin 'pangloss/vim-javascript' line 29: e492: not editor command: plugin 'elzr/vim-json' line 30: e492: not editor command: plugin 'vim-perl/vim-perl', { 'for': 'perl', 'do': 'make clean carp dancer highlight-all-pragmas moose test-more try-tiny' } line 31: e492: not editor command: plugin 'jparise/vim-graphql' line 32: e492: not editor command: plugin 'in3d/vim-raml' line 34: e492: not editor c...

azure service fabric - How to acquire a particular lock? -

how can acquire update, exclusive lock? article states “a user can ask update lock instead of shared lock” didn't find way specify type of lock. currently have dictionary stores lists. goal is: when reads list — let's take snapshot , don't block else. when going modify list — let's take exclusive lock or maybe update lock (honestly can't find difference) , else should wait before transaction commits, even reads should not possible . the detail i'm failing understand is: how specify if intention read, allow read of collection, , when intention read , write(we not able alter existing data in other way), transaction should wait locks , read , modify collection. there's enum called lockmode can pass methods on reliable dictionaries , queues allow specify functionality desired. afaik, methods support trygetvalue , containskey on dictionaries , trypeek on queues. i've been confused article myself, lead believe specify per transaction (which a...

php - How to perform MySQL UPSERT -

Image
this how table looks like. create table `answers` ( `id` int(11) not null auto_increment, `basicinfo_id` int(11) not null, `question_id` int(11) not null, `answer` int(11) not null, primary key (`id`), index `question_id` (`question_id`), index `basicinfo_id` (`basicinfo_id`), constraint `basicinfo_id` foreign key (`basicinfo_id`) references `basic_info` (`id`) on update no action on delete no action, constraint `question_id` foreign key (`question_id`) references `questions` (`id`) on update no action on delete no action) collate='latin1_swedish_ci' engine=innodb auto_increment=3383; this how data can i want update answers if exist "basicinfo_id". or if change answer question_id 1, 2 , 3. how can upsert data.? i have tried query doesn't update result. insert answers (basicinfo_id, question_id, answer) values('98', 1, '1'),('98', 2, '1'),('98', 3, '1'),('98', 4, '1'),('98', 5,...

java - Securing RMI calls using kerberos for SSO implementation -

i trying implement kerberos sso java swing application. application uses rmi calls on t3 protocol. dont want user enter user name , pwd instead want access windows userticket cache. possibilities found on google: modify registry add keyword access ticketcache. option not approved client. use keytab files instead of ticket cache. not viable option because cant handled @ launch of application, keytab files need generated before user tries access application. any insights on how achieve sso java swing client on webstart help. applet launched using .jnlp file jaas config , initial context factory parameters.

ios - addCoordinatedAnimations animation block not running -

in tvos on xcode 7.3.1, 1 of places use uifocusanimationcoordinator's addcoordinatedanimations function running completion before animation: if (coordinator != nil) { var tempdidanimate: bool = false // breakpoint 1 coordinator!.addcoordinatedanimations({ self.myfunctionthatdoesntgetcalled() // breakpoint 2 tempdidanimate = true }, completion: { () in if tempdidanimate == false { print("whaaaat?!??") // breakpoint 3 self.myfunctionthatdoesntgetcalled() } }) } order of breakpoints being hit 1, 3. never 2. this hacky use of if tempdidanimate == false solve problem, don't why problem happening. any ideas wrong? one idea: i'm inside addcoordinatedanimations block in stack... don't think so, stack complicated... can't see way check via code. tl;dr: yes inside animation block #$&^@#$! ok, turned out in ...

asynchronous - Do all C++ compilers support the async/await keywords? -

i want use async/await syntax in c++ (ue4 framework), due cross-platform code not sure possible... or possible? if yes, how can use it? and there await , __await ( resumable , yield , __yield_value also) keywords highlighted in visual studio. what's difference? maybe not compilers supports keywords or supports separately? gcc , clang accepts it? or not accepts , can use macros each platform individually. async , await language extensions proposed microsoft several revisions, current n4134 . has not yet accepted standard. the proposal opposed many http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0158r0.html due not being baked , having not been explored in ts , there's competing proposals n3985 proposes coroutines can implemented within existing language standard. to knowledge, compiler supports async/await ms visual studio. as update, clang 5.0 has support current draft co-routines proposal https://isocpp.org/files/papers/n4663.pdf has ...

dojo - dstore add() not adding new items to data store -

when try add new item data store, not add it. accepts data item set using setdata, , able work object including value, observe property etc. how add additional items data store? my code below. <script> require( [ 'dojo/_base/declare', 'dstore/memory', 'dmodel/extensions/jsonschema', 'dmodel/validators/stringvalidator', 'dmodel/store/validating', "dmodel/model", "dojox/json/schema", "dojo/text!app/model/testing/baseschema.json", ], function (declare, memory, jsonschema, stringvalidator, validating, model, djs, myschema) { var validatingmemory2 = (declare([memory, validating]))({ model: jsonschema( { "$schema": "http://json-schema.org/draft-04/schema#", "title": "form elements", ...