Albert
2020 questions
3
votes
0
answer
20
views
Computational graph vs (computer algebra) symbolic expression
I was reading Baydin et al, Automatic Differentiation in Machine Learning: a Survey, 2018 (Arxiv), which differentiates between symbolic differentiation and automatic differentiation (AD). It then says:
AD Is Not Symbolic Differentiation.
Symbolic differentiation is the automatic manipulation of [sy...
1
votes
1
answer
24
views
Can Azure change a users OID?
we are going to be storing users information in Cosmos. Storing their information against their email address is not an option. Instead, we are looking at storing against OID.
Can Azure change a users OID?
1
votes
2
answer
1.2k
views
How to direct traffic to different servers per geographic location?
If I have servers placed across the globe through AWS, Rackspace, some other cloud, or even bare metal, how do I direct traffic from, say Singapore, to a server instance living in the Asia region?
Is it some kind of load balancing, or DNS type things I would have to configure?
Thanks!
1
votes
3
answer
1.2k
views
Django SECRET KEY error
I'm building a little Django REST API. I've configured a separate settings module for local and production but I'm having an annoying error which is:
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting
must not be empty.
This error doesn't make sense because I have the SECRET_KEY var...
1
votes
0
answer
25
views
Create a Custom Toolbar programatically on Android
I have an app with some behavior. As an upgrade I'm going to add a Toolbar to the app. I know, I can do it putting de XML on each activity. But I want to create a Layout XML for the action Bar and inflate on each activity on the OnCreate method.
This way I think I can add the bar whenever I need it...
1
votes
0
answer
216
views
~200ms delay in Windows Sockets - why?
I have a performance problems with a TCP connection on Windows. My server sends a message to my client (frame 1049), which the client is supposed to answer immediately. The client does answer the message, but only with a delay of 188ms (frame 1057).
The PSH bit of the server message is set.
Since 18...
1
votes
1
answer
169
views
How to add a custom menu to an actionBar
I am working in an app with this kind of structure:
The app has no initial ActionBar so I add it on the OnCreate on each Activity this way:
android.support.v7.widget.Toolbar barra =(android.support.v7.widget.Toolbar) getLayoutInflater().inflate(local.quick_stuff.R.layout.barra_herramientas,null);
Li...
1
votes
0
answer
142
views
Loading Information onto XIB files from Firebase with Koloda View
I just started programming with Swift a few months ago so to help me learn, I'm working on a project similar to Tinder using Koloda View. I'm using Firebase as my backend. The code I have included below works fine with 6 images assets of cards but I'm trying to figure out a way to create a card for...
1
votes
2
answer
37
views
@ORM\OneToMany Is retrieving the virtual deleted entries
I have a relation in Doctrine2 @ORM\OneToMany, suposing that i have table school and student, in the entity school i have the @ORM\OneToMany column students,
and i also have a virtual deletion column deleted_at, so every student that has the deleted_at different of null is a deleted student that is...
1
votes
0
answer
129
views
Project references break after adding a nuget import project (“.targets”) file
We have a project that requires a pre-build task - signing a DLL without source code. For this, we're using Brutal Dev StrongNameSigner, which works well.
Recently, we've added this package from nuget - this adds an entry in the csproj such as the following:
That line picks up information such as en...
1
votes
1
answer
90
views
Django 2 versions of german
I'm developing website with 2 versions of german (Default and Austrian).
My problem is that template do not differ them, so in select django displays them both as Deutsch(de).
Languages in settings.py:
('en', _('English')),
('de', _('German')),
('de-at', _('Austrian'))
template code:
{% csrf_token %...
1
votes
1
answer
42
views
When printing auth::user() in the other page, it becomes null
I'm still new in here and new in Laravel. Last time, when I redirected to another page and printed Auth::user() in the blade.php, it worked fine. Now, when I am printing Auth::user()->name on the redirected page, it becomes null.
Here's my code:
route.php
1
votes
1
answer
618
views
Swift: How to check if user's phone number is already in Firebase database before creating a new user
I just started working with Swift a few months ago and to help me learn the language better, I am creating a chat application. For the sign-in method, I am using the phone number method. I have the onboarding process already created but I want to implement something that lets me check if the user ha...
1
votes
1
answer
349
views
PHP Intervention-image, avoid none image and exceptions to crash execution
I am building a filemanager. When I fetch all files, I make sure I have a thumbnail for the filemanager instead of loading big images into the view.
Problem
If the file is not an image, the intervention library will throw an exception. Of course, this is how it should be.I have a simple file extensi...
1
votes
3
answer
1.4k
views
import_meta_graph fails with Data loss: not an sstable (bad magic number)
Context
I came across this problem while trying to solve another error. The first error (original problem) was that when I tried to restore a meta graph I would get Cannot find KeyError: 'The name 'multi_rnn_cell_6' refers to an Operation not in the graph.'. In trying to create the MVCE for that pro...
1
votes
2
answer
61
views
Optimizing code for matching 2 values on 2 sheets
I have a customer list on Sheet1 and raw data on Sheet2. There over 40 customer groups and i was wondering if there is a more efficient way handle this other than setting For for each of groups.
The customer list is on C row. For example group A is from C2:C25, group B is C26:C89, group C is C90:C1...
1
votes
3
answer
95
views
AJAX success function not fetching data from MYSQL database
Apologies for similarities between this post and my previous one. I'd appreciate if someone could help me once again spot where I'm going wrong. Everything else appears to be working fine but what is puzzling me is the 'quiet' response on the AJAX success function. Nothing in the console either.
I'v...
1
votes
0
answer
65
views
R uploading data frame to hadoop
I currently have an ODBC connection with hadoop on my R. However, I would like to upload my R data frame to hadoop.
How would I do this? Would it be done through RODBC?
1
votes
1
answer
156
views
Python3 installing of Pocketsphinx on linux mint
Good day.I just want to ask anyone of you Face the error of installing of pocketsphinx on python3.Theres a lot of error
I try pip3 install python-dev but it doesn't fix it
This is the error that I Got.
[email protected] ~/Downloads $ pip3 install pocketsphinx
n:Collecting pocketsphinx
Installing collect...
1
votes
1
answer
84
views
Mock function outside package
I'm developing a Django software with different apps on it. I'm testing some views and I want to mock the return of a function inside these views.
For example I have this view (located at apps.policies.views):
def upload_policy_document(request):
# code fragment avoid
# save document ot ipfs
respo...
1
votes
2
answer
73
views
Sendgrid for ActiveAdmin
I have a website that currently sends an email to users once they sign up using sendgrid. This works all and well, but I cannot figure out how to do this:
When to user makes a reservation on my website(its kind of like open table), the reservation object is created. I then can go on Active Admin and...
1
votes
1
answer
467
views
disable a module in prestashop without admin panel
I installed HTMLbox module, in order to add ZENDESK Chat widget.
After saving widget script. The page www.dulzuria.com CRASHED.
I can no longer access the site, neither the admin panel.
I know that in Wordpress it's enough to change the plugin name in order for the plugin not to be loaded. What is t...
1
votes
1
answer
555
views
Warning numerical expression has >1 elements: only the first used
I have a dataset as follows:
Apr May Jun Jul Aug Sep Oct Nov b
1.0 9.0 4.0 5.3 6.4 3.4 2.5 4.3 2
5.0 6.0 9.0 2.3 5.8 2.3 6.5 5.2 3
8.0 4.0 6.0 0.7 5.2 1.2 2.2 6.1 4
2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 7
3.2 3.2 3.2 3.2 3.2 3.2 3.2 3.2 8
4.4 4.1 5.1 6.1 7.1 8.1 9.1 6.8 6
5.6 5.0 3.2 4.2 5.2 1.2 2.2 3.2 5...
1
votes
0
answer
191
views
Raspberry pi 3 Ubuntu Mate 16.04.2 -> segmentation fault
I've been trying to install Ubuntu Mate 16.04.2 from http://ubuntu-mate.org/download/1 in a Raspberry pi 3 B (not B+). I'm able to download the img from the site, write it into a MicroSD, boot (with correct screens: Resized partition, all the 'first boot' stuff like usename, wifi, etc), reboot for w...
1
votes
0
answer
37
views
How to style KML?
I have added drag and drop to my map, based on https://openlayers.org/en/latest/examples/drag-and-drop.html. Styling works for f.i. gpx but fails for kml.
Whatever I try, I can't get the kml features styled the way I want. Kml files with a style included are shown using that style but I cannot repl...
1
votes
0
answer
91
views
store hash-map in static array
This question is language agnostic. But let's use C and some pseudo code for demonstration.
I want to store a hash-map / hash-table / dictionary / key-value store inside a static array (or optionally multiple static arrays), i.e. I have some upper limit about the number of entries, and have this dat...
1
votes
0
answer
39
views
Arduino: reviewing sensor response when given a command
I have a gas sensor (Sprint IR sensor) that measures the CO2 concentration in the atmosphere. I would like the sensor to return current the digital filter setting. According to the sensor manual, I need to input two commands: set the sensor to 'command mode', and have it return the value of the digi...
1
votes
0
answer
29
views
How to test whether the activity has not been routed with Robolectric?
I have an activity which is as simple as this:
class HomeActivity : BaseActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_home)
if (!this.userPreference.memberRegistered) {
goToActivity(AuthActivity::class.java)
}
}...
1
votes
1
answer
59
views
facet api: textbox filter
I'm looking to a way to add a textbox filter for searches of facet api in Drupal7. My site has three content type (A,B,C) that is used in searches.
I see that I can activate some filters in Admin -> configuration -> search and metadata -> Search API (edit one and then filters tab), but I can't see o...
1
votes
0
answer
269
views
ultimate member user meta fields in user edit
Does someone know if it's possible to edit the fields the ultimate member plugin stores as user meta data?
In users list I see a tab containing the info on these fields, but don't see this info in the user edit page, which impeeds the admin to edit such fields.
Thanks
1
votes
1
answer
253
views
Gmail.Users.Threads.get with metadata scope and metadata format not working
I'm sure it's a pretty stupid thing I'm missing, but I can't quite see it.
My Google Apps Script only needs mail headers so it has a very restrictive scope:
'https://www.googleapis.com/auth/gmail.metadata'. I really don't want to change this scope because it provides just what I need.
Because of th...
1
votes
3
answer
259
views
How to mock after setup dagger-android 2.15 when writing espresso tests?
If we just use plain dagger 2. In the application class, we will have a property which holds the AppComponent. Then we can swap it during espresso tests.
But when I setup my project using dagger-android 2.15. Things becomes more implicit if adopt too much Dagger magic. The code is more clean, but ma...
1
votes
3
answer
251
views
Enumerate through a component's state in React
so I wanted to have a component iterate through an object within it's state and pass the data down to it's child. My parent component looks basically like this:
class ListContainer extends React.Component{
constructor(props){
super(props);
this.state = {'stuff': {
'pie': ['bread', 'apple'],
'fries':...
1
votes
1
answer
452
views
How to mock React stateless currying function using Jest & Enzyme
I have this stateless React component:
...
const Providers = ({ onSelectFeedProvider, ... }) => {
const handleSelectFeedProvider = value => e => {
e.preventDefault();
onSelectFeedProvider({ target: { value } });
};
return {
...
}
}
And the test:
import Row from 'components/Common/Row';
import Provid...
1
votes
2
answer
423
views
How can I get react-router v4 defined params with express at server-side
I try to get the :userId 'albert' from this url
http://localhost:5000/search/albert?query=al&page=1
at server side but failed, what can I do to get the react-router defined params correctly at node.js with express?
routes.js
[
{
path: '/search/:userId',
component: Search,
}, {
path: '/search',
comp...
1
votes
0
answer
420
views
Chrome media cache always been deleted
I encountered a problem under Chrome. I need to load a big MP4 file with video element. After call function 'play' , the video's API told me that it is buffered, and I find the buffered file under Media Cache folder. However, when I set the video back to the start or any other position that already...
1
votes
0
answer
139
views
get TensorFlow tf.Operation inputs by name
Let op be a tf.Operation. I can get its inputs via op.inputs. But the inputs also have names defined by the op type, which I probably can extract somehow via op.op_def. But is there an easy way?
In the end, I would want a dict like {input_name[i]: op.inputs[i] for i ...}.
My current solution:
def ge...
1
votes
1
answer
141
views
DDD why should domain model define interfaces for infrastructure
While studying DDD I'm wondering why the Domain model need to define interfaces for the Infrastructure layer.
From my reads I got that a high level (domain model, application service, domain service) defines interfaces that need to be implemented by a lower layer (infrastructure). Simple.
From this...
1
votes
2
answer
55
views
Writing a function that parses a nested json file in python
I have a json file that looks something like this:
{
'mAutomaticTestCompleted': true,
'mAutomaticTestList': [
{
'mName': 'acceleratorEntity',
'mTestStatus': true,
'mX': 3.8043518,
'mY': 8.114105,
'mZ': -3.3895721
},
{
'mName': 'barometerEntity',
'mTestStatus': false,
'mValue': 0
}]
}
There are actua...
1
votes
1
answer
50
views
Is it possible to use QCustomPlot in unit testing?
I need to create a family of plots during a test of my program. I want to use QCustomPlot for such purposes, but I have a problem. For creating and saving my plot in the file, I have to create QApplication, after I need to reimplement my class from QMainWindow and after that, I can Use my QCustomPl...