Liam

0

votes
0

answer
16

views

Retrieving Data from Webpage Chart in R

https://index.rugbypass.com/rpi/internationals/new-zealand/jack-goodhue/ The above is a rugby profile for one of the greatest players alive - Jack Goodhue. On there, there is a chart with his 'ranking' over the last 365 days. I wish to retrieve this data using R. Inspecting the page shows there is a...
Liam Young
1

votes
0

answer
7

views

What is the syntax for MariaDB 'IN NATURAL LANGUAGE MODE'?

According to the MariaDB documentation: There are no special operators, and searches consist of one or more comma-separated keywords. The search clearly does not need to be comma-separated, as replacing commas with spaces gives the same result. I assume that it breaks the string into separate keywor...
Liam
1

votes
1

answer
630

views

Android scrollview: scroll down automatically over a period of time [closed]

I am currently working on an app, this one: http://90kids.com/level-dash/ and i can't figure out how to make my screen scroll automatically like ther. Any help is appreciated
Liam Mertens
1

votes
2

answer
42

views

PHP, Function breaks when numbers are passed in as arguements

I have the following function which works well, if I call it with only the first parameter: function max_months($vehicle_age,$max_peroid,$no_older) { $tot_age_in = $vehicle_age + 315360000; while ($tot_age_in > 536467742) { $tot_age_in = $tot_age_in - 31536000; if ($tot_age_in < 536467742) { $max_...
Liam Fell
1

votes
1

answer
974

views

Compile as release in visual studio using command line

I am using visual studio 2013 to compile c++ code on the command line (cl.exe). I understand that when using the ide, there is an option to compile in release mode or debug mode. Does this option exist for the command line compiler as well? How can it be accessed? I have looked at all the options a...
Liam
1

votes
2

answer
38

views

Create this JSON output in PHP?

How can I create this JSON output using PHP? { 'external_ref': '12345', 'sale_datetime': '2016-03-01 22:09:00', 'customer_name': 'Foo Bar', 'shipping_address_1': '123 Test Street', 'shipping_address_2': '', 'shipping_address_3': 'City', 'shipping_address_4': 'County', 'shipping_postcode': 'AB12 3AB'...
Liam McArthur
1

votes
1

answer
56

views

Umbraco Non-Page Items

I've been working quite a bit with the Sitecore CMS, and I'm now trying to learn Umbraco. What is the best method/practice for creating non-page items in Umbraco? In Sitecore, I would create items outside the web site's content tree, and access them via the API in my controller. As a practical examp...
Liam Smith
1

votes
2

answer
34

views

Replace multiple substrings in PHP without going over old ones

When trying to use PHP's str_replace function to replace multiple substrings, is there a way to get it to ignore the strings it's just replaced? For example, when executing the following code block, it replaces the 'o' in '' from the first replacement. $str='Hello world.'; $old=array('e','o'); $new=...
Liam Hammett
1

votes
1

answer
328

views

Checking Servers with Motor(Mongodb & Tornado)

I need to create a function that checks to make sure Mongo servers are running using the ping function. I set up the clients right there (the config file has dictionary with ports numbers) clientList = [] for value in configuration['mongodbServer']: client = motor.motor_tornado.MotorClient('mongodb:...
Liam Paris
1

votes
1

answer
150

views

Variables not available using wp_localize_script()

I am attempting to make two variables accessible to a JS script in wordpress using the wp_localize_script(); function. I'm registering, localizing and enquing my scripts like this, as per the codex. wp_register_script( 'overview-map-js', '/js/overview-map.js'); $translation_array = array ( 'latitude...
Liam Fell
1

votes
1

answer
115

views

Store multiple variables as a single hex string

I am looking for a way to store a few variables in one variable so i can output a string. for example, I have variables; int flow_val = '128'; int numb_val = '104'; int size_val = '256'; I can put them together using $display like this $display('32'h%0h%0h_%4h', flow_val, numb_val, size_val); to pri...
Liam P
1

votes
1

answer
166

views

How can I get a list of a specified field from a Sails JS Waterline collection?

I have a MySQL table with a url column and I want to get a list of every url value in the table. Structure: In PHP using Laravel I could have done something like this to get an array of every url column value: $boards = Board::all()->lists('url'); However, I cannot figure out how to do this using S...
Liam Potter
1

votes
3

answer
44

views

Difference between returning a parent type or child type

I was wondering (and pardon if this is a repeat question, but I could not find information specifically regarding my question) what the difference between defining a method as returning a parent type or child type. Here is my specific scenario: Imagine the following classes and interface: public int...
Liam
1

votes
1

answer
520

views

Adding int and int? in Kotlin

I ran into a problem, which seems so simple that everyone should have ran into it at some point or another, yet failed to find a solution anywhere. Copied from the REPL: var a : Int = 1 var c : Int? = 3 a + if (c != null) {c} else {0} ERROR: None of the following functions can be called with supplie...
Liam Lime
1

votes
2

answer
218

views

How to set recipients with Gmail's Node.js API

As simple as it may seem, I cannot seem to figure out how to set recipients of a draft with Google's Gmail API. The documentation says that a users.messages Resource object contains a payload object that contains a headers object, and that headers object contains name-value pairs. // example from go...
Liam Mueller
1

votes
1

answer
37

views

How to print samples/observations/rows of any one cluster using scikit learn/pandas/python?

Very basic question: How do I print the observations attributed to any one cluster? data = pd.read_csv('my_file.csv') X = data[['Var1','Var2','Var3']] ms = MeanShift() ms.fit(X) labels = ms.labels_ cluster_centers = ms.cluster_centers_ I'd just like to see the values of 'Var1','Var2','Var3' for any...
Liam Hanninen
1

votes
3

answer
68

views

Fonts on wordpress

I am trying to get a custom font to work on my WordPress site which is using an already-built theme (hosted by azure). The theme has no option built-in to change/add a font. The font that I am using works on another website. The file format is .oft . I have disabled caching server side. I am able to...
Liam
1

votes
1

answer
170

views

What is the distinction between local and greedy algorithms?

I'm creating a simple LPT heuristic algorithm in python in order to solve a timetabling problem. The LPT algorithm I'm employing is greedy. I'm struggling to understand the distinction between greedy algorithms and local algorithms though. From my understanding a greedy algorithm is an example of a...
Liam Fell
1

votes
1

answer
2.5k

views

pandas groupby + list

New to pandas so sorry if this is old hat. What I'm trying to accomplish is similar to what is contained in grouping rows in list in pandas groupby, but I have more than two columns and can't figure out how to get all of my columns displayed along with the grouped value. Here's what I'm trying to do...
liam
1

votes
1

answer
63

views

canvas x y coordinate detection

I am making a mini-game and cant seem to be able to get my player to move around the green square but not go through it. When i try my current code the character can move near it but not got passed the x, y coordinates of the green square. Please help #canvas{ background-color: black; } var canv...
Liam Sperry
1

votes
1

answer
85

views

How are numbers encoded in unicode with right-to-left languages? (Normalisation)

During an Information Retrieval lecture, there were slides talking about the lemmatisation and/or normalisation of tokens for indexing and querying text documents. One of those mentioned right-to-left languages such as Arabic, but in unicode they're encoded logically/sequentially in the same manner...
Liam Gray
1

votes
1

answer
28

views

Trying to start program on JButton press

I am trying to make a simple program that will ask the user a question and then compare their answer with a stored correct answer. The problem seems to be that the main loop of the program is not running when I click the Ready JButton. I tried changing the main method to another non-default name and...
Liam Hait
1

votes
2

answer
28

views

drawing more on the canvas without having to create more script tags

I've been attempting to create a ecology simulation and so far its been going good. The code below does work I'm just wondering if theres an easier way to draw more items on the canvas with code instead of manually doing it. The way I'm doing it makes me consider the lag because I will be adding a l...
Liam Sperry
1

votes
1

answer
6k

views

Python error: missing 1 required positional argument: 'self' [duplicate]

This question already has an answer here: TypeError: Missing 1 required positional argument: 'self' 5 answers I'm brand new to Python, and I'm trying to learn how to work with classes. Does anyone know how come this is not working? Any additional tips about the keyword 'self' would be greatly appre...
Liam Hayes
1

votes
2

answer
14

views

Only displays the message intended for entering yes no matter what you input

When I run this code no matter what I input it always comes out as 'I agree!'. Any help is appreciated! Pizza_opinion = input('Does pizza taste good? ') if Pizza_opinion == 'Yes' or 'yes': print('I agree! ') elif Pizza_opinion == 'No' or 'no': print ('I disagree...?')
Liam W
1

votes
4

answer
27

views

function parameters are returning undefined

I'm having a problem with my function syntax, when I call the function and give its two parameters strings the output is always undefined. I don't understand why its doing this, I was also wondering if this could go on the code review part of stack exchange since its bug free. Any answers would be g...
Liam Sperry
1

votes
1

answer
396

views

Change Spring input validation language

I have a web application that exposes RESTful services with Spring Boot. I added validation on my models with the Hibernate implementation. Example : public class PersonForm { @NotNull @Size(min=2, max=30) private String name; @NotNull @Min(18) private Integer age; ... } The problem is that the mes...
Liam
1

votes
1

answer
431

views

How to specify the range 'in:' argument of Swift 3 method range(of:options:in)

Trying to use the method like this: let myrange = 0...3 let rang = data.range(of: data, options: NSData.SearchOptions(), in: myrange) Get the following error. cannot convert value of type 'CountableClosedRange' to expected argument type 'Range?' Documentation for method here: https://developer.apple...
Liam G
1

votes
1

answer
247

views

Swashbuckle.OData doesn't add controller if I change the Entity Set name

I have Swashbuckle.OData working with OData (4.0) in an Web Api project. It's all working fine, but when I change the 'Entity Set' name in the OData config, the OData controller no longer shows up in the swagger JSON file, and consequently the Swagger UI. This works: builder.EntitySet('AccountReco...
Liam Fleming
1

votes
5

answer
105

views

How to display all record from left table using left join in my case using SQL Server?

Actually I got my output, But it partial. In my left table I have all the records, But when I do filter in right table it is not bringing all the records from left table
Liam neesan
1

votes
1

answer
780

views

Filter the data from the return of HTTP Call - Angular

I am creating a project which uses a HTTP get from a web service and returns an array of projects, with ID, name, description etc. Previously, before I created my filter, the get returned a list of 60 elements using an ngFor in the HTML file: There is many projects within this web service but I am...
Liam
1

votes
1

answer
33

views

Argument required when calling function

I have a package which has the following documentation structure: CLASSES builtins.object EClient class EClient(builtins.object) | Methods defined here: | | __init__(self, wrapper) | Initialize self. See help(type(self)) for accurate signature. | connect(self, host, port, clientId) |...
Liam
1

votes
2

answer
40

views

Error “The expression ['$Agent.NUnit.3.0.Path$' exists] evaluated False” when trying to run NUnit from final builder?

I'm trying to run some unit tests using Final Builder Continua but nothing I try seems to work. I've configured a Unit test stage: But everytime I run the build I get the error: The expression ['$Agent.NUnit.3.0.Path$' exists] evaluated False then the whole thing hangs. There are several issues repo...
Liam
1

votes
1

answer
53

views

Determining the difference between error_reporting(0) and pre-pending @ in PHP

Having written a custom error handler for a PHP system I'm trying to figure out how to determine if the error reporting level (which can be obtained via error_reporting()) has been globally set to Off (0) or has been disabled for that line only using the @ prefix The issue at current is that for bot...
Liam Freke
1

votes
1

answer
41

views

Dataframe write to cvs failed

I am using the following code to save data into a cvs file: filename='shareListing.csv' allshares=pd.read_csv(filename) i=0 for item in allshares['Code']: try: print item ebitdata=fdata(item) allshares.loc[:,('endDate')][i]=ebitdata[0] allshares.loc[:,('EBIT')][i] = ebitdata[1] print ebitdata[1] exc...
Liam
1

votes
2

answer
103

views

React & Redux Reducer not changin

I have a React app built using Redux and React I'm trying to post data. Everything works fine, but I don't know why the reducer doesn't return the action. Does that make sense if I render fetch function after post function? I don't think react works like this way. scr/actions/userAction.js export f...
Liam
1

votes
1

answer
162

views

Beautiful Soup not pulling all the html of a webpage

I'm trying to practice using BeautifulSoup. I am trying to pull the image address of football player images from this website: https://www.transfermarkt.com/jordon-ibe/profil/spieler/195652 When I 'inspect' the code, the section that has the img src is below: imago So I was thinking that...
Liam Gower
1

votes
2

answer
217

views

Pandas Apply and Loc - efficiency and indexing

I want to find the first value after each row that meets a certain criteria. So for example I want to find the first rate/value (not necessarily the first row after) after the current row that increased 5%. The added column would be the last 'first5percentIncrease' and would be the index (and/or va...
Liam Hanninen
0

votes
0

answer
14

views

How to assign the result of a function to a variable

I'm working on a C++ project where the goal was to create a program that would run and process a text file one line at a time. Everything has worked beautifully so far until I was tasked with creating a new variable and assigning the result of a function to it. Here are the full instructions and th...
Liam Shaw
2

votes
2

answer
17

views

How to read the value from Json Stringify in my case?

After I validate user login, if it failed it will show the following error message jquery console.log('Full error = ' + JSON.stringify(showError)); console.log('test 1 =' + showError.responseText); Error message Full error = {'readyState':4,'responseText':'{\'error\':\'invalid_grant\',\'error_desc...
Liam neesan

View additional