Posts

Showing posts from February, 2013

database - SQL - How to list all tuples in a relation such that tuple 1 is greater than tuple 2 -

database - SQL - How to list all tuples in a relation such that tuple 1 is greater than tuple 2 - suppose have relation 1 column "value (int)" , values in descending order. +----------+ + value + +----------+ + 10 + + 9 + + 8 + + 7 + .... how can list combinations contains 2 tuples such first tuple greater sec tuple note: may exist 2 tuples same value the desired outputs should like: (10,9) (10, 8) (9,8), (9,7) (8,7) you can cross bring together on same table. select t1.value value1, t2.value value2 thing t1 bring together thing t2 on (t1.value != t2.value , t1.value > t2.value) sql database

android - Google play upload failed because of google play service version -

android - Google play upload failed because of google play service version - upload failed uploaded apk uses google play services version 6111000. need touse version 5100000 or lower. warnings uploaded apk uses google play services version 6111000. work android api levels of 9 , above. discouraged utilize google play services version unless have set minsdkversion in manifest 9 or higher. how prepare error other increasing minsdk 9 ? m using eclipse making apk. just download old version here, , import project. dont forget remove reference old version project. now google play take app. android apk google-play

hyperlink - compiling with HDF5: unable to link library files (fortran 90) -

hyperlink - compiling with HDF5: unable to link library files (fortran 90) - i seek compile these files using hdf5 have straight linked , included necessary ( think) still compile unable find files needed this makefile: cc = h5cc fc = h5fc ld = h5fc fdebug = -std -g -traceback cflags = -g -o0 -wall -pedantic fflags = -g -o0 -wall -i$(h5dir)/include -l$(h5dir)/lib/libhdf5hl_fortran.a ldflags = -i$(h5dir)/include -l$(h5dir)/lib/libhdf5hl_fortran.a #ldflags = -i$(mklroot)/include -l$(mklroot) -mkl=sequential # -opt-block-factor=16 -opt-prefetch=4 \ .suffixes: .suffixes: .c .f .f90 .f90 .o objs = timing.o \ kinds.o \ rw_matrix.o \ exe = matmul_omp.exe all: $(exe) $(exe): $(objs) matmul_omp.o $(ld) $(ldflags) -o $@ $^ .f90.o: -$(rm) -f $*.o $*.mod $(fc) $(fflags) -c $< .c.o: $(cc) $(cflags) -c $< .phoney: clean clean: this err: h5fc -i/curc/tools/x_86_64/rh6/hdf5/1.8.13/szip/2.1/zlib/1.2.8/jpeglib/9a/openmpi/1.8.2/int

Laravel command php artisan serve showing Directory does not exist -

Laravel command php artisan serve showing Directory does not exist - i have installed lavarel on ubuntu scheme going through this link. after steps can see laravel default page(you have arrived). came know laravel command tool. within laravel folder command tool(terminal) tried php artisan serve and showed me this laravel development server started on http://localhost:8000 directory not exist. when used http://localhost:8000 browser showed me webpage not available. can tell me how solve this? help , suggestions appreciable. thanks reinstall , skip part when remove public folder. it's security feature have public folder separated application code. php laravel laravel-4 artisan

css - Justified Inline Div Approach Broken with Wrapped Text -

css - Justified Inline Div Approach Broken with Wrapped Text - this question has reply here: an element more text pushes downwards other inline-block elements. why? 1 reply i have, in fiddle below, justified, as spaced divs grow/shrink dynamically window size. works great until add together plenty text 1 of divs, , cause wrap. in fiddle below, uncomment see effect. http://jsfiddle.net/jspyx21z/1/ here's basic thought of effect, visually. without much text: |hello--------| |hello--------| |-------------| |-------------| |-------------| |-------------| |-------------| |-------------| |-------------| |-------------| but when text added: |hello how are| |you doing?---| |hello--------| |-------------| |-------------| |-------------| |-------------| |-------------| |-------------| |-------------| the boxe

content management system - Is ZK framework a type of CMS? -

content management system - Is ZK framework a type of CMS? - is zk(zkoss) framework kind of web content management scheme wordpress, joomla , others? or more complicated , needs more advanced programming skills use? by using zk able write own java enterprise web applications. need great skill in java , database framework hibernate. of import point not need have skill in ajax , javascript. there many useful components can use. zk not cms. installing zk not able write posts , articles, similiar joomla or wordpress. content-management-system zk

lisp - Let being called multiple times in recursion -

lisp - Let being called multiple times in recursion - i trying declare local variable utilize within recursive function, allow seems beingness called each time function recurses. want allow function called 1 time declare variable , give value nil, i'd update value of local variable within recursive function without beingness wiped each recurse. here simplified framework of code. (defun recursive-function (l1 l2) (let ((?x nil)) (cond (... ... ... ;trying update value of ?x here (setf ?x 5) (recursive-funtion (rest l1)(restl2)) ;recursive phone call made )))) what you've written you've said don't want; local variable within of recursive function should updating each pass. if i've understood correctly, you'll need like (defun recursive-function (l1 l2) (let ((?x nil)) (labels ((actual-recursion (a b) (cond (... ... ...

Rails app on Nginx/Passenger/Capistrano: assets not working -

Rails app on Nginx/Passenger/Capistrano: assets not working - ok, know there post opened similar issues, i've devoted two/three days trying solve problem , i'm out of clue. i've developed app on rails 3.2.8 , deployed digital ocean server using tutorial: https://gorails.com/deploy/ubuntu/12.04 this involves deploying capistrano 3.1.0 on server nginx , passenger installed. ruby manager rvm. what happens: - css not loading, except application.css (only basic css coded on file working) - js not loading - destroy/delete routes not working (caused propably main js not beingness loaded) - app works fine on development environment what i've tried: - precompiling assets on production environment, connecting ssh - precompiling assets on development environment, pushing them production - checked assets generated , located on /current/public after - seek several config options of nginx - seek several config options of production.rb - restarted nginx: sudo s

Serialize a list of objects in JSON C# and deserialize it on Android -

Serialize a list of objects in JSON C# and deserialize it on Android - i need serialize list of objects in json c# , deserialize on android. c# public string serializedata(list<symbolsinfo> dave) { javascriptserializer jss = new javascriptserializer(); string json = jss.serialize(dave); homecoming json; } serialization -- ok. how can deserialize list on android ? [serializable] public partial class symbolsinfo { public string sname { get; set; } public nullable<double> sprice { get; set; } public nullable<int> svolume { get; set; } public system.datetime sdate { get; set; } } according knowledge android doesn't back upwards auto json deserialisation, , java library know jackson, check fasterxml/jackson @ github, don't think it's suitable android case. the mutual solution read http response , parse manually using jsonobject / jsonarray according response. link contains explanati

Socket.io android java client receiving messages and sending file example -

Socket.io android java client receiving messages and sending file example - does have sample code demonstrates receiving messages on java client side socket.io? also, there illustration on sending file/binary/picture on same socket.io java client? (basically sample code java instead of javascript client) the version of android java client can acquired here (this version claim can used socket.io 1.0 , later) (seems updated version) https://github.com/nkzawa/socket.io-client.java currently sample code allows me initialize connection, server able incoming connection event , java socket.io client able send out basic emit message. however, there no plain simple examples on how acquire message update server broadcast or emits website user. sample code reference: package com.sample.d10132014a; import java.io.bufferedreader; import java.io.fileinputstream; import java.io.filenotfoundexception; import java.io.inputstream; import java.io.inputstreamreader; import java.net.uris

jquery - How to call my controller action when my button is inside the Json query inside the view page in mvc4? -

jquery - How to call my controller action when my button is inside the Json query inside the view page in mvc4? - my controller block these: public actionresult delete(int id) { } my json code in view page is for (var = 0; < len; i++) { if (data[i].productid && data[i].name && data[i].shortdescription && data[i].mediumimage && data[i].price && data[i].iconimage) { var photoq = "/images/homeimages/" + data[i].mediumimage; var photo = "<img id='imgad' src='"+ photoq +"' width='100px' height='100px' alt='img'/>"; txt += '<tr><td><div id ="result1" ><div>' + photo + '</div> <div ><div>' + data[i].productid + "</br> name- " + data[i].name + "</br> description " + data[i].shortdescription + ", </br>" + data[i].price

Browsing directory of an Android device using Python -

Browsing directory of an Android device using Python - i user able view & navigate directories of android device when click "browse" button, able take folder photos stored. as of now, can go "adb shell", not able come in more commands interact while connected device via adb shell. connect device via adb shell , cd or run other commands after connecting device. current code horrible not understand "stdout=subprocess.pipe" mean , next online tutorials. here current code: from subprocess import check_output import subprocess out = check_output("adb shell ls") print out destination = raw_input("choose folder: ") p = subprocess.popen("adb shell",stdout=subprocess.pipe) out, err = p.communicate() g = subprocess.call(['cd', destination], stdout=subprocess.pipe) out, err = g.communicate() print out i appreciate help , guides given. give thanks in advance. i'll suggest utilize android fu

utf 8 - PHP Find if any character of a string is not in ISO 8859-1 -

utf 8 - PHP Find if any character of a string is not in ISO 8859-1 - i'm facing problem checking encodes. know encodes mess , hard check. i went lot of options , ended trying preg_match. i need observe if character not valid ascii or iso 8859-1 (latin1 in mysql). i ended this: return 0 === preg_match('/[^\x00-\x7f\xa2-\xff]+/', $value); but not work table: ¢£¤¥¦§¨©ª«¬-®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ some of characters not valid latin, in latin charset. É or À guess because locale or internal function of encondigs set utf8. because ʧ evaluates valid latin character. when not in charset http://es.wikipedia.org/wiki/iso_8859-1 any help here much appreciated. note: i made lot of tests mb_detect_encoding, mb_check_encoding, mb_convert_encoding , iconv of them homecoming ʧ valid latin1 character. i'm bit lost here. php utf-8 character-encoding latin1

html - Rotating a PNG exponentially using Javascript -

html - Rotating a PNG exponentially using Javascript - i'm creating spinning wheel game , want have wheel start slow, peak @ speed of rotation, , slow downwards again. any ideas exponential rotation speed? thanks! linear acceleration cause quadratically increasing displacement, commonly found in nature. should consider candidate. regardless, set programme can plug in different functions see how look. see jquery easings thought like. for starters, seek function angular displacement: a = ct^2, t < 3 = c(9 - t^2), 3 <= t < 6 = 0, otherwise where c constant. javascript html rotation exponential

python - How do I split multiple characters without using any imported libraries? -

python - How do I split multiple characters without using any imported libraries? - the string is: line = 'a tuba!' i want remove spaces , exclamation point when utilize .split() function, output follows: line = ['a','but','tuba'] i want without using imported libraries, basic code. first, remove ! using str.replace() , split string using str.split() . line = 'a tuba!' line = line.replace('!', '').split(' ') print line output: ['a', 'but', 'tuba'] python split

java - Returning a two dimensional array from a list is not indexing properly -

java - Returning a two dimensional array from a list is not indexing properly - okay have turned list 2 dimensional array. problem output indexes once, if have 10 elements within each list want add together 2 dimensional array, 2 dimensional array have 1 index 'n' number of elements. for example i like {{1,2,3}, {4,5,6}, {7,8,9}} instead returning: {1,2,3,4,5,6,7,8,9} i took suggestions from: convert arraylist 2d array containing varying lengths of arrays here code: public static object[][] getordercreatetestcases(){ list<list<string>> list = new arraylist<>(); list<string> values = new arraylist<>(); seek { jsonarray jobject = (jsonarray)getclient().sendget(string.format("get_cases/12&suite_id=136")); for(object obj : jobject){ jsonobject jobj = (jsonobject)obj; values.add(jobj.get("title").tostring()); values.add(jobj.get("id&q

ruby on rails - libmysqlclient_r.so.16: cannot open shared object file: No such file or directory DREAMHOST -

ruby on rails - libmysqlclient_r.so.16: cannot open shared object file: No such file or directory DREAMHOST - i have ror app deployed on dreamhost. here versions running on ruby: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] rails: rails 3.2.3 the error when seek load home page below: libmysqlclient_r.so.16: cannot open shared object file: no such file or directory - /gems/ruby/1.8/gems/mysql2-0.3.13/lib/mysql2/mysql2.so (loaderror) /gems/ruby/1.8/gems/mysql2-0.3.13/lib/mysql2/mysql2.so /gems/ruby/1.8/gems/mysql2-0.3.13/lib/mysql2.rb:8 /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:68:in `require' /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:68:in `require' /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:66:in `each' /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:66:in `require' /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:55:in `each' /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:55:in `require' /usr/lib/ruby/vendor_ruby/bundler.rb:120:in `requir

javascript - Convert given range values to domain values in D3 -

javascript - Convert given range values to domain values in D3 - i have linear scale: var xrange.range([0, parentwidth]).domain([0, 100]); now on mouseover xy coords of mouse cursor using d3.mouse(container) . show floating tooltip. need set xy values calculated mouse position according xrange scale. how do it? or have create scale swapped range , domain values? no need scale. linear (numeric) input can utilize linear.invert() , which: returns value in input domain x corresponding value in output range y. represents inverse mapping range domain. example: var x = d3.scale.linear() .domain([0,50]) .range([0,100]); // domain range: x(25); // 50 // range domain: x.invert(50); // 25 javascript d3.js

json - Full text index is not working in cloudant -

json - Full text index is not working in cloudant - full text index search function not working in cloudant. document 1 : { "_id": "527c8d9327c6f27f17df0d2e17000530", "_rev": "9-4a61c6dac8d03a7d55696c3dde6a4f50", "employee_id": "sci130202", "proj_role": "team member", "work_total_experience": "4", } document 2 : { "_id": "527c8d9327c6f27f17df0d2e17000531", "_rev": "9-4a61c6dac8d03a7d55696c3dd46a4f50", "employee_id": "sci130201", "proj_role": "developer", "work_total_experience": "2", } index function: { "_id": "_design/search_emp", "_rev": "3-4562324d684a2f13d2a1f6f570736e7e", "views": {}, "language": "javascript", "indexes": { "by_employee": {

flask - AirPlay messes up localhost -

flask - AirPlay messes up localhost - since lastly osx update (yosemite), localhost server total of error messages airplay (but not using it). each times it's same: [31/oct/2014 05:40:42] code 400, message bad request version ('rtsp/1.0') [31/oct/2014 05:40:42] "get /info?txtairplay&txtraop rtsp/1.0" 400 - it's annoying have server total of error messages if has clue prepare or remove airplay, thankful :) i think found answer: on cisco discovery forum listed nmap output revealed yosemite discoveryd port ranges. turns out apple using port 5000: port state service version 3689/tcp open daap apple itunes daap 11.0.1d1 5000/tcp open rtsp apple airtunes rtspd 160.10 (apple tv) 7000/tcp open http apple airplay httpd 7100/tcp open http apple airplay httpd 62078/tcp open tcpwrapped 5353/udp open mdns dns-based service discovery as can imagine default flask port, alter running port other

jquery - Does $(this) refer to the item clicked when inside a click function? -

jquery - Does $(this) refer to the item clicked when inside a click function? - i have fiddle here multiple galleries: http://jsfiddle.net/cmscss/uh0cq4o8/ i'd buttons (next, prev , zoom) refer gallery button clicked having lot of problem understanding many answers/blogs etc this . i've been trying move dom actual button clicked define right gallery replacing this: next = ($('.gallery-item.active').prev().length > 0) ? with like: next = ($(this).closest('.gallery').find('.gallery-item.active').prev().length > 0) ? or using parents like: next = ($(this).parents('.gallery').find('.gallery-item.active').prev().length > 0) ? but i'm not exclusively sure this supposed go. any pointers in right direction much appreciated. cheers this mutual scoping issue in javascript. in particular case, yes refers button command itself. want point out can set refers when phone call function using .bind

jquery - How to figure out which JavaScript functions are attached to an element? -

jquery - How to figure out which JavaScript functions are attached to an element? - this question has reply here: can find events bound on element jquery? 5 answers i'm working on webpage uses sources i'm not familiar with. 1 of elements having position changed on mouse hover, can't find corresponding css triggering behavior. thus, javascript. how can find culprit without figuring every possible selector element , going through every possible javascript file effort , find beingness used? you can utilize chrome dev tools figure out it. in elements tab select item want inspect , in right side tab called "event listeners". there can see events attached element , script file calling it. javascript jquery

java - How to pass exchange ID and originating route ID to a bean? -

java - How to pass exchange ID and originating route ID to a bean? - exchange interface has getexchangeid() method returns id of exchange. there way pass value method of bean when calling bean route? the same question id of route originated exchange. value returned getfromrouteid() method of exchange interface. i know pass exchange object bean entirely. it's undesirable bind bean camel api in case. you can utilize @simple annotation bean parameter binding public void foo(@simple("exchangeid") string id, @simple("routeid") string routeid, object body) { ... } some links http://camel.apache.org/simple http://camel.apache.org/parameter-binding-annotations.html java apache-camel

Java Jackson default type mapping -

Java Jackson default type mapping - i'm using jackson 2.4 convert pojos to/from maps. wrote little test programme below. import com.fasterxml.jackson.databind.objectmapper; import java.util.map; public class testobjectmapper { private object byteval; private object shortval; private object intval; private object longval; private object floatval; private object doubleval; public testobjectmapper() { byteval = (byte) 127; shortval = (short) 255; intval = 10; longval = 20l; floatval = 1.2f; doubleval = 1.4; system.out.println("constructor"); system.out.println("byteval.getclass() = " + byteval.getclass()); system.out.println("shortval.getclass() = " + shortval.getclass()); system.out.println("intval.getclass() = " + intval.getclass()); system.out.println("longval.getclass() = " + longval.getclass());

loops - how to write java program that read 5 numbers and calculate how many numbers has value from 0-9 -

loops - how to write java program that read 5 numbers and calculate how many numbers has value from 0-9 - import java.util.scanner; public class { public static void main(string[] args) { scanner variable = new scanner(system.in); int = 0, counter = 0, n = 0; (i = 0; < 5; i++) { n = variable.nextint(); } if ((0 <= n) && (n <= 9)) { counter++; } system.out.println("the number of values enterd 0-9 " + counter); } } i have no errors in programme i'm not getting right answer. illustration : ----jgrasp exec: java 5 6 4 number of values enterd 0-9 0 ----jgrasp: operation complete. i shoud "3" "0" your code doesn't work because missing brackets on loop. execute n=variable.nextint() 5 times without checking it, , check it. if include brackets should work. java loops

actionscript - AS2 - Assigning variable text and text color -

actionscript - AS2 - Assigning variable text and text color - i have flash file contains text fields. assign text fields via flashvar alter text color via flashvar. this changes text color reddish , works fine: &textcolor=0xff0000 however not alter text color, alter text contents correctly: &textcolor=0xff0000&title=titlegoeshere here actionscript: - reason have noticed if flip order below , assign text first, color second, color doesn't work @ all. // text color title.textcolor = textcolor; // assign flashvars title.text = title; how can both assign color , contents? bug in flash? i figured out - situation need specify different title , variable name. can't utilize same one. actionscript flash flashvars

Mandrill PHP unable to get local issuer SSL certificate -

Mandrill PHP unable to get local issuer SSL certificate - i've installed mandrill php api on windows apache server. when trying send email using code below error: mandrill_httperror - api phone call messages/send-template failed: ssl certificate problem: unable local issuer certificate it's not clear me how mandrill connects local issuer certificate. web server have valid certificate , can display https pages successfully. any ideas? $mandrill = new mandrill('mymandrillapikey'); $message = array( 'subject' => 'test message', 'from_email' => 'myemailaddress', 'html' => '<p>this test message mandrill\'s php wrapper!.</p>', 'to' => array(array('email' => 'myemailaddress', 'name' => 'david splat')), 'merge_vars' => array(array( 'rc

How do i print out a number triangle in python? -

How do i print out a number triangle in python? - how print out number triangle in python using loop based program? not homework assignment or exercise book have been trying have not come close. triangle should print out looking this: 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 for in range(7): print (str(i) + " ")*i output: 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 python

linux - Output of ls | wc -l -

linux - Output of ls | wc -l - normally output of wc -l command gives number of lines in file. but, when pipe output of ls command it, seems show number of files , directories , links in current working directory correctly. my question output of ls command displays name of files , directory in same line. so, why in case using wc -l gives different output, compared wc -l filename. in advance. ls detects it's beingness piped programme instead of console, , outputs 1 file/directory per line. can seek ls | cat see behavior. linux

javascript - Many instances of ngIf vs ngShow for complex UI and forms -

javascript - Many instances of ngIf vs ngShow for complex UI and forms - i found few questions regarding ngshow vs ngif nil addressed utilize case well. alternative ng-show/-hide or how load relevant section of dom what difference between ng-if , ng-show/ng-hide when favor ng-if vs. ng-show/ng-hide? i understand differences between 2 directives application many conditional ui elements (content, toolbar buttons, dropdowns, form fields, etc - of in ngrepeats ) improve selection - ngshow or ngif ? user navigates application , loads different content ui, these conditions evaluated happen regularly opposed 1 time might user preferences or permissions. also, much of content conditionally displayed contains {{bindings}} . number of watches concern ngshow while big number of dom manipulations concerns me ngif . is there best practice or guidance type of situation? there threshold 1 makes sense on other? or matter of trying both determine performance impacts of each (

html - How to change the link color of the current page with CSS -

html - How to change the link color of the current page with CSS - how display link current page different others? swap colors of text , background. this have: the html: <div id="header"> <ul id="navigation"> <li class="bio"><a href="http://www.jacurren.com/">home</a></li> <li class="theatre"><a href="http://www.jacurren.com/theatre.php">theatre</a></li> <li class="prog"><a href="http://www.jacurren.com/programming.php">programming</a></li> <li class="resume"><a href="http://www.jacurren.com/resume.php">r&eacute;sum&eacute;</a></li> <li class="portf"><a href="http://www.jacurren.com/portfolio.php">portfolio</a></li> <li class="contact"><a href="http://www.jacurren.

.net - How to use MEF and dlls embeded resources in a dll project c# -

.net - How to use MEF and dlls embeded resources in a dll project c# - for of import project have utilize mef build big assembly. assembly must turn on web server. my question how can load , add together embed dlls project using mef ? before have used approach works : var catalog = new aggregatecatalog(); catalog.catalogs.add(new directorycatalog(@"r:\dnn\extensions", "*.dll")); var container = new compositioncontainer(catalog); seek { container.composeparts(this); } grab (compositionexception compositionexception) { console.writeline(compositionexception.tostring()); } but solution dificult mantain ! can not update dlls in extansions folder when in use. the way restart dnn cms or charge updated dlls in new folder extensionsbis. i have find new solution compose project extarnal dlls. have seek solution embeded dlls : var catalog = ne

Can it ever be possible to program CUDA for Android (Tegra K1)? -

Can it ever be possible to program CUDA for Android (Tegra K1)? - i've been developing android bit on 3 years want delve gpu programming. i've checked out renderscript seems tailored more image processing. checked out cuda on nvidia tegra k1 , there seems development kit (tadp) available android developers interested in cuda. appreciate if someone, who's had experience tools, pointed me in right direction. i beginner of using cuda android. below developing cuda android. tools: tadp linux version. host ubuntu 12.04, (11.04 can't utilize this, due libc version) there sample of cuda in tadp. can research how run , compile first. device: need have device utilize tegra k1, btw, utilize mipad. books: books learning cuda ok think :) android cuda

javascript - jQuery each(), process one by one after inner ajax comepletes -

javascript - jQuery each(), process one by one after inner ajax comepletes - i have code $("[input]").each(function(){ var info = $(this).val(); $.post('someurl.php',{data:data},function(result){ alert(result); }); }); now, when open network tab, post ajax requests seems started simultaneously, want accomplish 1 one. means when 1 ajax request completes, want each() wait loop again. how can accomplish this? it because of asynchronous nature of ajax, seek like process($("[input]")); function process($inputs) { if (!$inputs.length) { return; } var $input = $inputs.eq(0); var info = $input.val(); $.post('someurl.php', { data: info }, function (result) { console.log(result); }).always(function () { process($inputs.slice(1)) }); } demo: fiddle javascript jquery ajax

sql server - Sql Azure Database Mirroring for Traffic Manager Failover -

sql server - Sql Azure Database Mirroring for Traffic Manager Failover - my objective implement azure traffic manager failover of our web site , databases. to accomplish this, have 2 identical sql azure databases deployed in different info centres. the database exhibits 450 tables, 4000 columns, ~8 1000000 records, 3gb in size , written to. is sql info sync viable alternative implement mirroring or in sql azure terms, bi-directional synchronization between them? my initial concern besides efficiency , cost, , regardless of bi-directional vs one-way, time required setup sql info sync, maintenance overhead when schema evolves , debugging complex schema when sync fails. there added issue of sql info sync still in state of preview. perhaps one-way geo-replication improve alternative , upon failover, 1 manually reinstate original database synchronized - i'm wondering if such course of study of action ensues database admin? my concern here departure autom

java - Spring JPA join tables with grouping -

java - Spring JPA join tables with grouping - i'm trying info grouping database using spring jpa, classes : employee.java @entity @table(name = "employee") public class employee implements serializable{ @id @generatedvalue(strategy = generationtype.identity) private integer id; @column(nullable=false, unique=true) private string name; @type(type="org.jadira.usertype.dateandtime.joda.persistentlocaldatetime") @column(name="date_of_birth") private localdatetime dateofbirth; private double salary; @column(name="marital_status") private string maritalstatus; @datetimeformat(pattern="mm/dd/yyyy") @column(name="date_of_hire") @type(type="org.jadira.usertype.dateandtime.joda.persistentlocaldatetime") private localdatetime dateofhire; private string title; @manytoone() @joincolumn(name="dpartment_id") private section depar

java - Karaf: how to configure virtual hosts -

java - Karaf: how to configure virtual hosts - how set virtual hosts in karaf? karaf has embedded jetty, made context.xml below content , have set /etc folder: <configure class="org.eclipse.jetty.webapp.webappcontext"> <set name="contextpath">/</set> <set name="war"><systemproperty name="jetty.home"/>/webapps/testwab_war.war</set> <set name="virtualhosts"> <array type="java.lang.string"> <item>test.localhost</item> </array> </set> </configure> ... test.localhost:8181 brings me 404 . instructions in documentation config file's location unclear me, tell me did wrong? i think cfg file's location... in case of karaf entire quest bit more complicated. need name connectors , utilize pax-web speciffic manifest header bind module it. more detailed description in blog post: http://notizblog.nierbeck.d

Attach both pdf and excel files to an email on single click in VBA -

Attach both pdf and excel files to an email on single click in VBA - i have vba code create pdf file in excel , attache email on button click. wondering if possible attach both pdf , excel file email on single click. please find below code trying modify.. bold section showing 2 functions. suggestion or help appreciated !! sub button1_click() dim emailsubject string, emailsignature string dim email_body string dim olmailitem object 'dim olformathtml form dim objmail object dim currentmonth string, destfolder string, pdffile string dim email_to string, email_cc string, email_bcc string dim openpdfaftercreating boolean, alwaysoverwritepdf boolean, displayemail boolean dim overwritepdf vbmsgboxresult dim outlookapp object, outlookmail object 'currentmonth = "" dim fname string, ecode1 string, ecode2 string, fnamelong string ' ***************************************************** ' ***** can alter these variables ********* 'create excel fn

How to stop automation of an iOS app in instruments from script -

How to stop automation of an iOS app in instruments from script - i using instruments uiautomation of app. there way can stop script if test case fails. ios instruments

oauth - How / where to store refresh token on Android? -

oauth - How / where to store refresh token on Android? - i'm writing app uses oauth. know can store auth token using accountmanager.setauthtoken , store refresh token? suppose utilize accountmanager.setuserdata or shared preferences, both seem hackish. suggestions? i think can save password. android oauth oauth-2.0 accountmanager

javascript - How do I grab the names of multiple files that are about to be uploaded? -

javascript - How do I grab the names of multiple files that are about to be uploaded? - i have next form , div , jquery. when selecting file uploaded, name of file (with it's extension) output div, however, doesn't work multiple files. when selecting multiple files, name of first file output. looked on solution multiple files, , not find it. <form id="myform" action="" method="post" enctype="multipart/form-data"> <input type="file" multiple name="files[]" /> <input type="submit" name="submit" value="submit"> </form> <div class="filename"></div> $("input:file").change(function (){ var filename = $(this).val(); $(".filename").html(filename); }); so remember, getting list of file names (with extensions) should happen files selected, not after form beingness submitted. edit: on top of said b

html - What causes VoiceOver to miss in-page links? -

html - What causes VoiceOver to miss in-page links? - situation: ios 7.1 voiceover enabled hyperlink ( <a href="#content"> ) points to: target element on page ( <div id="content">page contents</div> or <a id="content"></a> ) url i'm investigating: http://www.yooralla.com.au/whats-on/yooralla-media-awards/yooralla-media-awards-judges-pack what happens: select , activate link a border appears on target element (which halfway downwards screen) the page scrolls target element @ top of screen, but border stays halfway downwards screen. the closest element border selected , bordered, reading starts halfway downwards page instead of @ target element. closest reference can find issue item 1 here, maybe fixed in ios 8. but i'm trying work out why it's happening , how avoid on many devices possible. i've tried linking both main content div (which fills of page), , inserting empty a tag, both of beh

c# - Why does Response.Redirect throw the ThreadAbortException in VS 2013 but not in VS 2010? -

c# - Why does Response.Redirect throw the ThreadAbortException in VS 2013 but not in VS 2010? - i've been researching problem regarding response.redirect throwing threadabortexception . 1 part of in can't find reply why happen in vs 2013 , not in vs 2010? can open , run same project in each , response.redirect calls throw exception when run in vs 2013. responses. kevin c# asp.net visual-studio-2010 visual-studio-2013

.net - Specify supportedruntimeversion without a config file -

.net - Specify supportedruntimeversion without a config file - i have windows form application targetplatform x86 , targetframeworkversion 4.0 set. when run on x64 machine, works fine on x86 machine gives next error on startup (both of machines have .net framework version 4.0): this application not started. want view more info issue? clicking on ‘yes’ takes me http://support.microsoft.com/kb/2715633. (shim_noversion_found) i added config file project ‘supportedruntimeversion’ 4.0 , started working. is there reason application automatically detects runtime version x64 machines, needs config file x86 machines? there other way specify runtime version (apart config file) ? any help appreciated! thanks! .net

fpga - Is there a way to sum multi-dimensional arrays in verilog? -

fpga - Is there a way to sum multi-dimensional arrays in verilog? - this think should doable, failing @ how in hdl world. have design inherited summing multidimensional array, have pre-write add-on block because 1 of dimensions synthesize-time option, , cater add-on that. if have reg tap_out[src][dst][tap], src , dst set 4 , tap can between 0 , 15 (16 possibilities), want able assign output[dst] sum of tap_out particular dst. right our addition block takes combinations of tap_out each src , tap , sums them in pairs each dst: tap_out[0][dst][0] tap_out[1][dst][0] tap_out[2][dst][0] tap_out[3][dst][0] tap_out[0][dst][1] .... tap_out[3][dst][15] is there way improve in verilog? in c utilize for-loops, doesn't seem possible here. for-loops work fine in situation integer src_idx, tap_idx; @* begin sum = 0; (scr_idx=0; src_idx<4; src_idx=scr_idx+1) begin (tap_idx=0; tap_idx<16; tap_idx=tap_idx+1) begin sum = sum + tap_out[src_idx][dst][tap

Can two Process on a Linux running on two different users use same instructions? -

Can two Process on a Linux running on two different users use same instructions? - read textbook "understanding kernels" "if same program, editor, needed simultaneously several users, programme loaded memory once, , instructions can shared of users need it. data, of course, must not shared, because each user have separate data. kind of shared address space done automatically kernel save memory." my uncertainty is possible me start programme photoshop on user business relationship , switch business relationship access brother's business relationship , start photoshop. shared here? above para hold good? let's os linux. process linux-kernel

internalsvisibleto - LinqPad access to internals of signed assemblies -

internalsvisibleto - LinqPad access to internals of signed assemblies - is there signed version of linqpad utilize in order access internals of signed assemblies? yes. in linqpad, go to: edit, preferences... , advanced tab, , alter next setting: and (as says in screenshot) add together next project's assemblyinfo.cs : [assembly: internalsvisibleto("linqpadquery")] linqpad internalsvisibleto signed-assembly

c - How do you convert binary argv to string? -

c - How do you convert binary argv to string? - i have c function: void sysexcallback(byte command, byte argc, byte *argv) { ... } and want convert argv[0] (binary) simple string. tried things like: char v[10]; strcpy(v,argv[0]); but gives me error: arduino/hardware/tools/avr/avr/include/string.h:126:14: error: initializing argument 2 of 'char* strcpy(char*, const char*)' [-fpermissive] strcpy takes 2 character pointers parameters. argv[0] byte, not char pointer. seek strcpy(v,(char *)argv); alternatively can create character pointer , point byte pointer so: char *string = (char *)argv; c arduino

python - I want to print the occurance count of column3 in front of it as shown below -

python - I want to print the occurance count of column3 in front of it as shown below - this question has reply here: how print count of occourance of string in same csv file using python? 4 answers i have 3 columns separated commas shown below(column1,column2,column3). in below illustration "241682-27638-usd-ocof" not repeating count one, "241942-37190-usd-div" repeated twice count 2 , on. column1,column2,column3 ,occcurance_count_of_column3 name1,empid1,241682-27638-usd-ciggnt ,1 name2,empid2,241682-27638-usd-ocggint ,1 name3,empid3,241942-37190-usd-ggdiv ,2 name4,empid4,241942-37190-usd-chyof ,1 name5,empid5,241942-37190-usd-eqpl ,1 name6,empid6,241942-37190-usd-int ,1 name7,empid7,242066-15343-usd-cyjof ,3 name8,empid8,242066-15343-usd-cyjof ,3 name9,empid9,242066-15343-usd-cyjof ,3 name10,empid10,241942-37190-usd-ggdiv ,2 name11,empid11,2420

java - Referencing xsds on classpath when using Spring beans to call xsl -

java - Referencing xsds on classpath when using Spring beans to call xsl - so working on project uses spring inject schema location xsd when calling xsl, like: <bean id="transformer" class="com.mypackage.transformer"> <property name="xsl" value="sample.xsl" /> <property name="params"> <map> <entry key="schemalocation" value-ref="schema" /> </map> </property> </bean> <bean id="schema" class="java.lang.string"> <constructor-arg value="http://www.sample.com/schema/sampleschema.xsd" /> </bean> this works fine when utilize url schema location, illustration want refer schema brought in on classpath maven dependency. i've found using 'classpath:sampleschema.xsd' doesn't work. would've thought kind of behaviour common, there accepted wo

c# - how to get day of the week only if entered date is falling between last monday -

c# - how to get day of the week only if entered date is falling between last monday - i trying day of week if entered date falling between lastly mon current date i.e if today 30/10/14 output should th else show date entered here trying datetime aa = convert.todatetime(rr.detail); if (datetime.now.subtract(aa).days < 7) { // not looking want if aa // falling between lastly mon , less 7 days } so thought how accomplish it? if understand correctly, steps i'd take are: 1) date of previous monday 2) user's date 3) check if user's date after previous mon (in case show day) //get date of previous mon datetime prevmonday = datetime.now; while(prevmonday.dayofweek != dayofweek.monday) prevmonday = prevmonday.adddays(-1); //get user's date datetime aa = convert.todatetime(rr.detail); //check if user's date after mon if (aa > prevmonday && aa <= datetime.now.date) console.writeline

mysql - sql query update table with missing fields from another table -

mysql - sql query update table with missing fields from another table - i have issue sql query/sp i'm trying update table has missing info in specific fields table info in same fields exists , valid. trick here anchor on value in first table. can create work insert into / select from combo, creates duplicate record. im using mysql 5.x. here details. table missing info thisweek , table valid info lastweek . field 1 macaddress (which exists , anchor) , exists in both tables (for ex. be:ef:ba:be:ca:fe), fields 2-10 in thisweek blank (''), there info in same fields(fields2-10) in table lastweek . update thisweek set thisweek.field2 = lastweek.field2 thisweek.macaddress = lastweek.macaddress , thisweek.filed2 = ''; i know query isn't anywhere close, looking help. again, same macaddress exists in both tables, difference between tables beingness field2 in thisweek blank (and shouldn't be) , needs equal lastweek.field2 macaddre