text stringlengths 70 452k | dataset stringclasses 2
values |
|---|---|
What data structure fits this description?
I need a data structure that holds unique values (like a set), but also sorts them (like a priority queue) and allows random access for binary searching (like an array). Which type of data structure would fit these needs? I could live without the sorting (I can always sort it ... | common-pile/stackexchange_filtered |
Is there a way to measure how sorted a list is?
Is there is a way to measure how sorted a list is?
I mean, it's not about knowing if a list is sorted or not (boolean), but something like a ratio of "sortness", something like the coefficient of correlation in statistics.
For example,
If the items of a list are in asce... | common-pile/stackexchange_filtered |
I want to make my php know if there is a number in the password
I want to know if there is a number in one string (PHP CODE)
This is what i have:
if (!preg_match('/0/',$p) || !preg_match('/1/',$p) || !preg_match('/2/',$p) || !preg_match('/3/',$p) || !preg_match('/4/',$p) || !preg_match('/5/',$p) || !preg_match('/6/',$p... | common-pile/stackexchange_filtered |
Dotnet and Azure Event Hubs: Retrieve an event by its position
I've been trying to retrieve events by its position using Microsoft.Azure.EventHubs.
I've been told that there is a way to calculate an event position using its offset or sequenceNumber, so everytime I'm adding an event to an EventBatch, I cache in redis an... | common-pile/stackexchange_filtered |
How to get data from last number and still before space in javascript using regular expression
This is my problem below
var id = "10101-Building and Construction 21";
Basically, I have got id's data from other calculation , i want to separate to 21.
Here result will be 21;
How can i remove id's value without 21 .
Ple... | common-pile/stackexchange_filtered |
Why would I want to use Angular with Ruby on Rails?
I'm a studying CS and lately I've got myself really enjoying learning about web development..
Now, I have tried to learn AngularJS for a few times but then I wanted to focus more on backend first, since I already know the stuff like html/css/js which makes good part o... | common-pile/stackexchange_filtered |
Custom UIView wrap-around
I have an NSArray of custom UIViews (ACTileView). They act as one row. I would like to be able to slide them left or right (which is currently already possible) but have the wrap-around (to create the effect of endless "Tiles" much like the UIDatePickerView on the iPhone). I don't have any ide... | common-pile/stackexchange_filtered |
How to get an accurate LTSpice model of a real inductor after impedance analysis?
I want to get an accurate model of a real inductor in LTSpice. Therefor I used an Bode 100 Network Analyzer und measured its impedance in a range of 100 Hz to 20 MHz. My idea was to calculate the capacitance of the inductor from the reson... | common-pile/stackexchange_filtered |
How to show the gnome3 activities menu only on the monitor where it was triggered?
Additional information:
Whenever the gnome3 activities menu is triggered (e.g. when I'm using the gnome search tool to search for a program) the menus effect is triggered on all monitors e.g. showing all open windows for each monitor. I ... | common-pile/stackexchange_filtered |
How to acquire fully qualified names of installed applications in Android
I try to create an application that can start other applications (f.e. Gmail or Facebook or any installed one).
I tried to use the following code:
PackageManager pm = MainActivity.this.getPackageManager();
try
{
Intent it = pm.getLaunchIntentFo... | common-pile/stackexchange_filtered |
Excel macro runtime error 424
I can't find the root cause of my runtime error 424. I know it's to do with a missing object, but I'm not sure where or which object that would even be in this case. My assumption is has to do with ActiveSheet but I'm a bit lost.
Sub Macro1()
'
' Macro1 Macro
'
'
Sheets.Add
Error begins ... | common-pile/stackexchange_filtered |
pygame TypeError: Rect argument is invalid
I have read many threads with the same issue as me, but haven't found any that solve my problem, so have decided to ask here. I am currently following this tutorial. At 1:01:58, when he runs he gets no error, but I receive the error in the title above:
Traceback (most recent c... | common-pile/stackexchange_filtered |
Gitlab-Runner service not working in windows
I'm starting with gitlab CI.
I'm using Windows 7. I registred my GitlabRunner, but when I try to install it, I have this issue :
←[0;33mWARNING: Since GitLab Runner 10.0 this command is marked as DEPRECATED and will be removed in one of the upcoming releases←[0;m
←[31;1mFAT... | common-pile/stackexchange_filtered |
How to run tkinter function with both a key bind and a button command?
Is it possible to run a function with both a button press and an event? When I try to run this function by pressing the button, it, understandably, gives an error
TypeError: listFiller() missing 1 required positional argument: 'event'.
Couldn't fi... | common-pile/stackexchange_filtered |
Separate data and text from one cell to provide a duration with a summary
There.
I am trying to solve a problem with our current data collection at my office. As of now every Friday the entire team use a shared excel sheet to update their assigned project about the next activities with a date and a small description.
F... | common-pile/stackexchange_filtered |
ftruncate not working on POSIX shared memory in Mac OS X
I have written a code on Mac OS X to use POSIX shared memory as shown below:
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
int main() {
int fileHandle = shm_open("TW_ShMem1",O_CREAT|O_RDWR, 0666);
... | common-pile/stackexchange_filtered |
How to solve mousemove event bug in Chrome
I give mouseup mousedown mousemove different event handler:
var body = document.querySelector("body");
body.addEventListener("mouseup", function () {
console.log("mouseup");
});
body.addEventListener("mousedown", function () {
console.log("mousedown");
});
body.addE... | common-pile/stackexchange_filtered |
SQL - update query - update to next date value that is not NULL
I have a bunch of values that are currently on dates with NULL value (i.e. no data available on those particular dates).
How would I go about updating those values to the next date where there is data available?
I have a select query currently which highli... | common-pile/stackexchange_filtered |
Is there any way to test if a function running only on plugin update is successfully running?
Is there any way to test if a function running only on plugin update is successfully running? Right now I am calling function if WP version present in configuration file is not same as plugin version's value in database and so... | common-pile/stackexchange_filtered |
What are some more detailed dictionaries?
In the past few days I read through half of the excellent grammar book by Claudia Ross and Jing-heng Sheng Ma and all of the very enlightening "Aquisition of Word Order in Chinese as a Foreign Language" by Wenying Jiang (I recommend reading both). One of the things that the fir... | common-pile/stackexchange_filtered |
How to resolve : javax.xml.transform.sax.SAXSource cannot be cast to java.io.Serializable [BonitaSoft]
I'm trying to create a task in BonitaSoft and connect it to a webService created using Spring Boot I finished all the steps and when i want to test my web service i get this Error :
I can see that the Web service is... | common-pile/stackexchange_filtered |
Grammar for Unix command line options
This is a homework question. I would like to write a simple parser for Unix command line options.
First, I would like to define a grammar with BNF.
Options = Option | Options, space, Option;
Option = OptionName | OptionName, OptionArguments;
OptionName = '--', any character exclud... | common-pile/stackexchange_filtered |
Can I use In-App-Purchases when distributing outside of Apple's App Store?
I'm new to mac os app development and the documentation doesn't ever say that this is not supported (as far as I could tell).
Can I use IAPs if I don't submit to the App Store?
Is there anything different that I should do to setup IAPs when di... | common-pile/stackexchange_filtered |
increase size of multiple histograms
i have the following small multiples but i cannot increase their size. Anyone any idea on how to increase their size?
from pandas import DataFrame
import numpy as np
x = ['A']*300 + ['B']*400 + ['C']*300 + ['D']*500
y = np.random.randn(1500)
df = DataFrame({'Letter':x, 'N':y})
#plt.... | common-pile/stackexchange_filtered |
'df' command doesn't show file system requested in ubuntu 14.04
This strange behavior begins a few day ago. This is df of all file system
michele@OptiPlex-360:~$ df
File system 1K-blocchi Usati Disponib. Uso% Montato su
udev 1974808 8 1974800 1% /dev
tmpfs 397120 1340 3... | common-pile/stackexchange_filtered |
Alternative to RemoveAt and Insert list items
I am looking for a better data structure or method to simply replace an object in an dynamic array. It seems like list is the choice, however I read and notice that the performance of RemoveAt and Insert is not as good as I had hoped.
Let me elaborate on what I am trying to... | common-pile/stackexchange_filtered |
Negative Rotation Speed (vsini)
I've repeatedly seen the rotation speed of a star given as a negative. Does this mean that the star started spinning in the opposite direction at some point?
Your link doesn't work for me.
| common-pile/stackexchange_filtered |
Dispatcher forward method from POST to GET
I need to forward from my FooServlet doPost method to BarServlet doGet method. Is there a way to solve this?
Currently I'm calling the doGet method from my doPost but I'm sure that this isn't the best practice.
You fail to understand the meaning of HTTP methods. Please read o... | common-pile/stackexchange_filtered |
Syntax puzzle with derived template class and inherited member variables
While porting some Windows legacy code and trying to get it to compile with gcc/clang I ran into the following problem which I don't fully understand:
template<typename T> class Base
{
public:
Base() {}
T m_var;
};
template<typename T> c... | common-pile/stackexchange_filtered |
How to use web workers with svelte and esbuild?
I'm following this tutorial on how to use web worker in svelte but I'm getting an error
https://publish.obsidian.md/kometenstaub/50-Programming/Esbuild+web+worker
Svelte file Codeblock where I use worker
import Worker from 'src/timerWorker'
const worker = Worker();
... | common-pile/stackexchange_filtered |
$-\Delta u = f$ in $L^2(0,T;H^{-1}(\Omega))$ (as opposed to $H^{-1}(\Omega)$)
Why does nobody consider the equation $-\Delta u = f$ in the space $L^2(0,T;H^{-1}(\Omega))$?
Eg. given $f \in L^2(0,T;L^2(\Omega))$ find a solution $u \in L^2(0,T;H^1_0(\Omega))$ such that
$$\int_0^T \int_\Omega \nabla u(t) \nabla v(t) = \in... | common-pile/stackexchange_filtered |
PHP - Parse XML with simplexml_load_string - Getting empty values with CDATA?
When parsing an XML array like:
<?xml version="1.0" encoding="utf-8"?>
<Products>
<Product>
<Code>ABC-1001</Code>
<Brand>ZCOM</Brand>
</Product>
</Products>
I get an output of:
Array
(
[0] => Array
(
[Code] => AP1024-DDRI... | common-pile/stackexchange_filtered |
How to make the facebook comments on my website and on page's wall post binded?
everybody.
I am developing the facebook tab application. The functionality is pretty simple and is close to the blog.
Page Admin writes articles in the app, and the link to each article is posted on the page's wall via Graph API.
The wall ... | common-pile/stackexchange_filtered |
Installing GRUB on a different disc
I'm not sure what does the "Device for bootloader installation" do exactly. My Ubuntu install is on a separate drive but I'd rather put a separate EFI partition on an SSD and have kernels and all that stuff load from an SSD. I also have a separate Windows partition and its EFI on the... | common-pile/stackexchange_filtered |
How can i call directly Java Arraylist to be printed to a txt file?
This is my code, this is not a specific program. I just exercise myself with the java ArrayLists and making txt File and to store Arraylist variables in this file. I try to make class where i make method for scanner to make a input and then to store i... | common-pile/stackexchange_filtered |
Django sessions don't work with Apache installed on Ubuntu
In production server I can't login to my website.
I know that it is some bug of Django with MD5 crypt or something like that, but unfortunately I don't remember what I should do. I am searching the answer since half day, but I can't find this website where was ... | common-pile/stackexchange_filtered |
Azure pipeline to run two or more independent pipelines from a wrapper pipeline?
Is it possible to create a wrapper pipeline in Azure DevOps that simply runs two or more independent pipelines (in parallel) and does nothing else?
I have a problem to solve. and the scenario looks like this "*
In my project, I have say 9... | common-pile/stackexchange_filtered |
Why are the "Internal IP address"s of my nodes set to their external IP?
I have recently set up a kubernetes cluster in Digital Ocean. I manually set up 3 machines and created the cluster using kubeadm with the calico network plugin.
I used the following argument with kubeadm init: --apiserver-advertise-address=<IP_ADD... | common-pile/stackexchange_filtered |
How to append to an empty list in Julia?
I want to create an empty lsit and gardually fill that out with tuples. I've tried the following and each returns an error. My question is: how to append or add and element to an empty array?
My try:
A = []
A.append((2,5)) # return Error type Array has no field append
append(A... | common-pile/stackexchange_filtered |
resize field and resize back outside click
I'm new to jquery and I kinda don't get around this. So I have a searchbox (.search) which I want to resize when it's clicked. That does work, the searchfield get's "bigger". But, when I click outside the searchfield I want it to grow back again. I tried doing it with a "body"... | common-pile/stackexchange_filtered |
Breeze theme color problem
I recently upgraded Kubuntu to 17.10 Artful using the dark theme, but when I switched to the default breeze theme, this happened( in Plasma 5.11. I used the backports PPA. And no, even in 5.10, the plasma version kubuntu 17.10 ships with, the default theme was messed up as well)
As you can s... | common-pile/stackexchange_filtered |
SharePoint Calculated field in SharePoint Designer error?
I have taken calculated field as a data field number for adding weekdays excluding saturday and sunday.
It is working good. But the problem is in SharePoint Designer I have triggered action send an email there I have to send to the employee after submitting requ... | common-pile/stackexchange_filtered |
JPQL query to return items with at least one category belonging to a list of categories
I want to make a query similar to the following jpql query:
SELECT i FROM Item i WHERE i.category IN :categories
This query returns items with category belonging to the passed :categories list.
But the query I need needs to be some... | common-pile/stackexchange_filtered |
Can I use PBKDF2 for authentication and decryption?
I want to store a hash for authenticating a password. I also want to use the same password for decryption. Can I use PBKDF2 for both? (I plan to use different salts for the authentication and the decryption, of course, because otherwise the authentication result wo... | common-pile/stackexchange_filtered |
GitLab CI custom variable not recognized in rules
When defining a variable in the variables block which uses a predefined CI variable, it cannot be referenced in the rules blocks. Here, only job_1 gets executed:
variables:
PRODUCTION_BRANCH: $CI_DEFAULT_BRANCH
stages:
- stage_1
job_1:
stage: stage_1
script:
... | common-pile/stackexchange_filtered |
Botframework how to authenticate first and than use the token to make graph api calls
Auth Dialog:
import { ChoicePrompt, DialogSet, DialogTurnStatus, OAuthPrompt, TextPrompt, WaterfallDialog, ComponentDialog } from 'botbuilder-dialogs';
import GraphClient from '../graph-client';
const MAIN_WATERFALL_DIALOG = 'mainWat... | common-pile/stackexchange_filtered |
Why was this comment deleted?
The comment to this question on the screenshot below got promptly deleted.
What was wrong with it? Which Law.SE term did it violate? If it did, in the opinion of whoever deleted it, contain something prohibited, what was it, how do we define it and what test do we apply to see if the cont... | common-pile/stackexchange_filtered |
Is having only target SDK enough to develop UWP Application?
This question sound's to be little basic but I don't find any documentation on MSDN. Actually, in my machine, I have 4 UWP SDK version(17134, 16299, 14393, 15063) installed which is consuming a lot of disk space.
My App min version is 14393 and target versi... | common-pile/stackexchange_filtered |
Excel .xlsx file not opening after downloading the file from the server in java
Here is my sample code. I am using eclipse , tomcat server .Browser as IE9.
protected void service(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
response.setContentType... | common-pile/stackexchange_filtered |
Application C# for Skype
I just need a simple program that allows me to dial numbers and call via SkypeOut. I tried with Skype4, but I can't make a call. I just need to have 13 buttons (0 to 9 dial numbers) "+" "Call" "Finish". It will be for my car, and I need to develop it in C#. Can anyone help mi with that? Thanks ... | common-pile/stackexchange_filtered |
CSS3PIE & HTML5shiv printing issues IE8
I'm having problems using CSS3PIE & HTML5shiv for this huge website. It comes down to printing issues in IE8. Whenever I want to print a webpage, IE8 just seems to crash. I've done some research and this printing crash seems related to the use of CSS3PIE and HTML5shiv.
Any way I ... | common-pile/stackexchange_filtered |
How does the duality functor with respect to $K$ behave on morphisms?
In A duality formalism in the spirit of Grothendieck and Verdier Boyarchenko and Drinfeld give the following definition of the terms dualizing object and duality functor:
An object $K$ in a monoidal category $M$ is said to be dualizing if for every ... | common-pile/stackexchange_filtered |
Read .bmp image and subtract 10 from 10th byte of the image and re-create the image in Java
I am creating an application which will read image byte/pixel/data from an .bmp image and store it in an byte/char/int/etc array.
Now, from this array, I want to subtract 10 (in decimal) from the data stored in the 10th index of... | common-pile/stackexchange_filtered |
handling interruptions in insert
I'm processing(aggregating) a log file, and this is my process:
convert binary file to array of strings
start upsert at line $n (taken from a process_log record)
handle individual strings
parse string as object
insert object into various rollups
update $n record in process_log
The pro... | common-pile/stackexchange_filtered |
Search a file (10MB+) for keywords occuring in a similar context (<512 word length away)
I want to extract paragraphs from a file where input keywords occur together or a certain distance apart (maximum ~512 words apart). The file size is 10MB and although it would've been fine to do a naive search for every keyword, I... | common-pile/stackexchange_filtered |
onEdit(e) not generating trigger event when cell value changes due to inbuilt function
Below code monitors cell value changes in between (Row 1 to Row 5, column 1 to column 5), and it tracks and log event in different sheet.
Which is working only when changes are being done manually in spreadsheet cells. (because onEd... | common-pile/stackexchange_filtered |
How to change color of CAGradientLayer like screensaver?
I was created UIView with applying CAGradientLayer color effect as i attached Image Bellow. Now in this i want to change it's gradient color change top to bottom side smoothly like screensaver. I have Been tried using NStimer that bit Done but its changing color ... | common-pile/stackexchange_filtered |
Is encrypting credit card numbers one by one with rsautl secure?
I wish to encrypt credit card numbers one by one using asymmetric encryption on the command line. My current approach is this…
Encrypt:
/usr/bin/openssl rsautl -encrypt -inkey 'myKey.pub' -pubin | /usr/bin/openssl enc -base64
Decrypt:
openssl enc -base64... | common-pile/stackexchange_filtered |
How to define the size of List<Map<String, Object>>?
I am making a method that needs to return a list.
private List<Map<String, Object>> mapDO(List<dO> dOList) {
List<Map<String, Object>> ordersMapList = new ArrayList<>();
Map<String, Object> ordersMap = new HashMap<>();
for (int i = 0; i < dO... | common-pile/stackexchange_filtered |
vim-latex: "I can't write on ..." error
I am using vim-latex. I compile TeX document using \ll command, then \lv to view it. It generates a PDF file. So far, so good. The problem starts when I try to modify my TeX file and compile it again with \ll. I get an error:
I can't write on "filename".
I have to close the pre... | common-pile/stackexchange_filtered |
Google structured data
Before I ask I would like to mention that I have searched for solution...
I am trying to build Goggle's AMP page. I used their template and tested it with Chrome's Developer Tools, however, in Google's own Structured Data Testing Tool I get an error and two warnings. I'm stuck trying to figure th... | common-pile/stackexchange_filtered |
Is a visually impaired person considered a Person with Reduced Mobility (PRM)?
In Europe, all airlines are required to assist people with reduced mobility. I'm visually impaired, and soon flying with Iberia. So, I called them to ask for assistance at the airport. The guy who answered said that they only offered assista... | common-pile/stackexchange_filtered |
Essential supremum of function in real line
If the pre-image of the function is whole real line and is defined as following:
\begin{equation}
f(x) =
\begin{cases}
1 & \text{if}\,x\in\mathbb{Z} \\
0 & \text{otherwise}
\end{cases}
\end{equation}
What would be the essential supremum?
I underst... | common-pile/stackexchange_filtered |
Issue with ejb-jar.xml Error processing EjbDescriptor
I have a strange issue where if the ejb-bar has one bean, all works well, as soon as I've adding another bean, I am getting the above error when deploying to GlassFish.
I have made the second bean almost identical to the first and added the @EJB annotation with the ... | common-pile/stackexchange_filtered |
Google login in 3rd party app
I installed a 3rd party app and logged in using another Google account.
I then deleted the app.
Then when I opened google website on safari browser, it had already logged me in using my account.
How do I remove this?
| common-pile/stackexchange_filtered |
Why does my sound so dull?
I use beyerdynamics dt770 to mix.
I heard someone say that there was a problem with my EQing.
When I eq what I do is, I sweep for sounds that make the audio in question seem too resonant, like boxy then I reduce those.
I then compress and sweep for the sweet spots in the audio in question.
I... | common-pile/stackexchange_filtered |
Failed to unmarshall yaml
I have an execute endpoint that runs a child process which in turn runs a rancher-compose command to start up some containers within a host on rancher. When I hit this /execute endpoint from the node app it work fine and starts the containers as expected. When hitting the /execute endpoint fro... | common-pile/stackexchange_filtered |
LinearLayout: layout_gravity="bottom" not working on Horizontal LinearLayout
Ok, First of all, I searched all the internet, but nobody has a similar problem like this. So, all I want is to have 3 textViews, bottom aligned with the screen and with the same width. Here is an image representing what I want:
And here is m... | common-pile/stackexchange_filtered |
Selection of primitives when clicked by mouse not working
I'm developing a solitary board game, which has a piece per square, and each piece can be of two colors. If I click a piece, the four adjacent ones (top, bottom, left and right) all change to the next color.
I'm having problems with detecting in which piece the ... | common-pile/stackexchange_filtered |
How can I graphically visualize numerical data that I receive through a serial port?
I am trying to design an application in python to be able to read the data sent by a PIC microcontroller, for this I will use a UART-To-RS232 converter and then a RS232-To-USB converter to be able to receive the data on my computer, th... | common-pile/stackexchange_filtered |
How to get CSS of a clicked div using jQuery?
Can anybody know how to get border-color of a div using jQuery.
$("#divcolor").click(function (){
alert("dsf");
var divcolor = $(this).css("border-color");
alert(divcolor);
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></scr... | common-pile/stackexchange_filtered |
Chaining WireGuard Servers: Can ping both from client, but can't access internet. IP routing issue?
I am attempting a chained/double-hop VPN setup where all client traffic passes through 2 servers before reaching the internet:
Client → Server1 → Server2 → Public Internet
All peers are on these private address blocks: ... | common-pile/stackexchange_filtered |
Dynamically find localstorage key using jQuery
I am trying to work out a way to DRY up the following code, which looks to see if certain local storage keys are present, then does something if they are. It could have many keys, but they will all be numbered to marry to the relevant element id, i.e, key: item1 > #item1 e... | common-pile/stackexchange_filtered |
Are there free cloud computing platforms for biology projects?
I want to implement the analysis found in the paper RNA-Seq of Tumor-Educated Platelets Enables Blood-Based Pan-Cancer, Multiclass, and Molecular Pathway Cancer Diagnostics The project id is 281708. It has 285 samples comprising about 300 Gb of read data. T... | common-pile/stackexchange_filtered |
If a president is removed from office after being impeached, when does the vice president take office?
In the United States, if during an impeachment trial the Senate votes to convict the president, when does the vice president take office as the new president? Is is immediately after a vote is taken, or is there a wai... | common-pile/stackexchange_filtered |
Unable to create an RDD from an existing RDD - Apache Spark
I'm trying to create a new RDD from an existing RDD.
Intilaize an Array
scala> var a1 = Array(1,2,3,4,5,6,7,8,9,10)
a1: Array[Int] = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
Create the first RDD
scala> var r1 = sc.parallelize(a1)
r1: org.apache.spark.rdd.RDD[I... | common-pile/stackexchange_filtered |
How to create click-able link in MobaXterm
I would like to create an url link that can be CTRL-Click-ed in MobaXterm and opens the link in the default local the browser.
A simple web address (like http://example.com) is recognized by MobaXterm and you can click on it. However i need to add a port, which is not recognit... | common-pile/stackexchange_filtered |
How to sort date strings (format example: 2014 7 23) in JavaScript?
In JavaScript I'm trying to sort an array of objects, each having a date, by date, but I ran into an obstacle. Also the date's are input from 3 dropdown boxes on a site, so I just want 3 numbers. This means I cannot use JavaScript's Date() object, sinc... | common-pile/stackexchange_filtered |
Name 'Customer' is not defined CBV ListView
urls.py
from django.conf.urls import url
from system import views
app_name = 'project'
urlpatterns = [
...
url(r'^cust/([\w-]+)/$',views.PublisherBookList.as_view()),
...
]
views.py
from . import models
class PublisherBookList(ListView):
def get_queryset(... | common-pile/stackexchange_filtered |
How to get some text values in python below text format
I have sentences like
// string1 = value1
// string2 = value2.....
so on, how can I get only "values" using python
Actually I am thinking that need to take values in a list. is it right.
print [line.split('=',1)[-1].strip() for line in s.splitlines()]
>>> st... | common-pile/stackexchange_filtered |
PL/PgSQL calling a function inside a loop giving error
The code bellow is giving error on w_add_ax_extra(1, 'k', 'v') previously it was w_add_ax_extra(some_id, kv.k, kv.v) I changed it to k, v to reproduce the same error
declare
kv record;
begin
-- Lines skipped
for kv in select * from (select (each(extras)).*) ... | common-pile/stackexchange_filtered |
Get type of obj.constructor in TypeScript
I am trying to get the keys of an object's constructor's prototype.
type PrototypeKeys<T> = T extends { constructor: { prototype: infer P } }
? keyof P
: never;
class Foo {
foo() { return 1; }
}
const foo = new Foo();
type FooPrototypeKeys = PrototypeKeys<typeof foo>; ... | common-pile/stackexchange_filtered |
Summation of only numbers in spreadtab package
I recently discovered the spreadtab package since I needed some spreadsheets with some calculations.
I would like to produce a LaTeX file with the grades of my students, i. e. something like this (eight problems 10 points each and the total sum). However, I also would like... | common-pile/stackexchange_filtered |
How to multiply 2 images in JavaCV
I currently have a binary black and white image that I have used cvThreshold on, and I would like to get the color back on the white part of the image.
From my understanding multiplying the original image with the binary image will result in this effect. I am however unsure how to do ... | common-pile/stackexchange_filtered |
Is the bar resolution of complexes dg-functorial?
Let $k$ be a commutative ring, and let $V$ be a complex of $k$-modules (more in general, we can take an $\mathcal A$-dg-module, where $\mathcal A$ is a dg-category. We can construct the bar resolution $B(V)$ of $V$, which comes with a quasi-isomorphism $B(V) \to V$ (her... | common-pile/stackexchange_filtered |
App Crashes when clicking in different TextViews very fast
I am new to android and have a Fragment with a container view (a framelayout). There are two TextViews on top of it, like tabs. Each TextView ie txt1,txt2 adds 2 fragments ie frgmnt1,frgmnt2 respectively. When the TextView is clicked, the corresponding Fragment... | common-pile/stackexchange_filtered |
Is it possible to enforce two classes to implement the same field names but of differing type at compile time?
Let's say there's two parallel classes:
class A(
val stringField: String,
val intField: Int,
val floatField: Float
)
class B(
val stringField: Boolean,
val intField: Bo... | common-pile/stackexchange_filtered |
Why would zero-coupon perpetuity not be worthless (simple enough so grandma understands)
The context is the negative yielding treasuries in Europe (Germany). Here is a quote I found on the matter:
Why would a zero-coupon perpetuity not be worth exactly zero? Because
its nominal value adds to the stock of debt of the... | common-pile/stackexchange_filtered |
SSH.NET How to return a boolean from command execution
I am new to the SSH.NET library and I understand the basics of it such as connecting, executing a command and returning the output.
But my question is, how can I return a true/false statement if I wanted to check if a background process is running or not?
So for e... | common-pile/stackexchange_filtered |
master's degree vs master's course
Before, I thought that "degree", when associated with an academic title (e.g. bachelor, master), always meant the qualification given to a student after he/she has completed his/her studies. However, I have recently found out by reading the Cambridge dict corresponding entry that it c... | common-pile/stackexchange_filtered |
Sorting a list of lists by every list and return the final index
I want to sort a list with an arbitrary number of lists inside to sort by each of said lists.
Furthermore I do not want to use any libraries (neither python-native nor 3rd party).
data = [['a', 'b', 'a', 'b', 'a'], [9, 8, 7, 6, 5]]
I know I can achieve t... | common-pile/stackexchange_filtered |
Show/hide span on hover
I'm trying to show a span when an li with the class of .image is hovered, then preferably hide it once the mouse is removed from the li. I'm using the code below but to no avail.
The HTML
<ul>
<li class="image">
<span class="post_meta">Test 40in x 9in</span>
<img src="http://w... | common-pile/stackexchange_filtered |
How to debug a Windows 7 Install?
I am trying to do a fresh install of Windows-7 RTM. The machine keeps locking up at the same point of the install.. .
Finishes Copying Files
Finishes Expanding Files
Finishes Installing Features, etc.
Freezes at "Completing Installation"
Is there any way I can debug the install to f... | common-pile/stackexchange_filtered |
How to get IMEI number programatically in swift iOS?
I am making an iOS enterprise app which need iPhone/iPad IMEI, serial number and UUID programatically in Swift but I am not getting any way to find it out.
Apple doesn't allow us to get IMEI number directly but please let me know if any third party frameworks/api th... | common-pile/stackexchange_filtered |
I need an object to do anything
Or at least, to pretend to do anything.
>>> three = Three()
>>> three.value()
3
>>> three.sqrt()
3
>>> three.close()
3
>>> three.someRandomFunctionWithMadeUpParameters("hello, world", math.PI, True)
3
>>> three.stopSayingThreeDamnIt()
3
Is it possible to implement class Three in Python ... | common-pile/stackexchange_filtered |
Entry of "bury one's head in the sand" into English
How did the phrase "bury one's head in the sand" meaning "to ignore a bad situation hoping it will disappear" (coming from the misbelief that ostriches do this to hide from predators) end up being part of English?
At what time did the idiom and perhaps stereotype ente... | common-pile/stackexchange_filtered |
Any book on the timeline of progress of mathematical concepts and applications?
I was wondering if there is any book that chronicles the progress of Math over the centuries and also mentions about how/when applications of various theories were discovered/invented.
I have been trying to study university level math and I... | common-pile/stackexchange_filtered |
changing title of page doesn't work with facebook meta tags
I'm trying to set my meta tags for facebook like, but I have like button on changing page which means that title will be always different. My meta tag look like:
<meta property="og:title" content="<?php echo $listing['Listing']['title']?>" />
or whatever code... | common-pile/stackexchange_filtered |
unable to capture 'g-recaptcha-response' for Recaptchav2 with Selenium
So I've been trying to build a webscraper but some of the data I need to scrape is locked behind a reCaptcha. From what I've gathered scouring around on the internet is every captcha has a TextArea element with the 'g-recaptcha-response' that gets f... | common-pile/stackexchange_filtered |
Ruby - "bundle install" json gem error
I am working on Windows 10. I successfully installed Ruby, MSYS2 and DevKit, but after trying to run the following command:
bundle install
it throws me an error
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.... | common-pile/stackexchange_filtered |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.