Neal

1

votes
2

answer
407

views

Filter dataframe by vector of column names and constant column names

This is surely easy but for the life of me I can't find the right syntax. I want to keep all 'ID_' columns, regardless of the number of columns and the numbers attached, and keep other columns by constant name. Something like the below command that doesn't work (on the recreated data, every time):...
Neal Barsch
1

votes
2

answer
1.1k

views

Pandas Dataframe - Get index values based on condition

I have a text file called data.txt containing tabular data look like this: PERIOD CHANNELS 1 2 3 4 5 0 1.51 1.61 1.94 2.13 1.95 5 1.76 1.91 2.29 2.54 2.38 6 2.02 2.22 2.64 2.96 2.81 7 2.27 2.52 2.99 3.37 3.24...
Neal Titus Thomas
3

votes
4

answer
126

views

Applicative typeclass based on two different functors

Is there something similar to the Applicative type class, but where there are two functors for each side of the application which are different? i.e. () :: (Functor f, Functor g) => f (a -> b) -> g a -> f b
Neal Alexander
1

votes
0

answer
74

views

c# webrequest POST with p12 405 error

Tearing my hair out. We have a p12 file, which can't be exported to .pfx, so that solution on stackoverflow did'nt help. Using SOAPUI, I get a response, but from my C# (2014) client, written as a console application, I only get the 405 error. code follows: string host = 'https://dev-cust-ws.m2xxx.co...
Neal Rogers
1

votes
0

answer
80

views

Is there a way to 'auto-select' a tool when a user opens photoeditorsdk?

I am trying to reduce the number of clicks a user has to go through when using my app. I see how to configure which tools to show, but I would really like to be able to configure the plugin to automatically open in 'crop mode' at one point. Not, have the user open the app, and then select the lone...
Neal Brennan
1

votes
0

answer
134

views

Intermittent SecureChannelFailure error

I keep getting an intermittent SecureChannelFailure error when making a simple GET request to an https:// website I host. None of the errors are making it into the server log files. The frequency is less than 1 error per 100 calls but is there any reason why the code below would be causing these err...
Neal
1

votes
2

answer
72

views

R join or merge don't duplicate non-joining columns (reproducible)

This is different from the marked duplicate because I have to dynamically merge the column values removing NA, while merging I can't use datatxt1 or datatxt2 as merging columns since (as I outline below) df1 and df2 come in from a function that may or may not contain those columns. The data sample b...
Neal Barsch
1

votes
0

answer
30

views

Get Geotiffs Index from NASA data

NASA has their 500m resolution lights at night data in inexplicable projection and format on where they cut the boundaries (or am I missing something?). I'd like to have a function like this (made up, not work): ###Made up, not work getTILE('Australia') [1] D2 getTILE('United States') [1] A1 B1 This...
Neal Barsch
1

votes
2

answer
85

views

How to automatically number all the matching strings in a text file?

I have a text file, C:\text\sample.txt. How can I search through this text file , and numbering all instances of a given string (using regular expression), for example, word that starts with 'h' and ends with 'y' ? What the sample.txt looks like: (For this sample file, the regular expression I used...
Neal
1

votes
1

answer
34

views

Joining three tables, than order, how to use index in MySql?

I have these three tables: season(id, season); game_in_season(id, id_season, game); player_in_game(id, id_game, full_name, pts); I want to select all players of season with index 5 and order them by pts. Which index should I use? I have an index on pg.pts column, but it is not used when I join the t...
J. Neal
1

votes
0

answer
88

views

Failed to send an MIME email body with mail command?

I write a silly Python script to build a multipart/mixed MIME email body and try to send this email body with mail command. The recipient got the mail, but just treats it as a plain text body and displays its source code. I want to know how I can make my MIME email body to be recognized by my recipi...
Neal.Marlin
1

votes
1

answer
475

views

how to get struct field type in golang?

type Role int type User struct { Id int64 Name string Role Role } func ListFields(a interface{}) { v := reflect.ValueOf(a).Elem() for j := 0; j < v.NumField(); j++ { f := v.Field(j) n := v.Type().Field(j).Name t := f.Type().String() fmt.Printf('Name: %s Kind: %s Type: %s\n', n, f.Kind(), t) } } fu...
Neal
1

votes
3

answer
99

views

Add a Javascript Link to an Entire Flexbox Item

I'm trying to make an entire flexbox item clickable, which is pointing at some javascript. As i'm using javascript to pull in content below the flexbox container there are multiple IDs within the structure to consider. At the moment i'm only able to make the text clickable rather than the entire .d...
Neal
1

votes
0

answer
61

views

Launch TorBrowser or Tor enabled Firefox browser in RSelenium

How do you launch TorBrowser in RSelenium? I tried this to no avail: library(RSelenium) browserP
Neal Barsch
1

votes
3

answer
277

views

Can't start worker, No module named 'celery

I try to include tasks in my webapplication but i can't start the celery work. My project structure is the following: website/website --> init.py, settings.py, urls.py, wsgi.py website/index --> init.py, celery_app.py, tasks.py Index is my startpage where i want to run the tasks. index/celery_app.py...
Neal Mc Beal
1

votes
0

answer
37

views

Losing columns in Dask group by expression

I have a DataFrame like this: EVENT_TYPE PRICE TICKER TIME 2018-07-02 06:00:00.030691 TRADE 22.52 HPQ My group by is as follows: g = dfs[dfs.EVENT_TYPE == 'TRADE'].groupby(['TICKER', pd.Grouper(freq='D')]) g.first().compute() However, the output only as the group by columns: TICKER...
neal
1

votes
0

answer
66

views

How do I get the Parents and Grandparent and Great-Grandparent of an element?

SOLVED. I am trying to get the grandparent, great-grandparent ul elements of a clicked on checkbox element in a tree structure, using jQuery's 'parents()' function. I can get the parent ul element which has class='accordion-heading', but I can't get it's parent and grandparent up to it's first ances...
Neal Rogers
1

votes
2

answer
21

views

Merge numpy arrays/dataframe with same values and keep difference

I have two arrays. The first looks like this: Date Price Volume 2019-04-15 01:00:00 50 100 2019-04-15 02:00:00 35 120 The second array looks like this: Date Price Volume 2019-04-15 01:00:00 50 200 2019-04-15 02:00:00 40 130 The output array should...
Neal Mc Beal
1

votes
0

answer
322

views

Should WebClient be used in a using statement?

If HttpClient is not supposed to be used in a using statement, see these links: https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/ http://www.nimaara.com/2016/11/01/beware-of-the-net-httpclient/ So if your not supposed to use HttpClient in a using statement then why do so many examples o...
Neal Davis
1

votes
1

answer
71

views

Install an external library instance of libv8-3.14 to folder

I need libv8-3.14 to run some R packages on linux, but I don't have root access/sudo access on the linux computer I'm using so I'd like to install an external folder instance of libv8-3.14. I've seen R packages reference this as external as CDFLAG='folder/v8-3.14' so I know it is possible. I'm new(i...
Neal Barsch
1

votes
0

answer
27

views

Exporting a variable set in terminal to R

I am running Mac OS High Sierra with RStudio. I want to export a terminal set variable to RStudio, but echo and getenv currently show no output: In terminal: export testexpvar='testworks' ###I can echo in the terminal echo $testexpvar testworks In RStudio console: ###I can't echo in R: system('echo...
Neal Barsch
1

votes
2

answer
31

views

Write to outState when Onsavedinstancestate isn't called

I have an Activity(0) that starts another Activity(1) from a fragment it is hosting.I have set the Up button in the toolbar to return to Activity(0) from Activity(1) and a few more Activities(2,3,4) that might be initialized by Activity(1). I want to save a variable for Activity(0) so that when it i...
Neal
1

votes
0

answer
34

views

Install error in lwgeom package R, using custom PROJ location

cd ${install_directory} mkdir lwgeom cd lwgeom wget https://cran.r-project.org/src/contrib/lwgeom_0.1-4.tar.gz R CMD INSTALL --configure-args='--with-proj-include=${install_directory}/proj/include --with-proj-lib=${install_directory}/proj/lib' lwgeom_0.1-4.tar.gz ends up with the error: checking for...
Neal Barsch
1

votes
0

answer
61

views

How to print stack backtrace of functions defined in shared library?

I'm optimizing the performance of some codes, and I find that the call of func() in third-party shared library is too slow every a few minutes. For example, if I called it for 10 times in a loop, the first call was very slow compared the other calls. A few minutes later I repeated the same operation...
Neal
1

votes
0

answer
484

views

Download file via BLOB link in Android webview

I have a website that is navigated from within a webview. One of the pages generates a ZIP file that is downloaded via a BLOB URL. I discovered that this is not supported by webview, so I have tried implementing this solution: Download Blob file from Website inside Android WebViewClient However, it...
E. Neal
1

votes
1

answer
52

views

How to make radial gradients work in Safari?

I'm using radial-gradients on a new site that i'm building, but the colours are rendering differently (much darker) in Safari on desktop. Is there a better cross-browser syntax to use? I've tried different prefixes, but this hasn't fixed the issue. The code i'm using is as follows. .item1 { backgro...
Neal
1

votes
2

answer
45

views

How to set a select list's options with jQuery 3.3.1

I've tried most of the answers to previous questions here, but I can't get jQuery to set an option in a select list as selected. I do get and iterate each option's text. Using jQuery 3.3.1. HTML: --DeSelect-- Administrator Manager User Code: $('#ddlrole option').each(function ()...
Neal Rogers
1

votes
2

answer
25

views

Form pandas series of elements by taking dictionary as a input wherein value indicates frequency of key in that dictionary

I have a dictionary object, z = {'a':3, 'b':2, 'c':5} Based on that, I desire to get output object as pandas series or array as, array(['a', 'a', 'a', 'b', 'b', 'c', 'c', 'c', 'c', 'c']) Even if elements in output series are not in order that is fine, but should reflect same count as of value for i...
Neal
1

votes
1

answer
59

views

Stratified log-rank test in R for counting process form data?

Background: at half-year follow up times for 4y, patients may switch to a different medication group. To account for this, I've converted survival data into counting process form. I want to compare survival curves for medication groups A, B, and C. I am using an extended Cox model but want to do pai...
neal
1

votes
1

answer
426

views

How can I reproduce the Firefox faded image/text dragging effect in .NET?

Ok, I know this is probably a pretty newb question, but when it comes to graphics programming, I am a newb :) How does Firefox achieve the drag and drop effect while displaying the nice faded copy of the selected image or text? See below for an example with the SO logo. Also, how could I reproduce t...
Adam Neal
1

votes
2

answer
160

views

Help Finding Memory Leak

I am writing an iPad app that downloads a rather large .csv file and parses the file into objects stored in Core Data. The program keeps crashing, and I've run it along with the Allocations performance tool and can see that it's eating up memory. Nothing is alloc'ed or init'ed in the code, so why a...
Neal L
1

votes
2

answer
1k

views

how to convert bitmap image to CIELab image?

Hello to stackoverflow members! This is my first post but I love reading the questions and answers on this forum! I'm using VS2008, CSharp, NET 3.5 and Windows XP Pro latest patches on this project. I am reading in a jpeg file to a bitmap image using CSharp in the following way: Bitmap bmp = new Bi...
Neal Davis
1

votes
1

answer
500

views

WPF: Custom control that binds its content to a label

I want to write a custom control that's used like this: Some string It should render like this: -- Some string ------------------------------------------- Here's my code: It works except for the label binding. Can someone help me fill in the question marks? I thought about using a ContentPresenter...
Neal Ehardt
1

votes
1

answer
767

views

Application.Idle causes high CPU usage

I use the Application.Idle event to handle toolbar status (enable/disable) etc. quite extensively. As I'm beta testing Norton AntiVirus 2011, it brought to my attention that my app that I'm developing triggered a high CPU usage warning on at least one CPU. Sure enough, I opened the task manager an...
Neal
1

votes
2

answer
153

views

“Best” way to structure long views on iPhone

I'm working on an iPhone app that (among other things) has a detail view for records with lots of attributes and lots of related records. Rather than having one really long scroll view or table view, I am thinking it might be easiest to break the detail view into several separate views (some UIView...
Neal L
1

votes
2

answer
470

views

CHCSVParser in the main thread

This is a follow-up to a previous post regarding the CHCSVParser from Dave DeLong. In short, I am using the CHCSVParser to work with an extremely large CSV file and parse the lines into Core Data entities (on an iPhone). I've got the parser hooked up and working, and am now trying to display a pro...
Neal L
1

votes
1

answer
1.3k

views

How can I prevent tab characters etc. from being pasted into an asp.net textbox?

I'd like to have an asp.net textbox that people can paste content into and it works like notepad, i.e. no formatting or special characters will get entered. I take text and pass it to a web service which manipulates it and converts it into a tab delimited file. The problem I've experienced is som...
Neal
1

votes
3

answer
282

views

SQL Server Stored Procedure to dump oldest X records when new records added

I have a licensing scenario where when a person activates a new system it adds the old activations to a lockout table so they can only have their latest X systems activated. I need to pass a parameter of how many recent activations to keep and all older activations should be added to the lockout ta...
Neal
1

votes
1

answer
9.9k

views

create simple node js server and client

What i want to be able to do is have a server which one client will send updates and multiple other clients would receive those updates and update the relevant parts of the page. This must be really easy todo with node js, but i just dont know where to get started. Is there anyone here that can help...
Neal
1

votes
1

answer
434

views

Create a direct DATE or DATE/TIME input for iPhone apps

My users despise the iPhone native date/datetime pickers (spinning wheels). I need to come up with another solution such as a custom UITableViewCell that allows direct input or a UIAlertView that is customized for input similar to the way Android handles date and time input. I'll obviously need to...
Neal

View additional