Posts

Showing posts from June, 2011

Can I make an alias for `set -l` in the fish shell? -

i make liberal use of set -l / set --local in fish scripts, considered making alias it. name local seems apt. unfortunately, obvious approach doesn't work: function local set -l $argv end this fails because, of course, variable creates local local function itself. using alias doesn't work, either, since it's (perhaps legacy) shorthand above function. is there way can create local variable in calling scope without doing more complicated local foo 'bar' ? make eval (local foo 'bar') work, sort of defeat purpose. i'm open sort of trickery or hacks make work, if exist. i'm afraid not, local variables local topmost scope, , there's no way wrap set without creating new scope. best can this: function def --no-scope-shadowing set $argv end this creates variable in calling function scope. subtly different local: local scoped block, while above scoped function. still may sufficient use case.

ios - Memory Growth Mystery (Objective-C) -

i have memory growth issue in app. since describing full code here intimidating, narrowed down simple scenario switch , forth between 2 view controllers learn basic memory dynamics. - (void)viewdidload { [super viewdidload]; (int i=0; i<100000; i++) { __weak nsstring* str = [nsstring stringwithformat:@"abcsdf"]; str = nil; } } this supposed show no memory growth, because allocate 'str' , deallocate 'str' making 'str' becomes nil, losing owner. but, memory keeps growing. everytime load view controller, memory keeps growing , never coming back. can tell me why that? using arc. your code snippet includes several interesting things ios/os x memory management. __weak nsstring* str = [nsstring stringwithformat:@"abcsdf"]; str = nil; the code same following without arc. nsstring* str = [[[nsstring alloc] initwithformat:@"abcsdf"] autorelease]; str = nil; because stri...

hashmap - how to show map object data on jsp file using spring mvc -

@modelattribute(value = "tempmap") public map<integer, string> getetypemap(httpservletrequest request) throws employeebusinessexception { map<integer, string> tempmap = employeebs .fetchemployeementtype(userdetails.gettenantid(), userdetails.getlocaleid()); return tempmap; } here have tempmap ie hashmap type of object, problem want use oblect in jsp file using springmvc framework. use jstl foreach loop iterating map follows: <c:foreach var="tempmap" items="${tempmap}"> key: ${tempmap.key} - value: ${tempmap.value} </c:foreach> hope you.. use link more details jstl enabling javaserverpages standard tag library (jstl) in jsp

centos7 - Install postfix in CentOS 7 without maria-db -

i trying install postfix using yum in centos 7. i'm using version of mysql (5.5.28) installed directly rpm file. the default postfix has dependency on mariadb. since mariadb conflicts mysql i'm unable use this. tried using centosplus repository has mysql support. after installing compat-mysql rpm, able install postfix using following command: yum install --exclude=mariadb-libs --exclude=mysql-community-libs postfix but after when try start postfix following error: /usr/sbin/postconf: relocation error: /usr/sbin/postconf: symbol mysql_real_connect, version libmysqlclient_18 not defined in file libmysqlclient.so.18 link time reference i kind of stuck @ here. can 1 please help? thanks in advance. you need required packages. install deendency packages. note installing mariadb mot mean need running. take space on disk.

importing XML data in Oracle DB -

i'm new in dbadministration , have been asked design db structure starting big (8gb) xml files. building structure, , finished. i'm testing importing of data xml tables. have stored content of file column in table, when try export 1 column value, have no results (and no errors). here code: create table testtable2 ( xml_file xmltype ) xmltype xml_file store securefile binary xml; insert testtable2 (xml_file) (select xmltype(bfilename('export_dumps','test001.xml'), nls_charset_id('we8iso8859p1')) dual ); select 'cd_uid' xmltable('xml/records/rec/uid' passing (select xml_file testtable2) columns cd_uid varchar2(4000)); the xml starts this: <?xml version="1.0" encoding="utf-8"?> <records xmlns="http://xxxxxxxxxxxxxx"> <rec r_id_disclaimer="yyyyy"> <uid>uid_number</uid> i have tried extracting data directly xml file, have stored ...

ClassNotFoundException after updating to SoapUI 5.2.0 -

after having updated soapui 5.2.0 i'm getting 15:58:00,756 error [soapui] error occurred [com.eviware.soapui.plugins.auto.factories.autoimportmethodfactory], see error log details java.lang.classnotfoundexception: com.eviware.soapui.plugins.auto.factories.autoimportmethodfactory @ java.net.urlclassloader$1.run(unknown source) @ java.net.urlclassloader$1.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ sun.misc.launcher$appclassloader.loadclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ java.lang.class.forname0(native method) @ java.lang.class.forname(unknown source) @ com.eviware.soapui.plugins.loaderbase.loadautofactories(loaderbase.java:96) @ com.eviware.soapui.plugins.loaderbase.loadfactories(loaderbase.java:64) @ com.eviware.soapui.plugins.pluginloader.loadpluginfact...

java - Why can't I use REST Web App while SOAP web app is on the same Tomcat Server? -

i have tomcat 8.0 server rest api in webapps folder (activiti-rest). make successful rest calls until made soap project using jax-ws , placed jax-ws jars tomcat libs folder. soap service works rest api keeps returning 404 errors. what's problem or how can find out problem? log files in tomcat barebones, giving url , error code.

How do I convert a text file into a list while deleting duplicate words and sorting the list in Python? -

i'm trying read lines in file, split lines words, , add individual words list if not in list. lastly, words have sorted. i've been trying right while, , understand concepts, i'm not sure how exact language , placement right. here's have: filename = raw_input("enter file name: ") openedfile = open(filename) lst = list() line in openedfile: line.rstrip() words = line.split() word in words: if word not in lst: lst.append(words) print lst if you're splitting text file words based on whitespace, use split() on whole thing. there's nothing gained reading each line , stripping it, because split() handles that. so initial list of words, need this: filename = raw_input("enter file name: ") openedfile = open(filename) wordlist = openedfile.read().split() then remove duplicates, convert word list set: wordset = set(wordlist) and sort it: words = sorted(wordset) this can simplified 3 lines, so: filenam...

javascript - External script to trigger _postback for icon button on a webpage using keyboard shortcut extension -

i'm using keyboard shortcut extension in chrome (latest version) save time on repetitive browser actions. one such action: #'s in form, hitting "enter", icon button appears when clicked triggers hreference=_postback .. , takes me different page. how create external script uses "enter" keyboard shortcut submits form & triggers postback (or creates click event that) on generated icon button take me page clicking do? screenshots , names follow in 8 hours.

dynamics crm - Removing fields from flyout in CRM 2015 OOB entity -

Image
i customizing contact entity (oob) in crm 2015. 1 of attributes of entity address, composite attribute built using following street1 city state/province i remove city field flyout alltogether. how can achieve ? even though, there no supported way control (hopefully microsoft might make available in future release) little tweak did trick me overcome challenge. i created business rule ho hide default fields (city, state , country) form. wrote business rule without specifying conditions means load/work time. consequently, effect of business rule fields got hidden flyout menu well. changed display name of address composite field street , made visible, included rest 3 new lookup under same section. finally requirement got fulfilled able use composite field capture 4-fields (street1, street2, street3 , zip code) , use individual lookups city, state , country. link: https://ashwaniashwin.wordpress.com/2014/03/24/update-change-address-composite-field-in...

apache - .htaccess - need to replace "?" in URL with "&" -

so, have url unfortunately cannot modified, , paypal checkout appends token "?token=.....". problem proxy url contains several parameters, paypal token must appended "&token=.....", otherwise "token" not visible query string var. the way think might work replace "?" "&" in .htaccess file. ( unless has better idea! ) url including paypal token: https://some.samplesite.com/proxy/091f126b7b6d624623606a1bb67edc430885abaf02ad5975ff2a8276e21fd083091f126b7b6d624623606a1bb67edc430151c3df14a66603f9389b45ec89c9057c76a20ea0b4746ba97d7027e67e9ebc6437dcca31b42521a4794f8e766ab37a76c0e6bd4fc92c60351e7c5fadb37cf0f82210a04bf29a74/&trans=success?token=ec-8fj83689wf858702d i need .htaccess rule trick. including existing .htaccess file make sure other rules not violated. rewriteengine on rewritebase / # if not https, redirect rewritecond %{server_port} !^443$ rewriterule ^ https://%{http_host}%{request_uri} [l,r=301] # if / pre...

ImageJ - compare original and resized image on similarity -

dear colleagues. me please next question. want resize huge amount of images , substitute original images resized saving disk space. before substitution want sure, resized image same original image different dimensions (not white list, not malevich's square , on). there way check such similarity sure resizing successful? thanks. one idea might downscale image tentative down-resed version, scale original size , compare original. if seem pretty similar, overwrite original tentative conversion, if not, report error. here's how might in bash comments. can rehashed other languages of course, or can use system() shell out , use command line version language. #!/bin/bash # downscale image , check if correct # supply image name parameter original="$1" tentative="t-$$-$original" echo debug: tentative filename=$tentative # size of original can resize size origsize=$(identify -format "%g" "$original") echo debug: origsize=$or...

sql server - search for a matching string using part of the string in SQL -

i current have 1 table whereby unique index of 'col_0' have same set of data 2 different indexes. problem copy function in application automatically cuts of description , adds "copied @ end". example col_0 description annoying application problem b annoy (copied column a) i wanted search , update b matches i've tried join part of description. so far i've tried charindex can't quite right. i read request thus: "copied column a)" means copied description of record col_0 = 'a'. , want update "copied .." descriptions original description. in order find "copied .." records using like. extract col_0 value string using string functions (mainly reverse + charindex find last occurrence of blank , substring extraction). update mytable upd set description = ( select description mytable orig orig.col_0 = substring(upd.description, len(upd.description) - char...

ios - Trying to animate a circle formation using Swift -

Image
i new swift animations , need in understanding this. so have following code creates circle based on input provided. func drawcircle(percentage:cgfloat){ //some circle drawing code , circle drawn using percentage % provided. } i call function with drawcircle(0.5) i this. call using drawcircle(0.75) i this. based on percentage passed create circle/semi-circle/ring. hope making sense. now part want animate circle formation. when call drawcircle(0.5) should animate smoothly 0.0% 0.5% if call method timer , pass parameters sequentially (0.00, 0.1, 0.2 etc 0.5) can work. example: but don't think it's right way do. looking if there better way using animations in swift transition 0.0 0.5 smooth. [i don't want change existing codes circle creation. existing code base made working , has time factor , risk change right on existing code. looking function "drawcircle(%)" can used achieve desired output. suggestions welcome.] tia> ...

rest - Firefox Add-on RESTClient - How to send data-binary file in the request? -

i trying use restclient firefox add on post equivalent this: curl -s -s -x post -h "content-type: application/zip" \ --data-binary @./cluster-config.zip \ http://${joining_host}:8001/admin/v1/cluster-config the idea using firefox addon (restclient) debug stuff until works. stuck because don't find way add file request (equivalent --data-binary parameter of curl) how can include file in request in restclient firefox add-on?

SAP BPC EPM dynamic table member -

Image
i'm quiet new bpc , struggle right looking easy. have table splitted in 3 parts. in first 2 data coming cube in 3rd part (in red), data calculated excel formulas formula of cell d33 :(=d26 - d40) .... work long dimension doesn't move, if add new member formualas , number shifted , don't match anymore.. solution solve , stay dynamic ? tried several option epmformattingsheet , excel formulas, local member , formulas :((( has idea on how solve ? thank e. local members formulas should work case

ios - How do I make UIWebView pause/play video content programmatically -

i making app load youtube video through uiwebview need able have pause , play @ times. have looked @ answers here , none of them working. have tried this: webview.stringbyevaluatingjavascriptfromstring("var videos = document.queryselectorall(\"video\"); (var = videos.length - 1; >= 0; i--) { videos[i].pause(); };") but nothing. if matters, loading video this: webview.allowsinlinemediaplayback = true webview.mediaplaybackrequiresuseraction = false let embededhtml = "<html><body style='margin:0px;padding:0px;'><script type='text/javascript' src='http://www.youtube.com/iframe_api'></script><script type='text/javascript'>function onyoutubeiframeapiready(){ytplayer=new yt.player('playerid',{events:{onready:onplayerready}})}function onplayerready(a){a.target.playvideo();}</script><iframe id='playerid' type='text/html' width='0' height='0...

iOS : How to make a CGRect as visible rect for UIView? -

i drawing line graph in uiview width of 1200pixels. can visible 320pixels. how can make rectangle starting x=880 , width = 320 visible?. you can draw graph @ 880px using following way. step 1 : take uiscrollview width = 1200 . step 2 : add uiview in uiscrollview having x position = 880 , width = 320; now can draw graph on uiview . received output same want. hope you.

java - JTree DataFlavor issue -

i'm implementing d&d jtree . have written custom transferhandler , created new transferable class. class if easy: public class treepathtransferable implements transferable{ private static final dataflavor[] flavors = new dataflavor[] { new dataflavor(treepath[].class,"treepaths")}; private treepath[] data; public treepathtransferable(treepath[] data) { super(); this.data = data; } public dataflavor[] gettransferdataflavors() { return flavors; } public boolean isdataflavorsupported(dataflavor flavor) { return flavors[0].equals(flavor); } public treepath[] gettransferdata(dataflavor flavor) throws unsupportedflavorexception, ioexception{ return data; } } if "on drop" call dtde.gettransferable().gettransferdata(dtde.gettransferable().gettransferdataflavors()[0]) i java.io.notserializableexception . if change data-object in treepathtransferable object in following way: public cla...

c# - I need to create a list of numbers in text file -

hello please have program create numbers in text file based on textboxes value there 3 textboxes first typing not changed number textbox2 typing first number , textbox3 typing last number in output program give me 015 100 015 101 015 102 015 103 015 104 015 105 015 106 015 107 015 108 but int text box i'm typed first :0000100 last 0000108 , 015 fixed number , me need in text file 015 0000100 015 0000101 015 0000102 015 0000103 015 0000104 015 0000105 015 0000106 015 0000107 015 0000108 and code of button int a, b; = convert.toint32(textbox2.text); b = convert.toint32(textbox3.text); system.io.streamwriter objwriter; string fm = @"c:\users\hp pavilion\desktop\text.txt"; objwriter = new system.io.streamwriter(fm); int i; (i = convert.toint32(textbox2.text); <= convert.toint32(textbox3.text); i++) { objwriter.write(textbox1.text + " " + + "\r\n"); progressbar1.value = (100 / (b - a)) * i; } objwri...

javascript - CKEditor external fonts load in dropdown of Fonts -

in ckeditor (in inline mode) have fonts google fonts (external) , not load correctly in dropdown of fonts. it possible remove "preview" of each font in dropdown of fonts only? or exist other way load correctly fonts in dropdown of fonts? hope works - https://stackoverflow.com/a/13995619/4260462 myfonts = ['aclonica', 'allan', 'allerta', 'allerta stencil', 'amaranth', 'angkor', 'annie use telescope', 'anonymous pro', 'anton', 'architects daughter', 'arimo', 'artifika', 'arvo', 'astloch', 'bangers', 'battambang', 'bayon', 'bentham', 'bevan', 'bigshot one', 'bokor', 'brawler', 'buda', 'cabin', 'cabin sketch', 'calligraffitti', 'candal', 'cantarell', 'cardo', 'carter one', 'caudex', 'chenla', 'cherry crea...

javascript - How to get every page of playlists from Spotify API in nodejs -

i'm trying of user's playlists spotify api , put them in selecting list. can access 20 playlists @ time created while loop uses next-page property go through every page of playlists, reason results in infinite loop. i'm guessing issue in uri = playlist.next line, highlighted below. appreciated, here's code: //request user's information... $.ajax({ url: 'https://api.spotify.com/v1/me', headers: { 'authorization': 'bearer ' + access_token }, //... create list of user's playlists success: function(user) { var playlisturl = 'https://api.spotify.com/v1/users/' + user.id + '/playlists'; appendplaylists(playlisturl); function appendplaylists(nexturl) { if (nexturl == null) { return; } //append playlists menu $.a...

c++ - How to properly delete a map of pointers as key? -

i have map of key/value pointers : std::map<a*, b*> mymap; what proper way liberate memory of key only? i thinking doing : for (auto itr = _mymap.begin(); itr != _mymap.end(); itr++) { if (certaincondition == true) { delete itr->first; itr->first = nullptr; } } is correct way of doing it? map keep nullptr key , future iteration include nullptr ? you cannot modify key of container because used define ordering , changing in place invalidate ordering. furthermore, each key needs unique. therefore, need remove item map clean memory. if have key: mymap.erase(key); delete key; if have iterator within map: a* keycopy = itr->first; mymap.erase(itr); delete keycopy; edit per updated question: auto itr = mymap.begin(); while (itr != mymap.end()) { if (certaincondition == true) { a* keycopy = itr->first; itr = mymap.erase(itr); delete keycopy; } else { ++itr; ...

javascript - WebGL draw through indices -

i new in webgl, trying draw square using 2 triangles , indices. not getting right. have been looking @ codes , examples missing something. trying keep things simple. <html> <head> <meta charset="utf-8"/> <script id="vertex" type="x-shader"> attribute vec2 avertexposition; void main() { gl_position = vec4(avertexposition, 0.0, 1.0); } </script> <script id="fragment" type="x-shader"> #ifdef gl_es precision highp float; #endif uniform vec4 ucolor; void main() { gl_fragcolor = ucolor; } </script> <script type="text/javascript"> function init(){ var canvas = document.getelementbyid("mycanvas"); var gl = canvas.getcontext(...

Configure Angularjs ui-grid from Java before grid loads -

i configured angularjs ui-grid options, specific, columndefs, java because grid loads before gets columndefs configuration java, filtering doesn't show because loads before , doesn't see columns. i used $http.get('url') function(gridops) columndefs. how load config data java before ui-grid loads? thank you! found solution: var app = angular.module('app', ['ngtouch', 'ui.grid', 'ui.grid.selection', 'ui.grid.exporter', 'ui.grid.importer', 'ui.grid.autoresize']); fetchdata().then(bootstrapapplication); } function fetchdata() { var initinjector = angular.injector(["ng"]); var $http = initinjector.get("$http"); return $http.get("url").then(function(response) { app.constant("config", response.data); }, function(errorresponse) { // handle error case }); } app.controller('...

java - Two maven dependencies from different repos -

how can use selenium , sikuli in 1 pom.xml ? <dependency> <groupid>org.seleniumhq.selenium</groupid> <artifactid>selenium-java</artifactid> <version>2.45.0</version> </dependency> <dependency> <groupid>com.sikulix</groupid> <artifactid>sikulixapi</artifactid> <version>1.1.0-snapshot</version> </dependency> sikuli in : <repository> <id>com.sikulix</id> <name>com.sikulix</name> <url>https://oss.sonatype.org/content/groups/public</url> <layout>default</layout> <snapshots> <enabled>true</enabled> <updatepolicy>always</updatepolicy> </snapshots> </repository> but adding repo, makes maven there selenium too is possible link 2 different dependencies 2 different...

How do I force a rails ActiveRecord string column to only accept strings? -

i have post class title:string field post = post.create! #=> post created post.title = "foo" post.save! # success post.title = 1 post.save! # succeeds, want throw type mismatch exception how last save! throw type mismatch? ruby duck-typed language , doesn't have type mismatches. if object responds to_s , rails call to_s on , put string field. it sounds want validate format of value you're putting field (is string "2" valid value?), validates_format_of for. example, if want ensure value has @ least 1 non-digit character, this: class post < activerecord::base validates_format_of :title, with: /\d/ end of course, may want customize regex bit more. if can't stand duck-typing , want make sure nothing true string goes column, can override title= : class post < activerecord::base def title=(value) throw "`title' must string" unless value.is_a?(string) super end end note won't invoked w...

r - How to extract a parameter from a list of functions in a loop -

i have large data set , want perform several functions @ once , extract each parameter. the test dataset: testdf <- data.frame(vy = rnorm(60), vx = rnorm(60) , gvar = rep(c("a","b"), each=30)) i first definded list of functions: require(fbasics) normfuns <- list(jarqueberatest=jarqueberatest, shapirotest=shapirotest, lillietest=lillietest) then function perform tests grouping variable mynormtest <- function(d) { norm_test <- res_reg <- list() (i in c("a","b")){ res_reg[[i]] <- residuals(lm(vy~vx, data=d[d$gvar==i,])) norm_test[[i]] <- lapply(normfuns, function(f) f(res_reg[[i]])) } return(norm_test) } mynormtest(testdf) i obtain list of test summaries each grouping variable. however, interested in getting parameter "statistic" , did not manage find out how extract it. you can obtain value stored "statistic" in output of various tests with res_list <- myno...

pom.xml - In maven-dependency-plugin how to unpack only if I pass him parameter? -

does knows how can unpack artifact terms? meaning giving him boolean parameter determine whether or not unpack artifact. i tried use skip flag didn't work. <build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-dependency-plugin</artifactid> <version>2.9</version> <executions> <execution> <id>get-rpm</id> <phase>compile</phase> <goals> <goal>copy</goal> </goals> <configuration> <artifactitems> <artifactitem> <groupid>com.xx.xxx</groupid> <artifactid>xxx-onprem</artifactid...

Input Filter for moving to the correct project AND issue-type immediately via Jira Mail Handler via Subject Line -

example mail handler. reads subject , selects correct project , issue type. subject: (project2)(task) newissue do. find project2 , create newissue of type task. possible jira it? thank in advance luis ribeiro yes can use jira mail handler have issue key correct issue key in subject correct project this: subject: [jira] (jra-#####) this project, have set mail handler set project task (every email sent task), way specific type buy additional add-on jira mail-handler here: https://marketplace.atlassian.com/plugins/com.metainf.jira.plugin.emailissue

c# - Compiling Accept API/Framework with Visual Studio Namespace error -

Image
i trying compile project visual studio 2013 ( https://github.com/accept-project/accept-portal see details), after following instructions , solving dependencies problems, got namespace error when building solution. the code not me , knowledge in c# close none. what know is: can namespace errors come mistake on side or actual error code itself? any higly appreciated. thanks lot! simon

javascript - Using Lo-Dash and Underscore simulatenously in RequireJS environment -

in requirejs environment, what's best way allow amd modules use lo-dash while others simultaneously use underscore? i able solve problem myself simply. use lodash path modules require lo-dash , underscore modules require "underscore": require.config({ paths: { 'underscore': 'path-to-my-underscore-file', 'lodash': 'path-to-my-lodash-file' } }); in way, 2 libraries can used simultaneously without interference. contrary popular belief , claims, lo-dash not perfect drop-in replacement underscore.

c# - How to download a webpage in PDF format -

i trying create button download webpage working on in pdf format. using visual studio. eg; click on download button , webpage viewing downloaded onto computer. in advance can solution? when click on button go server side , convert pdf using itext. see example: how convert html pdf using itextsharp you need of course first render html document on server, done in serveral ways.

javascript - Knockout observableArray sort not reflecting in the UI (foreach binding) -

i'm adding data tag list grid (by checking rows of data). when happens, want tag list sorted (for example sorted alphabetically name). the sort result has reflect in ui, i've tried not work in case. here's fiddle example: http://jsfiddle.net/hlplobo2/5/ in order make sure it's sorted, i'm calling sortpersonsalphabetically function on foreach afteradd callback: <div class="tag-list" data-bind="foreach: { data: tags, as: 'tag', afteradd: sortpersonsalphabetically }"> <div class="tag-item"> <span class="tag-item-value tag-item-value-name" data-bind="text: tag.name"></span> <span class="tag-item-separator">:</span> <span class="tag-item-value tag-item-value-age" data-bind="text: tag.age"></span> </div> </div> but...

Use Ionic or Cordova? -

we want build simple application use lot of videos , images. application should run on different mobile devices running andriod , iphone operating systems. ionic convert each application mobiles options ? what suggest use cordova or ionic? edit : this answer update ionic framework version 3: disclaimer: sound advertisement, have i'm in no way affiliated ionic, happen i'm sharing love it. ionic more “just” ui framework. ionic allows to: have only 1 single codebase , deploy ios, android, , windows, along mobile web progressive web app generate icons , splash screens devices , device sizes single command: ionic cordova resources . alone saves @ least day of image preparing various sizes. instantly update apps code changes, when running directly on device ionic cordova run --livereload build , test ios , android versions side-by-side , see changes instantly ionic lab share ionic apps clients, customers, , testers around world without ever going through ap...

how can i call itemclicklistener inside a switch onclicklistener android -

i creating android application. want when user clicked switch in row call listview's onitemclicklistener. before, tried call listview's itemclicklistener on switch's onclicklistener inside customadapter throws error. if there's no way me achieve desired result, please tell me alternative way. if wondering why need listview's itemclick called inside switch's onclick because itemclick way can rows id use updating rows. thank in advance. :) here's code of activity listview: import java.text.decimalformat; import java.util.timer; import java.util.timertask; import android.app.activity; import android.app.dialog; import android.app.dialogfragment; import android.content.intent; import android.database.cursor; import android.os.bundle; import android.os.handler; import android.util.log; import android.view.view; import android.view.view.onclicklistener; import android.widget.adapterview; import android.widget.adapterview.onitemclicklistener; import andr...

git rev list - Git --min-children, any way? -

is there clean way obtain effect of hypothetical --min-children= git rev-list parameter? (which of course counterpart of --min-parents , returning commits have indicated minimum number of children) the way can see parse result of rev-list --children pick rows (number of columns)=(min-children wanted + 1), wonder if there's better way (and why git doesn't natively support such search). i think might useful in quest find commits belonging single feature branch, nice think have in general.

sql server - Entity Framework: how to find transaction isolation level in SQL Profiler? -

begintransaction method used manage transactions in entity framework 6. allows set isolation level transaction may see in code below (just sample): using (var context = new datacontext()) { using (var transaction = context.database.begintransaction(isolationlevel.serializable)) { context.entities.add(new entity()); context.savechanges(); transaction.commit(); } } the problem is: when use sql server profiler, cann't find information isolation level real sql transaction. attempt #1: i tried trace kinds of events , search "isolation" keyword in trace results. 2 events found: eventclass textdata ------------------------------------------------------------- existingconnection set transaction isolation level read committed auditlogin set transaction isolation level read committed read committed in these events. not code, because isolationlevel.serializable set above. attempt #2: for transaction has...

Flask/Python decoding username NTLM or Negotiate Authentication Header -

i have flask app hosted in iis in our intranet. in flask, i'm able www-authenticate header, need determine windows username. did have basic authentication enabled , able parse out username via method, want transparent user. in ie have option set auto login intranet sites they're not prompted username , password. i able string can either begin ntlm or negotiate (depending on setting in iis) , long auth string. reliable way can decode in python/flask? got it. class remoteusermiddleware(object): def __init__(self, app): self.app = app def __call__(self, environ, start_response): user = environ.pop('http_x_proxy_remote_user', none) environ['remote_user'] = user return self.app(environ, start_response) app.wsgi_app = remoteusermiddleware(app.wsgi_app) then in view doing this: username = str(request.environ.get('logon_user'))