Posts

Showing posts from August, 2014

Oracle.DataAccess.dll for .NET 4.0 in 32 bit Oracle Client install? -

below 2 paths , files present in installation of oracle client 32 bit (win32_11gr2_client.zip) .net 2.x , 4.x. when installed oracle client, chose not take default in 2 of windows during install wizard. chose install "runtime" , changed install path c:\apps{user}\ c:\oracle because our oracle dba @ organization gave me instructions. c:\oracle\product\11.2.0\client_1\odp.net\bin\2.x\ c:\oracle\product\11.2.0\client_1\odp.net\bin\2.x\oracle.dataaccess.dll c:\oracle\product\11.2.0\client_1\odp.net\bin\2.x\oraprovcfg.exe c:\oracle\product\11.2.0\client_1\odp.net\bin\4\ c:\oracle\product\11.2.0\client_1\odp.net\bin\4\oraprovcfg.exe i'm interested in referencing oracle.dataaccess.dll assembly in .net 4.x application. found these instructions add dll file gac 64 bit installation. http://devblog.rayonnant.net/2011/04/oracle-11g-r2-x64-client-with-odac.html four questions. 1.) if run command (which modified path have), 32 bit installation, happen? cd c:\oracle

sql server - importing excel to sql c# -

i have been trying import excel table sql database. have tried example: void importdata(string excelfilepath) { //declare variables - edit these based on particular situation string ssqltable = "ttableexcel"; // make sure sheet name correct, here sheet name sheet1, can change sheet name if have string myexceldataquery = "select student,rollno,course [sheet1$]"; try { //create our connection strings string sexcelconnectionstring = @"provider=microsoft.jet.oledb.4.0;data source=" + excelfilepath + ";extended properties=" + "\"excel 8.0;hdr=yes;\""; string ssqlconnectionstring = "server=mydatabaseservername;userid=dbuserid;password=dbuserpassword;database=databasename;connection reset=false"; string sclearsql = "delete " + ssqltable; sqlconnection sqlconn = new sqlconnection(

javascript - How to grab all Inputs with Number type -

this question has answer here: javascript (vanilla) - how specify type of element when using queryselectorall? 1 answer i have several numerical inputs <input type='number' id='input one'> scattered throughout html file hundreds of lines of code. have different ids. need set min attribute 0. have other types on inputs on page, can't use inputs=document.getelementsbytagname(); i need grab inputs type='number' attribute, , change min attribute. have for-loop rigged , ready, need way grab ones type='number' any ideas? help. note: vanilla javascript code only, please. call getelementsbytagname , use if check whether type number : var elements = document.getelementsbytagname('input'); for(var i=0; i<inputs.length; i++) { if(inputs[i].type == 'number') { inputs[i].min = 0;

Ease data in array to smooth a curve in PHP -

i'm using api elevation data gpx points, , try create graphic representation of it. problem each point in api separated 90meters, , gpx points separated 5meters, causing several points in row have same altitude before changing abruptly new altitude. basically, obtain array one: [0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 15, 15, 15, 15, 15...] how draw png image representation of altitudes while easing curves? need able change size of output picture. i'm trying change array i'm not sure how , if best solution: [0, 0, 0, 0, 5, 5, 10, 10, 10, 12, 13, 15, 15, 15, 15...] thanks hints, i'm not used work on pictures , data easing. here's basic way smooth points on "average" basis: <?php $points = [0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 15, 15, 15, 15, 15]; $refined = []; foreach($points $index => $point) { // make sure don't divide 0 $prev = isset($points[$index - 1]) ? $points[$index - 1] : false; $next = isset($points[$index + 1

javascript - Ionic - Cordova - $cordovaFileTransfer freezes - slow - blocks tabs -

i using cordova file transfer plugin ngcordova (both updated last version) download file. running app on android lolipop (lg g3) i keep searching on code , on google no success. the download working well, problem progress function going slow. explain myself better: success callback executed before progress stop running. also, using ionic tabs template, , won't load tab (even text only) before download finished. i not sure guess $timeout() should executed in background , looks not in case. here code, hope can me! angular.module('starter.controllers', ['angular-svg-round-progress', 'ngcordova']) .controller('searchctrl', function($scope, $http, $ionicloading, $rootscope,$timeout, $cordovafiletransfer, $ionicplatform) { $scope.download = function(id) { $scope.hidedownload[id] = 1; $ionicplatform.ready(function() { var url = "http://cdn.wall-pix.net/albums/art-space/00030109.jpg" conso

c++ - Using Max Database Size option in ADO causes the Open command to throw -

i have sqlcompact database i'm trying access using ado , c++ . due size of database (300mb, on default 256mb limit), have specify max database size in connection string. doing causes .open(...) function throw. the code i'm using: hresult hr = conn.createinstance(__uuidof(connection), null); conn->open(l"provider=microsoft.sqlserver.ce.oledb.4.0;data source=test.sdf;max database size=512", l"", l"",adconnectunspecified); the error: hr: db_e_errorsoccurred description: "multiple-step ole db operation generated errors. check each ole db status value, if available. no work done." message: "idispatch error #3105" note: i've tried using same code, smaller database , removing max database size connection string , works expected. adding max database size again causes problem reappear, therefore assumption it's 1 causing error. any thoughts? how can work databases on provider default s

ruby - Why is JSON.parse only parsing the first and last keys in the hash? -

i receive array formatted this {\"message\":\"{\\\"_id\\\":\\\"9e7a;10000000266_userscreensconfig\\\",\\\"userdefinedscreens\\\":[{\\\"id\\\":\\\"documents\\\"},{\\\"appleft\\\":\\\"patientinfo\\\",\\\"appletheader\\\":\\\"navigation\\\",\\\"applets\\\":[{\\\"datacol\\\":\\\"2\\\",\\\"datamaxsizex\\\":\\\"8\\\",\\\"datamaxsizey\\\":\\\"12\\\",\\\"dataminsizex\\\":\\\"4\\\",\\\"dataminsizey\\\":\\\"3\\\",\\\"datarow\\\":\\\"1\\\",\\\"datasizex\\\":\\\"8\\\",\\\"datasizey\\\":\\\"6\\\",\\\"id\\\":\\\"allergy_grid\\\",\\\"instanceid\\\":\\\"applet-1\\\",\\\"maximizescreen\\\":\\\"allergy-grid-full\\\",\\\"region\\\":\\\"applet-1\\\",\

php - Wordpress post thumbnail url is not working correctly -

i have issue website built on wordpress. i'm trying display post thumbnail blog's page it's not working expected... here : <?php $loop = new wp_query( array( 'post_type' => 'post', 'posts_per_page' => 9) ); while ( $loop->have_posts() ) : $loop->the_post(); $thumbnail = get_field( 'thumbnail' ); $category = get_the_category(); ?> <a href="<?php echo get_permalink(); ?>"> <section class="col-lg-4 col-md-6 col-sm-6" style=" background-image:url(<?php echo $thumbnail['url']; ?>);"> <div class="article-head"> <h2><?php echo the_title(); ?><br><span><?php echo the_time(get_option('date_format')); ?></span></h2>

javascript - Angular ng-selected not working -

i trying set selected tab when user tries edit or profile data preset current data. creates list doesnt create selected. can tell me wrong? <b>education:</b> <select class="form-control" ng-model="currentuser.education"> <option ng-repeat="education in educations" value = "{{education.educationid}}" ng-selected ="{{education.educationname == currentuser.educationname}}">{{education.educationname}}</option> </select>

html - Combining duplicate attributes from a tag in PHP -

i need convert string this <span style="font-size: 16px;" style="color: red;">is</span> test. this <span style="font-size: 16px; color: red;">is</span> test. there's possibility there more 2 matches or there style , class , style , , style s need combined. , won't span s unfortunately tidy isn't option more over-bearing in it's cleaning project can accommodate. going dom document route won't work since multiple style attributes isn't valid, gets contents of first one. i'd preg_replace, getting matches 1 tag proving quite difficult. if makes things easier, start life nested tags. have preg_replace combines them there , gives output. i agree comments above best solution prevent situation in first place, answer question: function combine of style attributes in given string. make sure pass single tag @ time. doesn't matter how many other attributes in tag, nor order matter. comb

c# - How to check valid selection when adding data from combo boxes? -

i have 2 combo boxes , add button on view, both combo boxes must have item selected them in order there valid selection. i tried disabling add button's enabled property if both combo boxes have no selection, button re-enabled if 1 of combo boxes has been selected. can suggest fix situation, or point out i've gone wrong setup? the button's enabled property bound property in viewmodel: //this button enable property bound combo boxes being selected -----> <button x:name="addgradebtn" grid.row="2" horizontalalignment="left" command="{binding path=addgradecommand}" content="add grade" isenabled="{binding buttonenabled, mode=twoway}" /> <combobox x:name="subjectcmbbx" grid.row="1" grid.columnspan="2"

c - Why do I always get the last elements of my string array? -

this question has answer here: buffering set of lines file , storing in array in c 3 answers i trying read strings text file , save them in array of strings. however, when try print contents of string array last part printed. why code copy last string? my code # include <stdio.h> # define buffersize 100 int main(int argc, char *argv[]){ char buffer[buffersize]; int = 0; char *text[buffersize]; while(fgets(buffer, buffersize, stdin) != null){ text[i] = buffer; i++; } int j = 0; (j=0; j<sizeof(text)/sizeof(char); i++){ printf("%s\n", text[j]); } return 0; } my text file esd can create spectacular electric sparks (thunder , lightning large-scale esd event), less dramatic forms may neither seen nor heard, yet still large enough cause damage sensitive electronic devices. electr

sap - Defining or expanding a radio button group in ABAP screen painter -

how can define radio button group in graphical abap screen painter? it easy paint them don't work group. grouping -> define , grouping -> expand greyed out first way: to insert radio button, click on radio button symbol on left, klick on canvas on right insert radio button. repeat each button. select button fill name (the variable name defined in abap program) , text (the label visible user) second way: open dictionary window (blue rectangle smaller red rectangle inside) type variable name used in program (you may type structure name fields in structure) klick on program. select line wish. mark radio button @ right end of line. klick on ok button. click canvas want insert button. how make them work group select 1 radio button mouse. hold down left mouse button , drag rectangle around radio buttons. right klick -> radio button group -> define (or expand if add later). done but defining group doesn't work, define , expand

java.util.scanner - Newbie to Java, wondering about if statements and strings that are read by Scanner -

so, started java today , playing around scanner object after having watched tutorial on how guy used find area of triangle. maybe i'm doing wrong, but, decided mess , see if incorporate "if" statement it. import java.util.scanner; public class test { static scanner sc = new scanner(system.in); /* * in = input keyboard or other device. * system class. */ public static void main(string[] args){ { string password; //this our variable - password system.out.print("enter password:"); password = sc.next(); //we have gotten user input words, work on displaying final message //using if if (password.equals(one)) system.out.println("you have logged in successfully"); } } } that's code , apologize if looks shoddy - still trying learn. my issue is, want if statement go through if input specific passw

can't sign DKIM email from php with phpmailer -

have problem sending dkim signed email phpmailer (v 5.2.9). the smtp server use (realsender.com) should sign every email send. works when send email delphi program instead doesn't work php . i've checked both email sent phpmailer , delphi https://www.mail-tester.com the results 10/10 delphi , 6.8/10 php. part of file send email phpmailer: $mail = new phpmailer(); $mail->charset = 'utf-8'; $mail->setlanguage('it'); $mail->issmtp(); $mail->host = smtp_host; $mail->smtpauth = smtp_auth; $mail->username = smtp_username; $mail->password = smtp_password; if (defined('smtp_port')) { $mail->port = smtp_port; } if (defined('smtp_secure')) { $mail->smtpsecure = smtp_secure; } if(defined('dkim_domain')){ $mail->dkim_domain=dkim_domain; $mail->dkim_selector=dkim_selector; $mail->dkim_private=dkim_private; } [...]//setting from, to, subject , body $mail->send(); note: $mail

Windows Desktop app or Windows Store app -

my app, basically, needs following: getting gps coordinates calling web services (for accessing, sending info etc) work in background no ui of time the target device mobile tablet running windows 8.1. i found out os can develop both desktop app or windows store app. please, suggest use needs? also, because dont know windows desktop app @ all, please can done using desktop app? thanks the main difference between 2 is, whether or not window in old-school desktop (desktop app) or 1 of fancy full-screen-app thingies introduced in windows 8... afaik can't sell desktop apps on windows store, functionality-wise average desktop app has no real downside can use .net fancy features both... here can find detailed comparison between both. description should fine desktop app (: cheers d

c++ - Initializing union member in initializer list without narrowing -

in following code, typedef unsigned long col24; inline col24 makergb24(int r, int g, int b) { return ...; } struct blitdata { union { int flags, stretch; col24 luminance; }; // (other members) }; int main() { blitdata blitdata = { makergb24(0, 0, 0), // ... }; } why first initializer in initializer list of blitdata give following error: non-constant-expression cannot narrowed type col24 (aka unsigned long ) int in initializer list why compiler trying initialize int member of union initializer type col24 instead of using initialize col24 member? the compiler suggests static_cast result of makergb24 int , result in unwanted narrowing. how can luminance member correctly initialized using result of makergb24 in initializer list? edit: blitdata should stay pod. this apparently nonstandard gcc extension, you're after: blitdata blitdata = { luminance: makergb24(0,0,0), }; if that's no you, suspect assi

javascript - Slick Slider slidesToScroll modification -

i use slick slider on site. , no matter how pulling slider left or right, runs on number of slides specified in property slidestoscroll. possible slick slider worked slider http://www.owlcarousel.owlgraphic.com/demos/mousewheel.html . how pulling - scroll same distance. sorry english. you. there code init slick slide: $('.slider-wrapper-2').slick({ slidestoshow: 4, slidestoscroll: 4, rows: 1 }); just add swipetoslide setting, enables swiping slide irrespectively slidestoscroll your initializing script should this: $('.slider-wrapper-2').slick({ slidestoshow: 4, slidestoscroll: 4, rows: 1, swipetoslide: true }); in case doesn't work, remove slidestoscroll option. please comment how worked can edit answer.

html - image randomizer in javascript -

i making html page image randomizer using code found somewhere. code, however, compels me set width , height in pixels. when use code on div image not scale bad fluid layout use. (when set width auto or 100% in css image doesn't show) how alter code works in fluid layout? here's css: .stretcher { /*#bg {*/ position: absolute; left: 0px; top: 0px; z-index: -69; width:1366px; height:768px; } the head part of html: <script type="text/javascript"> window.onload = function () { var header = document.getelementbyid('bg'); var pictures = new array('bgs/1.jpg','bgs/2.jpg','bgs/3.jpg','bgs/4.jpg','bgs/5.jpg'); var numpics = pictures.length; if (document.images) { var chosenpic = math.floor((math.random() * numpics)); header.style.background = 'url(' + pictures[chosenpic] + ')'; } } and div in body: <div class="stretcher" id="bg">&

ios - How to customise UISlider height -

i have project in have customise uislider element. wondering if knows how change, or possible change height of uislide bar line. i tried don't work: let custombounds = cgrect(origin: bounds.origin, size: cgsize(width: bounds.size.width, height: 15.0)) feedbackslider.trackrectforbounds(custombounds) thanks i hope want edit in storyboard, , line size, use in custom uislider class customslide: uislider { @ibinspectable var trackheight: cgfloat = 2 override func trackrectforbounds(bounds: cgrect) -> cgrect { //set bounds here return cgrect(origin: bounds.origin, size: cgsizemake(bounds.width, trackheight)) } }

html - Align 2 dropdowns horizontally -

Image
i have problem need align several dropdowns horizontally. have tried pure table tags , works suspect bad practice. here working fiddle http://jsfiddle.net/1440c8a6/5/ here html code: <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-12"> <div class="pull-left"> <div class="dropdown"> <button class="btn btn-default dropdown-toggle" type="button" id="dropdownmenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> dropdown <span class="caret"></span> </button> <ul class="dropdown-menu" aria-labelledby="dropdownmenu1"> <li><a href="#">action<

r - KnitR unable to download documents -

i able run code in r. setinternet2(use = true) download.file("http://d396qusza40orc.cloudfront.net/dsscapstone/dataset/coursera-swiftkey.zip", "coursera-swiftkey.zip", method = "curl", mode = 'wb') unzip("coursera-swiftkey.zip", files=c("final/en_us/en_us.twitter.txt", "final/en_us/en_us.news.txt", "final/en_us/en_us.blogs.txt"), exdir=".") but when try use knitr gives me error quitting lines 15-21 (milestone.rmd) error in parse(text = x, srcfile = src) : <text>:5:106: unexpected ')' 4: unzip("coursera-swiftkey.zip", files=c("final/en_us/en_us.twitter.txt", "final/en_us/en_us.news.txt", "final/en_us/en_us.blogs.txt"), exdir=".") 5: file.copy(c("final/en_us/en_us.twitter.txt", "final/en_us/en_us.news.txt", "final/en_us/en_us.blogs.txt"?)

php - How can I overwrite a file, when the file I want to upload already exists? -

i want overwrite file, if exists in folder. here code: index.php <form action="check.php" method="post" enctype="multipart/form-data"> <input type="file" name="file"> <button type="submit" value="upload">upload</button> </form> check.php if(isset($_files['file'])) { $file = $_files['file']; $target_file = 'files/'.basename($_files["file"]["name"]); if (file_exists($target_file)) { echo "file exist"; echo "<form action='overwrite.php' method='post'> <button type='submit'> overwrite</button> </form>"; } } overwrite.php move_uploaded_file($_files["file"]["tmp_name"], $target_file); echo "the file overwritten"; update: did mistake in question. c

powershell - How to find out who has full mailbox access for a list of users in exchange 2010 -

i need figure out way see has full access list of mailboxes in exchange 2010 powershell. can use get-mailbox | get-mailboxpermission | {$ .user.tostring() -ne "nt authority\self" -and $ .isinherited -eq $false} see has full access every mailbox in organization wondering if can call csv or text file view permissions mailboxes listed. sure can. call import-csv csv, or get-content text files (one line = 1 name), resultant array go foreach { get_mailbox -identity $_.name | ...} . example: <<text file follows>> user1 user2 user3 <<script follows>> get-content textfile.txt | foreach { get_mailbox -identity $_ | get-mailboxpermission | {$_.user.tostring() -ne "nt authority\self" -and $.isinherited -eq $false} }

javascript - Bootstrap alert doesn't close on clicking close button -

i trying use bootstrap alert show warning. alert fades , dismisses after time give user option of closing himself. have added jquery , js/bootstrap.min.js in order has been suggested in answers similar questions. this html code: <div class="alert alert-warning alert-dismissible errormessage" role="alert" style="display: none;"> <button type="button" class="close" data-dismiss="alert" ng-click="dismisserror()"> <span aria-hidden="true">&times;</span> <span class="sr-only">close</span> </button> {{ errormessage }} </div> and js: //sets errormessage displayed function displayerror(error) { if(error){ $scope.errormessage = error; $('.errormessage').fadein(300).delay(5000).fadeout(500); } $scope.dismisserror = function() { $scope.errormessage = '';

css - How to store javascript background color change in a session -

i'm creating web based game has 6 different background colours alternate throughout. when button pressed on page sets new colour on next page. if page refreshed reverts original colour. know need store colours in session doesn't happen, unfortunately struggling new javascript , have tried far doesn't work. this javascript have: <script> function backgroundyellow() { document.body.style.backgroundcolor = "#f7b538"; } </script> <script> function backgroundblue() { document.body.style.backgroundcolor = "#3cb9c4"; } </script> <script> function backgroundpink() { document.body.style.backgroundcolor = "#c33c55"; } </script> <script> function backgroundgreen() { document.body.style.backgroundcolor = "#8cb369"; } </script> <script> function backgroundorange() { document.b

ibeacon - How can I start / disable background monitoring for beacons at runtime with AltBeacon Library for Android? -

the altbeacon documentation need initialize library in application oncreate() background monitoring. but have data needed initialize @ runtime. specifically @ runtime (after remote http service call) know: if beacon tracking should started @ which regions monitor furthermore may need turn off if condition changes (remotely configured). what's correct way current version of library (2.5+) handle use case? when using android beacon library detect beacons in background, construct regionbootstrap class in custom application class described in starting app in background section of samples. this example shows setting initial region in oncreate method, there no reason needs static in example. welcome execute code call service information whether beacon scanning should started , identifiers should used in region definition. if put after response web service call, move line of code callback: regionbootstrap = new regionbootstrap(this, region); for w

ruby - rbenv installation permission denied -

hi i'm trying set dev environment , i've been following tutorial via; link tutorial i'm not doing , have no real experience of terminal commands other basic version control stuff. followed first link , when trying run source ~/.bash_profile i got error; mkdir: /usr/local/rbenv/shims: permission denied mkdir: /usr/local/rbenv/versions: permission denied now every time load terminal error appears. contents of bash_profile; export path=/usr/local/rbenv/bin:$path export rbenv_root=/usr/local/rbenv eval "$(rbenv init -)" any guidance appreciated it looks rbenv setup puts line of shell scripting in .bash_profile attempts create directory. either give permissions create directories in /usr/local/rbenv , or sudo mkdir /directories/that/need/to/be/created once. sudo mkdir -p /usr/local/rbenv/shims sudo mkdir -p /usr/local/rbenv/versions

Bash one-line command to send wake on LAN magic packet without specific tool -

is possible forge wake on lan magic packet , send in one-line bash command? of course, know there specific tools doing solve problem in 1 line, useful know minimal requirements wol forging. is: how deal wake on lan without specific tools . the minimum requirements can think off: bash supporting brace expansion (i think v3.5.1 , above). the sed command (1). netcat . assuming: wol package lan, broadcast 255.255.255.255. the command line be: echo -e $(echo $(printf 'f%.0s' {1..12}; printf "$(echo $mac | sed 's/://g')%.0s" {1..16}) | sed -e 's/../\\x&/g') | nc -w1 -u -b 255.255.255.255 4000 replace $mac destination mac. or, time in two-liner :-) command: mac=11:22:33:44:55:66 echo -e $(echo $(printf 'f%.0s' {1..12}; printf "$(echo $mac | sed 's/://g')%.0s" {1..16}) | sed -e 's/../\\x&/g') | nc -w1 -u -b 255.255.255.255 4000 so, in more generic notation: mac=11:22:33:44

node.js - How to check if NESTED array item already exists before adding to array -

i'm creating , assigning new object id nested array item in mongo, working great. can't figure out how check against object id verify doesn't exist. here route: router.post('/events', function(req,res){ var loggedinuser = req.user.username; var objectid = new objectid(); user.update( {"username" : loggedinuser}, { $push:{ primaryevents:{ _id: objectid, name: req.body.name, date: req.body.date, description: req.body.description } } }, {upsert:true}, function(err){ console.log('made calback'); if(err) res.send(err); res.render('index', { user: req.user, primaryevents: req.user.primaryevents }); } ); }); you want check there no value i

c# - Recreating a Message in WCF -

i retrieving data server via wcf (i client). unfortunately, server (which have no control of) returning invalid xml. in order fix this, plan add iclientmessageinspector (on client), modifies message before wcf has chance parse returned xml. my first step implement iclientmessageinspector , have leaves response unchanged (it should no-op), reason causes generated wcf method ( client.getbar() below) return null object, rather populated object. class utf8policer : iclientmessageinspector { public void afterreceivereply(ref message reply, object correlationstate) { message revised = null; var contents = new stringbuilder(); var writer = xmlwriter.create(contents); reply.writemessage(writer); writer.flush(); revised = message.createmessage(reply.version, reply.headers.action, xmlreader.create(new stringreader(contents.tostring())); revised.headers.copyheadersfrom(reply); revised.properties.copyproperties

plsql - What is pass by reference in oracle? -

i read on internet , found in parameter in procedure pass reference. can please explain example? in advance. to better understand, let's review how pl/sql handles parameters in 2 ways: by reference in case, pointer actual parameter passed corresponding formal parameter. both actual , formal parameters point same location in memory holds value of parameter. by value in case, value of actual parameter copied corresponding formal parameter. if program terminates without exception, formal parameter value copied actual parameter. if error occurs, changed values not copied actual parameter. by default out , in out parameters passed value , in parameters passed reference. when out or in out parameter modified inside procedure procedure modifies copy of parameter value. when procedure has finished without exception result value copied formal parameter. procedure add_numbers( first_val in number, second_val in out number ) begin second_val := first_val + second_val;

c++ - Generate reverse dependencies of a source file? -

we can use $cxx -mm <file> build dependency rule. example: $ $cxx -mm hex.cpp hex.o: hex.cpp pch.h config.h hex.h basecode.h filters.h simple.h \ cryptlib.h stdcpp.h misc.h smartptr.h trap.h secblock.h queue.h \ algparam.h argnames.h i'm interested in getting reverse dependencies of hex.cpp documentation purposes. is, want list of source files utilize hex.h . is there way reverse dependencies? if so, how?

assembly - Current x86 privilege level on a custom OS -

in custom os running on x86 in protected mode, there way obtain current privilege level, other e.g. executing privileged instruction , seeing if crashes? for instance, register cr0 contains pe bit, indicates if running on real mode or protected mode, , can retrieved using assembly code. is there equivalent privilege level? the intel architecture software developer manual mentions eflags register contains 2 iopl bits related i/o privilege levels. same current privilege level (cpl)? no it's not same. represent io privilege level. instructions such in , out , cli require io privileges determined using iopl , cpl . see also: iopl i/o privilege level field (bits 12 , 13) -- indicates i/o privilege level (iopl) of running program or task. cpl of running program or task must less or equal iopl access i/o address space. the cpl can read cs selector 2 lowest bits: mov ax, cs , ax, 3 this of course works in protected mode.

javascript - How to detect client closing connection during piping stream over http in node? -

i stream data server client in expressjs (nodejs) application. i this; // let contenttype , filename correctly defined in context function(req,res){ res.setheader('content-type',contenttype); res.setheader('content-disposition','attachment; filename='+filename); require('fs').createreadstream('/path/file').pipe(res); } i want know when client fails download file, don't how proceed. listen close event on response object. emitted when connection client closed prematurely refreshing page or closing tab. require('fs').createreadstream('/path/file').pipe(res).on('close',function(){ //do stuff closed connection })

sql server - Keeping TAdoConnection alive -

in 1 of question here: how can detect tadoconnection lost communication server? it suggested create timer , poll sql server. from answer : ttimer ok. query should performed in thread, corresponding connection used. not must although, different issue. should use same/main connection (in dm of main thread) or should create new connection in timer event "ping" sql server? is polling sql server keeping connection alive in first place? using timer poll connection bad idea. doing unneccessary polls consumes resources , bad concept of application design. the best way restore broken connection start using again in try block , re-establish within except..end block. take @ piece of code: // re-establishes connection every time gets broken procedure respawnconnection; begin fconnection := tadoconnection.create(nil); fadodataset := tadodataset.create(nil); fconnection begin connectionstring := adoconnectionstring; // cs here loginprom

3dsmax python add float script to sub animations -

Image
i have next setup: have sphere has morpher modifier. morpher modifier has amount of channels filled morph targets aka sub animations. want add controller each of these subanimations, more controller float script. have code snippet should work when go curve editor, morph channels/ sub animations did not change controller, nor value of controller changed. import maxplus target = maxplus.inode.getinodebyname('sphere001') #retrieve morpher modifier mod = target.getmodifier(0) #id of float script controller id = maxplus.class_id(1233584870,1911625032) #create float controller float_co = maxplus.factory.createfloatcontroller(id) #retrieve first morph channel / sub animation sub = mod.getsubanim(1) #controller assigned sub animation sub.assigncontroller(float_co,1) #basic test assigns 20 sub animation float_co.parameterblock.script.value = '20' when add wrong value script, example: float_co.parameterblock.script.value = '=20' i receive error , usual window

Minimum version of Visual Studio requirement for Windows Phone 8.1 application development -

what minimum version of visual studio required developing windows phone 8.1 application, can visual studio 2012 (update 4) used develop application. according microsoft , windows phone 8.1 development requires visual studio 2013 update 2 or newer, can't use visual studio 2012. note although page recommends installing express edition of visual studio if don't have paid one, better install community edition (and of course, should go vs 2015 instead of vs 2013).

cucumber - Support for the Page Object pattern in Ruby -

in ruby-land have capybara , webrat drive our web browsers during functional testing cucumber. what can't find geb in groovy/java-land seems works on 1 level of abstraction higher capybara. description of geb the geb website . geb browser automation solution. it brings power of webdriver, elegance of jquery content selection, robustness of page object modelling , expressiveness of groovy language. capybara brings webdriver (usually selenium) , jquery-style content selection. doesn't have support page object idea. (you create classes represent pages under test, steps carry out actions upon them rather @ dom directly time. mini-api page.) to give example of kind of useful feature i'm looking for, understand colleague geb can automatically assert page under test matches attributes in virtual page object represents page cucumber tests. i've made use of site prism page-objects in large application. cheezy's page-object gem other gem

How to switch back to default content (or switch iframes) in Selenium IDE -

i have navigate website build framework, , kind of "a special snowflake" it consists of 3 iframes, 1 "active" others set display: none. everytime move 1 page another, new page loaded in iframe. now, if want access element in new active iframe error "element not found" with webdriver solved problem doing following webelement currentframe = _driver.findelement(by .xpath("//iframe[not(contains(@style,'display: none'))]")); _driver.switchto().frame(currentframe); .... driver.switchto().defaultcontent(); .... webelement currentframe = _driver.findelement(by .xpath("//iframe[not(contains(@style,'display: none'))]")); _driver.switchto().frame(currentframe); in selenium ide managed find first frame command: selectframe target: //iframe[not(contains(@style,'display: none'))] but @ point stuck. if go , click command-sequence myself fine, when try whole testcase, doesn't find e

Android layout issue - item is hidden when other view is too long -

hello creating layout list of users name , notification icon. problem name (green rectangle) can have width , when name long notification icon (red rectangle) hidden container (black rectangle) bounds. http://postimg.org/image/6o7np9lx3/ what should that, when notification icon gone name can take width container allow. when notification icon appears never should hide on right side of container, move right side. , notification icon should on right side of name. last thing width of container depends on screen width. so this: http://postimg.org/image/94a0rxy1d/ notification , short text notification , long text no notification , long text hope clear:-) , upload image here directly, don't have enough reputation... edit: adding layout created: <relativelayout android:minwidth="25px" android:minheight="25px" android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id