14wml

1

votes
1

answer
1.3k

views

Installed BeautifulSoup but still get no module named bs4

I'm using a Jupyter notebook, Python 3.5, and a virtual environment. Within my virtual env I did: (venv) > pip install BeautifulSoup4 Which seemed to run fine b/c the terminal output was: Downloading beautifulsoup4-4.6.0-py2-none-any.whl (86kB) 100% |████████████████...
14wml
1

votes
1

answer
2.5k

views

What does In[num] mean in jupyter notebooks?

I know that In[*] means the kernel is running But what does In[93] mean? Does that mean the total number of seconds to execute the cell or is that the line number?
14wml
1

votes
0

answer
223

views

What is the data-value attribute in SVG?

I was looking at this article And particularly this code, A line chart showing some information 2008 2009 2010 2011 2012 Year 15 10 5 0 Price And I was wondering what data-value attribute was. When I tried googling for some documentation I only found this page, which said: The data-* SVG attributes...
14wml
1

votes
1

answer
622

views

Getting error when try to pattern match for Unix_error (Ocaml)?

I've been trying to pattern for the case where a user types in an invalid directory: # let dir = Unix.opendir 'adfalf';; Exception: Unix.Unix_error (Unix.ENOENT, 'opendir', 'adfalf'). My function is as follows: let files_of_dir d = try let dir = Unix.opendir d in ... with Unix_error (uerr, ucomma...
14wml
1

votes
1

answer
1.5k

views

Custom table cell not resizing to fit content view

I'm implementing a table view with 3 types of custom cells. As shown below, in the company information section, the headquarters label for my custom table view cell CompanyInfoTableViewCell is getting cut off because I think the custom table cell is not resizing to fit the content view. I tried impl...
14wml
1

votes
2

answer
729

views

Data from Firebase not loading into array

I don't have a storyboard. I'm doing everything programmatically. The loadData() method takes Firebase data, put it into a Company object, and loads the object into the companies array. In the didFinishLaunchingWithOptions method in the App Delegate, I instantiated the class and called loadData() Wh...
14wml
1

votes
2

answer
401

views

Firebase loading old data into table view

I noticed that my table view of companies displays old data instead of the data that's currently in the database when I pull up firebase on my browser. Why? How do I fix this? databaseHandle = databaseRef?.child('companies').observe(.value, with: { (snapshot) in             for item in snapsh...
14wml
1

votes
2

answer
48

views

How to center multiple form elements horizontally and vertically on frame?

Problem I've consulted both this resource and this resource, however my form elements are still not centering like they should (I've tried flex, I've tried padding, I've tried stretching, etc). I want both form fields to center both vertically and horizontally on the screen. I've wrapped my form el...
14wml
1

votes
3

answer
34

views

Why is image not centering if text is too long? (using display: table; margin: 0 auto; to horizontally center)

Problem What is happening What should happen For some reason, if the caption is too long it causes the image and the header text below it to shift to the far left. How can I fix this? If someone could provide me the css to horizontally center the img, h3, and h4 that would be greatly appreciated! Co...
14wml
1

votes
2

answer
523

views

How to center image in attributed string?

I have an image that I want to center alongside a bunch of text but even when I set the NSMutableParagraphStyle alignment to center, the line with the image does not center If anyone could please help me center the line with the image (i.e. first line) that would be great! Code let text = ' text nex...
14wml
1

votes
1

answer
471

views

UIBarButtonItems not showing up after creating UIToolbar programmatically?

I'm running across this issue which I can't seem to find the answer to online. Basically what I'm trying to do is programmatically create a UIToolbar with some UIBarButtonItems. What I've done (as detailed below) is create the UIToolbar and then set the items of the UIToolbar to an array holding al...
14wml
1

votes
1

answer
294

views

How to show input button when hover over input text?

What I want to happen When hover over Worksheet-Problem input text, I want .button-add to show up and the user be able to click on it. When the user hovers away from the Worksheet-Problem input text, I want .button-add to fade away. When hover over .button-bullet, I want .button-bullet to disappear...
14wml
1

votes
2

answer
58

views

How to preserve space in page layout while reveal/hide elements?

What is happening Using .hide() and .fadeIn(200) is creating this jumpy effect, which I don't want. What I want to happen When the user hovers over the menu icon, the menu icon to disappear the text 'Problems' to fadeIn its place When the user moves their mouse away, the text 'Problem' to disappea...
14wml
1

votes
1

answer
276

views

Regex not matching string (OCaml Str module)

I have this preword and regex: let regex = Str.regexp '\\([A-Za-z0-9]\\.*[A-Za-z0-9]\\)';; let s = '--O--c-a-l**9+===';; My regex is matching for a string that begins with a letter or number, has 0 to as many character in between, and ends with a letter or number. So the substring 'O--c-a-l**9+' sho...
14wml
1

votes
1

answer
59

views

Why is the nav bar not changing its background color after scrolling?

I'm trying to make my nav bar's background color change from transparent to blue when the nav bar reaches the About section of my page. Based on calls from the console, after scrolling, the scroll_start becomes greater than the aboutOffSetTop, but the nav bar color does not change. Why is this happe...
14wml
1

votes
2

answer
108

views

Queues not following QoS priority

Problem: When following this tutorial, I assigned different QoS to the 2 queues. However, when I ran the code, the queues act as if they have the same priority. Further, the blue dots are printing before the red dots even though the red dots are called first. I ran the code on the completed project...
14wml
1

votes
2

answer
324

views

background color not covering entire page

I want the purple background color to cover the entire page, but the background color cuts off before the image. How do you solve this? HTML Our Team The iGEM Team is comprised of 32 ppl. CSS (updated code) html, body { margin: 0; padding: 0; height: 100%; } .section { background-image: linear-gra...
14wml
1

votes
3

answer
2.3k

views

Looping through array of objects - TypeError: Cannot read property 'name' of undefined

I am trying to create a string of the artist's names from the artists array shown below (i.e. 'Taylor Swift, Rihanna, Justin Timberlake'), but the artist_obj is undefined and I get the error 'TypeError: Cannot read property 'name' of undefined'. How do I fix this? Code //Get info for each song var a...
14wml
1

votes
1

answer
162

views

Sceneview freezes when present web view controller

I'm using Safari Services kit to present a web view when an SCNode is clicked. However, when I go back from the safariVC to my VC with the sceneView, the sceneView is frozen even though I restart the session by re-running the session. I read on this website that presenting another VC kills the scene...
14wml
1

votes
1

answer
647

views

Is it possible to programmatically download a .scn file and run it?

Basically I was wondering if it was possible to host a .scn file on the web, download it, and render it as a SCNNode and put it in a sceneView. And if so, what frameworks & functions would I need to call to do this
14wml
1

votes
2

answer
580

views

How to turn .scn from Documents folder into SCNNode programmatically?

I have a .scn file in a folder in the Documents folder in the iPhone. I've been trying to use SCNSceneSource to turn the .scn file as a SCNNode //fileDestFolderURL is the folder that holds the .scn file let sceneSource = SCNSceneSource(url: fileDestFolderURL, options: [:]) let scene = sceneSource?.s...
14wml
1

votes
1

answer
39

views

Is there a way to multiply/divide a matrix by a corresponding cell in numpy?

Basically I have this matrix A: [[1, 2, 3], [2, 4, 6], [3, 6, 9], [4, 8, 12]] And I have this other matrix B (in which each column is the sum of the corresponding column in A): [[10, 20, 30], [10, 20, 30], [10, 20, 30], [10, 20, 30]] And I would like my resulting matrix C to be like this: [[1/10, 2/...
14wml
1

votes
1

answer
44

views

How to create a matrix of indices in r?

I need to plot a square of [-10,10] x [-10,10], which means I need 21 x 21 = 441 points Specifically I need a matrix where: X[1,] = x points = -10, -10, ..., -10, -9, -9, ..., -9, ..., 10 X[2, ] = y points = -10, -9, ..., 10, -10, -9, ..., 10, ..., 10 X[3, ] = all zeros How can I generate this matr...
14wml
1

votes
2

answer
704

views

How to build & run xcodeproj on simulator from command line?

All I want to do is be able to do the same thing as Cmd + Rthat I'm able to do in Xcode, except from the Terminal. But so far look at multiple stack overflow posts and articles have left me lost. So far I've been able to run the simulator from the command line: open -a Simulator --args -CurrentDevic...
14wml
3

votes
3

answer
4.2k

views

Sublayer is not showing up after add it

I'm trying to add the image 'resizeLayer' over my UIView selectedShape by sublayering it over selectedShape let sublayer = CALayer() sublayer.bounds = selectedShape.bounds //even when inserted this line, sublayer still doesn't show up sublayer.frame = selectedShape.frame sublayer.contents = UIImage(...
14wml
2

votes
2

answer
2.2k

views

How to create an oval UIView?

To make a circle view one must do shapeView.layer.cornerRadius = CGFloat(width)/2.0 So I extended this logic to make an oval view if width >= height { shapeView.layer.cornerRadius = CGFloat(width)/2.0 } else{ shapeView.layer.cornerRadius = CGFloat(height)/2.0 } Except my oval views have pointy ends...
14wml
5

votes
1

answer
6.4k

views

How to undo merge of master branch? [duplicate]

This question already has an answer here: Undo a Git merge that hasn't been pushed yet 26 answers I'm new Github so please forgive what may seem like an obvious question. I have an Experimentation branch which is 24 commits ahead of the master branch. Following this tutorial, I merged the master...
14wml
3

votes
3

answer
5.6k

views

Why does Safari & Firefox cut off bottom of input text?

What I want Chrome On Chrome, the input text looks normal. What is happening Firefox Safari As you can see, the input text is being slightly cut off at the bottom on Firefox and majorly cut off on Safari. How can I fix that? If anyone could help w/ this it would be greatly appreciated! Code HTML CSS...
14wml
3

votes
1

answer
6.2k

views

How to plot gamma distribution with alpha and beta parameters in python

I want to plot a gamma distribution with alpha = 29 (the scale) and beta = 3 (the size). In other words, I want to plot the pdf for Gamma(29,3). How do I do this if according to the documentation, the python gamma function only has parameters a and x and the size parameter doesn't exist? I thought...
14wml
2

votes
2

answer
1k

views

Domain=LaunchServicesError Code=0, Error=MissingBundleIdentifier, did not have a CFBundleIdentifier in its Info.plist

This is the error in the Simulator log com.apple.dt.Xcode[667] : Error Domain=LaunchServicesError Code=0 '(null)' UserInfo={Error=MissingBundleIdentifier, ErrorDescription=Bundle at path /Users/Monica/Library/Developer/CoreSimulator/Devices/A20C808A-5E72-4B1D-847C-AD6C18B479E9/data/Library/Caches/co...
14wml
1

votes
1

answer
446

views

Custom UITableView cell Nib file only shows up after select cell?

When I load my app this is what happens. For some reason the table view loads blank. And only when I select the cell and click another cell does the previously selected cell show up. But for the first cell, no matter where/how I click I still can't see the first cell. I don't understand why this hap...
14wml
3

votes
4

answer
646

views

jQuery functions not working after click button? [duplicate]

This question already has an answer here: Event binding on dynamically created elements? 23 answers What I want to happen When press the add button, a row will be added underneath the add button's row When press the remove button, that row will be removed. When hover or click on a certain input tex...
14wml
2

votes
2

answer
63

views

How to place an object next to another, and horizontally center and right-align it?

What is happening What I want to happen I want the icon-x-circle to be horizontally centered and on the same line as 'Rename' but be right-aligned (probably 30px away from the right end of the header). If someone could let me know how to do that it would be greatly appreciated! Something to note: Th...
14wml
3

votes
1

answer
1k

views

Delegate must respond to locationManager:didFailWithError: even though implemented didFailWithError method

For some reason Xcode thinks I'm not implementing didFailWithError method of the CLLocationManagerDelegate protocol I fail to see what I'm doing wrong, as I literally copied from another SO post that said this didFailWithErrormethod was updated for Swift 3. So I don't understand why Xcode thinks I'm...
14wml
1

votes
1

answer
1.7k

views

The import org.eclipse cannot be resolved…how to install Eclipse Plugin Development Environment?

According to this post I'm supposed to 'install it using 'Help > Install New Software'. Work with the main Mars site and install 'Eclipse Plugin Development Environment'' Is help the same bar as in the Eclispe software? When I google ''Eclipse Plugin Development Environment' I click this link. Then...
14wml
3

votes
1

answer
855

views

How to stop Bootstrap button from defaulting to grey background?

What is happening What I want to happen For some reason, when I click on button-bullet the background-color reverts back to Bootstrap's default grey, even though I set the background-color to #FCC1C5 using jQuery. As you can see in my jQuery code below, I have tried adding the event click and focus...
14wml
4

votes
1

answer
6.7k

views

Why is google font weight not working?

I'm trying to change h1 to font-weight: 300. Except when I did: .h1{ font-weight: 300; } Nothing happened! So to test the font weight on other text elements, I set the entire encapsulating container, container-fluid, to a font-weight: 200: .container-fluid{ font-family: 'Work Sans', sans-serif; font...
14wml
3

votes
3

answer
492

views

Why is background image not showing up for footer?

As seen in the image below, my background image for the footerImage div for my footer are not showing up, even though there is a clearly defined height (50px) and width (100%) for the div as shown by the green border. Why? How do I fix this? Note: It's NOT an image path issue because I can pull up a...
14wml
1

votes
1

answer
113

views

Why is difference between 2 Dates off by 1 minute if use Date()?

For some reason when I use Date() (to get the current date) and then calculate the difference in time, it is always 1 minute off. However, when I hard code a date and calculate the difference in time, it is correct. Why is that and how I can accurately calculate the difference between date right no...
14wml
3

votes
3

answer
79

views

How to animate change in text value using jQuery?

What is happening What I want Instead of having an abrupt transition, I want the numbers to fadeIn for 300ms. So when I click on a number, it fades into view on the #Demo-Card, and if I click another number, then it fades into view. I've been trying to use animate() but to no avail. If anyone could...
14wml

View additional