Posts

Showing posts from September, 2013

uwp - Outlook.com REST API -

i making uwp app cortanium in want mails of current user's account. have chosen rest api outlook.com. problem don't know can started. want user's e-mails , read user. i have seen article shows api calls can made , tried getting error: {"error":{"code":"oauthmissingforthisaccount","message":"authentication account must using oauth."}} so have in order proper response ? (p.s:i new in rest api world correct me if wrong anywhere) from error info, think it's possible didn't handle user authorization. for every request mail api, valid access token needed. access token, can refer register , authenticate app . in doc: to use outlook rest api access user's mailbox data, app should handle registration , user authorization: first, register app access outlook rest api. can implement api calls in app. at runtime, authorization user , make rest api requests access user's mail

mysql - INSERT ON DUPLICATE KEY with INNER JOIN -

Image
given t.id , a.id , t1.name , t2.name , how add or update t1_has_t2.data ? i can update if there record. update t1_has_t2 inner join t1 on t1.id=t1_has_t2.t1_id inner join t2 on t2.id=t1_has_t2.t2_id set t1_has_t2.data=123 t1.name="foo" , t1.t_id=333 , t2.name="bar" , t2.t_id=333; how can insert if record doesn't exist? edit. following? seems waste include t in join. insert t1_has_t2(t1_id,t2_id,data) select t1.id, t2.id, 123 t inner join t1 on t1.t_id=t.id inner join t2 on t2.t_id=t.id t1.name="foo" , t1.t_id=333 , t2.name="bar" , t2.t_id=333 on duplicate key set t1_has_t2.data=123; edit2. ah, maybe now. join t1 , t2 each other through shared t.id? insert t1_has_t2(t1_id,t2_id,data) select t1.id, t2.id, 123 t1 inner join t2 on t2.t_id=t1.t_id t1.name="foo" , t1.t_id=333 , t2.name="bar" , t2.t_id=333 on duplicate key update t1_has_t2.data=123; -- mysql script generated mysql workbench -- 08/08/1

Arch Linux Laravel not found -

i installed laravel via composer composer global require "laravel/installer=~1.1" but when try create laravel app laravel new app i error message bash: laravel: command not found i tried set $path in bash_profile, not working. composer location: composer: /usr/bin/composer so when deleted composer path bashrc, created project composer create-project laravel/laravel {directory} 4.2 --prefer-dist , needed install mcrypt , enable in php.ini with extension=mcrypt.so now works.

javascript - React datepicker hide on click outside broken -

i'm trying update react component based on array in controller.in controller i'm doing merge on diaries , change content , can't update view in react component.can explain me how can update react state controller??thank ! var app = angular.module('app', ['react']); app.controller('mainctrl', function ($scope) { $scope.resultprops = { item:[] } $scope.firstarrayprops = { item:[] } $scope.secondarrayprops = { item:[] } $scope.mergediariesfunction = function (first,second) { .... merge diaries code } $scope.runmerge = function () { var first = angular.copy($scope.firstarrayprops.item); var second = angular.copy($scope.secondarrayprops.item); first = $scope.sortdiarybystartdate(first); second = $scope.sortdiarybystartdate(second); if($scope.firstarrayprops.item.length == 0 && $scope.secondarrayprops.item.length == 0) {

Twitter API followers/ids - All Followers Returned but next_cursor is still present -

Image
i have been working twitter api [followers/ids] few of our accounts recent got stuck confusing state. usually twitter returns next_cursor when there still records remaining in next page(s). works fine iteration when tried request followers/ids 1 of our accounts doesn't have lot of followers (just on 4200) , can returned in single request. though, api returns followers in single request strangely next_cursor still present. so when try make (2nd) request cursor , 1 record returned not present in first set of records. what should consider how followers user have? total followers: 4224 1st request: 4224 [next_cursor: present] 2nd request cursor: 1 this creating confusion 4224 or 4225? attaching screenshot

android - Images and text go into the header when I scroll -

Image
every time scroll down screen, images , text keep going header , interfering header, can tell went wrong in xml file? i'm pretty sure it's small thing can't seem see it. thank you <scrollview xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_height="match_parent" android:layout_width="match_parent"> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dim

mysql - Birt report - count the number of times it matches a criteria -

╔═══╦════════════╦═════════════╗ ║id ║ tv# ║ time ║ ╠═══╬════════════╬═════════════╣ ║ 1 ║ tv1 ║ 0 ║ ║ 2 ║ tv2 ║ 10 ║ ║ 3 ║ tv3 ║ 0 ║ ║ 4 ║ tv3 ║ 20 ║ ║ 5 ║ tv3 ║ 21 ║ ║...║ ... ║ ... ║ ╚═══╩════════════╩═════════════╝ i want count number of elements id, each tv#, time > 0. in case, want result be: tv1 - 0 ; tv2 - 1; tv3 - 2 i'm using birt report, , i've tried different ways this, couldnt want. i've tried different ways, i'm using @ moment: data cube, summary fields (measure) function: count expression: measure["id"] filter: measure["time"]>0 and i'm using aggregation builder: function:count or sum expression:measure["id"] filter: measure["time"]>0 aggregate on: grouptv# when use count , returning: 0s , 1s (it gives me "1" tv# when there @ least 1 time>0), ie tv1

Regarding the RegEX -

i want write regular expression should allow 1 value after decimal point. 1 have written is: (n\/a)(n\/a)|\d+.?\d{0,1} it accepting values per requirement problem is accepting 1. - i.e., if not giving value after decimal accepting. in addition @wickramaranga's answer extracts first digit after decimal point if wish match on numbers can use lookarounds: (?<!\.)\b\d+(?:\.(\d))?\b(?!\.) this extract first digit (not including point) ensure number has 1 digit. note includes number no decimals. in order require there 1 , 1 digit: (?<!\.)\b\d+\.(\d)\b(?!\.)

Fun with US and UK dates on a new server -

i have had "pleasure" of moving old asp website / sql db new dedicated ovh server (french - defaults set us-eng) the db has moved sql 2005 sql 2012 (web edition 64 bit). i having old issue of date formats showing format on website e.g 8/3/2016 instead of 03/08/2016 . though in database stored iso date 2016-08-03 etc. i enter dates on asp classic, website uk format e.g 03/08/2016 , convert them iso format 2016-08-03 in sql passed stored procedure has set dateformat ymd @ top of it. if check tables in db stored correctly iso dates. i have made sure sql logins db have "british english" selected "default language". if view database properties under options default language british english. if view server properties under general->language it's english (united states) under advanced->default language it's british english. the dates getting stored iso correctly if datediff(day,stamp,getdate())=0 can see records though show

Swift: Format String width -

what i'm wanting simple in c/c++, java, , many other languages. want able specify width of string, similar this: printf("%-15s", var); this create of field width of 15 characters. i've done lot of googling. i've tried using copaquepointer as string(format: in various ways no luck. suggestions appreciated. have missed when googling. you better yourself let str0 = "alpha" let length = 20 // right justify var str20r = string(count: (length - str0.characters.count), repeatedvalue: character(" ")) str20r.appendcontentsof(str0) // " alpha" // left justify var str20l = str0 str20l.appendcontentsof(string(count: (length - str0.characters.count), repeatedvalue: character(" "))) // "alpha " if need 'more general' func formatstring(str: string, fixlenght: int, spacer: character = character(" "), justifytotherigth: bool = false)->string { let c = str.

USB CDC work only once w/ interupt endp -

i'm implementing virtual com port on stm32f4 mcu. the mcu don't have endpoints left available have revome interupt endpoint/notification element. problem mcu can send message pc once, after pc not it. the device usb descriptor: interface association descriptor: ------------------------------ 0x08 blength 0x0b bdescriptortype 0x02 bfirstinterface 0x02 binterfacecount 0x02 bfunctionclass (communication device class) 0x02 bfunctionsubclass (abstract control model) 0x01 bfunctionprotocol (itu-t v.250) 0x06 ifunction interface descriptor: ------------------------------ 0x09 blength 0x04 bdescriptortype 0x02 binterfacenumber 0x00 balternatesetting 0x00 bnumendpoints 0x02 binterfaceclass (communication device class) 0x02 binterfacesubclass (abstract control model) 0x01 binterfaceprotocol (itu-t v.250) 0x02 iinterface "" cdc header functional descriptor: ------------------------------ 0x05 bfuncti

node.js - fs dump equivalent in NodeJs? -

objective forcing fs (and libraries using it) write files before terminating application. background i writing object csv file using npm package csv-write-stream . once library done writing csv file, want terminate application using process.exit() . code to achieve aforementioned objective, have written following: let writer = csvwriter({ headers: ['country', 'postalcode'] }); writer.pipe(fs.createwritestream('myoutputfile.csv')); //very big array lot of postal code info let currcountrycodes = [{country: portugal, postalcode: '2950-286'}, {country: barcelona, postalcode: '08013'}]; (let j = 0; j < currcountrycodes.length; j++) { writer.write(currcountrycodes[j]); } writer.end(function() { console.log('=== csv written successfully, stopping application ==='); process.exit(); }); problem the problem here if execute process.exit() , library wont have time write file, , file empty. since library uses fs

sql server - TSQL - Do you calculate values then sum, or sum first then calculate values? -

i feel stupid asking - there math rule forgetting. i trying calculate gross profit based on net sales, cost, , billbacks. i 2 different values based on how calculation: (sum(netsales) - sum(cost)) + sum(billbackdollars) calculateoutsidesum, sum((netsales - cost) + billbackdollars) calculatewithinsum this coming off of basic transaction fact table. in particular example, there 90 records being summed, , following results calculateoutsidesum: 234.77 calculatewithinsum: 247.70 i imagined sort of transitive property , both results same considering it's summation. which method correct? from mathematical point of view, should same value both formulas. anyway in cases it's better performs sum after calculation. edit after opener response: and treat data isnull function or other casting function increases data precision. rounding, formatting , castings decreases data precision should applied after sums.

centos - GUI to set up cron jobs -

i need set , schedule cron jobs on server. is there cron tab gui can access server remotely using web url ? my server centos machine , local ubuntu. also, sources/links can refer in case isn't possible? i have seen http://alseambusher.github.io/crontab-ui/ not sure if allows remote access through web ui.

java - how can i use my executable_jar on ubuntu -

i have created spark application on eclipse used maven build , package it, because os windows, had add line code able run on windows: system.setproperty("hadoop.home.dir", "c:\\hadoop\\"); but , because want access cluster, have use ubuntu, , want use jar, know that line cause error because path doesn't exist on ubuntu, ask suggestion fix easily. while running jar can specify properties java -dhadoop.home.dir=/var/hadoop -jar spark.jar for may have remove line , can give hadoop home on run time

r - Using a JSON array in a POST request -

this question has answer here: httr post request api returns 400 error 2 answers i'm writing api wrapper query uk postcodes using httr package , works fine when use get requests. i'm lost when comes using post request. here's documentation of api says: accepts json object containing array of postcodes. returns list of matching postcodes , respective available data. accepts 100 postcodes. post https://api.postcodes.io/postcodes?q=[postcode] post data this method requires json object containing array of postcodes posted. e.g. { "postcodes" : ["pr3 0sg", "m45 6gn", "ex165bl"] } i tried following: library(httr) pc_json <- '{ "postcodes" : ["pr3 0sg", "m45 6gn", "ex165bl"] }' r <- post(paste0("https://api.p

android - Minimize app instead of exit on back button -

is there way minimize app when pressing hardware button? i'm using backandroid , exits app. edit: i have logic involved in js, overriding lifecycle method in reactactivity not sending event js. thus, doesn't work. handlebackbutton() { const { navigator } = this.refs; if (navigator) { if (navigator.getcurrentroutes().length > 1) { navigator.pop(); return true; } else if (this.props.selectedtab !== home) { this.props.selecttab(home); return true; } } return false; } i believe you'd have override default method i'm not sure actual code minimize be. perhaps mess around onresume well? @override public void onbackpressed() { // code minimize }

Google Calendar Api Android: 403 Error -

i having lot of trouble trying google calendar api work me. have searched lot , tried many solutions seem fail. what tried: - enabling contacts api - google+ api - google calendar api - running app in debug/release mode - recreating sha1 code many, many times - changing app name here's mainactivity, it's similar 1 in quickstart changed bit create event once done. package com.example.roudy.calendarplayground; public class mainactivity extends appcompatactivity implements easypermissions.permissioncallbacks{ private googleaccountcredential mcredential; private static final int request_account_picker = 1000; private static final int request_authorization = 1001; private static final int request_google_play_services = 1002; private static final int request_permission_get_accounts = 1003; private static final string pref_account_name = "accountname"; private static final string[] scopes = { calendarscopes.calendar }; @override protected void oncreate(bundle s

Excel: VBA to copy content from cell in active row -

i need assign function button in excel. want have button value of first column in active row , copy cell, or better assign "variable" used in lookup formula of cell. i have tried variants, example this: range("a" & (activecell.row)).copy ("h2") this gives copy method of range class failed i'm beginner in vba scripting don't know how move forward this. since wrote you're interested in cells value: range("h2").value = cells(activecell.row, 1).value

how to implement php native / pure php custom function to cakephp -

here php barcode generator php barcode generator . how implement function in cakephp? can use component, helper or else? thanks in advance.

Encryption in C# and Decryption in Android(java) -

i trying encrypt data in c# using code public static string encrypt(string cleartext) { string encryptionkey = "abc123"; byte[] clearbytes = encoding.unicode.getbytes(cleartext); using (aes encryptor = aes.create()) { rfc2898derivebytes pdb = new rfc2898derivebytes(encryptionkey, new byte[] { 0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 }); encryptor.key = pdb.getbytes(32); encryptor.iv = pdb.getbytes(16); using (memorystream ms = new memorystream()) { using (cryptostream cs = new cryptostream(ms, encryptor.createencryptor(), cryptostreammode.write)) { cs.write(clearbytes, 0, clearbytes.length); cs.close(); } cleartext = convert.tobase64string(ms.toarray()); } } return cleartext; } i want decrypt encrypted s

Coldfusion 11 - Global variables - Application.cfc or Application.cfm -

i'm working on application done in coldfusion 9. have migrate in cf11 , improve code. current application in cf9 done this: application.cfm : <cfapplication name="myapp" clientmanagement="yes" clientstorage="registry" setclientcookies="yes" sessionmanagement="yes" sessiontimeout="#createtimespan(0,1,0,0)#" applicationtimeout="#createtimespan(0,0,2,0)#" /> <cfset application.datasource = "myapp"/> <cfset application.name = "myapp"/> <cfset application.access = "app"/> <cfset application.version = "1.1"/> <cfset application.title = "my application"/> <cfset application.inc_path = "includes"/> <cfset application.com_path = "components"/> <cfset application.scripts_path = "

osx - OS X: Launch daemon doesn't start until user logs in -

i have daemon loads operating system - except on 1 macbook pro. daemon doesn't seem load until first user logs in - , keeps running despite log offs , log ins. macbook pro boots quite fast , when first user logs in, there's progress bar (in stead of spinning wheel) , log in seems take while. i suspect computer configured kind of fast boot mode haven't been able find out whether can switched off or somehow configured? secondly, need daemon run before logs in - there way make sure daemon loaded despite fast boot mode (that suspect) . the macbook pro runs latest el capitan. that computer's system volume encrypted filevault 2 , means operating system cannot start until 1 of users supplies password (which needed derive volume encryption key). until first user logs in, there no os running @ (the progress bar indicator of os booting), it's not possible daemon run before then. if need daemon run after computer powered on, must turn off filevault on comp

Google Maps: InfoWindow vs InfoBox vs InfoBubble -

infowindow standard part of google maps api v3, allowing user create pop-up window on map, there's 2 other libraries seem same thing: infobox infobubble i understand these 2 offer more customization options original infowindow, there other differences? competitors or different jobs? 1 more up-to-date other? while infowindow built-in object of google maps javascript api, infobox , infobubble "third-party" objects of infowindow, extend it. because of 2 located in utility-library. so doing same job, more enhanced concerning customizations. infobubble seems better documented , maintained. infobox library not mentioned on google maps github site anymore. if have make choice go infobubble instead of infobox (if need more options compared standard infowindow).

javascript - ReferenceError: THREE is not defined in a Rails Project with the threejs-rails gem -

i working in ruby on rails project three.js. installed corresponding gem , seems work fine. somehow javascript still throws following error: uncaught referenceerror: 3 not defined on line: renderer = new three.webglrenderer(); the weird thing program seems working. object gets displayed. my javscript file looks this: // set size size of containing box var box = document.getelementbyid('player'); if(box){ var boxsize = box.clientwidth; } var = 0.05; // set camera attributes var view_angle = 45, aspect = 1, near = 0.1, far = 10000; var camera, scene, renderer; var $player; var char, materialchar ; init(); animate(); function init() { renderer = new three.webglrenderer(); camera = new three.perspectivecamera( 75, 1, 0.1, 10000 ); camera.position.y = 10; camera.position.z = 20; scene = new three.scene(); // dom element attach // - assume we've got jquery hand $player = $('#player'); // attach render-supplied dom element $player.append(renderer.domel

vbscript - Batch file message box: Carriage return in message body -

i'm showing message box batch file using this method given boflynn previous question. i'm trying insert carriage return message box body text attempts , combinations of quote marks , char(13) have far failed. with reference above linked answer, i'm looking messagbox put text on multiple lines, such as: this shown in popup is possible? vbscript has builtin constant vbcr carriage return character. concatenate (sub)strings constant , display message box result: msgbox "this will" & vbcr & "be shown" & vbcr & "in popup" to display multiline text batch file need pass each line separate argument cscript messagebox.vbs "this will" "be shown" "in popup" and concatenate arguments redim args(wscript.arguments.count-1) = 0 wscript.arguments.count-1 args(i) = wscript.arguments(i) next msgbox join(args, vbcr)

java - Detect an array from text file -

i have files containing text, have extract information, among have 2-dimensional double array(sometimes might missing - therefore you'll find "if" clause). this way file formatted: name=filename groups={ group1=groupname group2=groupname minage= maxage= ages=[[18.0,21.0,14.7],[17.3,13.0,12.0]] } i using java.nio.file.files, java.nio.file.path , java.io.bufferedreader read these files, having problems while trying convert strings representing arrays real java arrays: path p = paths.get(filename); try(bufferedreader br = files.newbufferedreader(p)) { string line = br.readline(); string filename = line.split("=")[1]; line = br.readline(); string[] arr = line.split("="); string group1 = arr[2].split(" ")[0]; string group2 = arr[3].split(" ")[0]; integer minage = integer.parseint(arr[4].split(" ")[0]); integer maxage = integer.parseint(arr[5].split(" "

Highcharts(highstock) line chart Tooltip shows previous date -

Image
i using highcharts(highstock) v4.2.5. have linechart irregular date values on xaxis, , float values on yaxis. problem on hover, tooltip shows previous date values of next date. e.g hovering on 06-apr-2014 data point, shows tooltip wrong date 05-apr-2016 correct data values. why date in tooltip showing previous day? my js code below { "xaxis": { "type": "linear" }, "tooltip": { "bordercolor" : "red" }, "credits" : { "enabled" : true }, "navigator" :{ "enabled": true }, "scrollbar" :{ "enabled": true }, "rangeselector" : { "allbuttonsenabled" : true }, "legend" : { "enabled" : true }, "title" : { "text" : "" }, "series" : [] } json returned server is { "multilinedata": [{ "name": "bhibor o/n rate",

ios - How to get the playlist of currently playing item using systemMusicPlayer? -

i'm building music app , want playlist of playing item (in apple music). i don't mean want use mpmediapickercontroller, because want media items of current playlist. thank help! if don't start playlist yourself, it's not possible retrieve items coming next. you can information playing song getting nowplayingitem player, queue related apis write-only.

Guild lines for working with pre-populated sqlite database in android -

i working on pre-populated sqlite database. can please tell guide lines kind of project. i particularity worried database update. have method copy database form assets folder data, if database not present copy database. my question is, if in next version if add new table database if old user update app time old database present in phone new database not copy. i search on internet found there 1 method called onupgrade (sqlitedatabase db, int oldversion, int newversion) can please tell how use method, oldversion, newversion , how method work? method add new tables old database or replace old database new one. in solution told forcefully delete old database , replace new one, there way add new table old database if present without deleting old database. if have blog link, video tutorial please tell me.

Aggregating data with 2 columns in data.table (r language) -

i have table(input): date directorname companyname rank 2015-08-01 sergey vino 29 2015-08-02 sergey vino 42 2015-08-09 sergey vino 25 2015-08-04 sergey vino 27 2015-08-05 mike bolder 29 2015-08-01 mike bolder 27 2015-08-11 mike bolder 23 2015-08-09 mike bolder 30 2015-08-09 jay bolder 2 2015-08-10 jay bolder 10 2015-08-11 jay bolder 31 i want know directorname reached top 30 in rank companyname never reached top 10. output: date directorname companyname rank 2015-08-01 sergey vino 29 2015-08-02 sergey vino 42 2015-08-09 sergey vino 25 2015-08-04 sergey vino 27 thanks help! we can try in

What are benefits of having jenkins master in a docker container? -

i saw couple of tutorials on continuous deployment ( on docker.com , on codecentric.de , on devopscube.com ). overall saw 2 approaches: set 2 types of jenkins server (master , slave). master in docker container , slave on host machine. jenkins server in docker container. set link host , using link jenkins can create or recreate docker images. in first approach - not understand why set additional jenkins server residing inside docker container. not enough have jenkins server on host machine alongside docker container? the second approach seems me bit insecure because process container accessing host os. have benefits? thanks useful info.

angularjs - How to load the script section while using externally -

i have attached sample plunker <html> <head> <title>angular js views</title> <script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> <script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular-route.min.js"></script> </head> <body> <h2>angularjs sample application</h2> <div ng-app = "mainapp"> <p><a href = "#addstudent">add student</a></p> <p><a href = "#viewstudents">view students</a></p> <div ng-view></div> <script type = "text/ng-template" id = "addstudent.htm"> <h2> add student </h2> {{message}} </script> <script type = "text/ng-template" id = "viewstuden

javascript - how to authenticate states in angular js -

i want authenticate states in angular application. resources available complicated , don't understand why. my simple logic set variable $rootscope.is_authenticated = true and check whenever state loaded see if variable true or not. how can achieve , why login , authentication complicated in angular. my config file .config(function($stateprovider,$urlrouterprovider) { $stateprovider .state('auth', { url: '/auth', templateurl: 'partials/auth.html', controller: 'authctrl' }) .state('dashboard', { url: '/dashboard', templateurl: 'partials/dashboard.html', controller: 'dashboardctrl', resolve:{ check: function($rootscope, $state){ if($rootscope.is_authenticated == true){ return true; } else{ $state.go('auth'); }

mysql - How to get all orders last 30 days with date range using codeigniter PHP? -

here table , need fetch data mysql database display 30 days counting total number of orders per day. , there date range. example 1: current date aug 08, 2016. need display last 30 days aug 08, 2016. order table id | customer_id | num_of_order |date ---+-------------+--------------+-------- 1 | 10001 | 1 | 2016-08-08 07:23:50 2 | 10002 | 4 | 2016-08-07 11:33:50 3 | 10003 | 2 | 2016-08-06 15:44:50 //same day 4 | 10001 | 5 | 2016-08-06 20:50:50 //same day 5 | 10004 | 3 | 2016-08-04 11:17:50 now expected output display: array ( [0] => array ( [date] => 2016-08-08 [total_orders] => 1 ) [1] => array ( [date] => 2016-08-07 [total_orders] => 4 ) [2] => array ( [date] => 2016-08-06 [total_orders] => 7 ) [3] => array ( [date] => 2016-08-05 [total_orders] =>

java - Not able to handle the URL with Special Characters through Authentication Required pop up in Selenium Webdriver -

please find below code i'm using. authentication required pop up. using https://username:password@url in selenium web driver. password contains special characters #^[ ]( password error message received. manually working fine. string result = java.net.urlencoder.encode("925gp2i4gnqp^#(^985ghq95gqcpqjcg[0rijfm[e0rf9q", "utf-8"); string url = "https://" + uname + ":" + result + "@" + test_environment; string url1 = "https://" + test_environment; system.out.println(url);

console - Copy paste is not working in command prompt neither right click or keyboard shortcuts -

when i'm using console of digital-ocean operations not working paste through keyboard, right click of mouse , scrolling of console. you can use following script (found here , posted @dave butler commented below): !function(){function t(){function n(t,e){s=s.concat(rfb.messages.keyevent(t,e))}var o=e.shift(),s=[],i=o.charcodeat(),c=-1!=='!@#$%^&*()_+{}:"<>?~|'.indexof(o),r=xk_shift_l;c&&n(r,1),n(i,1),n(i,0),c&&n(r,0),rfb._sock.send(s),e.length>0&&settimeout(t,10)}var e=prompt("enter text sent console").split("");t()}(); open browser console (f12 / ctrl+shift+j on chrome). paste in. replace "enter text sent console" desired command. press enter.

Twitter like multiple image upload using Blueimp Jquery File Upload Plugin -

i using blueimp's jquery file upload plugin, need feature similar twitter, in user can choose 1) "multiple" images, 2) "preview" before upload 3) remove chosen image first 2 points have been implemented. want 1 request the singlefileuploads option set false in code. problem: when set singlefileuploads false, 1 cancel button appears, clicking on removes selected images. i want remove/cancel button every selected image preview. clicking on should remove image queue. also, want when remove button clicked, there callback available? please note :- upload , working fine, want remove selected image clicking on remove button. i using jquery multifile without problem. the plugin allows upload single file or multiple files. every batch of uploads grouped , assigned close button can remove specific files. the next nice feature preview of images.

objective c - How to dismiss current OSX window controller? -

i tried dismiss current osx window controller did not work: [self.view.window close]; and tried , did not work: nsarray *orderedwindows = [nsapp orderedwindows]; nswindow *frontwindow = orderedwindows[0]; [frontwindow close]; and tried , did not work: [self.view.window orderout:nil]; , 1 did not work: [self.view.window orderout:self]; how dismiss current osx window controller?

upgrade - magento 2.0.5 to magento2.1, Package fabpot/php-cs-fixer is abandoned -

Image
i using magento 2.0.5. when run composer update command, it's showing following warning: package fabpot/php-cs-fixer abandoned, should avoid using it. use friends ofphp/php-cs-fixer instead. writing lock file generating autoload files who can me? in fact, friendsofphp/php-cs-fixer. can have @ this link if want remove warning, can open composer.json file, in "require-dev" find "fapbot/php-cs-fixer" , replace "friendsofphp/php-cs-fixer". can run composer update.

how to align icon on the left side of the app bar in android -

Image
i trying push icon image on left side of app bar in android icon displaying in middle of app(tool) bar. how align icon on right side of app bar in android? please have @ image below. <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="divine.calcify.activities.homescreenactivity"> <item android:layoutdirection="ltr" android:id="@+id/hs_back_button" android:icon="@mipmap/ic_back" android:title="@string/homescreen_back" app:showasaction="always" ></item> <item android:id="@+id/menu_search" android:icon="@mipmap/ic_search" android:title="@string/homescreen_search" android:orderincategory="1" app:showasaction="a

web deployment - What To Consider Before Deploying A Meteor App? -

as heard there many things need considered before deploying meteor app, however, it's still quite vague. please give me opinions issue. this wrong forum type of question, since it's highly opinionated , not in q&a format, i'll give of personal opinions. where hosting app? this has lot app (web-based app, android-only), how many users plan have, if public app or private, how have spend, , many other factors. options include: host - on vps (virtual private server, digital ocean , others), cloud offering (aws or similar), or bare-metal server have hosted somewhere (like in closet). pay dedicated hosting - several out there offer many different features, galaxy or modulus, etc. if host yourself, have maintain hosting solution, i.e need support on own. may mean provisioning/installing os, installing , configuring server apps (mongodb, node.js, web servers, etc), , maintaining on time. benefits, however, potentially cheaper hosting costs (although d

regex - Java - Pattern matching between the same pattern -

my sample string: ghgduysgd fdferfdf bvfxbgdf gdfgdfg i need find contents between a's. i have (?<=a).* matches contents after a. want find between a. first iteration: ghgduysgd second iteration: fdferfdf i want data above manipulation. can regex? you alrady use lookbehind in regex, change use lookahead: (?<=a).*(?=a|$) then make .* non-greedy stop @ first available "ending" a : (?<=a).*?(?=a|$) edit: a|$ tobias_k's comment below, a

mysql - show all rows from left join -

i have query select if(viaturas.transportador null, 'sem transportador', viaturas.transportador) transportador, sum(ifnull(retorno_euro,0))- sum(ifnull(devolucao_euro,0)) total_euro, sum(ifnull(retorno_ddf,0))- sum(ifnull(devolucao_ddf,0)) total_ddf, sum(ifnull(retorno_vadias_plast,0))- sum(ifnull(devolucao_vadias_plast,0)) total_plast transportes.transportation_order left join transportes.viaturas on viaturas.viatura=transportation_order.viatura estado not in ('cancelado', 'eliminado') , servico in ('distribuição', 'devolução', 're-entrega') , data >= '2016-08-08' group lower(transportador); but shows result matched rows. how can show "tranportador" rows when there no match between tables? when left join , put right side table conditions in on clause true left join behavior. (when in where clause, you'll regular inner join result.) select if(viaturas.tran

javascript - How jQuery to change a second select list based on the Third select list option and second select based upon first -

why third select option changing based upon second one. when first select selected second 1 changing. while go second third 1 not changing view. <select name="select1" select="select1"> <option value="">select country</option> <option value="india">india</option> <option value="america">america</option> </select> <select name="select2" id="select2"> <option value="">select state</option> <option data-value="orissa" value="india">orissa</option> <option data-value="telangan" value="india">telangan</option> <option data-value="america" value="america">usa</option> <option data-value="america" value="america">california</option> </select> <select name="select3" id="selec