text stringlengths 70 452k | dataset stringclasses 2
values |
|---|---|
SIGABRT error for - https://www.codechef.com/problems/PRIME1
I am using sieve of eratosthenes to solve this problem but it is giving me SIGABRT error although my code is working fine on codeblocks....
Please help me modify this code to remove error....
My code is...
#include<vector>
#include<iostream>
#include<stdio.h>... | common-pile/stackexchange_filtered |
AS3 Event Bubbling outside of the Scenegraph/DisplayList
Hi just wondering if it is possible to take advantage of event bubbling in non display list classes in AS3.
For example in the model of an application where there is a City class that contains many Cars. What methods are there to attach an event listener to a Cit... | common-pile/stackexchange_filtered |
Change the date if the condition is met (SQL)
How could I check if the cancellation of the document (row 1 in the Table, BUSINESS_STAE = Canceled or BUSINESS_STAE = CancelledInFirstNDays) happened in the month before the last active row (row 2 in the Table, BUSINESS_STAE = Active) using REPORTED_DATE?
If it happened, I... | common-pile/stackexchange_filtered |
C++ and C# COM Event Performance. Help
Good day.
CppApp and CsApp Event Handle Design Changed. For Industry application.
Old design.
CsApp pull event from CppApp.
There are a lot of events from CppApp. So we created two threads in CsApp to handle the events from CppApp. It worked very well.
New design.
CsApp and CppA... | common-pile/stackexchange_filtered |
Next and Previous Buttons with php
I have been having a problem getting next and previous buttons to work using a php webpage connected to mysql database. I am not sure what is wrong but i think it may have something to do with the offset. Right now the button are not working at all you click them and nothing happens... | common-pile/stackexchange_filtered |
Allowing users to select options from a dropdown
My app allows users to create profiles and enter information (description, name, etc..). I'd like for them to be able to select their language from a dropdown and have that choice saved to their record in the User table.
I understand that I have to have a separate langu... | common-pile/stackexchange_filtered |
Why does this trigger a force close on Android?
Why does this code trigger a force close in Android?
`score.setText(Integer.parseInt((String) score.getText())+1);`
score is a TextView, and I am simply increasing the number by 1. I have predefined a String resource to be the initial number in the score TextView.
I am q... | common-pile/stackexchange_filtered |
Setting up dynamic chat rooms in FlaskSocketIO chat
I want to let user's of my mini chat to create their rooms dynamically. For now i got const in flask server app:
# Predefined rooms for chat
ROOMS = ["Lounge", "news", "games", "coding", "food", "cars"]
And user join/leave routes are in flask:
@socketio.on('join')
de... | common-pile/stackexchange_filtered |
Why is tuple faster than list in Python?
I've just read in "Dive into Python" that "tuples are faster than lists".
Tuple is immutable, and list is mutable, but I don't quite understand why tuple is faster.
Anyone did a performance test on this?
Please edit your question and add a link to the context of where you're ge... | common-pile/stackexchange_filtered |
How can I access a related object in a form being displayed in Symfony 1.4
I have a need to display a form to enter a blog post on the same page on which a news story is being displayed. The user is entering a blog post related to the story.
In my blog form I'm currently doing this to get the id of the story being disp... | common-pile/stackexchange_filtered |
Timescale DB not creating hypertable
I'm following the tutorial from timescaleDB.. https://docs.timescale.com/timescaledb/latest/how-to-guides/hypertables/create/#create-a-hypertable
but I cant create a hypertable.. I have successfully installed postgres and timescale. Why cant I make a hypertable?
package main
import... | common-pile/stackexchange_filtered |
VR without Gyro
Is there any app similar to Google Cardboard that can work without Gyroscope sensor. And by work I mean:
Play simple movies that doesn't require head movement
And if possible, can simulate gyroscope with help of accelerometer and compass. It can be done. Here is a open source development going on abou... | common-pile/stackexchange_filtered |
Using JSON builder how do I stuff a Map into each Object of Object Array
Given: myList = [request:request,actions:actions] where request is an object and actions is a map.
Trying to get something like this:
{data:[
{a:'a',b:'b',actions:[c:'c',d:'d']},..
]}
where a and b are request properties while c and d are ac... | common-pile/stackexchange_filtered |
How do I launch manually installed applications?
I'm completely new to Ubuntu. I'm used to being able to execute the .exe file in Windows. But in here, when I click on a file that looks to be a start up, it doesn't work. I'm using Ubuntu Mate on a Raspberry Pi 2.
I typed
sudo chmod +r+x ZSNES
It said that zsnes was no... | common-pile/stackexchange_filtered |
Segmentation fault when function is called from a specific class
When I try to access shader_id from my Shader class, it segfaults, but only when I try to access it from my OBJModel class. It doesn't matter if I make shader_id public or if I make it private and access it from a function.
This is the error I get when ru... | common-pile/stackexchange_filtered |
Angular2 view not updating when receiving data from rest api and mapping to hash map
I have a hash map that I use for the content of my app - basically I have a service, get some data from a JSON file, Map it and then use that to fill my views. In the future I would like have have i18n support in my app. Now some of th... | common-pile/stackexchange_filtered |
gdb assertion failure
I am compiling a test case for some code I have written with g++ and trying to debug it with gdb on the command line. The code compiles without errors or warnings, but when I launch my executable with gdb I get the following error:
Assertion failed: (g.numPlayers>0 && g.numPlayers<=MAXPLAYERS && c... | common-pile/stackexchange_filtered |
How can I change the docker subnet in Windows Docker Desktop
I understand that docker desktop creates a VM host for my containers to run.
When I run docker inspect {container_name}, I can see my container has an address of 172.x.x.x.
I use a subnet <IP_ADDRESS>/13 for lab networking, and so I've found that any time I t... | common-pile/stackexchange_filtered |
Twilio TaskRouter Serverless Reservation Function
Has anyone completed or found a guide on routing/ accepting a task router reservation?
Example flow:
Call # > picked up by Twilio Studio and enqueued to TaskRouter Workspace with attributes > task router workflow associates to a taskrouter queue and finds available agen... | common-pile/stackexchange_filtered |
Getting CST time for asian timezone
Why am I getting wrong timezone output for this code? The timestamp is correct (2:30 AM), but why am I getting CST as timezone format?
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("hh:mm a (zz)")
.withZone(TimeZone.getTimeZone("Asia/Shanghai").toZoneId())... | common-pile/stackexchange_filtered |
Jumble solver algorithm
I need to write code for the given problem:
I'm provided with a word and I need to find all the possible combination of it that matches with a given list of words in a file.
Here's my code. Can I make it much better? I'm sure it can be done. Please offer suggestions.
dict = {} ... | common-pile/stackexchange_filtered |
How to remove Malaysia keyboard on Windows 10
Well, I'm from Malaysia so my region of course is Malaysia. I think the English(Malaysia) keyboard is added automatically so I want to remove it. But I looked in the Settings and Control Panel, both shows no result. Only the English(United States) and Chinese(Simplified, Ch... | common-pile/stackexchange_filtered |
mySQL command to aggregate matches (Drupal to Wordpress migration)
I'm currently doing a migration of a Drupal blog to Wordpress on a MySQL database.
I've imported all of my posts, and I'm currently trying to associate all of my drupal post images (located in a story_image widget) to my wordpress posts.
When I run this... | common-pile/stackexchange_filtered |
the tab character in python really confuse me
i = 1
while i <= 6:
print 2**i,' ','\t', 3**i
i += 1
print
i = 1
while i <= 6:
print 2**i ,'\t', 3**i
i += 1
print
This is the two different code I wrote. For the first one, I add four spaces and the output is strange. If I change the four... | common-pile/stackexchange_filtered |
Argument to ivy-read action when collection is an alist
The documentation of ivy-read states that if the collection supplied is an alist, the selected candidate is passed as a cons cell to the function supplied in the :action argument.
So why does the code snippet below return "C1" or "C2", depending on the selection, ... | common-pile/stackexchange_filtered |
DrawImage scales original image
I am stitching several images together vertically and horizontally to create one bigger image (in which the total width and height are the sum of the widths and heights of the individual images) using Bitmap and System.Drawing.Graphics in C#. The size of the individual images are 256 px ... | common-pile/stackexchange_filtered |
Convert array index into String using PHP?
array:5 [▼
"open" => "info"
"on_hold" => "warning"
"answered" => "success"
"dev. In progress" => "success"
"closed" => "default"
];
I need to use this array and get only the index to String like this
'ticket_statuses' => [
'open' => 'info',
'on_hold' => 'war... | common-pile/stackexchange_filtered |
chromecast - error creating sender side web application details
I'm working on building integration of chrome cast into our web player. I'm having issues with building sender side of the process. Are there any good examples of the sender side of things?
I've visited this page: https://developers.google.com/cast/chrome... | common-pile/stackexchange_filtered |
How to install Windows 8 next to Ubuntu?
I've installed Ubuntu and now I want to install Windows 8. I've already done restoring of grub from the terminal, but now I dont know what to do. What should I do to install Windows? Please tell me all the steps. Thanks in advance.
UEFI with newer system or BIOS with older sys... | common-pile/stackexchange_filtered |
Script to parse CSV values
I'm using this code to parse the values and store them in List. The first row has names which are getting stored fine. But when storing values, only the second row is bring saved. I'm not sure what edit I need to make so that it parses all other rows as well.
Please see image and code bel... | common-pile/stackexchange_filtered |
Product of functions of class $C^r$
Let $f,g:\mathbb{R}^n\rightarrow\mathbb{R}$ be of class $C^r$. Show that the function $h(\textbf{x})=f(\textbf{x})g(\textbf{x})$ is of class $C^r$.
I'm posting this as a reference for myself, so I'm answering my own question.
So I'm looking at $r=1$ first. That $f$ is of class $C^... | common-pile/stackexchange_filtered |
SQL Party-Relationship Model - Consistency Between Sub and Super Class
In trying to solve a problem I was having with having different types of the same table, I decided to go with the Party Model design for relational databases - using multiple tables to represent the sub-objects.
Using this post as well as this one a... | common-pile/stackexchange_filtered |
GoLang - How to Execute/Spawn a process as 'Hidden'
This may only pertain to Windows, but I want to spawn a process from my GO program so that it runs hidden - the process will calculate some results and return them over stdout. I just don't want the annoying command window to popup while it is running (it's really ju... | common-pile/stackexchange_filtered |
Load HTML in WebView with local css and js
I am displaying a webview with a remote html content get as a string from a remote server.
I store the html locally for a no connection use of my application.
Moreover I also store a .js script and a .css style file locally. These files can be updated by the server.
I store a... | common-pile/stackexchange_filtered |
Confusion of the Isobraic Process Heat equation
I was currently reading a wiki article on Isobaric Process (Link at bottom f post). And am confused as to why in there derivation of heat of a an isobaric system they use specific heat capacity for volume when volume is changing and pressure is constant, so why they relat... | common-pile/stackexchange_filtered |
CentOS 7.4 Samba share access denied
I have set up Samba server on CentOS 7.4 and supposedly allowed it in SELinux.
I can successfully access anonymous share on root filesystem but cannot access directories on mounted NTFS partition. In Win10 I get
you do not have permission to access \<IP_ADDRESS>\soft
Here is how ... | common-pile/stackexchange_filtered |
Rotation Vector sensor keeps reporting high accuracy even when clearly wrong
I'm using a rotation vector sensor like this:
val sensor = sensorManager.getDefaultSensor(TYPE_ROTATION_VECTOR)
I register a SensorEventListener on it:
private class OrientationListener : SensorEventListener {
private val rotationMatrix =... | common-pile/stackexchange_filtered |
Custom Relationship in Entity Framework
I have got the following three tables (just an example)
public class User
{
public int id { get; set; }
public string name { get; set; }
public List<Code> Codes { get; set; }
}
public class Device
{
public int id { get; set; }
public string name { get; set; }... | common-pile/stackexchange_filtered |
PHP $_GET method is not working on server but working on local host
I am facing a issue with GET method,
I have 2 pages with name index.php and packages.php...
index.php generated POST method request and passing values to the package.php using the below code
if(isset($_POST["categorystring"])){
$retval = $_POST["categ... | common-pile/stackexchange_filtered |
Struts 2.5: Validation occurring but no message displayed
Ok banging my head against a brick wall here for the last 2 days as my validation message will not output on the JSP although validation is clearly happening...
I have set up simple validation for a required field through an action-validation.xml
<validators>
... | common-pile/stackexchange_filtered |
Print element after component at some point when iterating through array in Vue.js
I am using a for-loop on the component element and when the loop's third iteration comes, I want to display a <p> element which is just next to the <component> element.
The problem is that to access the iteration variable i, the <p> elem... | common-pile/stackexchange_filtered |
Check this regular expression please
I'm new to writing Regex's. I did a little bit of research and came up with this regex for the string:
7.0 GB of High-Speed Data Plus Unlimited^ Talk & Text (69.00)
Am I anything close to getting it right?
^(\\d{1}\\.\\d{1} \\s [G.t] \\s (\\d{2}\\.\\d{2})$
Have you tested it? Wh... | common-pile/stackexchange_filtered |
'Die Benutztere'. What is this? Does it really exist?
I was trying to translate my English documentation into my own, wonderfully terrible, German when I noticed that this sentence:
Der Benutzter muss nur einige Informationen über ... geben
was being highlighted in green. Indicating... STOP! Grammartime! The suggest... | common-pile/stackexchange_filtered |
LIDAR produces "phantom walls"
Hello,
We have a SICK LMS100 LIDAR attached to the front of our mobile robot and we have been using it for several years. We suddenly started noticing "phantom walls" appearing in the laser scan when viewed in RViz. You can see a video of the phenomenon here. The small yellow dots in ... | common-pile/stackexchange_filtered |
Trigger jQuery UI autocomplete at minLength = 3 but 1 when only digits
I have an autocomplete input field, and I want it to search on objects with a label (text) and an id (integer).
The autocomplete must allow users to search either on the textual label or the id. The server part is ok, but on the client part, I woul... | common-pile/stackexchange_filtered |
expectation of the function of Wishart matrix eigenvalues
For Given a $N×M$ random complex gaussian matrix $X$ where $M=XX^H$, let $\lambda_1>\lambda_2>\cdots>\lambda_N$ be the ordered eigenvalues of $M$ my objective is to get an estimation of
$$
f = \left(\sum_{i = 1}^{\min(N,M)} \frac{1}{\sqrt {\lambda_i} } \right)^2... | common-pile/stackexchange_filtered |
HeidiSQL Before Update trigger error when manually modifying updated column value
BEGIN
SET NEW.value_result = NEW.value_a + NEW.value_b;
END
I'm trying to understand why if I manually modify the value_result column is showing the following error:
MariaDB: Error
0 rows updated when that should have been 1.
If I mo... | common-pile/stackexchange_filtered |
iOS recorded video for all web browser support
In ios application, capturing video in mp4 format and uploading it to amazon server.
we are embedding this uploaded video url in html file using video tag.
The problem is, it wont play in firefox since is it doesn't support mp4 format .
in some forum and blogs I have seen ... | common-pile/stackexchange_filtered |
Is "upgrade" the right word to use in this context?
My friend said to me,
"I need to upgrade my mobile."
Generally, "upgrade" means "to improve the quality of something you already have".
But my friend wanted to say that he's gonna buy a new phone. Should I correct him or not?
Because I have heard lot of people say... | common-pile/stackexchange_filtered |
Use a GQLObject as arg for a mutation?
I have following mutation on serverside (nodeJS) (RequiredDataType is imported):
mutationA: {
type: MutationResponseType,
args: {
id: {
type: new GraphQLNonNull(GraphQLString)
},
name: {
type: new GraphQLNonNull(GraphQLString... | common-pile/stackexchange_filtered |
at command is not executed
I am trying to make the at bash command to run, but it is not working for me. I can add a job to the queue, but it is not run when the time is up. What am I doing wrong?
hpek@melda:~$ cat /usr/lib/cron/at.deny
hpek@melda:~$ atq
hpek@melda:~$ at now +2 minutes
echo TTTEEEST
job 12 at Sun May ... | common-pile/stackexchange_filtered |
How can I convert text (String) to image (UIImage) in Swift?
I did update of Xcode, cocoa pod, alamofire, alamofireimage today,
now I have a red marque on my code about text to image.
I am a beginner with coding.
func textToImage(drawText text: NSString, inImage image: UIImage, atPoint point: CGPoint) -> UIImage {
... | common-pile/stackexchange_filtered |
ios error: GooglePlus/GooglePush.h file not found
My project has GooglePlus ios SDK-1.7.1
Today morning suddenly xcode has shown me this error while running my project. Due to the error I am Unable to build my project.
Restarted xcode & macbook few times, error gone.. It worked couple of times but later the error was... | common-pile/stackexchange_filtered |
Compute z-score by two groups
I have a repeated measures data-set that I am working on. The data look like this:
ID=c('X1', 'X1', 'X1', 'X1', 'X2', 'X2', 'X2', 'X3', 'X3', 'X3', 'X3', 'X4', 'X4', 'X4', 'X4', 'X5', 'X5', 'X5', 'X6', 'X6', 'X6', 'X6')
Diag=c('Con', 'Con', 'Con', 'Con', 'Con', 'Con', 'Con', 'AD', 'AD', 'A... | common-pile/stackexchange_filtered |
jquery datepicker not display on my django project
I am trying to display a datepicker on my web little project with the help of django frame.
The case is that when I do the request to my page it displays everithing ok, but the datepicker calendar do not pop-up.
Could you help me? My code is:
My class:-----------------... | common-pile/stackexchange_filtered |
Visual representation of a Ranking over time (image provided)
[Disclaimer: I initially posted this question on stackOverflow 2 months ago and think it might be better suited for this forum (link to original question)]
The graph below shows a ranking of countries at 10 different points. The cool thing with this graph is... | common-pile/stackexchange_filtered |
How to populate a dict
I have a dict in this format:
names = ['Luis','Andres','Carlos']
my_dict = {'Name': names, 'Age'=['----']*len(names),'Address':['----']*len(names)}
I get the rest of the data through a request, using 'Name' as the input, like this:
for i in range(len(my_dict['Name'])):
data = request... | common-pile/stackexchange_filtered |
Is overriding controllers in Prestashop not being broken after CMS upgrade
Well, I think the title is containing the purpose of my question.
Prestashop documentation is not, in my opinion, clear about updates and their effects. I find no sentence in the documentation indicating that I can always override front controll... | common-pile/stackexchange_filtered |
Specifying Security Group for EB Load Balancer
I spent quite some time finding out that I need to modify the Security Group if I want to enable HTTPS on Elastic Beanstalk. I mean on the frontend, not on the EC2 instance. This is nowhere mentioned in Amazon's documentation. They have this nice switch where you can enabl... | common-pile/stackexchange_filtered |
MS Access writes a decimal with the proper precision, but reads back a shorter precision
I have a field on a subform (in MS Access, 2010) that is supposed to accept a decimal(6,5). The format is set to "general number", and the decimal places are set to 5.
Any number I enter that has more than 2 decimal places saves c... | common-pile/stackexchange_filtered |
The effects of special relativity when accounting for two reference frames
If reference frame A is travelling past reference frame B could one argue that it is in fact B that is motionless as their motion is relative to each other? If this is the case then how does one measure a particular objects motion relative to li... | common-pile/stackexchange_filtered |
Why is my grid not saving more than one row?
I have a grid embedded in a popup that stores user selected items from another grid. The user highlights the desired row, clicks a button, and it is added as a new row in the grid based on the information of the highlighted row. For some reason, it is not adding a new row, b... | common-pile/stackexchange_filtered |
base64_decode is not working with php8.1 & magento 2.4.4
We are using Magento 2.4.4 on php8.1 and one of the magento core file is having a method which is using base64_decode() method.
Can you please suggest alternate of base64_decode();
$filterString = base64_decode($filterString);
Have you considered that you may ha... | common-pile/stackexchange_filtered |
Can you switch a relay using 120V AC?
I'd think that switching a relay with 120V AC at the coils would not work due to this: https://gyazo.com/2a26aab1dbc70d3da16d0e5e31f1e759
Is that correct? If so, does that also mean 48VDC is the max voltage the coils of this relay can handle?
What I'm trying to do is switch on/off ... | common-pile/stackexchange_filtered |
SELECT with foreign key and JOIN table MYSQL
I have a table with Contracts and Dates, in table contracts I can have subordinate contracts and superior contracts. I want to select count of sub contracts for every sup contract (something like select how many employees each manager has) in my table Contracts I have id_con... | common-pile/stackexchange_filtered |
ACL Error when assigning AD Rights
I have a powershell script that can create multiple Active Directory users in one run. My issue is assigning ACL rights to the home directory. It seems to always work if there is only one user to create. When there are multiple, however, any account after the first may fail or may wor... | common-pile/stackexchange_filtered |
How do I write a string in a particular position in pdf?
I want to write a string in some random location in pdf page in java language.
Please help me.
Thank you
| common-pile/stackexchange_filtered |
Script within iframe not working
I'm loading iframe like this
var fw = 600;
var fh = 300;
var left = (window.screen.width-fw)/2;
var top = (window.screen.height-fh)/2;
$.ajax('/app/ardeal/check_ardeals.htm', {
data: {hookpoint: _hookpoint, lookupid: _lookupid},
dataType: 'json',
success: function(res){
... | common-pile/stackexchange_filtered |
Updating a line dynamically using SVG / Raphael
What I ultimately want to be able to do is to have a circle follow a path that is updated by a server real time. Think of it as a target following a line. I already know how to make a circle follow a path thanks to this fiddle. But my problems come from how to update t... | common-pile/stackexchange_filtered |
generate html and json reports for selenium python automation test using pytest
I have a selenium python automation test, it works fine, now I want to generate Html and JSON reports and have screenshots in the report using pytest. I am new to automation and python so I am not much aware of how its done.
following is my... | common-pile/stackexchange_filtered |
Describe the coordinates of all points that are 10 units from the yz plane.
I don't really understand the y and z coordinates.
I know i will have a +/- 10 as the x-value, and the point will be located at the front right above the origin quadrant (is there a better way to word this?)
not to sure about the y and z?
any h... | common-pile/stackexchange_filtered |
Visual C++ 2010 code questions
I've just started with C++ and I decided to use Visual C++.
In the application, I've selected the Windows Forms Application as my project and then I've "draw" my window using the tools menu.
Now the code looks like this:
Form1.h
#pragma once
namespace Test {
using namespace System;
... | common-pile/stackexchange_filtered |
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate<PHONE_NUMBER> bytes) in /home/news-insert.php on line 140
I am working on a project and am working on a page that should do updates and regular inserts. I found the code elsewhere and have been modifying it to work on my project. Anyway ... | common-pile/stackexchange_filtered |
Job scheduling with n tasks and m machines
Problem description:
I have n precedence constrained jobs and m independent machines. Each job has a cost c assigned to it (the number of machines required to finish the job in 1 time unit). It takes 1 time unit to finish a job, a job can only be finished if c machines are ass... | common-pile/stackexchange_filtered |
prefill not working in razorpay
$data = [
"key" => $api_key,
"amount" => $amount,
"name" => "DJ Tiesto",
"description" => "Tron Legacy",
"image" => "logo.png",
"prefill" => [
... | common-pile/stackexchange_filtered |
Meaning of "cut out (scheme-theoretically)"
Let $V$ be a projectively normal closed subvariety of some projective space over an algebraically closed field $\mathbb{K}$. Let $R$ be the local ring at the vertex of the affine cone over $V$ ($R$ is obtained by localizing the homogeneous coordinate ring $\mathbb{K}[V]$ at t... | common-pile/stackexchange_filtered |
Shell node: No such file or directory
I have a cron job that runs a shell script every minute. However I keep getting
/usr/bin/env: node: No such file or directory
restarting
nohup: failed to run command ‘npm’: No such file or directory
as an output.
I have tried installing pm2 globally but this doesnt work.
This is ... | common-pile/stackexchange_filtered |
Mobile browser not rendering at mobile size
I have a website that is built to change views depending on screen size. It wasn't doing so on my Android, ZTE Max using chrome. Instead, it was showing full sized window zoomed out very far.
I have read that I might want to use viewport meta tag, but I have also read this do... | common-pile/stackexchange_filtered |
Display categories on home page in Magento
I am a newbie in Magento and wanted to display all categories on the Magento home page rather than a top nav menu.
I read a lot of articles on it, but nothing has helped. Please point me to the right direction.
Thanks in advance.
I got where the problem was.
The solution is a... | common-pile/stackexchange_filtered |
BASH: Log stdout and stderr to file and display on screen -> get correct error code
I want to log stdout and stderr with timestamp to a log file and view it on screen.
So I redirect stderr to stdout, add the timestamp with awk und tee it to log file.
But there is a problem to get the correct error code.
Here an example... | common-pile/stackexchange_filtered |
Replacing `,\r\n` in PowerShell
I'm trying to fix a CSV file that has a trailing ,\r\n in it. No matter what I do, it simply doesn't do anything. I tried putting the expression in [] which makes it replace every single comma. That implies that the issue is that it can't match the newline character.
I have saved the fi... | common-pile/stackexchange_filtered |
IOS: insert a photo from camera in a UIImageView
In my app I use a custom camera and when I snap a photo I want to see it in an UIImageView, it's all ok it work, but there is a little problem: when it put the UIImage (from camera) in UIImageView, the image sems a little flattened, then what's the exactly resolution tha... | common-pile/stackexchange_filtered |
openMP deadlock while using parallel region and open for together
I am running into an openMP deadlock. The original code is relatively long and difficult to put here due to
space constraints. I include a example of code structure, which seemingly has similar structure and runs
into similar issues.
int main(int argc,... | common-pile/stackexchange_filtered |
Git merge range of commits from cherry command
Say I have two branches, A & B. When I run
git cherry -v A B
I will get a list of commits that exist in branch B but do not exist in branch A. In this instance, lets say there are fifty commits listed:
+ 53458a1a commit 1
+ de6e9b10 commit 2
+ 683f3ef2 commit 3
+ a9e8e2... | common-pile/stackexchange_filtered |
What would be the best way to use AngularJS with Ruby on Rails?
I'm about to start a new project and I am unsure if using AngularJS for my front end would be a good idea not. I've read about people saying this isn't the smartest way of doing a project. And even if I did, Is there a way to get AngularJS to interact with... | common-pile/stackexchange_filtered |
errors in running the clash interpreter
Running on an M1 mac, I installed stack via a nix-shell defined with:
{ pkgs ? import <nixpkgs> { system = "x86_64-darwin"; } }:
pkgs.mkShell {
buildInputs = [
pkgs.stack
# required for clashi
pkgs.libiconv
pkgs.libffi
];
}
I then run the clash interpreter ... | common-pile/stackexchange_filtered |
Using SQL 2005 Pivot
I need to turn the following results...
RowID ColumnName Value
======= ============ ==========
200 Status OK
200 Name Project 1
200 Created 01/01/2010 00:00
201 Status FAILED
201 Name Project 2
201 Created 02/01/2010 18:00
202 St... | common-pile/stackexchange_filtered |
Getting a css style to cover the full height of a page in asp.net-mvc with multiple partial views within the page
I answered this question Make <body> fill entire screen? and this has held me in good stead for html generally, however not for an asp.net-mvc project I'm working on.
I am using this neat css trick to preve... | common-pile/stackexchange_filtered |
What does "([%_])" regex mean in Java?
What does the following code/regex do in Java. I am looking at code written by another dev, but I can't make what the following regex does? Besides is it a well-known regex-pattern to use circle and square brackets ?
str.replaceAll("([%_])", "\\$1");
Just replaces any % or _ wit... | common-pile/stackexchange_filtered |
docker compose command to run with profiles
With the recent update of docker, whenever I run docker-compose up -d docker engine suggest me with the following line:
Docker Compose is now in the Docker CLI, try docker compose up
Question is how can I run docker compose command with profile option?
For example, in docke... | common-pile/stackexchange_filtered |
Mongoose handle duplicate url slug
I am storing url slugs from blog titles in MongoDB using Mongoose. So for instances when users enter the same blog title, I want to do it like how Wordpress handles it which is appending a number on the slug and increment it for every duplicates.
Example:
blog-title
blog-title-2
blog... | common-pile/stackexchange_filtered |
If the variance of residuals is known, then can we add an extra random effect?
In random-effects meta-regression, we often model an estimate of effect size ($effectSize_i$) as:
$$effectSize_i=\mu+u_i+e_i$$
where $u_i \sim N(0, \tau^2)$, and $e_i \sim N(0, v_i)$, where $\tau^2$ is the unknown between-study variance comp... | common-pile/stackexchange_filtered |
subdomain routing
When a user types in his username.example.com I read out the subdomain and render the users personal page.
map.home '', :controller => 'users', :action => 'show'
the problem is that I now want to add custom subdomains like www, '', help and so on.
What I do now but doesn't work:
I read the subdomai... | common-pile/stackexchange_filtered |
Discontinuous growth rate in a first-order dynamical system
Consider the dynamical system defined by
$$\overset{\circ}{x} = x\cdot g(x),$$
where
$$g(x) = \frac{r}{\alpha - x};\quad r,\alpha\in\mathbb{R}^+.$$
I am asked for a biological interpretation of this system, with $x(t)$ representing a population with a growth r... | common-pile/stackexchange_filtered |
How to fix the issue of controls shifting on high DPI?
I came across this Microsoft article on how to support high DPI in Windows Forms applications running on .NET Framework 4.7.
https://learn.microsoft.com/en-us/dotnet/framework/winforms/high-dpi-support-in-windows-forms
I followed those instructions and they did hel... | common-pile/stackexchange_filtered |
Embedding Lua in C++ mixed with C
I am working on embedding Lua in a C++ project, which relies heavily on some legacy C code. I have a few questions regarding to garbage collection and variable scope.
Here are some snippets related to the questions that follow:
/* C side */
typedef struct
{
/* fields */
} Element;
... | common-pile/stackexchange_filtered |
How to pick file randomly from a specified direcotry?
I am making this program that randomly picks a file (not a folder) from a directory and produces a message box with that file as text. I am currently using this:
Imports System.IO
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handle... | common-pile/stackexchange_filtered |
Adjacent Sibling Selector is not working as expected
The selector #div1 p:hover + #div2 img is not working and I can not understand why.
Trying to make hover over an object in div 1 affect the CSS settings of the objects in div2 with only CSS. Please help.
I am using Chrome.
#div1 #x:hover + #div2 #y {
width: 200p... | common-pile/stackexchange_filtered |
is there a construct in catch2 to express a mapping of inputs vs. expected values?
I have a set of inputs and their corresponding expected outputs for a function.
The test is currently written as follows:
TEST_CASE("test reverse_and_double")
{
struct { string input, string expected_output } tests[] = {
{ "a... | common-pile/stackexchange_filtered |
How to work with current working copy when moving to old branch in GIT?
I have a question concerning best practice in GIT. Imagine I create a branch called hotfixes and I add some fixes to it and then merge the branch with the master. Then I create a few other branches and merge them with the master.
After a few weeks ... | common-pile/stackexchange_filtered |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.