text stringlengths 70 452k | dataset stringclasses 2
values |
|---|---|
Value is returned as None from function
I am trying to get the value of an user input defined key from nested dictionary.
While I am able to print out the value from the function itself. Return statement sends value as None.
people = {1: {'name': 'John', 'age': '27', 'sex': 'Male'},
2: {'name': 'Marie', 'age'... | common-pile/stackexchange_filtered |
How to get the list of csv files in a directory sorted by creation date in Python
I need to get the list of ".csv" files in a directory, sorted by creation date.
I use this function:
from os import listdir
from os.path import isfile, join, getctime
def get_sort_files(path, file_extension):
list_of_files = filter(l... | common-pile/stackexchange_filtered |
What is the maximum SCSI LUN size?
What is the maximum size of single (i)SCSI LUN from perspective of SCSI protocol, what is the limit?
The answer would appear to be heavily dependent on the generation of the SCSI protocol, as it has gone through a handful of revisions through its days of glory.
First, 512 bytes = 2^9... | common-pile/stackexchange_filtered |
What is this game with Knights and Ogres and wolf riders I played when I was a kid?
I grew up in the 80s, so the game should of come out in the late 80s or early 90s. I believe that the game was made by the same makers that made Hero Quest, but I might be wrong.
The game was an War based game, that had 2 sides a good s... | common-pile/stackexchange_filtered |
How to create ZF3 console application
In Zend Framework 2 it's very simple to add the initial module banner to the console applications.
All we need to is to implement the getConsoleBanner and getConsoleUsage methods and implement the Zend\ModuleManager\Feature\ConsoleUsageProviderInterface or ConsoleBannerProviderInte... | common-pile/stackexchange_filtered |
how to createWriteStream() to GCS?
I'm trying to write an Express route that takes an image URI in the POST body and then saves the image into a Google Cloud Storage Bucket.
I'm not able to persist this image to local disk and need to stream the buffer straight to the GCS bucket.
My route creates a 4KB "stub" in the GC... | common-pile/stackexchange_filtered |
.Net Compact Framework development on Windows Embedded CE 6.0
I am busy developing a .Net compact Framework 3.5 application for Windows CE 6.0 and am really struggling to figure out how to get a development environment up and running to debug my code.
Creating the Visual Studio project and writing the code is not the ... | common-pile/stackexchange_filtered |
Average Price per column within different tables
I'm stumped in trying to complete a problem I was tasked in getting solved.
I'm tasked with doing the following: Calculate the average cost for different products and group them by the category of the product.
How can I do this against different tables?
If I wrote a rea... | common-pile/stackexchange_filtered |
How do I find recurring pattern lines in a large file
I have a large file that contains many lines of strings in a format of:
A
B
D
B
C
D
C
D
C
D
As you can see C and D appears recurrently 3 times next to each other , so I want to parse the file to find the recurring pattern of them to output:
A
B
D
B
repeat C D 3 tim... | common-pile/stackexchange_filtered |
Star pyramid program in c
I have output in image, but code is not proper
i want code for the given output
#include <stdio.h>
int main() {
int i, space, rows, k = 0;
printf("Enter the number of rows: ");
scanf("%d", &rows);
for (i = 1; i <= rows; ++i, k = 0) {
for (space = 1; space <= rows - i; ++spac... | common-pile/stackexchange_filtered |
Can I set up Hornetq Core-Bridges between two different Hornetq Server Versions?
I have to set up a Hornetq Core-Bridge to a Hornetq 2.1.X Server, but I would like to use a more updated version on my side of the architecture (2.2.X). Is it compatible?
I haven't found info about it on documentation (as always btw, rega... | common-pile/stackexchange_filtered |
Caffe Import error: libopencv_highgui.so.3.3: cannot open shared object file: No such file or directory
I created a virtual environment for python2.7 and I installed caffe using the command conda install -c conda-forge caffe. But when I try to import caffe, its throwing the following error.
Traceback (most recent call ... | common-pile/stackexchange_filtered |
elisp , passing functions as arguments and call it, an Eval error happend, why?
my elisp program is:
(defun test (f x) (f x))
(test (lambda (x) (* x x)) 10)
run it, an error happened:
* Eval error * Symbol's function definition is void: f
Emacs is a lisp-2, so has a different namespace for functions and variables. S... | common-pile/stackexchange_filtered |
how to re-run method when you re-visit screen in react-native?
I have wrote a method and tried calling that method in componentDidMount() ,componentWillMount(), render() methods but no methods runs again in react-native. I want to re-run that method every time screen is visited.
If you use react-navigation, you can us... | common-pile/stackexchange_filtered |
How to setup datastructure so to make pandas and numpy co-operate?
Having troubles compiling code that is based on pandas and numpy. I will try to explaining the issues by providing a downscaled working examples of where the problem lies.
What I'm basically trying to do is Markowitz portfolio optimization, in the follo... | common-pile/stackexchange_filtered |
MKOverlayPathRenderer color dependent by property
I would like to draw a line on my mapview with a gradient, but the gradient color on a specific position should be dependent on a property from the line (e.g speed or altitude)
I found several MKOverlayPathRenderer which can draw a gradient, but the color moves from the... | common-pile/stackexchange_filtered |
Can I bulk upgrade deployed SPFx web parts?
I created a SharePoint Framework web part and deployed the package to the App Catalog on my client's O365 tenancy. My client has added the web part to around 150 sites.
I've since deployed a new version of the package, which contains some important updates to the web part, to... | common-pile/stackexchange_filtered |
Postgres: How to insert row with autoincrement id
There is a Table "context".
There is an autoincrement id "context_id".
I am using sequence to retrieve the next value.
SELECT nextval('context_context_id_seq')
The result is: 1, 2, 3,...20....
But there are 24780 rows in the "context" table
How can I get the next value... | common-pile/stackexchange_filtered |
How to post JSON data to Action Method ?
I am POSTing to the server (.Net) and I am having trouble passing arrays to the controller action. I've tried just about every possible combination without any luck. However, one of them is puzzling me.
If I perform this request :
var dataArray = [ { /* some plain object */ }, {... | common-pile/stackexchange_filtered |
VB.Net - Create JObject from subset of properties in existing JObject
I'm working in UIPath and trying to put together a single JSON configuration file for a library. My hands are sort of tied as far what functionality in VB.Net I can use but I'd like to filter my properties by environment. I'm able to successfully fil... | common-pile/stackexchange_filtered |
Filter out some records on particular periods
I have below tables structures,
Trans Table:
Trans_Id(PK) User_Id(FK) Arroved_Date
________________________________________________
1 101 05-06-2016
2 101 20-06-2016
3 102 06... | common-pile/stackexchange_filtered |
how to store data in same key in dictionary using JavaScript
This is my output, in place of [object,object], it should give value but I am unable to get value.
[ 'CME,ES,201703': '0[object Object][object Object][object Object]',
'CME,ZB,201703': '0[object Object][object Object][object Object][object Object][object Ob... | common-pile/stackexchange_filtered |
How is "signed or unsigned type" meant in this C90 undefined behaviour definition?
In the ANSI C90 standard, section 6.3 has this to say about expressions:
An object shall have its stored value accessed only by an lvalue that has one of the following types: [...] a type that is the signed or unsigned type correspondin... | common-pile/stackexchange_filtered |
How to Change the language of my JDateChooser?
I would like to change the language of my JDateChooser to Chinese.
I have tried this method:
//change jdatelanguage
Locale locale = new Locale("zh", "CN");
But it didn't work. Maybe I put it in the wrong place.
Can someone please help?
I also tried this method:
java -Duse... | common-pile/stackexchange_filtered |
printer_open () php support, printing from web app possible solutions
Is printer_open() still supported in the latest php version? I am trying to figure out if its possible to print directly from PHP but I am not having any luck. I have found some useful questions and articles but they all use the "printer_open()" and ... | common-pile/stackexchange_filtered |
Python loop keeps stopping in Window's interpreter
I'm using the default Python 3.8 interpreter in Windows.
Whenever I run a long loop in it, it'll stop and I have to press or hold down the Enter key for it to keep going. This was never a problem in Linux.
How do I fix this behavior?
# this loop will eventually stop/ha... | common-pile/stackexchange_filtered |
My code is reading the textbox just once
The problem is that my code is just reading the Textboxes just the very first time, wheneaver I do any change to the Textboxes it doesn`t read the new ones.
This is the code of the form with 2 textBoxes.
public partial class Form1 : Form
{
double tb1, tb2;
public Form1()... | common-pile/stackexchange_filtered |
The screen size overwrites the other ones :S
Ive been trying to make a change of my category images depending on screen size. But right now only the first screen width size are being used. It seems as though the other ones are being overridden by the first row of code (max-width: 769px). (on this site: http://origami.d... | common-pile/stackexchange_filtered |
Extjs4 save all grid data in a table
I know how to get a value from a selected row of a grid, just like this:
var records = Ext.getCmp('My_Grid').getSelectionModel().getSelection();
var record = records.length === 1 ? records[0] : null;
alert(record.get('name'));
But what I want is to get the name of all rows of th... | common-pile/stackexchange_filtered |
Scanner doesn't recognize a number on the first try?
If I input 1 or 3, my game will start on the first try but if I input 2, I'll get invalid input. Try again :. When I input 2 again, my game will start.
public static void Difficulty() {
System.out.println("*********************************");
... | common-pile/stackexchange_filtered |
FrameLayout onClick for overlapping images on Android
First I thought that the problem will be very easy to solve, but it proved to be a challenge.
Scenario
One FrameLayout and two ImageViews, one over the other. The first images has a Translate animation and a onClick event. Let's translate this in something practical... | common-pile/stackexchange_filtered |
Converting String to Interger
I want to change the color of text by applying a condition. I'm getting the text from Json. Code is working fine without that "check for the color change" part present at the end of the code. Otherwise, It isn't returning anything. app crashes. What's the problem??
Here is the code :
Arra... | common-pile/stackexchange_filtered |
Why is $\bar x(1-\bar x) + \frac{s^2}{n}$ an unbiased estimator of $\mu (1-\mu)$?
Let's consider a population of boolean values [0,1]. In the population, the mean (or frequency of 1) is $\mu$. We take a sample of size $n$, which mean $\bar x$ is
$$\bar x = \frac{\sum_i^n x_i}{n}$$
and sample variance
$$s^2 = \frac{\su... | common-pile/stackexchange_filtered |
Provide different guidance text to suggested edit reviewers and to rejected editors
Some guidance is associated to suggested edit rejection reasons.
This guidance is shown to reviewers and to the original author alike. But reviewers and editors don't need the same kind of input: reviewers need guidance to make the dete... | common-pile/stackexchange_filtered |
Function wrapper in C++
Very simply, I’m using an optimization library in C++ that takes in a function of a single variable. I would like to be able to pass in multiple parameters though (which this library does not support). What I would like to do is create a lambda function of the sort (kind of like in Python) that ... | common-pile/stackexchange_filtered |
Redirection url provoc a lost of information in my url
I'm trying to do a redirection from my host : http://www.carthera.com to http://www.carthera.eu,
Everything looks fine, but when i try to go on another page with carthera.eu I have this :
http://carthera.eu/index.php?page=carthera&ssmenu=0
But with carthera.com ... | common-pile/stackexchange_filtered |
Upload File as a parameter to job in Azure DevOps
I have a Azure DevOps pipeline that automates user creation in salesforce. I am expecting the user details in an excel file, which is to be fed to the Azure DevOps pipeline as a pre-build parameter. However, I am not able to find a solution to it in Azure DevOps.
I had ... | common-pile/stackexchange_filtered |
change color of a row without refreshing page
I am working on a project at the moment. In iI am using ajax to update and calculate scores, which works fine. However, I have a color scheme that changes according to the score. The color does change, but only after the page is refreshed. Is there anyway I can get the colo... | common-pile/stackexchange_filtered |
Synchronising data between differently sized, and intermittently connected, devices
I am trying to find a solution to sharing my /home directories between my home computers. I have one desktop, with a 1TB disk, and a laptop with a 500GB disk. I also have a home server, which has a 1TB disk. The server's disk is complet... | common-pile/stackexchange_filtered |
Oracle forms Multiple rows modification issue
I m using forms 11g
I have one master-detail form.
I want to restrict the user from saving the non detail block record, If record entered in the corresponding master block has been rollbacked.
To be clear when i query or move out of that field i see a message 'do you want t... | common-pile/stackexchange_filtered |
How to organize apps into folders in Android Programming?
I'm developing a launcher application. I want to auto organize apps into folders with subjects as Game, Social Network, Entertainment, Tool... But I do not know based on the information of the application to know what type it.
Sample : http://dantri4.vcmedia.vn/... | common-pile/stackexchange_filtered |
FCU: DeviceError:serial:open: No such file or directory
I am try to simulate UAV in gazebo using px4 and mavros roslaunch mavros px4.launch
got the following error
... logging to /home/mubashir/.ros/log/595548e6-bb3f-11ee-bab8-f3b849e8f78c/roslaunch-pc-8488.log
Checking log directory for disk usage. This may take a whi... | common-pile/stackexchange_filtered |
How to parse stock data from objects into an array
I am using the Recharts library to plot some stock market data. However, the simple line chart requires a very strict data structure like so
{name: 'Page A', uv: 4000, pv: 2400, amt: 2400}
I have data that looks like this
Object
AAPL:Array[4]
0:Object
adjClose:53.509... | common-pile/stackexchange_filtered |
How to use a main column value on the sub-query of a join
I have a table "links". Links belong to "campaigns".
Links have many "clicks", "social_clicks" and "impressions"
For each active link belonging to an active campaign I want to calculate the following rate per day: (clicks + social_clicks) / impressions
The follo... | common-pile/stackexchange_filtered |
GitLab: You are not allowed to access master! After moving gitlab to another server
I'm moving my gitlab instance to another server and I run to problem.
clone is working fine, but push is throwing error, and I can't figure out where is problem.
In gitlab logs is nothing usefull.
git push
Counting objects: 5, done.
Del... | common-pile/stackexchange_filtered |
How to save GLSurfaceView rendering to file?
I'm using VideoSurfaceView extends GLSurfaceView to render filtered video. I'm doing it buy changing the fragment shader according to my needs. Now I would like to save/render the video after the changes to a file of the same format(Ex. mp4 - h264) but couldn't find how to d... | common-pile/stackexchange_filtered |
iOS11 - Realm Framework not building
I've downloaded Xcode 9 Beta 4 to fix a problem I have on my app in iOS 11.
However now Xcode won't let my build my app because Realm (and RealmSwift) are in Swift 3.1 and not 3.2.
Here is the message :
Module compiled with Swift 3.1 cannot be imported in Swift 3.2
I don't use Coc... | common-pile/stackexchange_filtered |
Accessing Citrix MDX in Ionic for getting user details
I have created a Hybrid Ionic3 app. It has been wrapped with MDX toolkit and is made available through Citrix SecureHub. The app can be downloaded and it works fine as intended. Now we want to build some role based features. As per the MDX toolkit documentation, th... | common-pile/stackexchange_filtered |
TO make Grant I have error 1064 (42000)
I am making a simple Grant in mysql, but wondering what is wrong with the below code.
GRANT ALL PRIVILEGES
ON name_database.*
TO 'root'@'localhost'
IDENTIFIED BY PASSWORD 'password';
Why I constantly get the error message like:
ERROR 1064 (42000): You have an e... | common-pile/stackexchange_filtered |
Hosting a hotspot without signaling metered connection
Currently, I am running a hotspot from an Android phone as my home network. The cellular plan for this phone has unlimited data.
When I host the hotspot, connected devices detect that this hotspot has a cellular connection behind it, and treats it as a cellular con... | common-pile/stackexchange_filtered |
Jquery store values from array
success: function (response) {
for (var i in response)
{
var serialized_data = '['+response[i].position+']';
alert(serialized_data);
}
}
Result of serialized_data ... | common-pile/stackexchange_filtered |
Getting around async issue in node.js application command line
My application is a simple mysql client used from command line - it connects to database and makes few queries to get information from database. Mysql functionality is encapsulated in a class and problem is since calls to mysql server is async (understandab... | common-pile/stackexchange_filtered |
Public action method "actionMethod" not found in Controller "controller"
I have an admin area in my ASP.NET MVC 4 project.
After add Authorize attribute in Index action of Home controller in admin area (localhost/admin/), when I redirected to /Account/Login I get an error saying that ObjetivosSubMenu was not found in A... | common-pile/stackexchange_filtered |
Build Query From List Box In PHP
I have a page where I am wanting to allow a user to select fields from a select that exist in a table, then display the contents of those fields on screen. I have set-up the select like so
<select name="queryfields" size="12" multiple="multiple" tabindex="1">
<option value="firstname">... | common-pile/stackexchange_filtered |
Nagios set the host state to CRITICAL only after 2 check
I have a nagios server, that is a backup server as well. This server receives auto backup files from over 30 network devices in my network. The network gears send backup files hourly, but not at the same time.
I have a simple script to check if backup file has be... | common-pile/stackexchange_filtered |
Need help understanding how Ninject is getting a Nhibernate SessionFactory instance into a UnitOfWork?
So using some assistance from tutorials I have managed to wire up a Nhibernate session to my repositories and my repositories to my controllers using Ninject. However, there is one peice of the setup that I am not gr... | common-pile/stackexchange_filtered |
C# export grid to word using template
I have created a word template with some number and text fields and I export my data from my application like this:
Object oMissing = System.Reflection.Missing.Value;
Object oTemplatePath = "C:\\MyTemplate.dotx";
Application wordApp = new Application();
D... | common-pile/stackexchange_filtered |
K3b fails to burn Windows ISO to DVD-R at 98% (Brasero also fails)
I'm trying to create a bootable Windows 8.1 ISO on a blank DVD after my system repeatedly failed to boot from a USB, only showing a flashing dash. I tried using Brasero, but I always get an error that it failed, so I tried K3b and it seems to work until... | common-pile/stackexchange_filtered |
Implementing multiple builds with AWS codebuild, with dependant artifacts
I currently work on a project that makes use of AWS CodeBuild for our CI workflow. There is currently one big build, that takes up quite a bit of time as it includes an e2e test suite that takes some time to run, and can sometimes be flaky, causi... | common-pile/stackexchange_filtered |
X is the major conference in our domain next to / beside / alongside Y
X is the name of a conference. Y is the name of a conference.
I wonder which form(s) are correct amongst the following:
X is the major conference in our domain next to Y.
X is the major conference in our domain beside Y.
X is the major conference i... | common-pile/stackexchange_filtered |
Indexing PostGIS table by tile boundaries
I have a PostGIS table with 2M rows, all Points. I'm creating tiles from the data, but it's quite slow.
Although I have the normal geometry indexes enabled on the table, I wonder if it's possible to index better according to tile boundaries (which are alwayws the same).
Or is... | common-pile/stackexchange_filtered |
tikz connection label and node distance
Is it possible to have tikz automatically determining the distance between two nodes based on a third node used to connect them?
For instance, in the following picture the arrow used to connect the nodes are too short. Can tikz calculate its length automatically so that its label... | common-pile/stackexchange_filtered |
How to download a PDF file from Google Sheet with specific margins and page breaks?
I see some ways to generate PDF from google sheets. But can not find how to set page settings like hiding gridlines, set margins, page breaks etc.
When I choice download as PDF from file menu I can do this.
So is there some method to ge... | common-pile/stackexchange_filtered |
Placing image buttons over a background image
I have a new project that requires me to create a webform with c# that contains a background image of a map and I have to make hotspots in specific cities. Clicking on a spot I need to open a pop-up messagebox with some info.
I am thinking on putting image buttons above the... | common-pile/stackexchange_filtered |
Windows Update is downloading updates when it is supposed to notify me first
I have Windows XP SP2, and Windows Update is set to notify me that updates are available and not download any updates.
However, recently, the yellow shield in the system tray has appeared indicating that updates are downloading.
I have gone in... | common-pile/stackexchange_filtered |
How can I create a menu in python and use functions as my options?
I hope you're doing great! I would really appreciate if you help me with this problem of mine. I wrote this code that creates dictionary based on user's input, then updates it, sorts by keys and values, finds if the item is in the dictionary, counts the... | common-pile/stackexchange_filtered |
I want to Remove the addition symbol from in-between the numbers using python and please find the below my code
limit = int(input("Limit: "))
allvalue = ""
count = 0
number = 0
while count < limit:
number += 1
count += number
allvalue += str(number) + " + "
print(allvalue)
This is my output 1 + 2 + 3 ... | common-pile/stackexchange_filtered |
How to remove all newlines from a file?
I have the command cat file.txt | gawk '{print $2}' > test which displays:
1
1
0
0
1
1
Afterwards:
vi test
:%s/\n//
Which outputs: 110011
My question is I don't know how I could incorporate this last step with pipes.
Update: Might be with sed. I tried to use sed 's/\n//' but st... | common-pile/stackexchange_filtered |
Container privileges
I want to deploy an an app in cloudfoundry that needs to have access to a file system for storage purposes. As the appcloud only provides S3 support I wanted to use the https://github.com/s3fs-fuse/s3fs-fuse in order to make the conversion. However, this image needs to be run as "privileged" and th... | common-pile/stackexchange_filtered |
Python decorator eats function results
Running python 3.9 on MacOS 13.4.1 on 2020 iMac 27".
While trying to use a decorator to time the execution time of a function, I have found that the value returned by the function being timed is reduced to 'None'. The timing_decorator is copied from a forgotten source. It works fi... | common-pile/stackexchange_filtered |
Phalcon form sanitize
Is there a way in which one can filter data that is auto-completed in a form generated by VOLT.
Consider the login form: Email/password.
When I edit the HTML (in the broser) and send the email as an array ('name="email[]") I can sanitize it in PHP and 'cast' as en email:
$loginEmail = ... | common-pile/stackexchange_filtered |
Results are different between python and mysql for similar command
I was using python to create a dictionary but as my data got larger I started to get memory errors so I thought I would save memory and just write the data to a database instead, but the results are not the same. I think this has to do with defaultdict... | common-pile/stackexchange_filtered |
Linux mint partition problem
When i started working with linux mint this partition was working well then mounting error began to appear and i solved it doing:
sudo ntfsfix dev/sda
mounting error came many times, but this time after solving mounting error using this code another error came says:
(Sorry, could not dis... | common-pile/stackexchange_filtered |
Debugging ExceptionInInitializerError
After a Java 10 migration, I am encountering an error java.lang.ExceptionInInitializerError
With no other info. Error occurs when I try to run/debug the project. Where should I begin looking to diagnose this?
Here is the full output in the console:
Information:java: Errors occurred... | common-pile/stackexchange_filtered |
Method not being called
I have a fairly simple method in a class in a separate file, which takes in an integer, looks it up in a case select, and returns an NSURL pointer that corresponds to it. It has this method:
#import <Foundation/Foundation.h>
@interface ChangeCurrentScene : NSObject
{
NSString *filePath;
... | common-pile/stackexchange_filtered |
Implement a correct scope in an Angular library
I have a question about how to implement a correct API exposure in Angular libraries.
So basically I have a Service, and a component inside my library that consumes some methods of the Service. Those methods thus cannot be private, since my component has to get access to ... | common-pile/stackexchange_filtered |
Find all natural $n$ numbers.
Find all natural $n$ numbers such that
$15(n!)^2+1$ is divisible by $2n-3$.
My try: First I assumed $2n-3$ is not prime number. Let $a$ be divisor of $2n-3$. It's clear that $a<n-1$, so $15(n!)^2$ is divisible by $a$. Which means $15(n!)^2+1$ is not divisble by $a$. But it is given that $1... | common-pile/stackexchange_filtered |
Deploying ASP.NET MVC 4 Application to private staging / preview
I'm building an MVC4 application that is starting to take shape and I want to deploy it privately for staging and preview purposes. I would like only a select few people to be able to access the full application. Most of the application is public, but the... | common-pile/stackexchange_filtered |
Is instantiating a GUID in Entity Framework Core bad practice?
If I have a model with a key of type Guid, is it bad practise to set the ID explicitly in the constructor?
I know it will be set implicitly by Entity Framework, but will anything bad happen (perhaps performance wise) from setting it explicitly?
Example:
cla... | common-pile/stackexchange_filtered |
Hypothesis testing - Newbie blockers - Update and more
Brief : I'm from manufacturing industry, a processing machine in our production line used to do pressing, polishing and QA one after the other. Now we have a new machine that will perform these at the same time. Ideally the new machine will produce units in less ti... | common-pile/stackexchange_filtered |
mongodb query and return specific collections
I'm trying to return all collections where field grade: 'Grade Two', I've tried a number of queries but getting either error or nothing being returned. I want my query only return documents from the collection with 'Grade Two', that should return only two docs.
I've tried t... | common-pile/stackexchange_filtered |
Beginner React query(How to remove a element and append another element)
I've just started learning React and after going through some guides, I tried making a Markdown Previewer. I successfully build it. But I wanted something else, I wanted to make a <textarea> then after the user has written on it then when they cli... | common-pile/stackexchange_filtered |
How can i get a Mongoose custom error message?
So I have this mongoose schema that I want to validate
const mongoose = require('mongoose')
const productSchema = new mongoose.Schema({
name: {
type: String,
required: [true, "You Must Include A Name"],
toLowerCase: true,
},
price: {
... | common-pile/stackexchange_filtered |
General Error Handler for Restangular
So far I have around 4 calls to my API using Restangular and in each one of them I have been checking for them on the second argument of the then as shown below:
Restangular.all("accounts").getList().then(function() {
console.log("All ok");
}, function(response) {
console.log... | common-pile/stackexchange_filtered |
using paper-datatable-card in a custom-tag
//index.html
<html>
<head>
<link rel="import" href="test-table.html">
</head>
<body>
<template is="dom-bind" id="index">
<test-table data="{{data}}" ></test-table>
</template>
</body>
</html>
Polymer({
is: "test-table",
properties :... | common-pile/stackexchange_filtered |
When should I use a ellipsis in a Menu Item
When should I put ... at the end of a menu item? I seem to remember reading some rules but can't for the life of me find them.
For context - I'm adding a properties option to a right click menu and am wondering if it is appropriate to add them.
Use the unicode ellipsis when... | common-pile/stackexchange_filtered |
Temporary method within method?
In the method below, there are three conditionals. I'd like to replace them with a method and pass in the conditional.
Also, the conditional body is nearly repeated. Is it possible to create a method that exist only locally within MyMethod()? So the code below reduces to something l... | common-pile/stackexchange_filtered |
why would identical mongo query take much longer via aggregation than via find?
so, i have 10M people documents. this query:
db.getCollection('people').find({'address.zip': '87447'}).sort({'name.last': -1}).limit(3)
returns in < 20ms
this query:
db.getCollection('people').aggregate([{$match: {'address.zip': '87447'}},... | common-pile/stackexchange_filtered |
How to add folders with C++ files to a NetBeans project?
I had copied folder to my project folder with one cpp file and set of headers. It appeared in project view. How I understand this means they was added to project (if I can see they in project view). Right?
But undefined reference to ((
Then I found that they does... | common-pile/stackexchange_filtered |
How to achieve the combobox with multiselect capability by typing
I am able to select the combobox with multiselect property as true..and i am able to select a value by typing but only one value..is there any way to select more than value by typing
In ExtJs 6 multiSelect config from Combo box has been deperciated ..Th... | common-pile/stackexchange_filtered |
Catalog price rules disappear after 24 hours in Magento <IP_ADDRESS>
We used two suggestions from https://stackoverflow.com/questions/25280095/ to solve this problem.
We applied the "line 121" fix to app/code/core/Mage/CatalogRule/Model/Action/Index/Refresh.php
We also installed AOE scheduler and used the settings sug... | common-pile/stackexchange_filtered |
Burninate the [godaddy] tag
First off, godaddy has 903 questions tagged with it. godaddy-economy-hosting has 15. (no longer true, burninated)
EDIT: we're at under 100 questions with godaddy tagged.
GoDaddy is a platform for hosting, and these askers seem to think that tagging their questions with their service provider... | common-pile/stackexchange_filtered |
Saving Images into SQLite database
I have a program that collects some data from the web-site. Text data is appended into "info" DataFrame and photo urls are appended to "photos" DataFrame.
I have already inserted "info" table to my SQL database and works really fine!
data.to_sql('Flat', con=conn, if_exists='replace'... | common-pile/stackexchange_filtered |
Meteor : Changes in collections are not reflected in rendered HTML
I have been trying to doing some very simple publish/subscribe in Meteor and I cannot get it to work as I expect from reading the sources available such as the Meteor documentation.
I am using a Macbook Pro with OSX Yosemite and running Node.js v0.10.4... | common-pile/stackexchange_filtered |
How does Scrypt use Salsa?
Bcrypt uses Blowfish to encrypt a derived key from the passphrase, and Blowfish is a cryptographic algorithm, but here it is said that:
Note that
Salsa20/8 Core is not a cryptographic hash function since it is not
collision-resistant.
so how this is useful in Scrypt?
Salsa20/8 is used not... | common-pile/stackexchange_filtered |
Displaying all the collapsible content in Accordion using Selenium Webdriver
Suppose I want to simulate a scenario, where a user wants to see all the collapsible content like the Accordion widget, one by one, with some wait, in between two clicks ( at most 2-3 seconds)
The user clicks on Section 1, then waits for 2 sec... | common-pile/stackexchange_filtered |
Classify, up to similarity, the $3$ by $3$ matrices with coefficients in $\mathbb{Q}$ that satisfy $A^6=I$.
I am working on the following question in review for my algebra final:
Classify, up to similarity, the $3$ by $3$ matrices with coefficients in $\mathbb{Q}$ that satisfy $A^6=I$.
My work:
As $A^6 - I = 0$, we k... | common-pile/stackexchange_filtered |
In C#, how to delete "Explorer file associate" overriding the "Registry Classes" File Association?
How to programatically delete all "file association" created by Explorer so that the file associations under HKCR work correctly?
For Example, I want to delete the registry key corresponding a user clicking "open with..."... | common-pile/stackexchange_filtered |
Factorization systems on tensor product of presentable categories
This question is motivated by the following particular problem.
I have two presentable categories $\cal A,B$ with orthogonal factorization systems $({\cal E}, {\cal M})$ (on A) and $({\cal U},{\cal V})$ (on B). I want to produce a factorization system on... | common-pile/stackexchange_filtered |
Converting byte[] property to Bitmap in android using ksoap2
I have this code to get an array of byte. The client is built in ksoap2.
All properties I am getting fine but when I try to get the property which has an image it returns null when BitmapFactory.decodeByteArray is executed. And really I get information when ... | common-pile/stackexchange_filtered |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.