Stephen

1

votes
2

answer
381

views

boost python won't auto-convert char* data members

I'm trying to wrap a C++ api and I'm hitting a roadblock on some char* class members. It seems that boost-python will auto convert char const * and std::string types into python objects (based on this answer), but it balks at char* types. This is the error I get (in python): TypeError: No to_python...
Stephen
0

votes
1

answer
20

views

Check multiple regex patterns

I am working on a calculator for feet and inch calculations. I currently have a program that works but so far I can only get it to work if you input the full measurement (ie 4'-0" instead of just 4' or 0'-6" instead of just 6"). I would like to be able to have it check against a few patterns as to b...
Stephen Lauer
1

votes
1

answer
421

views

Rails multiple registration paths with Devise

I'm using devise in rails, and I'm trying to create a second registration path, the default registration path for users (which works perfectly), and a second registration path whereby a user registers and creates a project in a single action as a "Getting Started" action (Think Freelancer.com or any...
Stephen
1

votes
1

answer
17

views

Appending to attribute of a specific object, where objects are stored in a dict

I am having trouble appending an element to a list, where the list is an attribute of a custom class I have created. The object containing the list should be accessible through a dict. For context, I am creating a game which can have multiple players, each player has a 'Player' object associated wit...
Stephen Mason
1

votes
2

answer
78

views

NodeJS - Can I detect when called from command line (ES6 + Babel)..?

In my module I need to detect when it's being called from either the command line, or from another module. const isFromCLI = '????' I'm using Babel/ES6, so when called from a command line, index.js is called (with the babel code), which hands off to script.js (with ES6 code). So from the script file...
Stephen Last
1

votes
3

answer
759

views

Vue.js 2: Vue cannot find files from /assets folder (v-for)

I am using Vue-cli 3 with Webpack, and my folder structure looks like this: /public /src /assets p1.jpg p2.jpg App.vue main.js I read in several places that in order for Webpack to know where your /assets are, you should use require() if you are in Javascript land. I have determined that this code w...
Stephen
1

votes
0

answer
14

views

Error - Visual studio 2017 community with C# language using zeroMQ cannot find libzmq or libsodium

Using VS2017 Community, up to date, on Win7, up to date, using the nuget zeroMQ package "Install-Package ZeroMQ -Version 4.1.0.27" for project, on creating the hwclient C# program compilation is successful as a windows form. On running it - get error that zeroMQ.lib cannot find libzmq.dll, or that...
Stephen Roesner
-1

votes
1

answer
20

views

Get getting this Error Code when uploading Wordpress site

I am trying to upload a website to my host provider for a client. Having done so in the past with no real issues today I have come up against the following Error; Error - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use...
1

votes
1

answer
28

views

regex: \w EXCEPT underscore (add to class and then exclude from class)

This question applies to Python 3 regular expressions. I think it might apply to other languages as well. The question could easily be misunderstood so I'll be careful in describing it. As background, \w means "a word character." In certain circumstances Python 3 will treat this as just [a-zA-Z0-9_]...
Stephen
0

votes
0

answer
5

views

How to regenerate the dependency bundle for ruby?

When install ruby, there are some dependency bundles created. For example, readline.bundle in lib/ruby/2.6.0/x86_64-darwin18folder. The bundle is based on the version installed on the system, and I have readline 7.0 currently. Now I upgraded the readline to 8.0.0, does anyone know how to regenerate...
Stephen
1

votes
1

answer
914

views

Linq To Entities Group By with multiple tables in key

With a table structure along the lines of: TableB TableC I need to run a query in Linq to EF that does this: SELECT SUM(TableC.SomeColumn) FROM TableA a INNER JOIN TableB b ON a.Id = b.fkAId INNER JOIN TableC c ON a.Id = c.fkAId WHERE GROUP BY c.Col2, c.Col3, b.Col5 I have this so far, but I can't...
Stephen York
1

votes
2

answer
130

views

Python variable working outside of function, but not inside

I have an issue where I am trying to copy feature classes into a geodatabase. I am looping through all the feature classes in the folder and copying only the polygon feature classes. My problem is, that when I copy the first polygon feature class it renames it 'shp', and then tries to name the sec...
Stephen Ruhl
1

votes
3

answer
971

views

Remove left and right padding in recyclerview list

I have been loading images in recyclerview list. In that left and right side of the image having some padding. I need to remove those padding.But I'm not sure how the paddings were added at left and right side of the recyclerview items. Below I have posted the screen shot and code relevant to this:...
Stephen
1

votes
3

answer
605

views

Ionic serve / ionic run not reflecting changes

Both ionic serve and ionic run are not reflecting any of my latest changes. ionic serve is showing them from a few hours ago, and ionic run is showing them from about an hour later. Since then, I've discarded all my changes, and created a new branch from the parent--yet it's still showing those same...
stephen
0

votes
0

answer
4

views

Selecting all rows based on a distinct column in .NET CORE 2.1 and Entity Framework

I have a table with some data which I want to select rows with unique dates using the .NET core entity framework. I want to return the results as a list of the unique rows. Here is the code. var rowsToReturn = await _context.Records .Where(b => b.SId == bId) .Select(d => d.Date) .Distinct() .OrderBy...
Stephen Mutua
1

votes
1

answer
974

views

SQL Server Import/Export: Enable Identity Insert

I'm using the SQL Server 2014 Import and Export Wizard to copy data from one SQL Server instance to another. I have 8 databases, each with 63 tables, so 504 tables in total. The Import/Export works just fine, data flows across into the destination database. The issue I have is that I need the Enabl...
Stephen Last
1

votes
1

answer
71

views

Set no header for all components React-Native

I have 4 components which all have static navigationOptions = {header: null} defined. But that it's very time-consuming when you define that in each component. So I define {header: null} in createStackNavigator but the header still appears at the top of the component. Can you guys help ? import { cr...
STEPHEN bui
1

votes
1

answer
34

views

WHERE clause in MDX for Dynamic Management Views

I am trying to query the metadata from a tabular cube using DMVs. I was able to get it to work without a where clause, but I can't seem to get a where clause to work. Any Advice? Here is the code that works: SELECT [MEASURE_CAPTION] AS [Measure] ,[MEASURE_IS_VISIBLE] AS [Visable]...
Stephen Re
1

votes
1

answer
122

views

What does “error: '.class' expected” mean and how do I fix it

Occasionally, new users encounter the following rather obscure compilation error '.class' expected: double d = 1.9; int i = int d; // error here ^ error: '.class' expected Some Java IDE compilers state this slightly differently; e,g, error: insert ". class" to complete Expression What do errors li...
Stephen C
1

votes
3

answer
35

views

How to get the current element when event on child?

I have an event listener on child element but I want to get the current element. Example code: $(".video").on("click", "img", function(e) { console.log(this); console.log(e.currentTarget); }); Video 1 Video 2 In this example, I want to get the .video element, not img. What's the best way to do...
Stephen
1

votes
3

answer
508

views

How to submit an object of data via POST, not ajax

My data looks like this, it's just an object, with two objects in it (each representing the data of a form). Object {x__sf: Object, x__mx: Object} x__mx: Object country_id: "1" input1: "" input2: "" ... x__sf: Object ... I think I'll have to make a temporary form in memory and submit that? I'm not s...
Stephen Bugs Kamenar
1

votes
2

answer
1k

views

WordPress, enable comments on specific PAGES?

I know how to enable/disable comments on all pages. But how can I enable only a few, WITHOUT USING THE UI. In functions.php I just wanna go if($this_is_a_page_i_want_comments_on) { enable_comments(); } enable_comments(); doesn't exist, this is the part I need help with. I could do this using WordPre...
Stephen Bugs Kamenar
1

votes
2

answer
2.3k

views

In the WinForms DevExpress XtraWizard control, how can one hide the back button?

I know that if I set the WizardStyle of an XtraWizard control to WizardAero, it will remove or hide the back button from the first page instead of simply disabling it, as can be seen here. I want the same behaviour, but I want to keep the WizardStyle as Wizard97. Is this possible, and if so, how?
Stephen Oberauer
1

votes
1

answer
5.1k

views

Codeigniter can only access default route controller

I suspect this may be a webserver configuration change that has taken place, and my hosting provider hasn't told anyone, but anyway... I have a Codeigniter instance set up with the following directory structure: /root /codeigniter /app /sys /www /sandbox /ci /js /css /img .htaccess index.php Therefo...
Stephen Wright
1

votes
2

answer
13.9k

views

How does one implement a job queue in .NET?

I have a Windows service that processes jobs. A job in this service is a sequence of actions, such as: A -> B -> C -> D -> E Each job is supposed to be completely independent from other jobs. The current implementation processes each job on its own thread (in this case, new System.Threading.Thread),...
Stephen Booher
1

votes
2

answer
234

views

Spam accounts being created via Facebook login

I've got a Rails App that uses Facebook for user accounts, and as of this evening, someone in Vietname has decided to (for whatever reason) use a bot to create fake accounts on my site using fake Facebook accounts. I'm getting about 2 new fake accounts / minute. I've temporarily disabled registratio...
Stephen Corwin
1

votes
1

answer
1.5k

views

UserControl accessing DependencyProperty via RelativeSource Self

I have been having a problem using RelativeSource Self in a UserControl. I have contructed two UserControls that I thought would be identical in operation, but one works and the other doesn't. The User Controls themselves consist of just a label whose content I want to set to the DependencyProperty...
STEPHEN DICKINSON
1

votes
1

answer
254

views

MYSql Load Contents Of URL INTO Table

I was wondering if there is a way of inserting into a table the return value from a url Something like LOAD DATA 'http://www.google.com' INTO TABLE test_table
Stephen Bouffe
1

votes
1

answer
2k

views

SWT Tree and TreeItem: Remove or change the drawing behavior of the expand/collapse indicator

I'm working in SWT (no JFace), and I'm attempting to customize the behavior of a Tree that I'm using a sidebar. The top-level items in the tree shouldn't be selectable; they're basically headers. Only the children of these items should be selectable. As a result, I would like the UI to behave in a...
Doug Stephen
1

votes
1

answer
70

views

Scrollbars appear without content overflow

I have a simple CSS loading indicator for a basic web app that uses Webkit radial gradients and animation. However, during the loading process, both the horizontal and vertical scrollbars appear. Resident Manager Portal html, body { width: 100%; height: 100%; background-image: -webkit-radial-gradien...
Stephen Cluff
1

votes
1

answer
3.2k

views

Flattening a nested object

I have to convert JSON to the format below, I'm having a problem converting it back. Here is the current format [{ "id": "5", "parentid": "0", "text": "Device Guides", "index": 0, "children": [{ "id": "10", "text": "Grandstream GXP-21XX", "index": 0 }, { "id": "11", "text": "Polycom Soundstation/Sou...
Stephen
1

votes
1

answer
904

views

Can I see dynamically-generated CSS source in Chrome DevTools?

I loaded a Javascript widget that outputs HTML, CSS, and additional Javascript. The source of the page (test.html) is just Widget Test The script executes and generates a widget. I can see the HTML nodes in the Element tab of Chrome DevTools. When inspecting a particular element, the inspector say...
Stephen
1

votes
2

answer
5.6k

views

Angularjs $anchorScroll not working in ng-view

My script is based on http://plnkr.co/edit/De6bBrkHpojgAbEvHszu But all my links with the ID anchors are within the view, and every time their clicked it doesn't take me to the element it just reloads the view. Any ideas? The script I'm using /*Intercept onpage anchor hash usage: Test/Foo */ Site.ru...
Stephen
1

votes
1

answer
63

views

Prevent the same setFlash() message from being output on every page

I am new to CakePHP and have inherited a project which uses CakePHP v1.3 and displays various messages to the user using $this->Session->setFlash(). One such instance where the message is displaying is after a successful login to the site. The problem is, the same message will pop up on every subseq...
Stephen Paul
1

votes
1

answer
607

views

Eclipse4 RCP Standalone Product : Class Not Found Expection

I have created two plug-in projects. The first declares my views, I'll call this my component project. The second declares my product, application and perspectives, incorporating various views from my component project, I'll call this my product project. Launching from Eclipse everything works fine,...
Stephen Baier
1

votes
1

answer
5.5k

views

Laravel 4 IP based users?

I'm not sure what the term for this is, but I want everyone who visits the site to have their IP entered in the users table so I can transparently keep track of them. It'd be nice if they could sign up normally if they want at some point too. Is there a proper way to do this in Laravel 4? Edit: I wa...
1

votes
1

answer
117

views

How much memory can I use when preloading textures?

I am trying to decide if I should preload all of my textures on a loading screen in my game, but I don’t know how much memory I can use for this. I looked around the web and I found where someone said that you can preload all of your textures as long as it is 80MB or under. If this is correct does...
Stephen
1

votes
2

answer
1.1k

views

How can you use generics to make universal methods in Java?

I have two classes, classB and classC, that both extend classLetters. In a separate class, which classB and classC call to, there are two methods: getBType() and getCType(). The code within the two is near duplicate because they both do the same thing, except one grabs B types and one grabs C typ...
Stephen D
1

votes
2

answer
133

views

Javascript this keyword and variables pointing to an object method [duplicate]

This question already has an answer here: In Javascript, why is the “this” operator inconsistent? 8 answers How does the “this” keyword work? 21 answers I'm trying to understand how the this keyword works in this context. function Person(name) { this.name = name; this.sayName = function()...
Stephen
1

votes
1

answer
93

views

IDLE throwing error for no reason [closed]

Ok so im absolutely stumped with some super basic python coding. I feel like an ass for having to ask this but here goes. im attempting to build a basic port scanner. im using code that i have absolutely used before and has worked. yet my IDLE is throwing up errors each time my code is run. my code...
Stephen Davies

View additional