Posts

Showing posts from April, 2014

python - interpolate values between sample years with Pandas -

python - interpolate values between sample years with Pandas - i'm trying interpolated values metric shown below using pandas time series. test.csv year,metric 2020,290.72 2025,221.763 2030,152.806 2035,154.016 code import pandas pd df = pd.read_csv('test.csv', parse_dates={'timestamp': ['year']}, index_col='timestamp') as far understand gives me time series jan 1 of each year index. need fill in values missing years (2021, 2022, 2023, 2024, 2026 etc) is there way pandas? if you're using newer version of pandas, dataframe object should have interpolate method can used fill in gaps. python pandas time-series

android - Ionic how to hide ionicActionSheet menu after tap on hardware back button on device? -

android - Ionic how to hide ionicActionSheet menu after tap on hardware back button on device? - in ionic app after tap on list item displaying action sheet menu: http://ionicframework.com/docs/api/service/$ionicactionsheet/ i hide displayed action sheet menu after tap on hardware button on android device. possible? , if yes , how can please? thanks help. code displaying action sheet menu: $scope.showactionmenu = function(number,id,itemindex) { // show action sheet var hidesheet = $ionicactionsheet.show({ titletext: 'select action', buttons: [ { text: 'call' } ], destructivetext: 'delete', canceltext: 'cancel', cancel: function() { hidesheet(); }, destructivebuttonclicked: function() { console.log(id); console.

c++ - Who is responsible for deletion of heap allocated object when moving it? -

c++ - Who is responsible for deletion of heap allocated object when moving it? - what happens when class created new, , move constructor of class executed? original creator still responsible deletion? illustration below runs fine (http://ideone.com/rs2lr9), shouldn't crash in sec scope since owner goes out of scope before vector , hence deletes object? i misunderstanding here, happens ownership after std::move? #include <iostream> #include <memory> #include <vector> #include <utility> class owner { public: owner() : data_(new int(1)) {} int& get() {return *data_;} private: std::unique_ptr<int> data_; owner(const owner&) = delete; void operator=(const owner&) = delete; }; int main() { { owner owner; std::vector<int> test; test.emplace_back(std::move(owner.get())); std::cout << test[0] << std::endl; } { std::vector<int> test; {

How to debug custom keyboard in android? -

How to debug custom keyboard in android? - i have legacy keyboard app legacy software application unfortunately needs fixed. running lot of problems debugging it. i'm stumped @ trying find way guts of app through debugger, maybe create stub project or test harness? here oncreate: public class inputlanguageselection extends preferenceactivity { @override protected void oncreate(bundle icicle) { super.oncreate(icicle); // addpreferencesfromresource(r.xml.language_prefs); // settings preferences sharedpreferences sp = preferencemanager.getdefaultsharedpreferences(this); mavailablelanguages = getuniquelocales(); string selectedlanguagepref = sp.getstring(latinime.pref_selected_languages, ""); log.i(tag, "selected languages: " + selectedlanguagepref); string[] languagelist = selectedlanguagepref.split(","); // compatibility hack v1.22 , older - if selected language 5-code isn't // found in current

UIWebview does not display embedded youtube well for iOS 8 -

UIWebview does not display embedded youtube well for iOS 8 - i have difficulty play embed youtube in uiwebview. if used default embed format youtube, not show in uiwebview. blank. nsstring *htmlstring = @"<html><body><iframe width=\"420\" height=\"315\" src=\"//www.youtube.com/embed/xnnaxgfo18o?rel=0\" frameborder=\"0\" allowfullscreen></iframe></body></html>"; [self.webview loadhtmlstring:htmlstring baseurl:nil]; i googled around , found next code works. nsstring* embedhtml = @"\ <html><body style=\"margin:0;\">\ <<div class=\"emvideo emvideo-video emvideo-youtube\"><embed id=\"yt\" src=\"http://www.youtube.com/embed/bpm8lkymcxs?hd=1\" width=\"320\" height=\"250\"></embed></div>\ </body></html>"; [self.webview loadhtmlstring:embedhtml baseurl:nil]; however, ther

ios - Overlapping elements of storyboard -

ios - Overlapping elements of storyboard - the next code updates label in prototype cell. when content takes multiple lines, uiimageview below label overlaps it. have uploaded pics of storyboard , when content updated. how can ensure there fixed space between lastly line of label , uiimageview ? under impression spacing nearest neighbour constraint solve seems prepare spacing between uiimageview , first line of label . contenttext.numberoflines = 0; contenttext.linebreakmode = nslinebreakbywordwrapping; contenttext.text = text; [contenttext sizetofit]; you need setup vertical spacing constraint between label , imageview. select label , imageview (the 1 overlapped) , in xcode select editor->pin->vertical spacing this ensure vertical spacing between them.now label resize according text imageview not overlap instead maintain fixed amount of space label's lastly line. ios objective-c

r - Convert CSV file to SAS Table (sas7bdat) -

r - Convert CSV file to SAS Table (sas7bdat) - i have huge csv file, , want convert sas table. know can utilize sas create import, interested in creating sas table using, example: c++, python or available library. for example, in spss can create sas table using command "save type" sas v9+ windows (*.sas7bdat). , not necessary have sas installed. i know sas7bdat.py exists reading sas7bdat.. r sas converter

javascript - Uncaught TypeError: Cannot read property 'next_page' of undefined -

javascript - Uncaught TypeError: Cannot read property 'next_page' of undefined - i'm working on site client , bit of code has worked in past, no longer working. no 1 has touched core code , i'm not sure resolution. we utilize docebo (an lms) , in test require pupil select reply before can click "next question". if haven't selected answer, button grayed out , unclickable. believe framework using yui library this. i don't "uncaught typeerror: cannot read property 'next_page' of undefined " error until select answer. 1 time error happens, button doesn't become functional. chrome's console points bit of code... function controltotquestion() { var info = yahoo.util.dom.get('answer_info'); if(tot_question == 0) { settimeout(function() { if(yahoo.buttonobjects.next_page) yahoo.buttonobjects.next_page.set('disabled', false); if(yahoo.buttonobjects.show_result) yahoo.buttonobjects.show_

java - Connect and download data in Android -

java - Connect and download data in Android - i have problem net connection , download data; can help me understand mistake? post code: public class mainactivity extends activity implements onclicklistener{ private static final string debug_tag = null; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); final string debug_tag = "httpexample"; //assegno le view button bottone = (button) findviewbyid(r.id.button); textview insert = (textview) findviewbyid(r.id.inserisci); bottone.setonclicklistener(this); } @override public void onclick(view v) { textview info = (textview)findviewbyid(r.id.content); edittext edit = (edittext)findviewbyid(r.id.edit); //assegna alla stringa sito il testo preso dall'edittext string sito = edit.gettext().tostring(); seek {

java - Array out of bounds exception? (Working on conway's game of life) -

java - Array out of bounds exception? (Working on conway's game of life) - so i'm halfway through first java class... might need break babe steps me, apologize! i'm working on conway's game of life right now. luckily not using gui (...yet?) i'm still stuck on setting grid. code compiling fine, when run get: error: not find or load main class gameoflife so, looked more , seems issue grid file, gives same error: error: not find or load main class grid edit**: how running them [bgorgero@sraysvcs2 gameoflife]$ java gameoflife error: not find or load main class gameoflife [bgorgero@sraysvcs2 gameoflife]$ java grid error: not find or load main class grid edit*: [bgorgero@sraysvcs2 ~]$ java gameoflife/gameoflife exception in thread "main" java.lang.arrayindexoutofboundsexception: 0 @ gameoflife.gameoflife.main(gameoflife.java:20) that error when seek access without beingness in folder. i'm trying grid read input txt file find ou

javascript - Backbone Forms: pass event between different subviews -

javascript - Backbone Forms: pass event between different subviews - brief: backbone forms framework achieved subviews totally unbind , don't know each other @ all. question appears - how pass event between different subviews? in other words: suppose have parent form object extends backbone.form , contains lot of fields. have can pass event parent specific field (subview) of form? you can communicate straight form field doing: var form = new backbone.form({ schema: schema }); var field = form.getfield('firstname'); here's illustration communicating between 2 different fields using events. in case, changing options in city based on value selected in country . http://jsfiddle.net/evilcelery/c5qhr/ javascript backbone.js backbone-forms

@OneToMany relationship issue while saving multiple values in hibernate and spring -

@OneToMany relationship issue while saving multiple values in hibernate and spring - iam having 2 entities @onetomany bidirectional relationship below: @entity public class company { @id @generatedvalue(strategy = generationtype.auto) private integer companyid; private string name; @onetomany(cascade = cascadetype.all, fetch = fetchtype.eager, mappedby="company") set<employee> employees = new linkedhashset<>(); employee class @entity public class employee { @id @generatedvalue(strategy = generationtype.auto) private integer empid; private string name; private string address; private string email; @manytoone @joincolumn(name="companyid") company company; intially saved 2 employees below: employee emp= new employee(); emp.setname("john"); emp.setemail("john@gmail.com"); employeerepository.save(emp); employee emp2= new employee(); em

php - Wordpress on IIS: High CPU Usage -

php - Wordpress on IIS: High CPU Usage - we're using wp 4.0 on iis 7, , experience high cpu usage: regularly spikes 25% single process (php-cgi.exe) in pool (w3wp.exe), summ on 3 or more processes > 60% (as can seen sysinternals process explorer). checked fastcgi active , installed wincache php - helped bit. , deaktivated plug-ins - brought minor improvement. our system: 3 intel xeon cpu 3.7 ghz 12 gb ram wp 4.0 microsoft iis 7 php version : 5.3.23 / 32bit os memory limit : 128 mb memory usage : 21.65 mb any ideas can done this? alter settings fastcgi or wincache? need improve hardware? your's felix is production server? guess... more info needed pointing resources have. i'll give points start. seems have plenty of memory , cpu resources. hardware rock solid , don't need improve hardware! but! 1 big problem see os (in opinion). there else going on machine? are converting photos, doing cpu intensive operations within wp installation? image

Is there a command like "git add ." but for git rm? -

Is there a command like "git add ." but for git rm? - in git, whenever need stage files can use git add together . to add together files have modified since lastly commit. when remove 1 file have remove 1 1 doing git rm 'filename' and git rm . deletes beingness tracked git. i wondering if there command similar git add together . git rm . thanks :) edit: i think didn't explain myself correctly. lets have files in git directory beingness tracked git , lets phone call them file1 , file2 , file3 . if remove (rm command) file1 , file3 git status tell me files deleted , execute git rm "filename" update committed. question is, there way add together removing action of both files 1 single command? if modify/add different files run git add together . , modifications/additions added staging area committed. use git add together -u / git add together --update or git add together -a / git add together --all . fo

c# - How can i use isPressed in Label? -

c# - How can i use isPressed in Label? - this part of code, search on google no 1 know mean. <label horizontalcontentalignment="center" verticalcontentalignment="center" width="30" height="30" content="" fontfamily="fontawesome" horizontalalignment="right" verticalalignment="center"> <label.style> <style targettype="{x:type label}"> <style.triggers> <trigger property="label.ismouseover" value="true"> <setter property="label.background" value="yellow" /> </trigger> </style.triggers> </style> </label.style> </label> you can seek using eventtrigger in case. if&

ember.js - Unable to start ember-cli project because of git error -

ember.js - Unable to start ember-cli project because of git error - when seek execute ember new myproject following: [ ... snip ...] create vendor/.gitkeep installed packages tooling via npm. failed execute "git ls-remote --tags --heads git://github.com/stefanpenner/ember-load-initializers.git", exit code of #128 error: failed execute "git ls-remote --tags --heads git://github.com/stefanpenner/ember-load-initializers.git" exit code of #128 @ createerror (/usr/local/lib/node_modules/ember-cli/node_modules/bower/lib/util/createerror.js:4:15) [ ... snip ...] so tried execute failing command: $ git ls-remote --tags --heads git://github.com/stefanpenner/ember-load-initializers.git fatal: unable connect github.com: github.com[0: 192.30.252.131]: errno=operation timed out the git://github.com syntax new me, tried version more familiar git@github.com: : $ git ls-remote --tags --heads git@github.com:stefanpenner/ember-load-initializers.git

ios - CBCentralManager not detecting nearby devices -

ios - CBCentralManager not detecting nearby devices - the cbcentralmanager not detecting nearby bluetooth devices. - (void)viewdidload { [super viewdidload]; _centralmanager = [[cbcentralmanager alloc] initwithdelegate:self queue:nil]; _data = [[nsmutabledata alloc] init]; } - (void)centralmanagerdidupdatestate:(cbcentralmanager *)central { if (central.state == cbcentralmanagerstatepoweredon) { nsdictionary *options = @{cbcentralmanagerscanoptionallowduplicateskey: @no}; [_centralmanager scanforperipheralswithservices:nil options:options]; nslog(@"scanning started"); } if (central.state == cbcentralmanagerstateunknown) { nslog(@"cbcentralmanagerstateunknown"); } if (central.state == cbcentralmanagerstateresetting) { nslog(@"cbcentralmanagerstateresetting"); } if (central.state == cbcentralmanagerstateunsupported) { nslog(@"cbcentralmanagerstateunsupp

javascript - How to add a variable to the URL on click? -

javascript - How to add a variable to the URL on click? - i have delte link [delete] onclick should attach couple of variables url. <a id="close-frame-course" href="action=#?delete_course&course_id=<?php echo $courseid[$count]; ?>"><div class="close-frame">x</div></a> the current url example.com/dashboard.php?page=all i add together action=delete_course&course_id=1 upon clicking on link. seems not right. can't values in js. help me prepare it? add class in html code using id. have used abc example. class="abc" now in jquery code href value , utilize window.location redirection. $(".abc").click(function(){ var txt = $(this).attr('href'); var url="example.com/dashboard.php?page=all" window.location = url+txt; }); hope help you.. javascript php

java - JTable not able to add scroll bars -

java - JTable not able to add scroll bars - i having jtable has records can't fit have decided add together scrollbars. however, scroll bar isn't appearing. doing wrong? new jscrollpane(table, jscrollpane.vertical_scrollbar_always, jscrollpane.horizontal_scrollbar_always); table.setautoresizemode(jtable.auto_resize_off); table.setbounds(10, 73, 850, 850); according answers have now: jscrollpane panel = new jscrollpane(table, jscrollpane.vertical_scrollbar_always, jscrollpane.horizontal_scrollbar_always); table.setautoresizemode(jtable.auto_resize_off); panel.setbounds(10, 73, 850, 850); contentpane.add(table); now table isn't shown. contentpane.add(table); you removing table scrollpane. you must add together scroll pane frame. code should be: contentpane.add(panel); java swing jtable jscrollpane null-layout-manager

Javascript won't execute "style.transition" -

Javascript won't execute "style.transition" - i'am trying create photo gallery. i've got problem code: function zmienzdjecie(currentobject, nextobject, direction) { var current = document.getelementbyid(currentobject); var kierunek = "0%"; if (direction == "next") { kierunek = "100%"; } else { kierunek = "-100%"; } current.style.transition = "right 1.0s, opacity 1s"; current.style.right = kierunek; current.style.opacity = "0"; settimeout(function () { lokphoto(current) }, 500) var next = document.getelementbyid(nextobject); next.style.display = "block"; next.style.transition = "opacity 1.0s"; next.style.opacity = "1"; } i don't know why javascript won't execute line: next.style.transition = "opacity 1.0s"; could tell me wrong ?. because browser 1 thing @ time (in cas

c# - Check printer if connected to pc or not -

c# - Check printer if connected to pc or not - i need write code prompt message "printer connected" when printer plugged computer , prompt message "printer not connected" when plug out printer computer. want list printers available through combobox . how can in c# using visual studio? you should utilize winspool.lib c# signature : [dllimport("winspool.drv", entrypoint = "openprintera", setlasterror = true, charset = charset.ansi, exactspelling = true, callingconvention = callingconvention.stdcall)] public static extern bool openprinter([marshalas(unmanagedtype.lpstr)] string szprinter, out intptr hprinter, intptr pd); edit: you can utilize this foreach (string printer in system.drawing.printing.printersettings.installedprinters) { //add in combo box } c#

java - Generic Types & the toArrayMethod -

java - Generic Types & the toArrayMethod - i have class mystack<t> defines following public t[] toarray(){ int s=size(); @suppresswarnings("unchecked") t[] result=(t[])new object[s]; node n=first; (int i=0; i<s; i++){ result[i]=n.data; n=n.next; } homecoming result; } since returns array of type t , think if declared instance: mystack<string> s=new mystack<> , next valid: string[] test=s.toarray() . think because since s of type string , toarray should homecoming array of type string , since string has been substituted in every t in class (only particular instantiation, know). way runs without errors if this: object[] test=s.toarray() . why this? well, hold on minute. suppose hypothesis right string substituted every t . would next cast valid? string[] result = (string[])new object[s]; no, not. can sure new object[] not string[] . now see (t[])new object[n] works because cast becomes e

removing the label on MS Access forms -

removing the label on MS Access forms - i know right way remove label included @ top of each form. annoying when have pop-up form contains label containing name of form itself. remove completely. i believe have 2 choices: change 'caption' value space, or add code in form_load event me.caption = " " ' note! include space between quotes access-vba ms-access-2010

c++ - Static assertions that a type has no data members -

c++ - Static assertions that a type has no data members - my type has no instance info members. want ensure none accidentally added in future. can static_assert , type_traits somehow? best came asserting size of type, must abstract won't work, or @ to the lowest degree not in portable fashion. i'm happy allow static info members. checking size of type fine idea. can create dummy class abstract, , then: static_assert(sizeof(t) == sizeof(dummy), "oops"); that is, check size of target class same size of class known have no info members. c++ c++11 static-assert

debugging - Gradle - Compile issue with Gradle 2.1 -

debugging - Gradle - Compile issue with Gradle 2.1 - i'm doing poc work migrating gradle 1.6 2.1 (basically resolve issue: gradle build / test failed - kryo.kryoexception: buffer overflow ). gradle build works gradle 1.6 with gradle 2.1, when i'm running "gradle clean build", i'm getting next error messages. failure: build failed exception. * where: initialization script '/production/gradle-2.1/init.d/extra1.common-thids.gradle' line: 19 * went wrong: not find property 'compile' on root project 'infrastructure'. * try: run --stacktrace alternative stack trace. run --info or --debug alternative more log output. build failed and :findbugsmain failed failure: build failed exception. * went wrong: execution failed task ':findbugsmain'. > version of findbugs (3.0.0) inferred findbugs classpath high work used java version (1.6). please utilize lower version of findbugs or utilize newer version of java. insp

Jenkins failed to connect to TFS -

Jenkins failed to connect to TFS - i have been working on configuring jenkins connect tfs server , working fine until migrate of our projects tfs 2012. our jenkins running on ci server service under local scheme business relationship , users log jenkins console using windows id configured active directory the job connect tfs server through command line utility started getting http 404 error tfs 2010 projects after ran build 1 tfs 2012 projects. here job log when connects tfs 2010 server [test] $ cmd /c phone call c:\windows\temp\hudson666032816381947801.bat c:\softwares\jenkins-1.569\workspace\test>"c:/program files (x86)/microsoft visual studio 11.0/common7/ide/tf.exe" workspaces /owner:domain\username /login:domain\username,password - server:http://tfs2010server:8080/tfs http code 404: not found c:\softwares\jenkins-1.569\workspace\test>exit 100 build step 'execute windows batch command' marked build failure finished: failure if

Amchart x-axis date format -

Amchart x-axis date format - i have amchart 2 different categories, date mysql database in "yyyy-mm-dd hh:mm:ss" format. problemist date not displayed right on chart. <script type="text/javascript"> var chart; var graph; var chartdata4 = [ {"year":"2014-11-05 21:16:37", "v1":7.3, "v2":99.9}, {"year":"2014-11-05 21:17:36", "v1":7.3, "v2":99.9}, {"year":"2014-11-05 21:18:07", "v1":7.3, "v2":99.9}, {"year":"2014-11-05 21:30:01", "v1":7.3, "v2":99.9}, {"year":"2014-11-05 21:45:02", "v1":7.2, "v2":99.9}, {"year":"2014-11-05 22:00:01", "v1":7.2, "v2":99.9}, {"year":"2014-11-05 22:15:01", "v1":7.1,

showing current time in TimePicker in android -

showing current time in TimePicker in android - i utilize code show current time in timepicker, don't know really,why doesn't show correctly!? illustration time (system time) 2:56 pm, shows 2:56 am!. how can solve it? thanks. private long timer1 = 0; ... switch (view.getid()) { case r.id.add1: { if (timer1 == 0) { timer1 = getcurrenttime(); } calendar calendar = calendar.getinstance(); calendar.settimeinmillis(timer1); timepicker timepicker = (timepicker) findviewbyid(r.id.tp_1); timepicker.setcurrenthour(calendar.get(calendar.hour)); timepicker.setcurrentminute(calendar.get(calendar.minute)); break; . .. } private long getcurrenttime() { calendar calendar = gregoriancalendar.getinstance(); homecoming calendar.gettimeinmillis(); } and have same problem when want convert time string form method below

C# Orientation in Windows Phone -

C# Orientation in Windows Phone - i'm amateur in windows phone, how can auto alter size orientation in landscape mode , portrait mode? in c# winforms can utilize dock or anchor , totally works fine in windows phone can't. here xaml code, possible help me? <phone:phoneapplicationpage xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:microsoft.phone.controls;assembly=microsoft.phone" xmlns:shell="clr-namespace:microsoft.phone.shell;assembly=microsoft.phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:toolkit="clr-namespace:microsoft.phone.controls;assembly=microsoft.phone.controls.toolkit" xmlns:local="clr-namespace:testapp" x:class="testapp.dlpage"

c++ - Predict smearing of FFT -

c++ - Predict smearing of FFT - after applying fourier transform signal, energy of single sine wave spread out across multiple bins (aka smearing). have @ right side of image below illustration: i want extract list of peak frequencies. finding highest bin easy. after smearing becomes problem. i have heuristic tells me if magnitude of specific bin perchance result of smearing or if there has peak frequency in order explain signal. (it improve if miss have false positives) my naive approach calculate few one thousand examples , take maximum of these envelope curve smearing below envelope. but there improve way this? the fft result of rectangularly windowed pure unmodulated sinusoid sinc function. sinc (sin(pix)/(pix)) function 0 bins except 1 (at peak magnitude) when frequency of input sinusoid has integer number of periods in fft width. for other frequencies not @ exact center of fft result bin, if know exact frequency , magnitude (which won't in single

java - Making a Sieve of Eratosthenes more efficient & printing values of a boolean array -

java - Making a Sieve of Eratosthenes more efficient & printing values of a boolean array - for class assignment asked write code in java sieve of eratosthenes , code inefficient. doesn't take long run i'm there's room loop besides listing out did.. here's code: public class test { public static boolean[] myarray() { boolean[] myarray = new boolean[100]; for(int = 1;i <100; i++) { if(i % 2 ==0) { myarray[i] = true; } if(i % 3 ==0) { myarray[i]= true; } if(i % 5 ==0) { myarray[i]= true; } if(i % 7 ==0) { myarray[i]= true; } if(i % 11 ==0) { myarray[i]= true; } }

Access 2013 Web App - How to select the first record in a table using expression builder? -

Access 2013 Web App - How to select the first record in a table using expression builder? - i using access 2013 web apps build application. have 1 table containing list of organisations, , table containing comments organisations. 1 organisation can have many comments. i trying write query select organisation , first comment organisation comments table. however, proving quite hard limited web app functions (that is, not know how select first comment - selecting of comments associated organisation). have looked high , low how accomplish this. help much appreciated. thanks. the way can build query joins in kid records in sorted order. this: note how in above sort order descending comment date. in case sort descending pk [id] of kid table. can sort column, , sort descending on column want recent row. noted, if don't have comments date column, sort pk [id] of kid table. once have above, can write info macro returns first row, recent based on lastly row. so

Return table data with Delphi ISAPI -

Return table data with Delphi ISAPI - i first created regular datasnap application server , client. in order info server have sqlconnection connected dsproviderconnection , connected clinetdataset. have set clientdataset commandtext , open it. but isapi not sure how achive client side connections. have dsrestconnection on cliendmoduleunit. can still have sqlconnection , dsproviderconnection on too. if yes not sure how set properties sqlconnection isapi. i want pass database table info server client in isapi datasnap applicaiton. , display info in grid. please allow me know if there other improve ways this. i using xe6. you need set host/url datasnap server listens incoming connections. it, depends on how configured web server: http://docwiki.embarcadero.com/radstudio/xe6/en/connecting_the_client_to_datasnap_server delphi isapi delphi-xe6

ios - Apple TestFlight error 'Couldn't accept the invite' -

ios - Apple TestFlight error 'Couldn't accept the invite' - i have installed app internal tester. app ready external testing, , has passed apple review. in email received apple, clicked open in testflight button, opened testflight app , displayed app details. clicking install button fails next alert: couldn't take invite you've accepted invite app. ok the message identify problem. ideas how resolve it? also create sure you're not trying install internal tester while beingness added external tester in previous build because sure result in same error. resolve problem log in itunes connect , remove business relationship external testers list - should able install internal tester without problem. ios ios8 testflight

data structures - Hash map in ruby is storing key-value pair automatically -

data structures - Hash map in ruby is storing key-value pair automatically - this way create hash map in ruby colors = { "red" => 2, "blue" => 3 } but in below code, did key , corresponding value specified, done in "colors" hash. puts "enter string" text = gets.chomp words=text.split frequencies = hash.new(0) words.each {|word| frequencies [word] +=1} frequencies = frequencies.sort_by |wordy, wcounty| wordy end puts frequencies is done in each loop or in line next "frequencies" new value assigned loop, if yes , how? i new ruby have little knowledge of java , hard me understand. if take @ line: words.each {|word| frequencies [word] +=1} you can think of this code (just example, not rubyish way write it): i=1 words.each |word| frequencies [word] = = +1 end the key word , corresponding value assigning i. in case wondering, do/end key values same {}. utilize when code within itera

java - Return a double value from JDialog to JFrame? -

java - Return a double value from JDialog to JFrame? - i'm making bank project , came problem. have depositwindow class extends jdialog , accountwindow class extends jframe . problem how update accountwindow balance adding previous balance , deposit amount in depositwindow class , display in accountwindow balance? here accountwindow : import javax.swing.*; import javax.swing.border.*; import java.awt.*; import java.awt.borderlayout; import java.awt.event.actionevent; import java.awt.event.actionlistener; import java.awt.event.windowevent; import java.awt.event.windowfocuslistener; public class accountwindow extends jframe { private final jbutton jbtdeposit; private final jbutton jbtexit; private final business relationship acct; public accountwindow(account acct) { this.acct = acct; // create panel p1 buttons , set gridlayout // set borderlayout horizontal gap 5 , vertical gap 10

Update Azure Website instance size (Small, Medium, Large) with Powershell -

Update Azure Website instance size (Small, Medium, Large) with Powershell - is there way scale azure website instance size (not instance count) using powershell? haven't found way. i know can done using azure cli or portal, want able powershell. posible? i want update existing website instance size, not create new website. yes, first need know name of resource grouping , web hosting plan website belongs, can new azure portal. can alter worker size 0 (small), 1 (medium) or 2 (large). switch-azuremode azureresourcemanager $resourcegroup = "myresourcegroup" $webhostingplan = "mywebhostingplan" $whp = get-azureresource ` -name $webhostingplan ` -resourcegroupname $resourcegroup ` -resourcetype "microsoft.web/serverfarms" ` -apiversion 2014-04-01 $newworkersize = 1 $whp.properties.workersize = $newworkersize $whp.properties.workersizeid = $newworkersize set-azureresource ` -name $webhostingplan ` -resourcegr

java - generate a random number for a credit card -

java - generate a random number for a credit card - i trying utilize method generate credit card number of 16 digits starts 4 if issuersymbol equals issuer amer express. random number has start 3 if issuersymbol equals issuer visa , 5 it issuer master card. public integer getissuercode(string issuersymbol){ int randominteger = 0; random random = new random(); for(int = 0; < 5; i++) { randominteger = random.nextint(); if (issuersymbol.equals(issuer_amer_express)) { } else { system.out.println("error"); } if(issuersymbol.equals(issuer_visa)){ } else{ system.out.println("error"); } if (issuersymbol.equals(issuer_master_card)){ } else{ system.out.println("error"); } } homecoming randominteger; } i think have problem

uml - Is Object Oriented Modelling And Design part of Software Architecture? -

uml - Is Object Oriented Modelling And Design part of Software Architecture? - is object oriented modelling , design part of software architecture? i confused between object oriented modelling & design , software architecure. in software achitecture providing skeleton scheme (as understand) in objet oriented modelling , design design scheme using different uml digrams. doing same thing in software architecture ? because skeleton defined using diagrams only,right? can please explain me illustration of software architecture? no, object oriented modeling toolset or process, software architecture deliverable artifact. related: wikipedia: software architecture wikipedia: object-oriented analysis , design kirill fakhroutdinov's uml-diagrams.org: examples of uml diagrams documenting software architecture scott w. ambler's agile modeling: architecture envisioning: agile best practice uml

Making Batch for /f code work propely -

Making Batch for /f code work propely - here file trying read hosts file. reason, it's not workin properly. seek code see error messages. @echo off cd %windir%/system32/drivers/etc /f "eol=# tokens=* delims=," %%a in (%windir%/system32/drivers/etc/hosts) type %%a pause>nul type expects file name. meant echo . issue, hosts file not comma, whitespace separated. you'll need alter delims include space , tab, assuming want have hostname. batch-file

r - new font style for stargazer latex table when using knitr -

r - new font style for stargazer latex table when using knitr - i want print latex table generated stargazer() in monospaced font, , want in reproducible way knitr (i.e., no manual latex coding). tried define environment called mymono , wrap knitr chunk in environment via \begin{} , \end{} . not work; table prints in default font style. \documentclass{article} \newenvironment{mymono}{\ttfamily}{\par} \begin{document} <<lm, echo=false>>= df <- data.frame(x=1:10, y=rnorm(10)) library(stargazer) lm1 <- lm(y ~ x ,data=df) @ % reproducible \begin{mymono} <<table_texstyle, echo=false, results='asis', message=false>>= stargazer(lm1, label="test") @ \end{mymono} \end{document} i don't think there font setting in stargazer() except font.size . # > sessioninfo() # r version 3.0.2 (2013-09-25) # platform: x86_64-apple-darwin10.8.0 (64-bit) # other attached packages: # [1] stargazer_5.1 even improve wra

c++ - Qt - serial port name in ubuntu -

c++ - Qt - serial port name in ubuntu - i have problem finding serial port name on ubuntu. know, reading serial port on windows, can utilize code example: serial->setportname("com3"); but when compile code on ubuntu, can't utilize code: serial->setportname("/dev/ttyacm0"); i know serial port name ttyacm0 , can read info on issuing command: cat /dev/ttyacm0 but why cannot utilize name in code? should do? in order permission regular user, please sysadmin add together grouping in charge of serial ports emulated on usb. it either tty , uucp or something. varies distribution distribution, can check running next command: ls -l /dev/ttyacm0 then check grouping column , sysadmin this: sudo usermod -a -g grouping username please not introduce security vulnerabilities giving global write access others this: sudo chmod 666 /dev/ttyacm0 c++ qt ubuntu serial-port qtserialport

windows - Index all files and folders under E:\data using batch file -

windows - Index all files and folders under E:\data using batch file - i want write batch script create csv or json file containing file , folders under e:\data. informations need store (file or folder name, size, type--file or folder, total location path). any help appreciated. give thanks you. powershell can ease. have add together little subexpression give friendly terms if folder or file. otherwise rid of entire @{l=...} bit , utilize psiscontainer , true/false state if folder or not. get-childitem e:\data -recurse | select name,length,@{l='type';e={if($_.psiscontainer){'folder'}else{'file'}}},fullname | export-csv c:\path\to\output.csv -notype or, if want find out folder sizes of folders (including files in folder) run this: | select name,@{l='size';e={if($_.psiscontainer){$_.getfilesysteminfos()|measure -sum -property length|select -expand sum}else{$_.length}}},@{l='type';e={if($_.psiscontainer){'folder'

mysql - SQL Updating column in records where only part of content is to be changed -

mysql - SQL Updating column in records where only part of content is to be changed - in table xxx have column yyy links: htttp://mysiteddress/items/cat32/2a.pdf htttp://mysiteddress/items/cat32/3a.pdf htttp://mysiteddress/items/cat32/4a.pdf . . . i want create query alter cat32 cat22 have no thought how that. help me? i assume should made somehow update query... give shot: update xxx set yyy = replace(yyy, 'cat32', 'cat22') mysql sql

jquery - jqgrid : pager alignment -

jquery - jqgrid : pager alignment - by default pager centered @ center position. when i'm providing fixed width size columns pager position goes left. but want ti center align. how can ? i suppose problem can fixed removing width left part of pager. if pager have illustration name mypager id of left pager mypager_left . suggest seek following: class="lang-js prettyprint-override"> $("#mypager_left").css("width", ""); more details why width set in situations can find here. jquery jqgrid

Can't publish GitBook, the error message is vague and without detail -

Can't publish GitBook, the error message is vague and without detail - i'm trying publish i've written gitbook page using gitbook gui on ubuntu 14. i'm going book > publish > book-name but error appears: this doesn't happen often, looks broken. hitting button , trying 1 time again might best bet. if doesn't work can head homepage. there might more info on our status page reporting systems operational. the book names been set thing on website, , i'm signed in on both programme , website. i'm not sure i'm meant do. the current gitbook version 1.1.1 (and previous versions) have bug/issue reported relates error message , vagueness. https://github.com/gitbookio/editor/issues/185 the problem experiencing due invalid value specified version when seek publish. although publish dialog provide hint: version must semver (ex: 0.0.1, 0.4.5, ...) there nil in error message help understand version value sour

Camel - which pattern to use in order to complete xml with values from other services -

Camel - which pattern to use in order to complete xml with values from other services - i have xml similar next has element composed url. url webservice contains xml. need completing xml info webservice, , accomplish camel. here goes example: initial xml <root> <level11>level1.txt</level1> <level12> <level21>http://someservice/11</level21> <level21>http://someservice/12</level21> </level12> <level13> <level22>http://someservice/21</level22> <level22>http://someservice/22</level22> </level13> </root> http://someservice returning xml have replace original xml. example http://someservice/11 returns <someservice> <test>11</test> </someservice> http://someservice/12 returns <someservice> <test>12</test> </someservice> http://someservice/21 returns <so

ios - iOS7 Compatibility with Xcode 6 -

ios - iOS7 Compatibility with Xcode 6 - i want create ios8 app compatible ios 7.0 but, gives next error log. by referring previous questions, have tried re-adding frameworks , making them optional no avail. please help me here. dyld: symbol not found: _objc_class_$_cikernel referenced from: /var/mobile/applications/3f71e632-c303-4c7e-9da5-be70b8d2c8fd/xxxxx.app/xxxxx expected in: /system/library/frameworks/coreimage.framework/coreimage in /var/mobile/applications/3f71e632-c303-4c7e-9da5-be70b8d2c8fd/xxxxx.app/xxxxx try setting coreimage.framework optional in linked frameworks , libraries section under general tab. ios ios7 ios8 xcode6

git - c - standard file descriptor - open if missing -

git - c - standard file descriptor - open if missing - i saw next function in setup.c of git source code. code: /* if standard file descriptor missing open /dev/null */ void sanitize_stdfds(void) { int fd = open("/dev/null", o_rdwr, 0); while (fd != -1 && fd < 2) fd = dup(fd); if (fd == -1) die_errno("open /dev/null or dup failed"); if (fd > 2) close(fd); } it seek open stdio file descriptors (0/1/2) /dev/null, if missing. my question is: in while (fd != -1 && fd < 2) , why utilize 2, not 3. because if fd == 2 have opened file descriptors 0,1,2 , there nil more do. needed open 3 descriptors stdin, stdout , stderr. if set there 3, loop open file descriptors 0,1,2,3. line if (fd > 2) close(fd); close descriptor 3. work in both cases, original solution better. c git stdio