dan dan

11694 questions
1

votes
1

answer
152

views

Is this a correct implementation of LESS?

Problem Ok so i'm trying to use LESS to allow a CSS called bootstrap.min.css to only apply to one part of my code. As when i apply it globally it screws with my styling. Current Implementation My .less defined in header Contents of Boot.less #bootbox { @import (css) "bootstrap.min.css"; } Usage in...
Dan Cundy
1

votes
3

answer
628

views

running linux command from java, error 500, Cannot run program No such file or directory

im trying to send an email with a Linux command from Java, i admit i don't know much about Linux but i think iv'e tried everything and i'm just really confused, if someone could shed some light for it would be great i export the application to a war file and upload it to a linux server (CentOS) so h...
Dan Levin
1

votes
1

answer
2.1k

views

How do I assign an IBOutlet a value using an Initializer?

I am having difficulty with something that I feel like should be working, I am wondering if there are some things that I'm not understanding about initializing values of IBOutlets. So I've created a class that has three IBOutlets. I then created initializers for those outlet variables. When I create...
Dan Beaulieu
1

votes
2

answer
739

views

react-select cannot set id

Have a react-select component and the id field does not get set? Is it possible to set an id? I have resorted to setting the id of the parent div, but it seems silly I can't do it directly for the select.
Dan Littlejohn
0

votes
0

answer
22

views

Integrating Regex with my custom 'BigStringBuilder' class

Due to the ~2.15 billion element limitation with the .NET Framework (even taking into account 64bit Windows, .NET 4.5+, and gcAllowVeryLargeObjects), I needed to create my own BigStringBuilder to manipulate extremely large strings. Unfortunately, now I need to use Regex on the class. It appears that...
Dan W
3

votes
2

answer
17

views

In TypeScript, what does it mean for an import or export to be “top-level”?

The TypeScript docs say: In TypeScript, just as in ECMAScript 2015, any file containing a top-level import or export is considered a module. Conversely, a file without any top-level import or export declarations is treated as a script whose contents are available in the global scope (and therefore t...
Dan B.
0

votes
0

answer
40

views

How do I “include” code in Java instead of including it in every file?

I have the following Java code that allows me to dynamically change the text in my Android app header bar - retrieving the name from Strings.xml. // Display header title headertitle = findViewById(R.id.header_title); int id = getResources().getIdentifier(getLocalClassName(), "string", getPackageName...
Dan Leach
0

votes
0

answer
3

views

Passing items/keywords to SelectedFilters while using them as tags in ReactiveList

I tried to replicate this example on a local machine with the current version of ReactiveSearch (v3 Web). Everything works fine except for one function (no error shown in console). It's about the "topics" in this example, which are used as tags. In the Codesandbox-example you can click on a tag (or...
Dan
1

votes
1

answer
443

views

VSTS: how to requeue broken build and switch agent queue

Background: We are running Visual Studio Team Services (VSTS) with Gitflow and have been trying to use a private pipeline with local build agents on our laptops. However, our local agents have been having trouble and for a particular pull request, the build is failing against this local agent. I ha...
Dan Csharpster
1

votes
1

answer
58

views

How to make SOAP types not force lowercase after migrating from CF10 to CF2016?

We are in the process of migrating from the latest update on CF10 to the latest update on CF2016. An issue we are running into is that for the webservices we publish, when we previously specified returntype as components the WSDL and response XML preserved the camel-casing. After migrating all of th...
Dan Roberts
1

votes
2

answer
55

views

Convert hash with integers to list with hashes

What's an optimal way to convert this hash: %{ "0" => [ %{"foo" => 1, "baz" => 10} ], "1" => [ %{"foo" => 2, "baz" => 11} ] } to a list like this? [ %{"foo" => 1, "baz" => 10}, %{"foo" => 2, "baz" => 11} ]
dan-klasson
0

votes
0

answer
5

views

Difference in ElasticSearch between scraped data and default set value (via Scrapy) in a text field

I found something really weird in ElasticSearch and I can't get my head around it. Let me first describe how I feed data into ElasticSearch: I use Scrapy to crawl data I use ScrapyElasticSearch as a pipeline to ES In my example I created an index in ES that contains 3 text fields: title, title_alt a...
Dan
0

votes
0

answer
18

views

(Closed) Global variables are not picked up in a different function in python

I am trying to make a code that rolls 2 dice and has some other requirements to look for. I have declared a variable as global but it is still giving me an error I have also tried to put the variables as a condition in the draw() function but this will still not work class DiceGame(): def game(...
Dan Howe
1

votes
1

answer
245

views

How to change the name of a tab in a browser opened by java

So I have code which opens up a file in my documents in my browser with the code below: OpenQuery(){ try { Process p = Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\iexplore.exe"); Thread.sleep(5000); p.destroy(); File folder = new File("C:/Users/SAVAGD05/Documents/RMP/QUERIES/")...
Dan Savage
0

votes
0

answer
110

views

Problem switching between openresty and nginx

I'm trying to switch between nginx and openresty with php using exec. I use this to switch to openresty, exec('/bin/systemctl stop nginx ; /usr/local/openresty/nginx/sbin/nginx -p /usr/local/openresty/nginx'); and this exec('/usr/local/openresty/nginx/sbin/nginx -s stop ; /bin/systemctl start nginx'...
Dan Bray
1

votes
2

answer
69

views

Angular: can't apply a filter to data loaded via $http

I have some data being pulled in from an API in my controller with $http.get I then want to apply a text formatting filter to that text to make it all pretty. However I am getting TypeError: Cannot read property 'split' of undefined all over my console. Here's the code: Controller $http get: $http....
Dan Hodson
1

votes
2

answer
1.2k

views

Ionic - disable animation for nav bar

My app has a static header. Meaning it remains the same in all views. The problem is that when I use the directive the header is animated every time the view changes. On IOS it's not that bad because the entire is sliding in, but on Android it looks like it flickers. How can I disable the animation...
Dan Pincu
1

votes
1

answer
422

views

Using axlsx partials

I am using axlxs and axlsx_rails. I can create inline spreadsheets no problem - for example I have an index.xlsx.axlsx file etc. The problem is I have another action the uses the exact same code so I tried creating a partial _export.xlsx.axlsx and moving my code in there. I then replaced index.xls...
Dan Tappin
1

votes
3

answer
100

views

str_replace function replace placeholders

I've got the following string which has been loaded from a database into $message. Hi,\n\nYou have a new voicemail message from ${VM_CIDNAME} (${VM_CIDNUM}), on ${VM_DATE}.\n\nThank you for using 123 Solutions. I'm trying to str_replace the placeholders in that string with real data, but since PHP i...
Dan_J
1

votes
2

answer
813

views

Simple Injector Register Concrete Type with Lifestyle

I am looking for a way that I can register a concrete type with a specified Lifestyle, essentially something like the following. public void SomeFunction( Type concrete, Lifestyle lifestyle ) => container.Register( concrete, lifestyle );
Dan S.
1

votes
1

answer
572

views

What does `git checkout-index -u` or `--index` do?

The git checkout-index command copies files from the index to the working tree. The documentation includes a cryptic remark about its -u or --index command-line parameter: -u --index update stat information for the checked out entries in the index file. What is "stat information?" What's the differe...
Dan Fabulich
1

votes
3

answer
167

views

ggplot strange ordering of stacked bar

I am attempting to create a diverging stacked bar like here, and am experiencing a similar issue to this SO question. My approach is slightly different though as I am managing it all via a single dataset, rather than two and my colours are independent of my data. Reprex as follows: library(tidyverse...
Dan
1

votes
1

answer
195

views

RequestFactory & reverse with pk (must be called with either an object pk or a slug)

So I have this code: request = self.factory.get(reverse('portal-edit-automation', args=(self.rule.id,))) response = EditAutomation.as_view()(request) And if I set a pdb break point right before it and do: (Pdb) reverse('portal-edit-automation', args=(self.rule.id,)) u'/portal/automations/edit/1/' I...
dan-klasson
1

votes
1

answer
2.8k

views

How to get the Transaction ID using PayPal Express Checkout Integration (Client-side REST)

I would like to get the transaction ID once the Paypal payment is succesfull. I am using Paypal Express Checkout (Client-side REST). Please find below my code for the payment button. My objective is to be able to update the MySQL database to (1) confirm the order and (2) include the Paypal transacti...
Dan
1

votes
1

answer
134

views

Query for average scores of all game results in a collection?

My app stores game results that can have a final score in the range of -30 to +30 in a field called score. How do I query for the overall average of all the game results?
Dan McGrath
1

votes
1

answer
1.2k

views

BottomNavigationView : FrameLayout vs ViewPager

I am implementing a BottomNavigationView in my app, but no tutorial I've seen has made this clear. Should I use a FrameLayout (like here), and have my fragments appear and disappear, or a ViewPager (like here) with an Adapter, and have my fragments swipe like with a TabLayout? What are the pros an...
Dan Chaltiel
1

votes
1

answer
817

views

“Subclassing” traits in Rust

I have a situation where several of my structs should implement multiple traits, but all of them implement at least one trait in common. When I get hold of a mixed bag of these structs, I want to treat them all as being of the common trait: pass them as method parameters typed to that trait, store...
Dan Wiebe
1

votes
1

answer
3.6k

views

React Component Mounting Twice

Inside a small portion of my React/Redux/ReactRouterV4 application, I have the following component hierarchy, - Exhibit (Parent) -- ExhibitOne -- ExhibitTwo -- ExhibitThree Within the children of Exhibit, there are about 6 different possible routes that can be rendered as well. Don't worry, I will e...
Dan Zuzevich
1

votes
1

answer
535

views

error: --mirror can't be combined with refspecs

I mirrored a git repository and deleted application.properties containing passwords from the MyProject repository. I can see the message under Deleted files and my file name below: $ java -jar bfg-1.13.0.jar --delete-files application.properties --no-blob-protection MyProject.git Using repo : \\hnas...
Dan
1

votes
1

answer
959

views

Building Electron Application with electron-builder in Angular 5

I am creating an electron application that is utilizing an Angular 5 application as the front end. I am able to run the application in a development mode by running npm run build && electron . to trigger the electron instance and load up the angular site. However, when building using npm run dist ba...
Dan Patil
1

votes
2

answer
52

views

Which loop should I use to remove all data entries within a table using Selenium?

I need to code out a loop to remove all entries within the table. To remove the entries, I need to use Selenium to 'tick' the delete checkbox and click on 'save'. However, every entry has a unique 'checkbox' name. The first entry will be called delete0, the second entry is called delete1 and so on s...
Dan
0

votes
0

answer
21

views

Pushing data to objects.name using a function? [duplicate]

This question already has an answer here: Dynamically access object property using variable 11 answers JavaScript set object key by variable [duplicate] 2 answers If I wanted to do something very simple like this how would I use an function with one input to store data into an object. this.Data =...
Dan Loze
1

votes
2

answer
2.4k

views

.htaccess add trailing slash on pages except when #'s are in the URL

I want my URL's to add the trailing slash, but only when the URL does not end with an anchor. Here's my current .htaccess file # ---------------------------------------------------------------------- # Enable Rewrite Engine # ---------------------------------------------------------------------- Rew...
Dan
2

votes
3

answer
51

views

Destructuring objects from an array using map?

I have wrote this simple code that destructures an array of objects to build new arrays from each key. I am learning ES6 and would like to refactor it into one line of code using destructuring but I dont fully understand how too. let candles = [{ open: 1, high: 2, low: 0.5, close: 1.5, volume:...
Dan Loze
4

votes
1

answer
140

views

DataTables not found in Angular Datatables using Webpack Encore

I've been upgrading a Symfony application from 3.4 to 4.2.2, everything is fine but I cannot get DataTables to function via yarn install and webpack encore with angular-datatables. How I've set it up Yarn install: yarn add [email protected] yarn add [email protected] yarn add [email protected] yarn add...
Dan
1

votes
1

answer
835

views

Retrieving a youtube playlist without asking the user for login

is it possible to retrieve a public youtube playlist with the google-api-objectivec-client without asking the user to login in order to perform the OAuth 2.0 authentication? I'm working on an app which should retrieve a playlist from youtube and play related videos, but I cannot and don't want to as...
DAN
0

votes
0

answer
4

views

Twilio Error - 52134 Invalid APNs device token, happening only on my devices

Following is the issue which I've been struggling to fix. Twilio Error - 52134 Invalid APNs device token As you can see from above I've gone through every possible scenario and finally it all came down that only my devices are throwing this error. App is live now and it doesn't show error on other...
Dan
1

votes
1

answer
87

views

How can I locate the currently open tab in the project?

In Webstorm I have a bunch of tabs open. How can I locate the file in the current tab within the Project tree?
Dan Dascalescu
1

votes
2

answer
4.2k

views

One Producer, multiple Consumers

I have been working on some code, but I need help. I have created one producer and one consumer, however I need to create multiple consumers who will consume the specific String from the producer e.g. I need a consumer that will consume specifically 'Move Left Hand'. Contained in the code is the bu...
dan carr
31

votes
8

answer
1.7k

views

Pointers and access to memory in c. Be careful

Still learning more C and am a little confused. In my references I find cautions about assigning a pointer that has not been initialized. They go on to give examples. Great answers yesterday by the way from folks helping me with pointers, here: Precedence, Parentheses, Pointers with iterative array...
Dan

View additional