Posts

Showing posts from January, 2013

javascript - @media print css not formatting table on printing -

i have simple table button below it. in body section of jsp below: <div id="mydivforprint"> <table class="t1"> <tbody> <tr> <th>one</th> <th>two</th> <th>three</th> </tr> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> </tbody> </table> </div> <button onclick="printdiv()">print</button> below css @media rule supposed format table. css in head section of jsp: @media print...

c# - Call Controller Method using Ajax request -

please call method controller using ajax request, below code, error had returned says source of controller cannot found. here ajax code function getservices() { var e = document.getelementbyid("catagories"); var struser = e.options[e.selectedindex].value; var id = e.options[e.selectedindex].id; $.ajax({ url: "~/vascontroller/executevas/", //url: '<%= url.action("getservices", "vas") %>', type: 'post', contenttype: 'application/json', data: {"id": id}, success: function (result) { alert(result); } }); } and here controller method [webmethod] public static string getservices(string id) { return id; } kindly advice, still beginner in c# , mvc in controller file public class yourcontrollernamecontroller : controller { [httppost] public actionresult dosomething(int? id) { //your code ...

xml - Issue with XmlNode.SelectNodes -

i'm getting web service below xml , i'm try select ttcontext nodes need parse contextvalue node contextgroup = pcsessionid. i figured first make sure @ ttcontext nodes , work there modify code go when run below code node list contains 0 nodes. can lead me in right direction? dim xmldoc xmldocument = new xmldocument xmldoc.loadxml(e.innerxml) e.innerxml contains below xml: <soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <soap-env:body> <apsrvresponse xmlns="urn:etimews:etimews"> <result xsi:nil="true" /> <dscontext> <ttcontext> <contextgroup>param</contextgroup> <contextname>pcpassword</contextname...

jQuery .remove() option using :contains() -

at bottom of page line "step 2" opens accordion tab. on first section of interface 2nd drop down reads select servive. im trying use :contains() , .remove() remove options contain word phone in text. here's code, doesn't seem work. error reads im missing closing ) cant see where. <select class="ab-formelement ab-select-mobile ab-select-service"> <option value="">select service</option> <option value="1">early pregnancy scan</option> <option value="2">2d sexing / gender scan</option> <option value="18">phone booking &gt; bundle of joy</option> </select> jquery(document).ready(function($){ $=jquery; var option = jquery('select.ab-select-service option:contains('phone')'); $(option).remove(); }); update: ive noticed else. try of elements within plugin seem not work. theres difference in syntax on jquery , code in ...

html - Moving the Search Bar to specific location in Bootstrap 3 -

Image
i have search bar appears @ center of page. move 1/4 of way. how achieve this? code below. update: using developer tools in chrome, able make work temporarily using following steps: inspect element "developer tools" uncheck "display: table-cell;" in .intro .intro-body click on "element.style" type "margin-top: 300px;" i can play around position of search bar. however, whenever refresh browser lost! thanks! <!-- intro header --> <header class="intro"> <div class="intro-body"> <div class="container"> <div class="row"> <div class="col-md-8 col-md-offset-2"> </form> <form action="/predict" style="width: 500px; margin: 0.3em 2em;" method='post'> <div class="input-group...

Cloudera Kafka can not run -

i installed zookeeper , tried install kafka0.8.0 on cloudera5.4.4. deployed, when ran it, failed. error log following: [errno 2] no such file or directory: '/var/log/kafka/server.log' i have no idea. in advance! i met problem before, default maximum memory of brokers set 0mb cloudera(it seems bug of cloudeara), caused kafka not run, , parameter fetch.message.max.bytes set low default. check stderr installation log, search keyword error, otherwise log messy check. find root error message. message above [errno 2] no such file or directory: '/var/log/kafka/server.log' not root exception.

linux - How to check C libraries installed without root access? -

i working on school project in limited environment (archlinux) don't have root access. subject says allowed use libraries installed. coding in c using gcc. how list of libraries ? for libraries managed pkg-config utility, following command show installed libraries: pkg-config --list-all | less however, not libraries managed may forced go through /usr/lib , /usr/local/lib directories.

c# - Using Linq, I need to delete all of the rows from a table and then enter about a thousand new rows. How can I make this whole thing a transaction? -

i need empty table , enter around 1000 rows it. need whole thing transaction, however, i'm not stuck empty (or partially empty) table if of inserts fail. so experimented code below, insert (.add) intentionally fail. when running it, however, call delete stored procedure (prdeletefromusertable) not roll transaction. i'm left empty table , no inserts. using (var context = new entities(_strconnection)) { using (var transaction = new transactionscope()) { //delete rows in table context.prdeletefromusertable(); //add row, made intentionally make fail test transaction context.usertable.add(row); context.savechanges(); //end transaction transaction.complete(); } } how accomplish using linq-to-sql? linq queries (language integrated query) , not designed bulk deletion , insertion. solution use sql delete rows delete mytable , sqlbulkcopy 1000 inserts.

c# - AutoMapping objects -

i have weird situation have object s , list s of object s part of entities , contracts interface third-party service. i'm going try see if can replace actual object class more specific in entities , contracts around this, curious if there way automapper handle is. here dummy classes: public class { public object item { get; set; } } public class fromobject { public string value { get; set; } } public class { public object item { get; set; } } public class toobject { public string value { get; set; } } and quick replication: mapper.createmap<from, to>(); mapper.createmap<fromobject, toobject>(); from = new { item = new fromobject { value = "test" } }; to = mapper.map<to>(from); string type = to.item.gettype().name; // fromobject basically, question this: there way automapper understand from.item fromobject , apply mapping toobject ? i'm thinking there's not way make automatic, since there's nothing indica...

emacs and python-mode: typical key bindings don't do anything? -

i getting close nice emacs environment, based off of this baseline. however, many of python-emacs tutorials mention things " c-c c-c run in python shell", or " c-c ! " launch python shell". reason not getting functionality. getting c-c c-c undefined . work m-x run-python . why not getting standard behavior? running emacs through cygwin, has both python , ipython installed. your sample init.el uses different python mode tutorials read. python-mode.el (line 3147/3152) defines: (define-key map [(control c)(control c)] 'py-execute-buffer) (define-key map [(control c)(!)] 'py-shell) but not define run-python , instead defined in python.el , distributed emacs since version 24.3. , set default python mode in referenced init.el . see emacswiki: programming python mode dot el setup instructions python-mode.el .

php - How can i use count function with autoincrement? -

i working on php situation have. should like. each product has unique id value. if product id posted throught submit button, count action should activited count number of time product id posted, increment. i hope exposed situaation clearly. way thought doing it, can't work: <?php if (isset($_post['submit'])) { $do = count($_post['id']); echo $do; if ($do > 1) { $i= $do+1; echo $i; } } ?> <!doctype html> <html> <head> <title>test</title> </head> <body> <div class="holder"> <div class="im"> <img src="session-test/images/orange-juice.jpg" /> <p>bestorange-juice</p> <form method="post" action="sessiontest.php"> <input type="hidden" id="id" name="id" value="2" /> <input type="hidden" id="price" name="price...

python - Splitting nested dictionary -

i have nested dictionary per below. looking remove initial data item. left inner dictionary {0: 'information1', 1: 'information2', 2: 'information3'} . all information have found far suggests splitting based on value , after value of data not entirely sure how specify split. initial nested dictionary {'data': {0: 'information1', 1: 'information2', 2: 'information3'}} expected result dictionary {0: 'information1', 1: 'information2', 2: 'information3'} you not trying split, retrieve 1 of values inside dictionary: d = {'data': {0: 'information1', 1: 'information2', 2: 'information3'}} inner = d['data'] inner contain {0: 'information1', 1: 'information2', 2: 'information3'} a bit more explanation: looking @ d , contains 1 key/value pair. key 'data' , value {0: 'information1', 1: 'information2...

Can't Connect to Amazon RDS MySQL Instance from anywhere Except Home -

i working on school project in need perform statistical analysis in r. sake of project, have created amazon web services rds mysql instance, share colleagues. i have uploaded data need our project in database , can connect instance via both mysql client , r from home . however, cannot connect either school or local café via either mysql client or local café. i have configured security group can access database (both inbound & outbound). port use 1433 . anybody has idea how can resolve problem? can try security group rule: 0.0.0.0/0 ?

Read dataset with URL link in R -

i read in r following dataset link( https://data.cityofchicago.org/public-safety/crimes-2001-to-present/ijzp-q8t2 ). tried display dataset in text format or csv format, have not been able to it. also, file big contained in 1 excel csv file. interested toward observations 2015. purpose built code execute have access internet. that's why want extract , manipulate dataset command lines on r. i have been working on many hours. hints or solutions appreciate.

python - Ways to search and tag a MongoDB database of academic papers -

apologies vague nature of question i'm not quite sure start , thought i'd ask here guidance. as exercise, i've downloaded several academic papers , stored them plain text in mongodb database. i'd write search feature (using python, r, whatever) when enter text , returns relevant articles. clearly, relevant hard -- that's google got right. however, i'm not looking perfect. something. few thoughts had were: 1) simple mongodb full text search 2) implement lucene search 3) tag them (unsure how though) , return them sorted number of tags? is there solution has used that's out of box , works well? can optimize search feature later -- want pieces move together... thanks! is there solution has used that's out of box , works well? it depends on how define well , in simple terms, i'd no. there no single , accurate definition of fairly well . lot of challenges intrinsic particular problem arise when 1 trying implement good se...

javascript - Why I cannot disable some dates in datetimepicker based on my logic in jquery? -

i'm using following javascript: http://xdsoft.net/jqplugins/datetimepicker , , want achieve simple effect - when user selects today's day, should show him hours available until end of day, previous time should disabled. when choses other day in future - whole time should available. , 1 more thing - want use american timezone time, server php. later on i'm using moment.js parse , i'm including in datetimepicker. wrote following function in js: $(document).ready(function () { var today; var time = 1443571620; var newyorktime = time - 5*60*60; today = new date(newyorktime*1000); var dd = today.getdate(); var mm = today.getmonth(); var yy = today.getfullyear(); var hh = today.gethours(); var = new date(newyorktime*1000); now.sethours(now.gethours()); var ispm = now.gethours() >= 12; var ismidday = now.gethours() == 12; var result = document.queryselector('#result...

.htaccess - WordPress redirect all HTTPS to HTTP -

we have wordpress site, , used have ssl certificate. site used https, , don't need ssl anymore let expire. we've changed site address , wordpress address in admin panel http://example.com . we have several links out in wild link https:// , if user accesses site https:// site breaks or user gets warning message in browser. bottom line, need redirect https:// traffic http:// . i tried couple of plugins (no luck): https://wordpress.org/plugins/force-non-ssl/ https://wordpress.org/plugins/wp-force-http/ and changed .htaccess file (still no luck) <ifmodule mod_rewrite.c> rewriteengine on rewritecond %{server_port} ^443$ rewriterule ^(.*)$ http://%{http_host}/$1 [r=301,l] rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule> not sure else need do. the problem here lies fact before apache or wordpress come in play, browser needs es...

ios - Custom UITableViewCell with auto layout issue -

Image
i have custom uitableviewcell seen below: my image has fixed width , height, description label fills remaining width , has automatic height based on content. this creates problem because, depending on description label’s height, there’s never fixed anchor attach bottom of cell to. so, have constraint bottom of image bottom of cell’s margin, relation of >= 0. similarly, have constraint on bottom of description label relation of >= 0. however, when run app auto layout uses image constraint calculate bottom instead of description label constraint, when when description label taller. clips label. i have feeling might content hugging , compression resistance both views 251 , 750 respectively. (i’ve toyed around these no luck - don’t understand them) how use auto layout attach bottom of cell image when description smaller image? , vice versa? you can remove bottom constrain label , set vertical content hugging , vertical content compression 1000 (required). ...

java - Not printing occurrences of each keys correctly with the HashMap -

i trying print how many times particular key has occurred in array , seems it's printing 1 of values. please tell me logical error having in code below: import java.util.hashmap; import java.util.map; public class mostoccuranceofnumber { public static void main(string[] args) { int[] n = {1,2,3,4,5,6,7,7,7,7}; map<integer, integer> map = new hashmap<integer,integer>(); // create hash map for(int = 0 ; < n.length ; i++){ if(map.containskey(n)){ map.put(n[i], map.get(n[i]) +1); } else{ map.put(n[i], 1); } for(map.entry<integer, integer> m : map.entryset()){ system.out.println("key "+m.getkey()+"occured"+m.getvalue()+"times"); } } } } try this: import java.util.hashmap; import java.util.map; public class mostoccuranceofnumber { publ...

forms - Meteor binding values for inputs with event generation -

i have form input value bound reactive data source: <input type="text" name="first-name" id="first-name" required value="{{currentuser.profile.firstname}}" /> i want watch 'change' events on input: $('#first-name').change(function() { alert('value changed!'); }); this works fine if change value directly in input. however, if value changes reactively, change event doesn't fire. what's best way bind values form elements 'change' event fires if reactive data source changes? the optimum solution use manuel:viewmodel . keep state of ui in javascript object , bind ui elements properties of object. example : first add package project meteor add manuel:viewmodel then in html following : <template name="loginbox"> first name: <input type="text" data-bind="value: first"/> <br/> last name: <input type="text" data-b...

Pinterest API https://api.pinterest.com/v1/me/ returns "authorization failed" -

i passed oauth part, got access token successfully. need user profile calling https://api.pinterest.com/v1/me/?access_token= 'token'. returned me: { "status":"failure", "code":3, "host":"coreapp-devplatform-devapi-184", "generated_at":"wed, 30 sep 2015 01:57:50 +0000", "message":"authorization failed.", "data":null } it works app creator, not collaborator or tester. missing? just verified pinterest has fixed issue. works collaborators or testers. make sure collaborators or testers follow app creator's pinterest account.

Is it possible to code music in R and play it back? (Mac OS X) -

i wonder if there way write script in r create music. coding program (supercollider or, less coding still, pure data), want know if there way generate sound in r. actually, know how can play birthday music using r? , nice. want chords , multi instrumental composition. possible? is there simpler way play music in r happy birthday link? you can create music in r programming using tuner library first need create simple sine waves each note , concatenate notes vector. now tune ready, can edit sound using different sound processing techniques timbre, filtering etc. example create simple a4 note: library(tuner) #import tuner library setwavplayer("audacious") f=440 #frequency of a4 note sr=8000 bits=16 secs=2 #length of note set 2 amp=1 t=seq(0, secs, 1/sr) y= amp*sin(2*pi*f*t) #make sinewave above attributes s=floor(2^(bits-2)*y) #floor make integer value u=wave(s, samp.rate=sr, bit=bits) #make wave structure play(u...

html - CSS 2 Floating Div's Inside Container Full Height w/ Image -

i have container thats 900px wide 2 floating divs inside. need make column 2 background full height , dependent image left. text in column 2 needs vertically centered, again based on image height. https://jsfiddle.net/rj5o6n79/1/ <div class="wrapper"> <div class="col span_2_of_3 content"> <img src="http://www.keenthemes.com/preview/metronic/theme/assets/global/plugins/jcrop/demos/demo_files/image1.jpg" /> </div> <div class="col span_1_of_3 box2"> column 2 </div> <div style="clear:both;"></div> </div> you can use jquery height of left div var leftdivheight = $('.span_2_of_3').height(); $('.span_1_of_3').css('height',leftdivheight); then wrap content of inner div div <div class="col span_1_of_3 box2"> <div class='innercontent'> column 2 </div> <!-- added div --...

c++ - Can I use a variable in destructor that is not defined in the header file? -

i have been reading code 1 of class. , got confused on 1 of variables in destructor. here code, btw, linked list header file. , variable think not defined used n; #include <iostream> using namespace std; class linkedlist { private: struct node { int info; node * next; }; typedef node * nodeptr; nodeptr start; int count; public: // constructor linkedlist() { start = null; count = 0; } // destructor ~linkedlist() { nodeptr p = start, n; while (p != null) { n = p; p = p->next; delete n; } } the first time n showed line nodeptr p = start, n; please teach me why legal use variable this. commands appreciated. thank in c++ language (just in c) each declaration can include multiple declarators. e.g. int a, b, c; declares (and defines) 3 variables: a , b , c of type int . can optionally add initializers declarators (or of them) i...

php - Adding URL Query parameters to WP_Query -

i implementing product filter woocommerce store. want filter product base on attributes, such color, can retrieve url query parameters. example, if path /product-category/clothing/?filter_color=16 , product color id = 16 shown. right feature seems available when added widget yith woocommerce ajax product filter plugin. however, not want use plugin because not consistent other features , implement own. couldn't find how yith achieve this. i want make work both main loop , custom loops. main loop referring this: <?php while ( have_posts() ) : the_post(); ?> <?php wc_get_template_part( 'content', 'product' ); ?> <?php endwhile; // end of loop. ?> and custom loops: $args = array( 'post_type' => 'product', 'posts_per_page' => 12, 'product_cat' => $category->slug, 'orderby' => 'menu_...

Android update user have parse.com -

i have user score 5. after want update user score 6. can me. parseuser user = parseuser.getcurrentuser(); if (user == null){ return; } if (username.equals(user.getusername())) { user.put(playermodel.parse_field_score_player, 6); user.signupinbackground(new signupcallback() { @override public void done(final parseexception e) { if (e != null) { log.e(">>>>>playerprovider",e.getmessage()); } } }); } after change same code bellow, no success. can me. user.saveinbackground(new savecallback() { public void done(com.parse.parseexception e) { // todo auto-generated method stub if (e != null) { log.e(">>>>>playerprovider",e.getm...

android - get only last mobile number entered/edited for each contact id in phonebook -

i using code phone contacts. getting multiple names based on how many mobile/work numbers have entered . want 1 contact id last edited/added mobile number .is there way can edit following query achieve result ? appreciate help. cursor cur = managedquery(contactscontract.data.content_uri, null, contactscontract.contacts.data.mimetype + "='" + contactscontract.commondatakinds.phone.content_item_type + "'", null, contactscontract.data.display_name + " asc"); int number = mcursor.getcolumnindex(contactscontract.commondatakinds.phone.number); int name = mcursor.getcolumnindex(contactscontract.data.display_name); while (mcursor.movetonext()) { string phname = mcursor.getstring(name); string phnumber = mcursor.getstring(number); string thumbnailuri = mcursor.getstring(mcursor.getcolumnindex(contactscontract.contacts.photo_thumbnail_uri)); } try using ...

javascript - How to write function in async mode when $rootscope.broadcast is being used in an infinite loop? -

i have following function gets called @ least 10 times in second. every time have around 100 records same except it's lastseentime, readcount. since simulator know behaviour in real time, no of records in array may vary 100 - 1000. may or may not same. need add distinct records tagstore being displayed in ui thereafter. $scope.$on('getreadtags', function (event, tags) { if (($scope.tagstore == null || $scope.tagstore.length == 0) && tags.length != 0) { $scope.tagstore = tags; } else { (var = 0; < tags.length; i++) { var notfound = true; (var j = 0; j < $scope.tagstore.length; j++) { if (tags[i].tagid == $scope.tagstore[j].tagid) { $scope.tagstore[j].readcount += tags[i].readcount; $scope.tagstore[j].lastseentime = tags[i].lastseentime; $scope.tagstore[j].discoverytime = tags[i].disco...

White screen on iOS simulator with Xcode 7.0.1 (Swift) -

after upgrading xcode 7.0.1, can run old apps without problems (after updating swift syntax), new apps try build invariably freeze launch screen on attempts build , run on simulator or device. i can make changes storyboard want, create code linkages button, textfield, etc, nothing launch screen when build & run. there no compiler errors, no warnings, nothing give me hint of heck going on. i've cleared derived data, clean & build, reset content & settings, & removed/reinstalled xcode without luck. does have idea what's going on here, or can tell me can start digging find issue? i'd post screen shot if there post, i've got nothing. i'm running yosemite 10.10.5 xcode 7.0.1 swift

javascript - Sticky header with next and previous button -

i'm trying build sticky header next , previous button in site. there no sticky section when user scrolls down menu hides hamburger menu , sticky element comes up. on further scrolling sub section titles features, contact us, etc... updated .also we can goto next , previous section shown in image. so, how build or there plugin can make use of? thank you. sticky things sticky sections can achieved using combination of regular html, regular css , javascript plugin like sticky.js here . using can use js attach css class html sections when visitor scrolling. can style css accordingly display / or hide sections of page on scroll , thereby override / rewrite original positioning. previous , next to achieve previous , next button link manually using html - quite work. if dynamically linke site content should have @ static site generators octopress , or jekyll - or consider using cms wordpress . edit: if mean "jumping" , down 1 section of site can @ html...

android - I need to generate a custom drawable view as mentioned -

Image
i stuck generating custom drawable of above type.i able make cicular selector button shown in in red , green border. unable make other drawable includes these 2 buttons in grey color , dark grey color border. , don't understand how place circular buttons @ right positions. you can try doing this, give desired result. <?xml version="1.0" encoding="utf-8"?> <!-- view hold background --> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/temp" android:orientation="horizontal"> <!--takes 50%--> <framelayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="50"> <button android:layout_width="wrap_content...

groovy - Get input approver user name in Jenkins Workflow plugin -

i trying userid approved "input" step in workflow jenkins groovy script. below sample script node('node1'){ stage "test" input message: 'test' } in workflow ui if person hits "thumbs up" want print userid in log. dont see option it. def cause = currentbuild.rawbuild.getcause(cause.useridcause) cause.userid will print person started build. have googled days not finding anything. here appreciated :) this jira issue describes how work going forward, still open. in meantime, approach of getting latest approveraction via build actions api suggested on #jenkins irc , should work, note it's not sandbox safe. something along lines of below getting recent approver: @noncps def getlatestapprover() { def latest = null // returns copyonwritearraylist, safe iteration def acts = currentbuild.rawbuild.getallactions() (act in acts) { if (act instanceof org.jenkinsci.plugins.workflow.support.st...

javascript - best data structure for below xml of book in html -

data.xml: <catalog abbrev="kjv" name="xyz"> <book num="gen"> <chapter num="1"> <page num="1">in beginning ...</page> <page num="2">and earth .... </page> </chapter> <chapter num="2"><page num="1">.....</book> <book> i have create hierarchical structure user can navigate or down dynamically. means first of have show title of book: attribute of book element when user click on book title see list of chapter..then next when click on chapter see verses list...then when click on particular verses see single verses...

jms - MQ 7.0.1.9 selector JMSCorrelationID Mistaken Msg -

we developed java application in multiple java jms clients connect server, both websphere mq 7.0.1.9. each client has consumer selector on application specific client id eg. jmscorrelationid='050_14133431' on shared queues, in server set application specific client id on messages setjmscorrelationid( ) sent particular client. application specifi client ids unique. works fine of time. however, found messages client sessionid consumed client b surprisingly. checked logs , confirmed each client create consumer selector on sessionid. in understanding, consumer consume messages match selector criteria. 1 thing note used read ahead feature our application use non persistent messages. happened rarely, once month. idea why happen? syntax error in jmscorrelationid='050_14133431', should must start letter instead of digit? hints appreciated. in advance. please find below jms documentation (emphasis mine): the delivery modes supported jms api persistent , non_p...

image - Gradient Descent With Smoothness constarints -

i have noisy image y , known kernel h. need estimate denoised image x such gradient of x minimised. j= ||y-hx||^2+ alpha* smoothness constraint(x); smoothness constraint= l1norm(|| grad(x) ||) how estimate gradient of second term involving smoothness. help me on understanding update rule x; know gradient first term.

printf - How would I assign the values of 11,12, and 13 to all equal 10 without using logical operators, relational operators, or selection constructs in C? -

i'm supposed make program simple form of blackjack. program randomly draws 4 cards standard deck of 52, , card number should displayed along card value. (for example, if card number 43 has value of 4) cards 2-10 worth given value, ace worth 1, face cards (11-13, jack, queen, king) worth 10. when total exceeds 21 program should display 'b' after total. i'm having trouble last 2 parts. can't figure out how face cards equal 10, , display 'b' without using logical operators, relational operators, or selection constructs such if statement. appreciated! thanks! here code have far: #include<stdio.h> #include<math.h> #include<stdlib.h> int seedvalue(); int card(); int cardvalue(int); int cardvalue2(int); int cardvalue3(int); int cardvalue4(int); void printstatements(int, int, int, int, int, int, int, int); int main() { int seed; int cardnum1; int cardnum2; int cardnum3; int cardnum4; int value1; int value2; int value3; in...

How can I install Windows Phone 8 development application without visual studio -

i have developed windows phone 8 application. have developer account , unlocked device. i'm able deploy/install application in phone through windows phone development sdk. now want install application in device ( device of friend, in different location). don't want put application in app store. want mail xap file him. there other way install (xap file) application in mobile. i looking forward responses. thanks. answer 1: your friend has unlock device developer account in order install it. can use "application deployment tool" install xap. (this goes if friend developer) answer 2: (easiest way friend install) you can release beta in store, , include microsoft id of friend beta tester. , after releasing app, can email link friend. beta release fast , goes live within 1 hour.

html - Getting the value of a select tag without the help of post or get method using php -

i'm making project in need pass value of select tag 1 page through url. problem cant value of select tag dynamically. mean know how value $_post['select_tag_name'] don't wanna apply functionality because requires submit button. hoping find way value dynamically(without of form submission). know can submitting form , pass value through header. or setting action next page, don't wanna that. hope makes sense you.thanks , time in advance. use jquery, on change of select element, or on click of other element, can redirect form. <script> $("#select_tag_name").change(function(){ var val = $(this).val(); window.location.href = 'your-php-page.php?drop_down='+val; }); </script> note: 1) can use event on element. change() event listed here example.

apache - VisualSVN Server : get /svnindex.xsl forbidden while accessing from browser -

we have configured visualsvn server in remote machine, while accessing repository browser in our local machine, getting below error in internet explorer browser 'the xml page cannot displayed' cannot view xml input using xsl style sheet. please correct error , click refresh button, or try again later in server machine's event viewer, found log 'get /svnindex.xsl forbidden'. please note able connect repository in tortoisesvn & other subversion command line tools. is setup or permission needed browse repository in browser ? the account runs visualsvn server service (the account "network service" default) must have read & execute permissions %visualsvn_server% . seems in case account not have read access %visualsvn_server%htdocs or %visualsvn_server%htdocs\svnindex.xsl . check permissions in order solve issue. read article kb37: permissions required run visualsvn server more information.

swift - Check if date falls between 2 dates -

i have code convert string date object let date2 = keysdata[indexpath.row]["starttime"] as? string let dateformatter = nsdateformatter() dateformatter.dateformat = "yyyy-mm-dd't'hh:mm:ss.sssz" if let date = dateformatter.datefromstring(date2!) { println(date) } i know if current date falls between 2 days got in array startdate , endate you have code conversion of date string in keysdata nsdate . assuming have 2 dates in startdate , enddate , have check if current date in between: let startdate = ... let enddate = ... nsdate().isbetweeen(date: startdate, anddate: enddate) extension nsdate { func isbetweeen(date date1: nsdate, anddate date2: nsdate) -> bool { return date1.compare(self) == self.compare(date2) } } edit: if want perform inclusive range check, use condition: extension nsdate { func isbetweeen(date date1: nsdate, anddate date2: nsdate) -> bool { return date1.compare(sel...

jquery - Loading Dynamic Touchscroller page Externally -

greetings trying load dynamically generated (php) touchscroller page index.html file phonegap app. thomas kahn's cool jquery plug-in code here: http://smoothtouchscroll.com/ in addition loads these resources, of on server: <link rel="stylesheet" type="text/css" href="css/smoothtouchscroll.css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script> <script src="js/jquery-ui-1.10.3.custom.min.js"> </script> <script src="js/jquery.kinetic.min.js"> </script> <script src="js/jquery.smoothtouchscroll.min.js"> have tried jquery load , methods , vanilla javascript xmlhttp response-innerhtml request, images come disjointed , there no scrolling effect. going dynamically generated php page directly (echoing full code resources) generates working touchscroller, know loaded page works, leaves me thinking may timing i...

amazon web services - generate a Cloudfront Signed URL using Clojure -

is there easy way generate cloudfront signed url in clojure? i'm using amazonica s3 (which works great): (s3/set-s3client-options {:path-style-access true}) (aws/defcredential s3_accesskey s3_secretkey) (s3/generate-presigned-url bucket key (-> 6 hours from-now)) is there similar cloudfront?

rtmp - Mpeg-dash support in nginx-plus -

i searched enough couldn't sort out how configure mpeg-dash in nginx plus . rtmp module supporting guess dont understand how can configure , request in nginx plus server. when configured rtmp in nginx.conf getting error unknown directive "rtmp" in /etc/nginx/nginx.conf:13 configuration user nginx; worker_processes auto; error_log /var/log/nginx/error.log notice; pid /var/run/nginx.pid; events { worker_connections 1024; } rtmp { server { listen 98; server_name 127.0.0.1; application dash { live on; dash on; dash_path /usr/share/nginx/html/dash; } } } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"...

Mapbox iOS SDK 2 - Detect click on polygon -

i need recognize mglpolygon selected user on mapbox 2.0 map. - (void)mapview:(mglmapview *)mapview didselectannotation:(id <mglannotation>)annotation doesn't work. how can customize mglpolygon make clickable? this functionality isn't supported yet: https://github.com/mapbox/mapbox-gl-native/issues/2082

apache - Redirect all but 2 links to new URL -

i have domain.de , domain.com . in past have used both domains, want use domain.de , domain.com should redirect domain.de/en . there 2 links need domain.de/api/xx1 + domain.de/api/xx2 (so without /en). tried following: <if "%{http_host} = 'domain.com'"> redirect /api/xx1 http://domain.de/api/xx1 redirect /api/xx2 http://domain.de/api/xx2 redirect / http://www.domain.de/en </if> but redirects .de/en , ignores 2 links, how change works? the usage of redirectmatch like: redirectmatch 301 "^/((?!api).*)" http://www.domain.de/en/$1

bootstrap DatePicker can't display on swedish -

Image
i'm using datepicker bootstrap https://bootstrap-datepicker.readthedocs.org/en/latest/ but want months / dates in sweden went javascript , did change following line: language: 'en', too language: 'sv', but datepicker looks this: datepicker settings: var defaults = $.fn.datepicker.defaults = { autoclose: true, beforeshowday: $.noop, beforeshowmonth: $.noop, calendarweeks: false, clearbtn: false, toggleactive: false, daysofweekdisabled: [], datesdisabled: [], enddate: infinity, forceparse: true, format: 'yyyy-mm-dd', keyboardnavigation: true, language: 'sv', minviewmode: 0, multidate: false, multidateseparator: ',', orientation: "auto", rtl: false, startdate: -infinity, startview: 0, todaybtn: false, todayhighlight: false, weekstart: 1, disabletouchkeyboard: false, enableonreadonly: true, container: 'body' ...

xcode - Images doesnt show on iPad 2 simulator with iOS 9 -

Image
in asset catalog i'have image set name "panda" iphone , ipad devices. 3 images iphone , 2 ipad when run app on ipad air, ipad air 2, ipad retina, ipad 2 ios 8.4 image show on tap, nothing happens on ipad 2 ios 9! override func touchesbegan(touches: set<uitouch>, withevent event: uievent?) { /* called when touch begins */ touch in touches { let location = touch.locationinnode(self) let sprite = skspritenode(imagenamed:"panda") print(sprite) sprite.position = location let action = skaction.rotatebyangle(cgfloat(m_pi), duration:1) sprite.runaction(skaction.repeatactionforever(action)) self.addchild(sprite) } } using version 7.0 here settings // edit 1.0 apparently bug, not fixed yet https://forums.developer.apple.com/thread/4268 https://forums.developer.apple.com/message/36854#36854 try (objective c) uiimage *img = [uiimage imagenamed:@"image"]; s...

swift - Alamofire PUT isn't working -

i'm using xcode 7 (7a220) , alamofire 2.0.2 carthage installed. let parameters = ["briefdes": briefdes.text, "jobdetail": detail.text, "skill": skillstf.text] alamofire.request(.put, "http://localhost:2403/postedjob?id=\(jobid.text)", parameters: parameters) error: alamofire compiled optimization - stepping may behave oddly; variables may not available. somewhat related this: just incase else getting: error: alamofire compiled optimization - stepping may behave oddly; variables may not available. i getting error when constructing url google geo services. appending street address end of url without encoding street address first. solution: var streetadress = "123 fake street, new york, ny" var escapedstreetaddress = streetaddress.stringbyaddingpercentencodingwithallowedcharacters(.urlhostallowedcharacterset()) let url = "(self.baseurl)&address=(escapedaddress!)" that fixed me! didn'...

ASP.NET 5 authentication with ADFS 3 -

i'd want create asp.net 5 / mvc 6 application authentication on adfs 3.0. the new asp.net security middleware don't support wsfederation authentication. adfs 3.0 don't support openid connect. are there working scenarios achieve ? 1-create new asp.net mvc application using visual studio 2013 2-click on change authentication 3-choose organizational accounts 4-from drop-down choose on-premises 5-enter adfs meta url in text-box "on-premises authority" source: http://www.cloudidentity.com/blog/2014/02/12/use-the-on-premises-organizational-authentication-option-adfs-with-asp-net-in-visual-studio-2013/

scala - NoSuchElementException in Play Framework while sending email? -

below, have pasted code sending mail attached file. don't missed in code getting nosuchelementexception in web application. can tell missing or there problem server part? have add apache or server licence in code project. below code: val email = email( "simple email", "mister <vignesh.gopal@hubino.com>", seq("miss <ibrahim.sultan@hubino.com>"), attachments = seq( attachmentfile("leak.txt", new file("e:/oui_mem_leak.txt")), attachmentdata("data.txt", "data".getbytes, "text/plain", some("simple data"), some(emailattachment.inline))), bodytext = some("a text message"), bodyhtml = some("<html><body><p>an <b>html</b> message</p></body></html>") ) println("email contents: " + email) mailerplugin.send(email) application.conf smtp.host = localhost smtp.port = 9000 smtp.ssl =...