Posts

database - How many Observations in SAS Sample Data Output -

i have sample sas output , need find out how many observations , compute t-statistic beta1. can me started on how go doing this? sample sas output to number of obs in dataset can run code. data _null_; put nobs=; stop; set sashelp.class nobs=nobs; run; a proc reg give summary statistics need, namely, t-value, beta1 , beta null, intercepts of regression equation. here simple easy follow example http://support.sas.com/documentation/cdl/en/statug/63962/html/default/viewer.htm#statug_reg_sect003.htm

ios - how to query based on pfobject/pfuser associated with another pfobject in parse.com? -

i have parse class called friendrelation. class has 2 users, 1 friend other user. i want of messages posted of friends of user. attempting following query: pfquery *innerquery = [pfquery querywithclassname:@"friendrelation"]; [innerquery wherekey:@"user" equalto:currentuser]; pfquery *query = [pfquery querywithclassname:@"message"]; [query wherekey:@"usermessage" matchesquery:innerquery]; [query findobjectsinbackgroundwithblock:^(nsarray *comments, nserror *error) { }]; this query comes no results. i believe occurring because of line: [query wherekey:@"usermessage" matchesquery:innerquery]; the key needs friendrelation match. correct? how can make results of inner query user intern match matching query? thanks! you can try using - (void)wherekey:(nsstring *)key matcheskey:(nsstring *)otherkey inquery:(pfquery *)query something like: pfqu...

javascript - Feed FileReader from server side files -

i´m starting customize/improve old audio editor project. can import audio tracks canvas via drag&drop computer. thing use audio tracks stored in server clicking on list of available tracks... instead of use <input type="file"> tags. how can read server side files filereader?ajax perhaps? in advance. this code file reader: player.prototype.loadfile = function(file, el) { //console.log(file); var reader = new filereader, filetypes = ['audio/mpeg', 'audio/mp3', 'audio/wave', 'audio/wav'], = this; if (filetypes.indexof(file.type) < 0) { throw('unsupported file format!'); } reader.onloadend = function(e) { if (e.target.readystate == filereader.done) { // done == 2 $('.progress').children().width('100%'); var onsuccess = function(audiobuffer) { $(el).trigger('audiee:fileloaded', [audiobuffer, file]); ...

javascript - How to get current YouTube IDs via iMacros? -

i want viewed youtube video id , save csv via imacros, gets nothing. here js code: var videoid; videoid ="code:"; videoid +="url goto=https://www.youtube.com/watch?v=dbnywxdz_pa"+"\n"; videoid +="add !extract {{!urlcurrent}}"+"\n"; videoid +="set !var1 eval(\"var s=\"{{!urlcurrent}}\"; s.match((?<=watch\\?v=|/videos/|embed\\/)[^#\\&\\?]*);s[0]; \")"+"\n"; videoid +="add !extract {{!var1}}"+"\n"; videoid +="saveas type=extract folder=* file=url.csv"+"\n"; try this: var videoid = "url goto=https://www.youtube.com/watch?v=dbnywxdz_pa" + "\n"; videoid += "set !extract {{!urlcurrent}}" + "\n"; videoid += 'set !extract eval("\'{{!extract}}\'.match(/v=(.{11})/)[1];")' + "\n"; videoid += "saveas type=extract folder=* file=url.csv" + "\n"; iimplay...

c# - Maintaining a program folder in program files out of date? -

for program i'm writing in vs c# wpf need store user related information on user's computer. far knew has been done creating folder in c:\program files , adding whatever program related info folder in subfolders or whatever. after doing browsing came across lot of people saying method out of date because access may denied create folder there, works administrative accounts, etc.. 1 site suggested saving c:\users\username\appdata\roaming or c:\users\username\appdata\local. question best , date method saving program data users computer? also take @ msdn article . it uwp apps have general idea put if developing wpf app. you may need these folders: environment.specialfolder.applicationdata environment.specialfolder.localapplicationdata environment.specialfolder.commonapplicationdata

emulation - Android map show my location didn't work -

i have been struggle current location in google map, tried official map demo, not working also. shows getmylocation button on upper right, didn't show blue dot on map current location. here code , i'm using emulator target api 23, guess may emulator's problem since code download directly github. advice appreciated. [screenshot][1] package com.example.mapdemo; import com.google.android.gms.maps.googlemap; import com.google.android.gms.maps.googlemap.onmylocationbuttonclicklistener; import com.google.android.gms.maps.onmapreadycallback; import com.google.android.gms.maps.supportmapfragment; import android.manifest; import android.content.pm.packagemanager; import android.os.bundle; import android.support.annotation.nonnull; import android.support.v4.app.activitycompat; import android.support.v4.content.contextcompat; import android.support.v7.app.appcompatactivity; import android.widget.toast; /** * demo ...

java - Array of Bitmaps Displayed in a GridView using ArrayAdapter. Android -

i'm trying populate gridview array of bitmaps. when trying use code: public void onresultreceived_image(bitmap[] bitmaps) { arrayadapter<bitmap> adapter = new arrayadapter<bitmap>(this, android.r.layout.simple_list_item_1, bitmaps); gridview.setadapter(adapter); } i tostring exceptions, makes sense considering simple_list_item_1 attempting use text view populate grid (as understanding anyway). i've put research custom array adapters far haven't found particularly useful or relevant bits of material towards bitmaps , gridviews. there easy fix or simple implementation of custom array adapters can point me to? new android , java.

How can I cancel the default action when the 'drop' occurs using Dojo dnd -

i using dojo/dnd/source.in application, drag item source target,and under conditions,i want cancel default action when or before drop it. i tried return false in ondrop handler,but doesn't work. tried "this.emit('dndcancel')",and doesn't work neither. mytarget.on("drop",function(source,nodes,copy){ this.emit("dndcancel"); return false; } what should do?please thanks! try dojo publish: require(['dojo/topic'], function(topic) { topic.publish("/dnd/cancel"); }

javascript - jQuery keep other boxes not edited state -

Image
in code below when click edit other boxes loose edited icon until cancel clicked. is there away can have if box not being edited keeps normal state of code? the library using is: https://vitalets.github.io/x-editable/ normal state: when edit button clicked: jquery: /* x-editable */ $(function(){ $.fn.editable.defaults.mode = 'inline'; $.fn.editable.defaults.params = function (params) { params._token = $("#_token").data("token"); return params; }; var dataurl = $('.updatefield').data('url'); var inputname = $('.updatefield').attr("name"); $('.updatefield').editable({ type: 'text', url: dataurl, name: inputname, placement: 'top', title: 'enter public name', toggle:'manual', send:'always', ajaxoptions:{ datatype: 'json' } }); $('.edit').click(function(e){ var contai...

how to count the total number of items for the lists contain a specific item in python -

i want count total items lists contain 'a', should 4+3 = 7 tweetword = (['a','b','c','a'],['a','e','f'],['d','g']) count_total_a = {} t in tweetword: word in tweetword: if word not in count_total_a: count_toal_a[word] = len(t) if word in count_total_a: count_total_a[word] += len(t) '''the result not correct coz counts first list twice''' really appreciate help! take sum on generator: sum(len(x) x in tweetword if 'a' in x)

php - Slim Framework : Homepage Routing without Trailing Slash -

using slim 3, want homepage url www.domain.com instead of www.domain.com/ . this routing redirect home request www.domain.com/ $app->get('/', function ($request, $response, $args) { }); but 1 gives me error. $app->get('', function ($request, $response, $args) { }); i'm using standard .htaccess : rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^ index.php [qsa,l] i think common issue. best workaround this? edit: what trick or workaround homepage url looked without trailing slash on address bar? the first / required http spec. if go https://stackoverflow.com in firefox , inspect headers sent using livehttpheaders, see this: / http/1.1 host: stackoverflow.com user-agent: mozilla/5.0 (macintosh; intel mac os x 10.11; rv:45.0) gecko/20100101 firefox/45.0 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-language: en-gb,en;q=0.5 accept-encoding: g...

python - numpy recarray from CSV dtype has many columns but shape says just one row, why is that? -

my csv has mix of strings , numeric columns. nump.recfromcsv accurately inferred them (woo-hoo) giving dtype of dtype=[('null', 's7'), ('00', '<f8'), ('nsubj', 's20'), ('g', 's1'), ... so mix of strings , numbers can see. numpy.shape(csv) gives me (133433,) which confuses me, since dtype implied column aware. furthermore accesses intuitively: csv[1] > ('def', 0.0, 'prep_to', 'g', 'query_w', 'indef', 0.0, ... i error cannot perform reduce flexible type on operations .all(), when using numeric column. i'm not sure whether i'm working table-like entity (two dimensions) or 1 list of something. why dtype inconsistent shape? a recarray array of records. each record can have multiple fields. record sort of struct in c. if shape of recarray (133433,) recarray 1-dimensional array of records. the fields of recarray may accessed name...

java - 1D array frequency counter for other methods -

i wanted call method prompt user enter miles driven, gallons used, calculate miles per gallon, display how many miles per gallon type of car got on trip. wanted method passes “1” add frequency counter each type of car later on. (if car honda, add “1” arrayname[1], if car toyota, add “1” arrayname[2], etc.). int[] mpglist = new int[5]; // 5 because there 4 more car types mpglist[0] = do{ prompt = double.parsedouble(joptionpane.showinputdialog(null, "enter" + "\n" + "1 honda")); if (prompt == 1) { forhonda(); }; ...... public static void forhonda(){ double miles, gallons, mpg; miles = double.parsedouble(joptionpane.showinputdialog(null,"enter miles driven ")); if (miles <= -1){ joptionpane.showmessagedialog(null,"input negative" + "\n" + "try again...

osx - Copy/paste issue with my .vimrc file -

when try copy in visual mode , paste it, pasting new line instead of copied line. when same thing done under root dosent use .vimrc works fine. this .vimrc using. appreciated , 1 thing note same .vimrc when used in linux works fine. since mentioned work under linux, assume error on windows or osx. mentioned @sudobangbang issue line set clipboard=unnamedplus what set default copy buffer vim + vim's alias x window clipboard used linux. not sure why it's giving new lines it's how interacts os to work windows , osx you'll want use command set clipboard=unnamed sets copy buffer * alias clipboard in windows/osx. however if remove line entirely can manually copy/paste system copy buffer doing "*y , "*p using " reference * buffer followed command

Passing parameters in url using python scripting -

my need : want pass payload in each parameter , result stored in text file. want know how pass payload parameters in url using python fyi : pulling url text file , writing output text file. need pass parameter in between = & ex url : http://apps.hello.com/appeditprofile/appeditprofileupdate.php&marital_status=1&encid=d961e7e192042c955bde7b68e38c25a72&tofeet=5-8&fromfeet=4-5& i recommend using urllib handle encodings well. building off of arshid’s example: import urllib url = 'http://example.com' params = { 'var1': 'test', 'name': 'arshid' } url = '%s?%s' % (url, urllib.urlencode(params),) you can see examples here more info.

javascript - Rails 4 - jQuery to hide initially, then toggle with click -

im having trouble resolving conflicts between jquery , javascript. one of javascript conflicts comes trying use dependent-fields gem. see outline of problem here: rails - conflicts between jquery , javascript instead of trying solve problem, i'm trying figure out how make jquery code directly manipulates forms hide , show data in way gem serves (or intended do). i have made file in app/assets/javascripts called: projects.js.coffee. has: $(document).ready(function() { $("#check_project_milestones").hide() }); im not expecting toggle part, hoping might work hide content in check_project_milestones tag. doesnt. in projects form, have: <%= f.input :has_milestones, as: :boolean, boolean_style: :inline, :label => 'does research project have identifiable milestones or decision points?', id: 'check_project_milestones' %> <%= content_tag :div, data: {'checkbox-id': 'check_project_milestones...

jenkins - Can we integrate the Allure report to Maven based TestNG project -

i have integrated allure-report maven based testng project, , report generated can see running jetty server , looking @ localhost. xml reports generated inside main project folder. now integrating jenkins test project, able build project jenkins not able see allure report in jenkins. tried adding allure-report plugin jenkins guess missing basic config allure-report , jenkins. kindly suggest if has got success in it. you have configure allure-plugin post-build action in jenkins job. there can set folder xml-results generated in project. "target/allure-results". the rest should done plugin...

msbuild - Issue with VS 2015 Project/Solution build definition in TFS 2010 Server -

i'm getting issue tfs 2010 build definition not copying dlls project in vs 2015. had issue compiler dlls putting in bin folder , i'm getting application level errors. once moved compiler dlls (csc.exe, .config, .codeanalysis.dll,...) roslyn folder inside bin folder (project\bin\roslyn), application working successfully. roslyn folder creating outside project root directory. folder structure: ......\build\roslyn ......\build\_publishedwebsite\project_folder\bin i have created post build command move roslyn inside bin , moved successfully. still copy of files under roslyn available in bin , failing application work properly. any help. please let me know if need more info. as temporary fix, have added post build command remove files , it's working successfully. if exist "$(webprojectoutputdir)\bin\microsoftcodeanalysisdll" del /f "$(webprojectoutputdir)\bin\microsoftcodeanalysisdll"

broadcastreceiver - Android: AlarmManager called my Broadcast Receiver even though the trigger time not reached yet -

i having trouble alarm manager , broadcast. code schedule task in hour. var preference = preferencemanager.getdefaultsharedpreferences (application.context); var alarmmanager = (alarmmanager)application.context.getsystemservice (application.alarmservice); var intent = new intent (application.context, typeof(scheduleusagelogreceiver)); var schedule = new logschedule (1); var serializer = new datacontractjsonserializer (typeof(logschedule)); if (preference.contains (scheduleusagelogreceiver.share_preference_usage_name)) return; using (memorystream ms = new memorystream()) { serializer.writeobject(ms, schedule); var json = encoding.default.getstring(ms.toarray()); var editor = preference.edit (); editor.putstring (scheduleusagelogreceiver.share_preference_usage_name, json); editor.commit (); } var pendingintent = pendingintent.getbroad...

typescript: What to do if a typings (or tsd) is not available? -

i looking on typescript handbook , can't seem find answer. if using library no typings exist options. one create typings file, don't want do. what other options, seem remember kind of 'declare' keyword ? or maybe in tsconfig ? i assume there way of declaring variable (type) globally every time use it, work. and presume there way of declaring available in 1 file. i still confused this. of course best way include typings file won't available. any appreciated thanks if primary concern rid of errors, can write declare var myuntypedlibrary: any; above code, myuntypedlibrary name of global reference dependency. if need reference in several files , don't want repeat yourself, write in top of file, above namespaces, , available whole project. if have many untyped dependencies, idea have separate ts-file define these. note: works fine when using local modules. i'd guess might more troublesome if 1 using external modules , want ...