Posts

Showing posts from August, 2014

compare - Subtracting r objects of class 'times' -

i have 2 objects of class 'times' generated using chron trying compare. on surface identical: > str(x) class 'times' atomic [1:6] 0.04444 0.05417 0.05486 0.00208 0.01111 ... ..- attr(*, "format")= chr "h:m:s" > str(y) class 'times' atomic [1:6] 0.04444 0.05417 0.05486 0.00208 0.01111 ... ..- attr(*, "format")= chr "h:m:s" so expected x - y = 0 or x==y return true, not case: > x-y [1] -6.245005e-17 -2.775558e-17 -2.775558e-17 7.372575e-18 -7.112366e-17 0.000000e+00 > x==y [1] false false false false false true any idea going on or how can compare two? tried changing posixct , works, before comparing, have operations on data frame columns data comes (adding , subtracting), can't done posixct. also, requires steps , meant quick check see if there discrepencies in data. i guess can use as.character(x)==as.character(y), , works, there has more elegant way

java - simulate key board input does not work -

i have web tag such: <object tabindex="2" class ="commentclass" id="_comment_1491528136824_10" classid="clsid:0cbfd428-e975-4b41-a8c6-eb820fa5bde6" onkeydown="if(13==event.keycode || 27==event.keycode)commentguardctrl('_comment_container_1491528136824_10',0);"> <param name = "input2" value = "[\s\s]*"/> <param name = "kbmode" value = "1"/> <param name = "maxlength" value = "12"/> <param name = "input3" value = "^[a-za-z0-9!#$%&()*+,-./:;<=>?@[\]^_{|}~]{6,12}$"/> </object> i want automatically enter text element, regardless use java selenium library or jni c++ simulate keyboard input, text can never go field. selenium library or jni c++ keyboard simulation code works fine in other html elements, not one. can gurus me out? lot.

virtual machine - Install and initialize kerberos KDC on docker VM -

based on ubuntu docker vm, has done automated installation , initialization of kerberos kdc ? i following manually: follow link install kerberos packages: https://help.ubuntu.com/lts/serverguide/kerberos.html follow link configure kdc: https://www.rootusers.com/how-to-configure-linux-to-authenticate-using-kerberos/ pointer appreciated.

jquery - Rails clock display -

i have application needs display clock on index page. have static controller this: controllers/static_controller.rb: class staticcontroller < applicationcontroller def index @time = time.now.strftime("%h:%m:%s ") end def get_time @time = time.now.strftime("%h:%m:%s ") render partial: "date" end end and have on views/static/index.html.erb: <div class="time-container"> <%= render partial: "date" %> </div> and partial views/static/_date.html.erb contains var: <%=@time%> i used js function try update time on assets/javascripts/static.js: $(document).ready(function () { setinterval(function () { $('.time-container').load('/static/get_time'); }, 1000); }); my routes.rb this: rails.application.routes.draw # details on dsl available within file, see http://guides.rubyonrails.org/routing.html root "static#index" resourc

React native: The "Google Chrome" application cannot be started -

Image
today i've attempted start dev environment, usual , got alert: nothing seems changed. 1 thing i've noticed chrome started asking update today. error has shown before i've restarted chrome , updated it. still, assume, there critical changes introduced , begun breaking things once again. got/solved already? os x 10.11.6 chrome 57.0.2987.133 looks parallels issue, have chrome installed on windows vm on mac using parallels? if so, removing chrome windows see if problem still persists might first test. my theory rn trying launch chrome it's locating 1 inside of vm instead of app on osx.

javascript - How to get this object as the result -

in javascript declared var = "p", b = "q", c = "r"; and var obj = {a : "x", b: "y", c:"z"}; and want var obj = { "p": "x" , "q": "y", "r": "z"} but not getting same. you can either use computed property this: var obj = {[a]: "x", [b]: "y", [c]: "z"} or can use obj[a] other's have suggested means use value in a name of key. note: computed properties won't have support in every environment. see "browser compatibility" section in link posted above.

Javascript, RegEx to split the string to multidimentional array between parentheses -

i'm struggling split following input string array: '((application = smtp , "server port" != 25) , (application = smtp , "server port" != 25)) or (application = pop3 , "server port" != 110) or (application = imap , "server port" != 143) , (application = imap or "server port" != 143)'.split(/\(([^)]+)\)/g) yields: ["", "(application = smtp , "server port" != 25", " , ", "application = smtp , "server port" != 25", ") or ", "application = pop3 , "server port" != 110", " or ", "application = imap , "server port" != 143", " , ", "application = imap or "server port" != 143", ""] but want result should like: ["", "(application = smtp , "server port" != 25) , (application = smtp , "server port" != 25")", or ", &qu

python - The Anaconda launcher takes long time to load -

i'm new coding , decided install anaconda because heard practical platform beginners. the problem is, every time try opening it, literally takes @ least 15 minutes boot while showing me "updating metadata..." , subsequently showing me "updating repodata..." statements. would of know how fix or go around issue? i'm using macbook air has 8gb of ram , i5 processor, if helps.

ApplicationContext.populateSessionTrackingModes in Tomcat7 -

we migrating tomcat apache 5.5.9 tomcat 7.0.10 getting null pointer exception when application executed. the exception same mentioned in question migrate embedded tomcat 5 tomcat 7 if has suggestions please let me know. tried in version of tomcat 7.0.x still same issue. i attaching call stack of dump. at java.lang.thread.run(unknown source) caused by: java.lang.nullpointerexception @ org.apache.catalina.core.applicationcontext.populatesessiontrackingmodes(applicationcontext.java:1188) @ org.apache.catalina.core.applicationcontext.<init>(applicationcontext.java:127) @ org.apache.catalina.core.standardcontext.getservletcontext(standardcontext.java:2211) @ org.apache.catalina.core.standardcontext.postworkdirectory(standardcontext.java:5989) @ org.apache.catalina.core.standardcontext.startinternal(standardcontext.java:4960) @ org.apache.catalina.util.lifecyclebase.start(lifecycl

objective c - How to do audio call in our application in ios -

i have 1 query how audio call functionality device device same whats app call , other application. i have refereed quickblox , twillo documentation.can 1 have steps need follow. any 1 can me in advance... (i not able comment due low reputation) could try https://stackoverflow.com/a/9955087/1474080 ? if ([[[uidevice currentdevice] model] isequaltostring:@"iphone"]) { [[uiapplication sharedapplication] openurl:[nsurl urlwithstring:[nsstring stringwithformat:@"tel://%d", number]]]; } or have seen documentation yet - using callkit under section, making outgoing calls. ? https://developer.apple.com/reference/callkit

windows - Bitlocker - Win 10 - TPM 2.0 - Legacy Mode -

we planing rollout of windows 10 in our company via sccm. done new notebooks dell have tpm 2.0 onboard , want use bitlocker on them. unfortunately bitlocker not actived on them. on researches found out, have install notebooks in uefi mode. not possible @ moment. so question is: know or have clue if or how possible use bitlocker windows 10, tpm 2.0 , legacy mode? thanks , best regards, sebastian

javascript - Delete cookie when navigating away from specific page of a website -

i working on e-shop php website. in cart template page defined javascript cookie want store specific choice user on specific page. code is jquery(document).ready(function($) { $("input[name=\"license-selector\"]").click(function(){ // when license-selector radio button being clicked var thiselem = $(this); // value being written variable value var value = thiselem.val(); //localstorage: sessionstorage.setitem("option", value); // value stored in localstorage //cookies: document.cookie="option="+value; // value stored in cookie }); //localstorage: var itemvalue = sessionstorage.getitem("option"); // value being loaded variable itemvalue //cookies: var n = document.cookie; if (n.indexof("option=") !== -1) { var cookievalue = n.substring(n.indexof("option=")+7, n.indexof(";")) // value being loaded variable co

How to compress multiple images size while uploading imaged using php? -

below code tried there showing warning errors: warning: getimagesize(c:\xampp\tmp\php2f0b.tmp): failed open stream: no such file or directory in c:\xampp\htdocs\maahima\admin\uploadbulkimages.php on line 55 warning: imagejpeg() expects parameter 1 resource, string given in c:\xampp\htdocs\maahima\admin\uploadbulkimages.php on line 66 i want code insert images in folder in bulk compressed image. <?php if(isset($_files['file']['tmp_name'])){ $pro_image = $_files['file']['tmp_name']; $no_of_file = count($_files['file']['tmp_name']); $name = ''; $type = ''; $size = ''; $error = ''; for($i=0;$i < $no_of_file;$i++){ if(! is_uploaded_file($_files['file']['tmp_name'][$i])){ header("location:add_products.php?error=er8r5r"); } else{ if(move_uploaded_file($_files['file']['tmp_name'][$i],

python - I can't import from __init__ in Flask? -

i want import socketio init .py file exist inside main app folder main controller exist inside controllers folder , can't , error appears says: importerror: cannot import name socketio here app tree: ├── add_permissions.txt ├── db_init.py ├── develop │   ├── config.py │   ├── controllers │   │   ├── abonent.py │   │   ├── events.py │   │   ├── __init__.py │   │   ├── panel.py │   │   └── users.py │   ├── extentions.py │   ├── forms.py │   ├── forms.pyc │   ├── __init__.py │   ├── models.py │   ├── plugins.py │   ├── requests.py │   ├── send_sms.py ├── init.sh ├── manage.py the content of __init__.py create app: from flask import flask develop.controllers.abonent import abonent_route develop.controllers.panel import panel_route flask_principal import identity_loaded, userneed, roleneed flask_login import current_user develop.extentions import ( login_manager, toolbar, assets_env, cache, moment, principal ) develop.models import ( db,

c# - how to seriliaze object with numeric element name -

public class uname { [xmlelement("0.23")] public string name1{get;set;} } when serialize above object generated below <uname><_x0030_.23>value</_x0030_.23></uname> i need below provided attribute number: <uname><0.23>value</0.23></uname> what want not valid xml. element names must start letter or underscore . see https://www.w3.org/tr/rec-xml/#nt-namestartchar

c# - Trouble converting UTC time received from database to local time -

i have been attempting convert string representing time in utc local non-utc format. for example, 1 of strings attempting convert: 2017-04-07t16:00:00.000z and trying datetime (m/d/yyyy, etc.) format of: 4/7/2017 4:00 pm but reason output receiving in european datetime (d/m/yyyy, etc.) format of: 7/4/2017 4:00 pm my code attempting convert string follows: datetimeoffset start_time = datetimeoffset.parse(event_time); // in unity, debugging time without offset debug.log(start_time.localdatetime); i have attempted use parseexact , other methods output in desired format, haven't been having luck far. doing wrong? you can pass format in tostring method m/d/yyyy , see more custom date , time format strings debug.log(start_time.localdatetime.tostring("m/d/yyyy h:mm tt"));

javascript - e.preventDefault(); & then continue to submit and post form -

ok firefox not letting registering onclick event...so have use e.preventdefault(); problem submitting (post) vars form , result page cannot continue reload..... how can work around this? $(document).ready(function(){ $( "#submit" ).click(function(e) { e.preventdefault(); $.post() .done(function( data ) { //here need disable e.preventdefault(); , carry on & post submission normal.... }); }); }) try this: .done(function( data ) { $('#formid').submit(); // submit form halted e.preventdefault(); });

postgresql - Best way to get the count of data in big data table using SQL -

i have table 12 millions of data , want count of data matches criteria. table indexed , when want test worst case of count of records in table take hours data using select count(id) big_table date > xxx , date < yyy does have better idea count in java using sql?

java - How many configuration files in a Spring project? -

how many config files write in medium sized spring project? , on basis decide should configure in separate file? at least applicationcontext.xml required bean configuration,view resolver etc.. other can add more configuration file add aop , all.

jenkins - How to get parameters from upstream job with out changing its configuration -

i know there called "build after other projects built" , add in downstream job trigger after upstream job has been built. but there way upstream job parameters?? if using multijob plugin , may check "current job parameters" option. copy current job parameters downstream jobs. if not using plugin, may inject job parameters in environment file , retrieve them in downstream job. prefer using plugin though ;)

send the file to my asp.net webapi controller from angularjs -

am trying upload image file. need send file asp.net web api controller angularjs. tried several questions. (i dont know going wrong) wont me. can 1 me solve it. html <input type="file" file="file" fil onchange="angular.element(this).scope().photochanged(this.files)" /> <img ng-src="{{ thumbnail.dataurl }}"width="150" height="150" /> angular controller //this preview uplaode image $scope.thumbnail = { dataurl: 'adsfas' }; $scope.filereadersupported = window.filereader != null; $scope.photochanged = function (files) { if (files != null) { var file = files[0]; if ($scope.filereadersupported && file.type.indexof('image') > -1) { $timeout(function () { var filereader = new filereader(); filereader.readasdataurl(f

java - Android how to print barcode from esc printer -

i manage print out barcode android apps ip thermal printer. in case can print out text printer , barcode image can't work. suggestion print out barcode esc thermal printer. public void print_bar_code(string content) { byte[] formats = {(byte) 0x1d, (byte) 0x6b, (byte) 0x49}; byte[] contents = content.getbytes(); byte[] bytes = new byte[formats.length + contents.length + 1]; system.arraycopy(formats, 0, bytes, 0, formats.length); system.arraycopy(contents, 0, bytes, formats.length, contents.length); try { writer.write(string.valueof(formats)); writer.write(string.valueof(contents)); } catch (ioexception e) { e.printstacktrace(); } }

Flyway Ant tries to open .sql file as a zip, fails with ZipException -

i trying use flyway in ant project run ddl scripts. managed configure classpath flyway sees migration scripts. when run flyway:migrate task, exception: unable obtain resource (...)/src/ddl/v1__create_tables_logging.sql: java.util.zip.zipexception: error in opening zip file [flyway:migrate] unable obtain resource (...)/src/ddl/v1__create_tables_logging.sql: [flyway:migrate] java.util.zip.zipexception: error in opening zip file there suggestion @ end: [flyway:migrate] possible solution: run ant javac , copy tasks first flyway can find migrations but project not java application, have no java sources compiled javac. flyway need have migration scripts packed in jar? can't run text files sql statements? unfortunately, didn't provide configuration have, without it's hard tell, causes issue. but seems odd me, not using location property of task, classpath . try specify directory migration scripts follows: <flyway:migrate> <locations>

Python: pymysql parameter query does not work -

i having hard time using query, doing nothing without displaying error message. i have list , put variable, name b c .. on, , using pymysql wanted put in db cursor.execute("insert db (a, b, c, d, e) values ({}, {}, {}, {}, {})", (a,b,c,d,e)) it supposed insert in table nothing happened just examples show, string bound parameters "%s". cursor.execute("insert db (a, b, c, d, e) values (%s, %s, %s, %s, %s)", (a, b, c, d, e))

Cloning hybris project to local machine -

i new in hybris. have been given task copy hybris project server , run on local machine. i copied whole folder ant typed ant all gave errors , build failed. runs in server. when start server starts localhost://9001 shows nothing. both server , local pc using oracle db. can please give advise how move existing project server local pc , need change in files. the best way unzip on local installation hybris archive corresponding hybris version in production. then copy/paste custom directory prod env (custom contains custom code only). you might need copy config folder , might have change configuration depends on how project implemented. once have hybris + custom code + config run ant clean all run ant initialize create db. if works, run hybrisserver start server. note procedure quite standard , have more steps related project.

Bootstrap 4 (v4.0.0-alpha.6) - Carousel slides a little extra -

i´m using bootstrap 4 project , noticed the carousel slide has odd behaviour. when slide shifts, slide effect first fast, in end of slide animation slide moves sideways before stops. for example visible in bootstrap 4 official example: https://v4-alpha.getbootstrap.com/examples/carousel/ i want remove slow slide effect or slide bug. anyone have clue how remove ugly behaviour?

xsl fo - Avoid line break between minus sign and amount -

i'm generating pdf using fop. due box width constraint, message "balance of -$578.09 previous bill" split 2 lines, minus sign @ end of first line , amount @ beginning of second line. input: <fo:block>balance of -$578.09 previous bill</fo:block> output: balance of - $578.09 from. how can keep value in message? you can use keep property ensure minus sign not considered feasible position line break: <fo:block> balance of <fo:inline keep-together="always">-$578.09</fo:inline> previous bill </fo:block>

How I can copy my local PostgreSQL database to Heroku for SpringBoot app -

i have deployed springboot app heroku. copy local postgresql heroku. i have found information on devcenter.heroku.com . don't understand enough using of file db.changelog-master.yaml . could give me details simplest solutions copy database? create valid dump of local postgres database , host somewhere publicly available. able restore entire dataset (schema , records) pg:backups:restore shown here . sole caveat here target database must empty work. can empty heroku postgres database heroku pg:reset . if cannot take approach listed above can run pg_restore directly local instance, provided local version of postgres >= target version of postgres. applies creating dumpfile , requirement because pg utilities not guaranteed forward compatible. documentation pg_restore here .

php - Woocommerce Add To Cart redirect to Checkout not working for product with variants -

i'm trying redirect people click on add cart button checkout page directly. add cart button adding product cart not redirecting @ all. the code use working product no variations. i'm using latest version of woocommerce 3.0.1. //redirect checkout add_filter ('add_to_cart_redirect', 'redirect_to_checkout'); function redirect_to_checkout() { return wc()->cart->get_checkout_url(); } try this: function add_to_cart_checkout_redirect() { wp_safe_redirect( get_permalink( get_option( 'woocommerce_checkout_page_id' ) ) ); die(); } add_action( 'woocommerce_add_to_cart', 'add_to_cart_checkout_redirect', 11 );

android - Full screen activity in landscape mode at the same time with configChanges -

in activity, have imageview moves (100, 100) coordinates clicking on it. added following code before setcontentview() in activity have full screen view in landscape mode: if (getresources().getconfiguration().orientation == configuration.orientation_landscape) { getwindow().addflags(windowmanager.layoutparams.flag_fullscreen); } else { getwindow().clearflags(windowmanager.layoutparams.flag_fullscreen); } everything works fine , when turn device landscape mode, have fullscreen view. need activity doesn't recreate turning landscape mode. example, if clicked on imageview , moved (100, 100), after going landscape mode should stay on coordinates. this, added line manifest: android:configchanges="orientation|screensize" but adding line manifest, fullscreen property stops working. can me have these 2 property simultaneous please? in advance , sorry bad english. activity : public class mainactivity extends activity { @override protected voi

css - Overflow: hidden not work -

Image
in image border overlapped social icon can't fix see in pic border come in background of social icons this html <div class="social text-center"> <p class="icons"> <i class="fa fa-facebook" aria-hidden="true"></i> <i class="fa fa-google-plus" aria-hidden="true"></i> <i class="fa fa-youtube" aria-hidden="true"></i> <i class="fa fa-twitter" aria-hidden="true"></i> <i class="fa fa-instagram" aria-hidden="true"></i> </p> <div class="divider"> </div> this css .social { position: relative; } .divider { position: absolute; border-top: 2px solid #fff; width: 100%; top: 50%; } please solve problem. thanks in adva

python - Matplotlib plot window is not closing with command-w -

i using ipython3 on mac, following version python 3.5.2 |anaconda custom (x86_64)| (default, jul 2 2016, 17:52:12) and matplotlib version 2.0.0 i changed backend macosx qt5agg in matplotlibrc file. now, when hit cmd-w close window, doesn't work anymore. there can solve this? matplotlib , anaconda python under macos don't work because matplotlib requires framework build of python able call macosx backend. see many answers around recommending changing backend, dealing symptoms, , not root of problem. anaconda ships framework build binary of python well. instead of python3 , called pythonw3 . to use matplotlib ipython, , make sure works fine native macosx backend, change ipython interpreter from: $home/anaconda3/bin/ipython3 to $home/anaconda3/bin/pythonw3 -m ipython -i closing windows cmd+w should work alright.

UBER reminder API 403 ERROR -

i trying make call uber reminder api post /v1.2/reminders with headers: content-type: application/json authorization: token o8qh38ydlhkraxiipo0ay-3crlvgzy5rtk5zcnob and json data: { "reminder_time": 1429294463, "phone_number": "+10000000000", "event": { "time": 1429294463 , "name": "frisbee friends", "location": "dolores park", "address": "532-564 dolores st, san francisco, ca 94114, usa", "product_id": "a1111c8c-c720-46c3-8534-2fcdd730040d" } } i added ip address in white list ip addresses in uber developer portal still getting 403 error.

c# - Changing Windows Scale (100%, 125% etc) creates graphics glitch winforms -

i'm working on windows forms application users use native windows scale fonts/apps functionality. when winforms app open, , change scale either or down - around 50% of time black boxes outline controls , text until redrawn/shown (changing selected tab , forth redraws of controls , fixes this). i've tried setting autoscalemode , setting font stay @ set size doesn't solve issue. i've looked using resize , formsizechanged events form - these aren't being fired when user changes scale. any massively appreciated. thanks

Cannot call Google Script API Functions from Web App (TypeError: Cannot read property 'run' of undefined) -

i had google apps script working fine months , stopped working. i'm wondering if google deprecated part of code or something. this link file: click here view google spreadsheet file the google script code apparently failing when trying call google script function html file. line of code fails. google.script.run.importcsvdata(id); the lines fails , catches following error: typeerror: cannot read property 'run' of undefined like said, had code working fine months , stopped working. (fyi... purpose of code upload csv file tab "archivo plano adn". run code, 1 must select "importar archivo csv" --> "importar archivo..." upper menu. when prompted select file, select .csv file. csv file must separated ;) my google spreadsheet file has 3 code files ("code.gs", "codeimport.gs" , "picker.html") let me give code of each: code.gs: function onopen() { var me = session.geteffectiveuser();

python - How to remove item from xml without concurrent modification exception -

i want iterate xml file , delete items. however, way use, not remove issues because of concurrent modification exception. how can resolve issue? here script: xml = et.parse(_file) root = xml.getroot() error in root.iter('error'): bmatch = false file = error.find('file').text if file != none: p in _include_patterns: if p in file: bmatch = true break if bmatch == false: root.remove(error) xml.write(_file) edit modified, iter below , works well: error in list(root.iter('error')):

Python & Pandas: Pendant for R/dplyr .rds format -

what's closest pendant / alternative .rds format known r python respectively pandas dataframe ? i tried to_pickle() listed in dataframe documentation lacks property smaller corresponding .csv file holding same contents. df = pd.get_dummies(pd.series(list('abca'))) df.to_csv("tmp.csv") # 44 bytes df.to_pickle("tmp.pickle") # 682 bytes i'm looking fast (save time writing , reading in comparision .csv ) , compressed (save disk space in comparision .csv ) way (de)serialize pandas dataframe s. thanks. pandas can export hdf5 , faster , more compact csv. has problems mixed types, problems exist csv well. you have careful comparing filesizes small datasets. overhead compression might make file larger smaller datasets

java - Add SAN or Local disk to already provisioned Server in Softlayer using rest api? -

i trying add san or local disk existing server in softlayer using rest api ,i searched in google can't solution , got solution in stack overflow in ruby . can tell how frame using rest api ? thank help in order add new disk server need modify server, task can done using product_order::placeorder method. here can see example how modify server: how add 2 or more disk softlayer virtual server while provisioning regards

Select next item from combobox and click on a button Excel VBA -

have combobox & command button placed on excel sheet. combobox have items listed, have 1, 2, 3, 4, 5. when combobox loaded first time, default first value ie 1 selected. now using vba macro, want select next value combobox list (ie 2) , click on command button. i googled unfortunately, not getting expecting. here have far, dont expecting (explained above): getting error message object doesn't support property or method on line if worksheets("qc update").combobox1.selectedindex < combobox1.items.count - 1 then sub select_next_items() if isempty(range("a9").value) = true if worksheets("qc update").combobox1.selectedindex < combobox1.items.count - 1 combobox1.listindex = 0 ' select first item in listbox combobox1.listindex = combobox1.listcount - 1 ' selects last item set combobox1.selectedindex = worksheets("qc update").combobox1.selectedindex + 1 set combobox1.listcount = 0

Android - the following class could not be found -

i creating bottom menu in android app i have created on directory in res/menu/option_menu.xml this <?xml version="1.0" encoding="utf-8"?> <menu xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <item android:id="@+id/post_offer" android:title="postoffer" android:icon="@drawable/ic_launcher" tools:ignore="hardcodedtext" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <item android:id="@+id/history" android:title="history" android:icon="@drawable/ic_launcher" tools:ignore="hardcodedtext" android:layout_width="wrap_content" android:layout

c - registering an ISR for a SPI slave -

i'm reading code demonstrates use of spi master sending data spi slave on soft processor (nios ii) on fpga. demonstrates how set isr runs when spi slave recieves data. my question in relation function alt_ic_isr_register() . definition of function below. third argument alt_isr_func isr isr rountine runs when interrupt occurs (i got that). alt_ic_isr_register() could explain 4th argument void* isr_context . defined isr_context points data structure associated device driver instance but (void *)spi_command_string_tx passed function. if function registering irq slave why passing pointer tx string? i don't understand happening here. #include "altera_avalon_spi.h" #include "altera_avalon_spi_regs.h" #include "sys/alt_irq.h" #define spi_slave_irq_interrupt_controller_id 1 #define spi_master_base 0x00021020 #define spi_slave_base 0x00021000 #define spi_slave_irq 8 //this isr runs when spi slave receives data static void sp

jquery - Javascript Overlay functionality as like flipkart zoom of particular area of the product whenever movement happens? -

i have create function elevate specific area wherever rectangular box move. example : flipkart product zoom functionality i.e.when rectangular box moves specific area of product gets zoomed , particular part gets zoomed,since that's image im facing little bit different issue wherein have zoom specific area of div. folks give suggestions... there many plugin can use functionality. check below sites. http://www.jqueryrain.com/example/jquery-zoom-effect/ i have used - http://i-like-robots.github.io/easyzoom/ upvote if helped.

excel - How To Vlookup Values in Diffrent Sheet -

Image
i want apply vloopkup function in sheet 1 have data in sheet2 (refer screenshot) as in screenshot 2 can see giving reference of sheet2 in vlookup function not working .below function use, working in same sheet different sheet =vlookup($d$1,sheet2!$a$1:$b$4,2,0) if want have check value in , lookup range in sheet2 result in sheet1...you should reference value range reference sheet well.. =vlookup(sheet2!$d$1,sheet2!$a$1:$b$4,2,0)

web - How to allow specific ip address to access my webapp deployed in azure? -

i have deployed web app in azure want allow specific ip address ( or mac address if possible) access sites on web app deployed on azure. i've been searching internet step step instructions cannot find one. saw several codes paste web.config not know how nor find file. what understand need setup network security group found under settings on web app cannot find there. can see networking. can please provide step step instructions. tia according description, should create app service environment(virtual network), in way, can add nsg virtual network, can set inbound rules virtual network, in way, can control inbound traffic web app. we can follow official article create app service environment , add nsg web app.

java - How to execute this paralell task in Java8 -

i'm new in java concurrency, ask best way perform action this: i have static method matches sub image within image. looks that: public static point match(final bufferedimage subimage, final bufferedimage image) the method returns null if nothing matched, else returns point of match. now have 40 different sub images 1 (big) image, want match in parallel. each second new (big) image in need search 40 smaller images on , on again. need return values of each call to match method @ end of match task in main task, can analyze it. furthermore need use many cpu cores possible task. how can accomplish that? have read lot executorservice, task, runnable , on. examples show how print on console in paralles. confused way should go in scenario: how pass values , how results? how should layout of class(es) like? have no idea way go if create 40 tasks second (it take time setup task, right?) code great explain :) use completionservice , more executorcompletionservice .

Angular 2 With Web API File Upload -

i trying upload file using angular 2 web api not getting file on server. my controller method is [httppost] [route("add")] public ihttpactionresult add(coursedto course) { try { return ok(""); //course.companyid = user.identity.getuserid<int>(); //var result = _courseservice.add(course); //return ok(result.message); } catch (exception ex) { return badrequest(ex.message); } } my coursedto is public class coursedto { public int id { get; set; } public httppostedfilebase coursefile { get; set; } } my html file is <form class="form-horizontal" #courseform="ngform" (ngsubmit)="onsubmit()" enctype="multipart/form-data"> <div class="form-group"> <label class="control-label col-sm-4">browse course:

python - 412 no matching index found Error -

i have following error: 412 no matching index found. recommended index is: - kind: monthly_report properties: - name: belongs_to - name: date_added i using python 3.5, datastore, , remote django project accessing datastore through google-cloud api (google-cloud==0.24.0). i ran commands: google cloud datastore cleanup-indexes index.yaml google cloud datastore create-indexes index.yaml the indexes created: index.yaml: indexes: - kind: history ancestor: no properties: - name: date_added direction: asc - name: address direction: asc - kind: payment ancestor: no properties: - name: date_added direction: asc - name: belongs_to - name: order - kind: monthly_report ancestor: no properties: - name: date_added direction: asc - name: status - name: belongs_to direction: asc i make query on kind payment filters on date_added , belongs_to . works. however, in same method, make query on kind monthly_report filters

javascript - How to get the elements selected of checkbox with knockout -

<div id="title" data-bind="foreach: list"> <input type="checkbox" data-bind="attr:{id: $index,value: list.id}" class="k-checkbox"> <label class="k-checkbox-label" data-bind="attr:{for: $index},checked: myfunction(this),text: list.id"></label> </div> <span data-bind="text: elementsselected"></span> </div> myfunction check if selected checkbox. elementsselected elements selected of 'list'. print array span. you can use ko.purecomputed show data based on condition. here example: var simplelistmodel = function(id, item) { var self = this; self.id = ko.observable(id); self.item = ko.observable(item); self.isselected = ko.observable(false); self.printitem = ko.purecomputed(function() { if(self.isselected()) return self.id() + " " + self.item();

html - php code to send sms without the manual entry of mobilenumber and message inside the code -

<?php //please enter details $user="user_name"; //your username $password="your_password"; //your password $mobilenumbers="0123456789"; //enter mobile numbers comma seperated $message = "demo sms"; //enter message $senderid="demo"; //your senderid $messagetype="n"; //type of message $url="http://sms.mavyah.com/webservicesms.aspx"; //domain name: domain name replace domain $message = urlencode($message); $ch = curl_init(); if (!$ch){die("couldn't initialize curl handle");} $ret = curl_setopt($ch, curlopt_url,$url); curl_setopt ($ch, curlopt_post, 1); curl_setopt($ch, curlopt_ssl_verifypeer, false); curl_setopt($ch, curlopt_ssl_verifyhost, 2); curl_setopt ($ch, curlopt_postfields, "user=$user&passwd=$password&mobilenumber=$mobilenumbers&message=$ message&sid=$s enderid&mtype=$messagetype"); $ret = curl_setopt($ch, curlopt_returntransfer, 1); //if beh

javascript - How to get row id of particular row from legacy jQuery data table -

i had gone through http://www.gyrocode.com/articles/jquery-datatables-checkboxes/ it shows nice way retrieve row id // handle click on checkbox $('#example tbody').on('click', 'input[type="checkbox"]', function(e){ var $row = $(this).closest('tr'); // row data var data = table.row($row).data(); // row id var rowid = data[0]; however, need stick legacy datatable 1.9.4. try perform similar thing. $('#confirm-table').on('click', 'input[type="checkbox"]', function() { var $row = $(this).closest('tr'); var data = table.fngetdata($row[0]); var rowid = data[0]; // expect "123" or "456". getting '<input type="checkbox">' alert(rowid); }) as can see, did convert current datatable code from var data = table.row($row).data(); to legacy datatable code var data = table.fngetdata($row[0]); however, instead o

amp html - Amp- iframe in amp Lightbox or amp-accordion -

This summary is not available. Please click here to view the post.

Windows 10 how to create shadow storage on another drive without vssadmin create -

i want create shadow storage 1 drive on using windows 10. server windows editions, there is: vssadmin add shadowstorage /for=<forvolumespec> /on=<onvolumespec> [/maxsize=<maxsizespec>] the add command missing in windows 10, how 1 go it? there powershell commands available, not make them work. (get-wmiobject -list win32_shadowstorage).create('c:\','d:\','3000000000') vssadmin has "create" option on windows server. instead, have make use of powershell script create shadow. powershell.exe -command (gwmi -list win32_shadowcopy).create('e:\','clientaccessible') since makes use of win32_shadowcopy class in wmi, can use other methods create shadow. includes " wmic " utility. wmic shadowcopy call create volume='e:\'

php - how to compulsively send <input> data in a form in html file OR why I cannot send it -

here's thing: put <input type='checkbox' name='a'> in <form action="b.php" method="get"> can not '?a=something' url. don't know what's wrong because use several <div> s nesting them , css style , bootstrap classes. my complete code below. <form action="addfile.php" name = "fileinfo_form" method="get"> <div class="input-group"> <span class="input-group-addon" id="basic-addon1">sha1</span> <span class="input-group-addon"> <input type="checkbox" id ="sha1checkbox" name="sha1checkbox"><!--i cannot sha1checkbox's value url --> </span> <input type="text" name="sha1code" class="form-control" placeholder="sha1 hash code" aria-describedby="basic-addon1">

Return JSON data with predefined key Yii2 -

i use yii2 , created restful api service. in app want return json data predefined key responses. example: default respons: [ { "id": 1, "title": "brooklyn" }, { "id": 2, "title": "financial district" }, { "id": 4, "title": "social district" } ] but want smth that: "data": [ { "id": 1, "title": "brooklyn" }, { "id": 2, "title": "financial district" }, { "id": 4, "title": "social district" } ] you should customize rest serializer, in controller : public $serializer = [ 'class' => 'yii\rest\serializer', 'collectionenvelope' => 'data', ]; read more .