abalter

1

votes
0

answer
44

views

Is there a way to mix conda and native R?

I have found that even with the R package reticulate, sometimes I run into a problem where an R package in my environment won't load. Or, the R package may not be available in the conda channels I'm using. However, if I install the R package natively with install.packages, R installs its own version...
abalter
1

votes
0

answer
94

views

How to set environment variables in R to use a conda environemnt

The reticulate package is supposed to enable conda environments within R. I can trivially show that it does not work. [email protected]:~$ R > library(reticulate) > use_condaenv('dada2') > library(dada2) Error in library(dada2) : there is no package called ‘dada2’ > Save workspace image? [y/n/c]...
abalter
1

votes
0

answer
23

views

How to release knitr cache memory in RStudio without button (with command)?

Similar problem here. It's a bit hard to create a MRE for this sort of thing. It happens only after working with the same RMD file for a while, say running a few chunks multiple times. Suddenly, my rsession process is using 13G of ram even though my data objects are nowhere near that--the bighgest m...
abalter
1

votes
1

answer
569

views

Eclipse giving me XML junk in console instead of running program

Note: I am running Eclipse ADT Build: v22.2.1-833290 Example: I have the java code: File: HelloWorld.java public class HelloWorld { public static void main(String[] args) { System.out.println('Hello World!'); } } Works just fine if a compile and run at the console. However, when I run this file in...
abalter
1

votes
1

answer
10.7k

views

Set default value for combo box in MS Access form

I have a combo box called dropBoolType2. I tried setting the Default Value under the Data property tab to =[dropBoolType2].[ListIndex](1)] but I'm still getting a blank default value.
abalter
1

votes
1

answer
487

views

Lazy loading not working in Entity Framework

I have two classes that are connected by using the virtual keyword: Student: public class Student { public int StudentId{get; set;} public string LastName { get; set; } public string FirstName { get; set; } public DateTime EnrollmentDate { get; set; } public virtual IEnumerable Enrollments { get; se...
abalter
1

votes
2

answer
1.2k

views

Alter schema of Access 2013 database with linked table

I'm trying to change the schema of an Access 2013 table. I want to lengthen some of the text fields. When I change the schema and try to save I get dialog with Operation is not supported for this type of object, and a note that This property cannot be modified in linked tables. That makes sense. So...
abalter
1

votes
3

answer
1.3k

views

Bootstrap modal disappearing in ASP MVC 5, and not from double loading bootstrap

I'm toggling a model from Javascript, but it disappears immediately. I'm not loading bootstrap-modal (which is one of the problems people have). Also, I tried eliminating bootstrap.min.js, and that didn't fix it either. I tried .modal(), .modal('show') and .modal('toggle'). Also, this was a VisualSt...
abalter
1

votes
1

answer
36

views

Stop search dialog from coming up in MS Access form

The 'Find and Replace' dialog keeps coming up after my button event runs. Why and what can I do to stop it? Private Sub btn_Find_Click() Dim query_string As String 'MsgBox (Me.InventoryDetailsID) query_string = 'SELECT ' & _ 'tbl_Inventory_Header.InventoryHeaderID, ' & _ 'tbl_Inventory_Header.Invent...
abalter
1

votes
1

answer
301

views

Geany search and replace in few keystrokes

I'm looking for a quick way to search and replace in Geany, particularly using regex. I can select a word and do CTRL-h to bring up the dialog, then hit tab and type in the replacement. But then I need to hoist the mouse up to the 'InDocument' button. Is there a way to do that with a keystroke? Web...
abalter
1

votes
1

answer
52

views

Match successive overlapping groups with regex

I have strings like: TAACCCTAACCCTAACCCTA I can do $ echo TAACCCTAACCCTAACCCTA | grep -Eo '[ACGT]{4}' TAAC CCTA ACCC TAAC CCTA But I would like: TAAC AACC ACCC CCCT CCTA ... ... It must have something to do with non-greedy and lookaheads or lookbehinds, but I need some help.
abalter
1

votes
1

answer
35

views

Bash array not filling in loop reading from file [duplicate]

This question already has an answer here: A variable modified inside a while loop is not remembered 6 answers I'm trying to fill an array with the lines in a file in bash. I do not understand what is happening here: [email protected]:~$ declare -a a [email protected]:~$ cat t.txt a b c d e f g h balter...
abalter
1

votes
1

answer
0

views

Dplyr filter using dynamic column name and dynamic value

This same question was asked here and marked as a duplicate. However, it is not a duplicate and received no answers. I'm asking again. I have df = data.frame(A=1:10, B=sample(c('TT', 'TG', 'GG'), 10, replace=T)) # df # A B #1 1 TG #2 2 TG #3 3 GG #4 4 TT #5 5 TT #6 6 TT #7 7 GG #8...
abalter
1

votes
2

answer
54

views

More direct way of duplicating Visual Studio project? [closed]

I've been searching for how to duplicate a solution. In my case, I just want to move my solution to a new directory (it got created in the Visual Studio directory under 'Projects' and I want it to be in the folder for the course I'm taking). I understand there is the problem of absolute paths. But...
abalter
1

votes
4

answer
1.4k

views

How to give access in one Javascript file to a variable defined in another

What is the simplest way to put a variable in one js file in the scope of another js file. The question has been asked before, and answers given. But I'm unsatisfied because (1) The explanations were not simple to me and (2) The solutions were not simple to me. One answer was 'As long as the global...
abalter
1

votes
2

answer
68

views

AngularJS in JSFiddle?

There must be something else I need to do here, but I'm not sure what. 1 + 2 = {{ 1 + 2}} var theApp = angular.module('theApp', []); With AngularJS 1.2 added is giving: 1 + 2 = {{ 1 + 2 }} If I remove the ng-app attribute, then it gives the expected result. http://jsfiddle.net/abalter/yvh0e7vL/
abalter
1

votes
1

answer
251

views

Create SQL user-defined function in ColdFusion with MS SQL Server

I'm doing queries in which I want to extract the left-most n characters from a string that has been stripped of all leading and following spaces. An example is: Select SUBSTRING(LTRIM(RTRIM(somefield)), 0, @n) AS mydata FROM sometable It's the only way I can figure to do it on a SQL Server. I've nev...
abalter
1

votes
1

answer
553

views

File open dialog in ImageJ Javascript Script

I want to write a macro/script to open a file open dialog, and then import the selected image using BF with various options. I found this JS script for doing the latter part here: importClass(Packages.loci.plugins.BF); importClass(Packages['loci.plugins.in.ImporterOptions']); // 'in' is a reserved...
abalter
1

votes
1

answer
690

views

How to access shell variable in ipython

Using the ! magic I can access env type environment variables, but not ones defined in my terminal, or .bashrc. $://balter/chip-seq-analysis/chipseq$ echo $hg38 //genomes/hg38/release-85/Homo_sapiens.GRCh38.dna.primary_assembly.fa [email protected]://balter/chip-seq-analysis/chipseq$ ipython Python 2.7...
abalter
1

votes
2

answer
300

views

How to overlay text on an image in a container--and keep the text in the container

I'm following the solution given in a bagillion places for how to overlay text on an image, using relative and absolutepositioning. The problem is that the text with position: absolute pops out of its container and goes to the utmost top, right, etc. I'd be happy to use a background image, but then...
abalter
1

votes
1

answer
5.3k

views

Imagemagick label font size/background

I can't seem to control font size, background and fill. command 1: convert \ testimage.jpg \ label:'Days: 0' \ -background Black \ -fill White \ -pointsize 1 \ -gravity center \ -append \ days_1.jpg image: command 2: convert \ testimage.jpg \ la...
abalter
2

votes
2

answer
462

views

Is it possible to capture the window.location.replace event?

If I'm currently at the URL'example.com/somepage#somehash' and I invoke window.location.hash = 'anotherhash', the URL changes to 'example.com/somepage#anotherhash'. This fires the window.hashashchange event. If I am currently at the URL 'example.com/somepage?a=1&b=two' and I invoke window.location.r...
abalter
5

votes
2

answer
17.7k

views

Array of class objects as class member in VBA

I'm writing an Excel macro in VBA to send emails to library patrons alerting them of overdue materials. The data comes from a spreadsheet with data like UserID Name Email Title Author Barcode Call Number Borrowed Date Due Date user2 Jones, Bob [email protected] Title1 A. Baker...
abalter
6

votes
2

answer
2.1k

views

Javascript equivalent to python's .format()

I would like a javascript function that mimics the python .format() function that works like .format(*args, **kwargs) A previous question gives a possible (but not complete) solution for '.format(*args) JavaScript equivalent to printf/string.format I would like to be able to do 'hello {} and {}'.for...
abalter
4

votes
1

answer
3.1k

views

Why are code-first tables not being created using Entity framework?

Yet another in the saga of the ASP MVC tutorial I'm working through. Everything was going along pretty nicely, except, I noticed that two of the three tables being created had no data in them. Unable to figure out why, I got serious and deleted the database thinking I would let it be created again f...
abalter
1

votes
1

answer
101

views

CFWheels “Hello Database” in true MVC format

The 'Hello Database' example at cfwheels.org includes only a controller and views. What would the app look like if it included a model? Total beginner here, and I want to know when and how to use a model. http://cfwheels.org/docs/1-3/chapter/beginner-tutorial-hello-database To make sure this is a pr...
abalter
11

votes
4

answer
6.7k

views

Define function in unix/linux command line (e.g. BASH)

Sometimes I have a one-liner that I am repeating many times for a particular task, but will likely never use again in the exact same form. It includes a file name that I am pasting in from a directory listing. Somewhere in between and creating a bash script I thought maybe I could just create a one...
abalter
8

votes
1

answer
2.3k

views

Which inline html styles does GitHub markdown accept? [closed]

This gives a pretty thorough description of how HTML elements are interpreted by markdown. But it does not discuss styles. So far, the only thing I can get to work is image width. I can't find a list anywhere of what is accepted/rendered It appears that the style='.....' attribute is completely igno...
abalter
3

votes
3

answer
5.4k

views

Can't specify explicit initializer for arrays

Why does this compile in VS 2013 int main() { int a[3] = { 1, 2, 3 }; return 0; } but this gives the error class TestClass { int a[3] = { 1, 2, 3 }; }; How do I fix it?
abalter
4

votes
3

answer
49

views

Is file automatically closed if read in same line as opening?

If I do (in Python): text = open('filename').read() is the file automatically closed?
abalter
2

votes
2

answer
1.5k

views

Python expression to MathML

I would like to be able to convert a python mathematical expression into content MathML using Python. The goal would be to turn an expression like (a*x^2 + b*x + c)/(2*a) into the content MathML example in the Wikipedia article on MathML. The asciimathml package will generate display MathML, but as...
abalter
3

votes
4

answer
34.2k

views

How to center a set of html radio buttons in a fieldset with div

I have a set of radio buttons and labels. The radio buttons precede the labels. I would like to center the set of them within a field set. I tried putting them in a div with display set to inline-block. Almost works, but one label gets bumped down to the next line. My understanding was that givi...
abalter
29

votes
9

answer
29.5k

views

Owin error with ASP.NET MVC application

I have an ASP.NET application that runs fine on my local machine. I just uploaded it to a server using web deploy. I'm getting the following error when I try to view the site: The following errors occurred while attempting to load the app. - The OwinStartup attribute discovered in assembly 'Gators3'...
abalter
6

votes
2

answer
853

views

Modern way to create static or Class variable for Javascript class

I've been hunting around for a clear answer to this, and most of what pops up still relates to the old (or should I say 'traditional') way of defining classes using function. According to this SO answer, Class properties are not supported in ES2015. As far as I can tell, the only way to add a static...
abalter
3

votes
3

answer
5.2k

views

ColdFusion isDefined getting Not Defined error

I have: And I'm getting the error: :'Variable ACTIVITY is undefined.' Huh? Oh, and the error is with isDefined, not with the cfset.
abalter
1

votes
4

answer
84

views

Strangeness with type constructors in python

In python I can do things like: d = dict() i = int() f = float() l = list() but there is no constructor for strings >>> s = string() Traceback (most recent call last): File '', line 1, in NameError: name 'string' is not defined Why is that? Or, IS there a constructor for string types? Also, follow...
abalter
3

votes
2

answer
28.7k

views

Set image source and background image with javascript

I've looked at many other posts and I think I'm using the exact syntax suggested. However, I'm not getting the images to show up. I have a jsfiddle. Is it a jsfiddle issue? It's also not working on a website I'm working on. Hello var string = 'url('http://www.premiumbeat.com/blog/wpcontent/uploa...
abalter
13

votes
3

answer
178

views

Safe to change base class in python?

Questions like this exist, but none exactly like this, and I found no completely satisfactory answers. I'm doing an agent-based biological model. Suppose I have a class of cell type A, and one of type B. They age according to a clock. Suppose when a cell of type A reaches a certain age, it change...
abalter
3

votes
1

answer
1.3k

views

Plotly hover text not displaying

Although I've specified text and hoverinfo, I'm not getting any hover annotation at all. If I comment out the 'text' attribute, I get the default behavior of hoverinfo: 'x+y'. I've also tried hoverinfo: 'text' and hoverinfo: 'x+text' (which is what I really want), but these do not change the behavio...
abalter
4

votes
1

answer
3k

views

Dealing with missing data in Pandas read_csv

I have not found a satisfying solution to the problem of missing data when importing CSV data into a pandas DataFrame. I have datasets where I don't know in advance what the columns or data types are. I would like pandas to do a better job inferring how to read in the data. I haven't found any combi...
abalter

View additional