title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Concatenate few rows into a single row with comma seperated using string_agg in postgreSQL | <p>clique_bait.page_hierarchy</p>
<pre><code>CREATE TABLE clique_bait.page_hierarchy (
"page_id" INTEGER,
"page_name" VARCHAR(14),
"product_category" VARCHAR(9),
"product_id" INTEGER
);
sample input
('1', 'Home Page', null, null),
('2', 'All Products', null, null),
... | 3 | 1,631 |
Typical ref counting for a handler pipeline | <p>Trying to upgrade to Netty 4.1.17.Final, I'm facing a ref counting issue for the following pipeline.</p>
<ul>
<li>The first handler is framing the raw input from <code>ByteBuf</code>: waiting there are at least the minimal amount of <code>readableBytes</code> to consume a frame, putting all the frames that can be r... | 3 | 2,129 |
How to create lists from objects | <p>I have an inventory program which reads lists from an excel file and then creates a class. I want to override new values of objects in the list then I will export the list to excel. Here I import the lists from the excel file</p>
<pre><code>import pandas as pd
df = pd.read_excel('stock.xlsx')
inventory_code = df['c... | 3 | 1,482 |
Login validation not working on HTML using JSON and PHP | <p>I am making a login form on HTML using JSON and PHP but all of the <code>if</code> statements on success are not working but the <code>beforeSend</code> and <code>error</code> is working. Can you help me check my mistakes?</p>
<p>I dont know know what is wrong with the function on success. The alerts are not poppin... | 3 | 1,237 |
Does the speed of ldp instruction depend on caching? | <p>I created an annotated trace with perf. For some reason, the instructions with the highest percentages are of type ldp:</p>
<pre><code> 5.56 │ ldp s9, s8, [x28,#80]
37.65 │ ldp s2, s3, [x19,#24]
37.65 │ ldp s2, s3, [x19,#24]
</code></pre>
<p>Is this a mistake? Or does it hint toward ... | 3 | 17,753 |
Why does my Lambda function write an empty csv file to S3? | <p>I'm calling the YouTube API to download and store channel statistics in S3. I can write a csv file to my S3 bucket without any errors, but it's empty. I have checked this thread <a href="https://stackoverflow.com/questions/61526474/why-the-csv-file-in-s3-is-empty-after-loading-from-lambda">Why the csv file in S3 is ... | 3 | 1,375 |
invalid data type 'numpy.str_' when training bert model with pytorch | <p>my data are divided to 2 parts training and validation one . I Used load_dataset and dataloader functions . I convert data in dataset to torch format using traindataset.set_format
when starting training I got error</p>
<blockquote>
<p>new(): invalid data type 'numpy.str_'
in this line</p>
</blockquote>
<pre><code>fo... | 3 | 1,210 |
Is ORA-01403 being received by the procedure or the package being called within the procedure? | <p>Sorry to paste the long code. I have a procedure that inserts data in a table and calls several packages. On running the below procedure, I get following error - </p>
<p><a href="https://i.stack.imgur.com/6apzE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6apzE.png" alt="ORA-01403"></a></p>
<... | 3 | 1,892 |
Overload Constructor with Class in Parameter | <p>Was giving the first code below. What is the proper way to create the Turtle Class? -- Basically, I am trying to get this to show no error: <code>Turtle t = new Turtle(STARTX, STARTY, w);</code></p>
<p>I think my problem might be here with the overload constructor: <code>public Turtle (double STARTX, double START... | 3 | 1,162 |
Converting number scale into category | <p>I have a data frame that looks like this:</p>
<pre><code>> example
Country Urban
1 Afghanistan 0
2 Albania 40
3 Algeria 50
4 Andorra 50
5 Angola ... | 3 | 1,139 |
AngularJS not showing ng-repeat, just showing an empty list | <p>I have a problem trying to show a collection of objects in AngularJS.</p>
<p>The ng-repeat is just showing the items but with empty data in console. I get the JSON data properly, catching the scope items with success of my api.
In my view it's just showing a gray bar at the bottom, the data is printing on bottom b... | 3 | 2,699 |
Is this a good way to add transaction to sql ? | <p>Is this a good way to add TRANSACTION to my code. I have to first update my code and if it fails then insert should also not work. Have a look please if it's a correct way or not. If not then please improve.</p>
<pre><code>Begin Transaction[Transaction1]
Begin Try
IF(@ServiceInfoToJobStatus = 1)
... | 3 | 1,567 |
Paint Component seems to be causing cursor and Mouse Listener of Label to not work | <p>Using <code>LayerUI</code> to add labels to the upper corner of a tabbed pane. Would like to allow these labels to display as hyperlinks, so I set the color blue, the cursor to a hand and I added a <code>mouselistener</code>. </p>
<p>Howev,er when I paint the component the cursor customization and mouse listener... | 3 | 1,611 |
Laravel Inserting Data Only the Last List or Data | <p>I want to insert the data specifically look at my page. </p>
<p><a href="https://i.stack.imgur.com/Iadv0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Iadv0.png" alt="enter image description here"></a></p>
<p>When I set time the data will be inserted. But what I have right now is the data that... | 3 | 1,584 |
jQuery remove duplicated hashtag | <p>I'm trying to make a hashtag system using jQuery, but I have a problem with my code. So normally the code is working fine. But I want to remove duplicated tags in the written hashtags.</p>
<p>I've created this <strong><a href="http://codepen.io/shadowman86/pen/EmaejY" rel="nofollow noreferrer">DEMO</a></strong> on ... | 3 | 1,958 |
Somthing confused with ole drag and drop implementation | <p>I wish to finish a little demo to implement OLE drag and drop(drag a file from my application to windows explorer).</p>
<p>But here comes a problem:DoDragDrop return DRAGDROP_S_DROP which means the ole drag and drop operation has successfully done,but also get DROPEFFECT_NONE which means drop target cannot accept t... | 3 | 12,175 |
R: How to draw a plot with day of the week in x-axis using ts_seasonal() and ts_heatmap() function | <p>I'm learning about using "ts" object and do visualization in R. For the practice, I want to plot a seasonality line plot and heatmap, just like the plots show below.
<a href="https://i.stack.imgur.com/DmGLF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DmGLF.jpg" alt="enter image descr... | 3 | 1,343 |
Jupyter SAS kernel failing inside Docker container | <p>For some reason I'm unable to run SAS notebooks inside a Jupyter Docker container. I can run SAS code inside <em>Python</em> notebooks via saspy, but the SAS kernel keeps throwing errors on me.</p>
<p>I'm using the image jupyter/pyspark-notebook:notebook-6.4.2 as the base, and connecting to a remote server via IOM. ... | 3 | 1,348 |
When pressing a specific button, it crashes the app | <p>When I press a specific button (Who's Next) it crashes the app. Though when pressing the other buttons those appears to work as expected. I have created all buttons with the same "method", and a lot of the functions are the same. </p>
<p>I have tried removing the buttons and the reference in the code, adding it aga... | 3 | 1,890 |
FAST Algorithm : No Corner Detection in Rectangular shapes | <p>I am trying to implement my own FAST algorithm in c++ following the OpenCV tutorial. As the algorithm <a href="https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_feature2d/py_fast/py_fast.html" rel="nofollow noreferrer">says</a> : </p>
<blockquote>
<p>The pixel p is a corner if there exists a set of n contiguou... | 3 | 3,458 |
Bot framework - Getting the user's answers from a form generated by json schema | <p>I am using the function to BuildJsonForm to <a href="https://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-formflow-json-schema" rel="nofollow noreferrer">define a form using a JSON schema</a>. I generate the JObject with some parameters the bot asks the user during runtime.</p>
<p>An example of ... | 3 | 1,327 |
Why does the SharedPreferences update the TextView only once? | <p>I've got this service, which - among other things - updates a TextView, every time it gets destroyed (the TextView is "txtCounter"). By updating it, I mean it adds a 1 (one) to the TextView, every time it ends. So, the first time I call the service, the TextView should be 1. The second time should be 2 and so on.</p... | 3 | 1,755 |
pandas: insert rows in a dataframe from column values in another dataframe | <p>I've two multi-indexed dataframes with data as shown below:</p>
<p>df1:</p>
<pre><code> qty
plot name sub plot name crop date
BL1 Cabbage-041221 Cabbage 2022-03-01 36.000000
... | 3 | 2,624 |
How to add an extra control point to a Bezier curve? | <p>Here is the code which creates the bezier curve with total 4 control points:</p>
<ul>
<li>Blue color is the starting and end control point.</li>
<li>Cyan color is the second and third control point. </li>
</ul>
<p>I want to add a control point to the existing curve so that now I have 3 cyan coloured control points... | 3 | 1,332 |
Translations in Angular using i18n | <p>I'm new on i18n, i need to translate a whole div using a single id, but I can't seem to find any guide that helps me convert any html tag to xliff.</p>
<p>I've seen this guide <a href="https://docs.oasis-open.org/xliff/v1.2/xliff-profile-html/xliff-profile-html-1.2-cd02.html" rel="nofollow noreferrer">https://docs.... | 3 | 1,359 |
Can you use a classpath file to configure DispatcherServlet with <init-param>? | <p>I was going through the Spring configuration files in a web application I’m working at and we have this in our <code>web.xml</code>:</p>
<pre><code><context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</co... | 3 | 1,290 |
How to save Highscore after app closed? | <p>I want to save the highscore, even after App is closed, on how many times I clicked the Imagebutton. I want to see the highscore the whole time the app is running
But when I try my code the App crashed every time and I dont know where I made a mistake.</p>
<p>EDIT: Now the App doesn't crach but the Highscore ist al... | 3 | 1,584 |
SqlDataSource UpdateCommand parameters not changing | <p>I have a <code>FormView</code> with an <code>UpdateButton</code> and a <code>SqlDataSource</code> which are below. My <code>updatebutton</code> always update the <code>Sil</code> table with the same values (the values at the first line of my gridview), I couldn't figure out why. </p>
<pre><code><asp:FormView ID=... | 3 | 6,605 |
Perl - Returning Multiple "Same" Matches from one string | <p>I have string of the form: </p>
<pre><code>column1\\\u0022\u003E\u003Ca href=\u0027\\\/stock\\\/QCOM\u0027\u003EQUALCOMM Incorporated\u003C\\\/a\u003E\u003C\\\/td\u003E\\n \u003Ctd class=\\\u0022view_all_column2\\\u0022\u003E4.99%\u003C\\\/td\u003E\\n \u003C\\\/tr\u003E\\n \u003Ctr\u003E\\n ... | 3 | 1,140 |
Can't bind to 'options' since it isn't a known property of 'div' | <p>I am trying to implement the ng2-daterangepicker module in my application. But I am facing a property binding error in it. I don't know why?</p>
<p>I have imported the module into AppModule also.</p>
<p>At least I want to whether is this because of property binding or the wrong method of using the package.</p>
<ul>
... | 3 | 1,524 |
dotnet restore solution is restoring projects like they are .net framework projects when called from GitHub Actions | <p>I have a solution with many projects, and we are migrating to .NET SDK style projects, but for now we have a mix of .NET framework style projects and .NET SDK style projects.</p>
<p>We are also migrating to GitHub actions, and this solution was building without errors previously, but the restore action started faili... | 3 | 1,302 |
error not found model after upload into hosting | <p>In localhost, it works fine. After uploading into my hosting i got this error. I'm using zend framework 1.12.</p>
<pre><code>Fatal error: Class 'Application_Models_DBTable_Kereta' not found in /home/mysite/public_html/application/controllers/CarController.php
</code></pre>
<p>others post said the problem is becaus... | 3 | 1,213 |
Split navbar in left-center-right with logo keeping responsive design | <p>what I'm trying to do is to split my navbar in left, center and right, on left it will be the Application name, on the center the different menu options but the text centered, on right should be the app logo (this will be hidden when minor resolutions appear) something like the below image</p>
<p><a href="https://i.... | 3 | 1,099 |
AWS SQS Listening vs Polling | <p>I currently have implemented in a Spring Boot project running on Fargate an SQS listener.</p>
<p>It's possible that under the hood, the SqsAsyncClient which appears to be a listener, is actually polling though.</p>
<p>Separately, as a PoC, on I implemented a Lambda function <em>trigger</em> on a different queue. Thi... | 3 | 1,038 |
Dynamic import from node_modules throws "Cannot read property 'call' of undefined" | <p>Webpack-stream version: <code>5.2.1</code></p>
<p>npm version: <code>6.14.4</code></p>
<p>node version: <code>v10.13.0</code></p>
<p>platform: <code>windows10</code></p>
<p>I use gulp + webpack-stream for two modules: libraries.js and page.js</p>
<p>The problem relates only to the import from node_modules to pa... | 3 | 1,735 |
mail sending code error in godaddy | <p>i have created a mail sending script with one of my word press project and tested it well in my own server , it works and getting all the mail contents including the attachment, later i had transfer the project into godaddy server ,
error is Array ( [type] => 2 [message] => mail(): Multiple or malformed newlines fo... | 3 | 6,612 |
I'm having trouble with installing Propel, sql:build does not work | <p>I am following the official Propel tutorial: <a href="http://propelorm.org/documentation/02-buildtime.html" rel="nofollow">Propel chapter 2: build time</a></p>
<p>But when I execute the vendor/bin/propel sql:build script, nothing happens!</p>
<p>I created a composer.json file and then installed composer, just as e... | 3 | 1,438 |
Satis can read composer.json, but cannot checkout the other files | <p>After trying Satis on my personnal SVN server (Linux, Svn, Apache 2, SSL, LDAP, DAV), that works fine; I am trying to make it work on my company's SVN server (Windows, Visual SVN, SSL).</p>
<p>In both cases Satis runs under Linux; Mine is an Ubuntu, and my company's is a CentOs.</p>
<p>On my company's Satis instan... | 3 | 2,353 |
How to update struct item in binary files | <p>I have a binary file that i write some struct items to it. Now I want to find and update specific item from file items.
Note that my struct has a vector and its size is not constant.</p>
<p>my struct:</p>
<pre><code>struct mapItem
{
string term;
vector<int> pl;
};
</code></pre>
<p>codes that write ... | 3 | 1,578 |
VBA Function: Faster Way to Index Match | <p>I have a function which I use to do a two-column lookup and return a third value. I however need to call this function frequently within a macro to return the corresponding value and it dramatically increases execution time. Is there a faster way to lookup values?</p>
<pre><code>Function FindValue(rng1 As Variant, r... | 3 | 1,975 |
How to convert (convas chart) to either (Chart , or system.drawing.image , or stream , or []byte ) where I can use it in c# to generate pdf | <p><a href="https://i.stack.imgur.com/WAiCn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WAiCn.jpg" alt="this is the page "></a></p>
<p>I have this chart which will print number of visitors per hours in specified year </p>
<p>and this is the function that will take out the data for specified yea... | 3 | 3,808 |
installing requirements with pip | <p>I am very new to using python and pip, and I am currently trying to run a python program for the very first time.
I downloaded the program on git and the readme file told me to run the command:</p>
<pre><code>pip install -r requirements.txt
</code></pre>
<p>which I did. I now have an exception that I don't unders... | 3 | 1,346 |
How to alter 2 subelements of xml file in python by their tag parameter using ElementTree? | <p>I have an xml file like this, I want to alter the 2 sub-elements.</p>
<p>I tried like below.</p>
<pre><code>import xml.etree.ElementTree as ET
file_name = 'manifest.mpd'
tree = ET.parse(file_name)
root = tree.getroot()
for elem in root:
for subelem in elem:
a = subelem.attrib
if a['mimeType'] =... | 3 | 4,522 |
ActionDispatch::Cookies::CookieOverflow occurs when trying to return relevant values using devise token auth | <h1>Assumption</h1>
<p>I'm using <code>devise token auth</code> in Rails, and when I try to return values related to user information created with <code>devise token auth</code>, I get a <code>cookie over capacity</code> error. If I use <code>model name.all</code> the error does not occur.
How can I resolve this error?... | 3 | 1,046 |
implement a custom open() function / 'subclass' the open() function | <p>Disclaimer: The word <strong>subclass</strong> in the title is not correct, but this is a reference to the old pytho2 only solution and I didn't know any better way of describing it.</p>
<p><strong>The objective:</strong>
I am looking for a way, that lets me do following in my existing code</p>
<ul>
<li>import <code... | 3 | 1,128 |
Merge Multiple Lists of Lists Based on Template | <p>I have 3 DB calls returning a tuple of tuples with a name, code and count like so:</p>
<p><code>year = (('Fanklin Grand Isle', '5560', 1), ('Windham', '3457', 1))</code></p>
<p><code>month = (('Fanklin Grand Isle', '5560', 1), ('Chittendon', '3367', 1))</code></p>
<p><code>week = (('Fanklin Grand Isle', '5560', 1... | 3 | 1,520 |
How do I make a path out of a hash? | <p>I am trying to locate the route of the shortest path of a map(connected nodes with weight/distance).</p>
<p>Let's assume I have a hash like this:</p>
<pre><code>{"A"=>{"B"=>1, "E"=>1}, "B"=>{"A"=>1, "C"=>1, "F"=>1}, "C"=>{"B"=>1, "D"=>1, "G"=>1}, "D"=>{"C"=>1, "H"=>1}, "E"... | 3 | 1,104 |
retrieve action window from a button openerp | <p>In my module I want to view form from a button click.</p>
<p>this is my button "Postponed" with other workflow buttons</p>
<pre><code><header>
<button string="Planned" type="workflow" name="action_planned" class="" icon="gtk-undo" states="postponed"/>
<button string="Complete" type="workflow... | 3 | 1,943 |
red5 server not being started | <p>I tried to implement <code>rtmps</code> with red5 but was having an error that the address is not found. In simple words the port was already in use. So i changed mine <code>rtmps port to 6443</code>. Now when i try to launch red5 I m getting the following error. Can any one please help me out here. Thanks.</p>
<pr... | 3 | 1,036 |
Getting Started Tutorial Error: uncaught throw "Cannot file target sproutcore for entry lib/index.rhtml" | <p>I'm using Mac OS-X Lion, have Ruby on Rails 3.0 already preinstalled and doing the Getting Started Tutorial for Sproutcore (http://sproutcore.com/guides/getting_started.html). When I run the server and hit: <a href="http://localhost:4020/todos" rel="nofollow">http://localhost:4020/todos</a>. I get the follow error ... | 3 | 7,781 |
Make copy of class arrays without the same id | <p>I am doing Conway's Game Of Life.
There are two things that are wrong.</p>
<ol>
<li>For some reason the animation code is receiving the grid information but not plotting it right, just shows one value for all cells. This was working before but I don't know much about matplotlib so i can't find what's wrong.</li>
<li... | 3 | 1,863 |
Login to web page without form via c# | <p>I am trying to connect to a page to get one value but I ran into a login problem, does anyone have any idea how to solve it?</p>
<p>I'm working with c# Console App</p>
<p>Page code:</p>
<pre><code><table align="center">
<tr>
<td class="user" >User Nam... | 3 | 1,234 |
GET http://127.0.0.1:8000/ net::ERR_CONNECTION_REFUSED error when fetching data from backend service on same webserver | <p>I have a very simple app running on a webserver. A bit of Javascript requests some data from a FastAPI service. When I visit the domain I get the following error in the console <code>GET http://0.0.0.0:8000/ net::ERR_CONNECTION_REFUSED</code>.</p>
<p>If I ssh into the webserver, I can curl localhost:8000/ and get th... | 3 | 1,149 |
How to update dependencies version (e.g react) in package.json if using docker | <p>I'am trying to use webpack + reactjs to run a project. here are the main files:</p>
<pre><code># docker-compose.yaml
web:
build: .
ports:
- "3000:3000"
volumes:
- .:/usr/app/selina-server:rw
environment:
- NODE_ENV=dev
command: >
sh -c '
if test -d node_modules;
then
... | 3 | 1,531 |
Use Python code in R in order to change a dataframe | <p>I was just wondering if it was possible to use python codes in R to modify or create new tables?</p>
<p>Here is an example of code I use in python</p>
<p>Here is a dataframe:</p>
<pre><code> species family Events groups
1 SP1 A 10,22 G1
2 SP1 B 7 G2
... | 3 | 1,752 |
Sleepless process on Ionic5, Capacitor, Android | <p>I have an ionic5 app with Capacitor that I'd like to deploy on android. When the app starts I'm getting a list of reminders (from API) I'd like to schedule to be shown as local notifications during the day. After deploying it to my device (by .apk file) is working fine when it's open but after some time when the pho... | 3 | 1,557 |
SwiftUI - how to respond to TextField onCommit in an other View? | <p>I made a <code>SearchBarView</code> view to use in various other views (for clarity, I removed all the layout modifiers, such as color and padding):</p>
<pre><code>struct SearchBarView: View {
@Binding var text: String
@State private var isEditing = false
var body: some View {
HStack {
... | 3 | 1,142 |
Syntax error near 'rows FROM `#__whmportfolio_item` AS a WHERE a.cate in (4)' at line 1 | <p>I have moved the site from server that have mysql server to other one that have MariaDB server version also the site was working without issue on the old server </p>
<p>But on new one I got this error : </p>
<blockquote>
<p>1064 You have an error in your SQL syntax; check the manual that
corresponds to your Ma... | 3 | 1,465 |
form input will not POST to MYSQL but will show on screen | <p>The form sends the data to this page. The print_r outputs everything I want to put into the table onscreen to check it's there, but nothing goes to the table. I have only managed to populate the table manually in phpmyadmin. Iam sorry if it's a really easy fix - I have only been learning for two weeks!<br>
There are... | 3 | 1,266 |
start second page where first page end in javascript | <p>I have some issue with the window scroll.
I created a news feed like page using angularjs with database and pagination and ng-repeat.
I want that when user click on load more button window will scroll to last position of the page 1 and then page 2 start, but I tried all option but it not working like what I want.</p... | 3 | 1,061 |
Blocking in an async http request with android async http library | <p>I know the heading sounds like an oxymoron, however please listen to my case.</p>
<p>I am using refresh token and access token authentication in my android app.
In my app every request goes to a central Network.Java class through the <code>post()</code> method;</p>
<p>first thing I do in the <code>post()</code> ... | 3 | 2,044 |
Export to pdf in MVC 4(Embed Html in pdf) | <p>I am trying to export pdf using MVC 4. While exporting when trying to embed Html in pdf document error occur:</p>
<ul>
<li>The type or namespace name 'tool' does not exist in the namespace
'iTextSharp'</li>
</ul>
<p>I have added iTextSharp.dll but i dont know why i am getting error. Please help me thanks in adva... | 3 | 1,052 |
Maintenance Table, presentation of Data using record details as column headers and extracting only most recent maintenance | <p>I've tried to find a solution to this issue I'm facing but I'm not sure how to advance.
To be honest I am not too sure how to even phrase my question, but please bear with me.</p>
<p>I have a table which is essentially a table which is written into every time an update on a customer record is made, its an odd table... | 3 | 1,188 |
Using an if loop to exclude entries containing a substring | <p>I'm trying to scrape the results & statistics from the last 4 seasons of snooker from <a href="https://cuetracker.net" rel="nofollow noreferrer">https://cuetracker.net</a>.</p>
<p>I succeeded (somewhat) in scraping most of the data however I neglected to recognise that there are walkovers included. These walkov... | 3 | 2,579 |
How to use procedures with generic lists in VHDL-2008? | <p>I refactored some working VHDL code to use a <code>procedure</code> with a generic list, and now it segfaults in Modelsim (2020.1).</p>
<p>The procedure's generic list includes a <code>type</code> and another <code>procedure</code>.</p>
<p>The segfault seems to be happening because a <code>std.textio.line</code> (wh... | 3 | 1,366 |
SwapBuffers() not recognized | <p>Can someone help me with why I am unable to use SwapBuffers()?
I am using WindowsForms c# with OpenTK in Visual Studio 2015. I am using the HelloGL3_OpenTK code to learn from. Everything else seems okay, but the SwapBuffers() line. I get a message :
<strong>The name SwapBuffers does not occur in the current context.... | 3 | 5,341 |
How to edit a record that results in a uniqueness violation and echo the change to child tables? | <p>PostgreSQL 11.1</p>
<p>How can "Editing" of a record be transmitted to dependent records?</p>
<p>Summary of my issue:</p>
<ul>
<li>The master table, disease, needs a unique constraint on the description column. This unique constraint is needed for foreign key ON UPDATE CASCADE to its children tables.</li>
<li>To ... | 3 | 1,547 |
Kohana 3.1 routes with default subdirectories | <p>I have an application that is essentially working until I tried to implement an Auth module for logins and registrations.</p>
<p>My application directory structure is basically:</p>
<pre><code>application
-- classes
-- controller
-- admin
(admin area)
-- block
(blocks to display within ... | 3 | 1,066 |
Writing to logfile does not work with Android 4.2 Jelly Bean | <p>I am trying to integrate some code for a school project that takes sensor values received over bluetooth and write them to a comma separated data log file. I can not get a simple example of the file writing functionality running on Jelly Bean after trying dozens of examples. The code works perfectly fine on my perso... | 3 | 2,201 |
How to retrieve the latest row from table in php/mysql? | <p>I try to retrieve the latest added bookingID from table booking but I do not know how to get it.
The scenario: when user click 'submit' button, mysql query will generate a parentBookID and store userID, eventID in table booking.Then query will get the created parentBookID to insert into table bookingDetail, user wil... | 3 | 1,174 |
React form - Field is automatically unselected when value changes | <p>I'm a total beginner in React, and am trying to build my first form. </p>
<p>I fetch the questions asked in said form using an API, and once the form submitted, I would like to create an answer object through this same API. </p>
<p>The problem is that everything seems to work just fine (questions render ok, answer... | 3 | 1,312 |
How to use the Laplace distribution in a GLM model | <p>Good morning everyone! I am a PhD student and I am performing some statistical analysis on a behavioral dataset related to aggression of pied flycatchers males against other male intruders. The aggression variables I am using are "males peck rate" (M_PECKS_H) and "males attack rate" (M_ATTACKS_H)... | 3 | 1,617 |
On macOS 10.14 Mojave, impossible to install `newrelic` Node.js module | <p>Since the upgrade to macOS 10.14 Mojave, it seems that the installation of the <code>newrelic</code> (version 4.11.0) Node.js module fails.</p>
<p>Let's create a project:</p>
<pre><code>$ mkdir test-newrelic
$ cd test-newrelic/
$ npm init
$ npm init --yes
</code></pre>
<p>Now, let's install <code>newrelic</code> ... | 3 | 2,441 |
QBXML - How do I go about adding brand new items on the fly when i modify an Invoice using InvoiceModRq? | <pre><code><?xml version="1.0" encoding="utf-16"?><?qbxml version="13.0"?><QBXML>
<QBXMLMsgsRq onError="stopOnError">
<InvoiceModRq>
<InvoiceMod>
<TxnID>983C-1639586336</TxnID>
<EditSequence>1639586895<... | 3 | 1,445 |
radiobutton getleft() returns 0 when repopulate | <p>I have one radiogroup with database populated radiobuttons. When I repopulated them with: </p>
<pre><code>Radiogroup fofo = (Radiogroup) findViewById(R.id.AperturasRadio);
fofo.removeAllViews();
for(int i = 0; i < mStringArray.length ; i++){
RadioButton newRadioButton;
newRadioBut... | 3 | 1,091 |
How to checked the value in checkbox when doing edit form? | <p>I have edit modal window with checkbox input in my laravel project. I want the value in checkbox checked when I open the edit form. Idk why it always checked the first value and not suit with the value from database like this picture:</p>
<p><a href="https://i.stack.imgur.com/XKnCO.png" rel="nofollow noreferrer"><im... | 3 | 1,350 |
URL for Google Plus and Twitter -share doesn't change after ajax load | <p>I have a WordPress website using Advanced Ajax Page Loader. On various pages I have a URL share function for Facebook, LinkedIn, Twitter & Google Plus. When clicked the Facebook & LinkedIn button share the current URL - The Twitter & Google Plus buttons only share the URL of the main website (root), unle... | 3 | 1,400 |
Where in the file and how do I submit a form using Jquery | <p>I bought a template online and i'm trying to develop a website and I'm stuck on the contact form. I can't seem to get it to submit. When I click submit it just remains static, but i'd like to get it to run the action- that is go to the contactTq.php page. Below is all the code i think you need. but if you want t... | 3 | 1,468 |
On edit of my form It is throwing error | <p>It might be a silly mistake but taking me ages to solve this issue.</p>
<p>I have existing table called users and I added new column call Approve (bit).
And on my form Edit I am trying to provide check box to approve User for authorisation. </p>
<p>Below is my form: </p>
<pre><code><%@ Control Language="C#" ... | 3 | 2,928 |
java.sql.SQLSyntaxErrorException on a entity I'm not saving | <p>there is a "insane" error on my spring boot application. I have two entities Arrecadacao and ArrecadacaoTest. They are mapped each with different tables. As you can see in the example, I'm trying to save an ArrecadacaoTest object.
I don't no why, but If I get an Arrecadacao object, set an attribute and DON... | 3 | 4,082 |
Printing specific data from an array, fulfilling conditions | <p>I have been tasked with writing a code to create 4 classes(<strong>Main, Person,Account,Vehicle</strong>)and create objects of the <strong>Person</strong> class as per user requirements, doing so using an array. I had to store data within the array via user input, and retrieve them as per user choice. Which I believ... | 3 | 2,564 |
NextJS Rewrites keeps on refreshing | <p>I've two projects,</p>
<ul>
<li><strong>Project 1</strong> - React + Electrode - <em><a href="http://www.example.com/au" rel="nofollow noreferrer">www.example.com/au</a></em></li>
<li><strong>Project 2</strong> - Next Js - <em><a href="http://www.example.com/au/sell-your-car" rel="nofollow noreferrer">www.example.co... | 3 | 1,140 |
Flexgrid holy grail with 100% height | <p>I have a twist on the "holy grail" layout and you'll notice that the <code>#main</code> has a <code>min-height: 800px</code>. What I'm really looking for is 100% height, then as I add content within the <code>section</code> the rest of the layout continues down with it (as it currently does).</p>
<p>Any idea how t... | 3 | 1,030 |
Prevent use of a class outside of temporary scope? | <p>Is there a way to tell if an instance has been constructed in temporary scope or not, or prevent it from being used outside of temporary scope? I'm guessing there's not, but then again, I'm always surprised by the ability of C++ to exceed its own design limitations. </p>
<p>It's kind of a weird question, I admit,... | 3 | 1,798 |
What is the substitute for com.sun.tools after jdk 16? | <p>I read some articles which teach how to implement Lombok. It mentions that lombok was implemented by JavacTrees, TreeMaker in the jdk package com.sun.tools like below:</p>
<pre><code>import com.sun.source.tree.Tree;
import com.sun.tools.javac.api.JavacTrees;
import com.sun.tools.javac.code.Flags;
import com.sun.tool... | 3 | 2,308 |
Cannot send value with CoreBluetooth | <p>I'm trying to write value from central to peripheral through CoreBluetooth, but it doesn't work.
But I get error, that peripheral has no such characteristic, but it has.
Here is CoreBluetooth Extension:</p>
<p>CentralManager:</p>
<pre><code>extension MapViewController: CBCentralManagerDelegate {
func centralManage... | 3 | 2,476 |
How to use non-Nexus 5 emulators with Google Play Services dependency for my Google Maps app | <p>My testing approach involves using many emulators of various configurations (makes/models/dimensions/apis/targets). </p>
<p>I have recently upgraded to Android Studio 3.1.</p>
<p>My app is going on 3 years now and uses Google Maps v2 and I'd like to keep maintaining it (Google laughs).</p>
<p>Every emulator (oth... | 3 | 1,162 |
searchBar not searching | <p>I have viewed some example code of searchBar and followed it to the tee, but my searchBar is not working. I have a Master-Detail app, and the search is on the Master which has a searchBar and a UITableView. Whenever I type in anything, I expect the tableview to lessen to show. Example when I type in "G", it shoul... | 3 | 4,247 |
How do I pass the form data for POST call using mechanize in ruby | <p>I have a post call that requires form data to be sent in place of usual payload data.
The POST call details are as follows: </p>
<pre><code>.....
.....
Request Method:POST
Status Code:200 OK
Response Headers
view source
Content-Type:text/html;charset=UTF-8
Date:Mon, 06 Apr 2015 07:46:03 GMT
Server:Apache-Coyote/1.1... | 3 | 1,424 |
Running Azure Function Net5 (dotnet-isolated) in Linux Container generate error - System.IO.DirectoryNotFoundException: /home\site\wwwroot/ | <p>I have a Azure Function App running in a Linux Container with the following Specs</p>
<ol>
<li><code><TargetFramework>net5.0</TargetFramework></code></li>
<li><code><AzureFunctionsVersion>v3</AzureFunctionsVersion></code></li>
<li><code>"FUNCTIONS_WORKER_RUNTIME": "dotnet-isola... | 3 | 10,946 |
Condiontionalpannel Multiple Conditions and Calculating Age (R Shiny Dashboard) | <p>I was wondering if I could get your help.</p>
<p><strong>Background:</strong> I am building a shiny app (see here: <a href="https://camh-nds.shinyapps.io/STOPDataQuality/" rel="nofollow noreferrer">https://camh-nds.shinyapps.io/STOPDataQuality/</a>) to help with data quality control</p>
<p><strong>PROBLEM #1</stro... | 3 | 2,279 |
Resources$NotFoundException fatal exception for custom view after proguard, on specific devices | <p>I'm getting the following stacktrace for crashes on few specific devices. Both the devices I faced the crash on are running OSv5.1</p>
<pre><code>Fatal Exception: android.view.InflateException: Binary XML file line #161: Error inflating class com.adroitandroid.stitchastory.ui.AppTextInputLayoutPlus
at androi... | 3 | 4,084 |
processRequest action parameter: NPE error in JSP | <p>I have a file index.html where I can look up a Student (by name and surname).
I use a Servlet, StudentInfo, as controller. The POST request on index.html brings me to overview.jsp (hardcoded Students are available).
The GET method looks up a Student and give it to me in result.jsp</p>
<p>On result.jsp I have a GET ... | 3 | 4,997 |
Where should we put attention in an autoencoder? | <p>In <a href="https://www.tensorflow.org/tutorials/text/nmt_with_attention" rel="noreferrer">this tutorial in tensorflow site</a> we can see a code for the implementation of an autoencoder which it's Decoder is as follows:</p>
<pre><code>class Decoder(tf.keras.Model):
def __init__(self, vocab_size, embedding_dim, de... | 3 | 1,595 |
Creating layout for ListView with a side index list | <p>I created this layout for my <code>ListView</code>:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ListView
android:id="@... | 3 | 3,261 |
XMonad stuck launching xterm | <p>In XMonad I have the default config file. I've made some small changes but I'm trying to get alacritty to launch instead of xterm. I've tried changing the "myTerminal" to = alacritty and that didn't work. Then I tried to spawn alacritty and it still spawned xterm.</p>
<p>So I added in a keybinding:</p>
<... | 3 | 4,199 |
error while calling google api from python command line | <p>I am very new to python. I am trying to call google monitoring API, through python command line from <strong>google cloud shell</strong>. I am using python 2.7. Before that I had already installed</p>
<pre><code>pip install --upgrade google-api-python-client
</code></pre>
<p>This is the code for calling google m... | 3 | 1,335 |
How to create Generic Response handler for error and validate response using retrofit,rxjava and dagger | <p>I'm trying to create generic architecture to consume complex json structure as follows:</p>
<blockquote>
<p><strong>Json</strong> Format</p>
</blockquote>
<pre><code>{
"type": "success",
"code": "s-groups-0006",
"description": "Index List successfully",
"result": {
"asOnDate": 1505457095278,
"indexList":... | 3 | 1,889 |
How to change the appearance of an android view with a click listener and background worker? | <p>I have an android app that users can use to check into a course at a certain time. Their daily schedule shows up on a RecyclerView as a series of CardViews. Each CardView has basic information about each class, including instructor name, course title, attendance status, etc..
The app communicates with a MySQL datab... | 3 | 2,093 |
conditional sequence across rows in a new column | <p>If there's a "6" in <code>df$a</code>, I'd like <code>1:9</code> from the previous September to next May, to be in a new column, shown here as <code>df$b</code>, with <code>NA</code> as the rest.</p>
<pre><code>library(tidyverse)
library(lubridate)
date <- c("2/29/1940","3/31/1940","4/30/1940","5/31/1940","6/30/... | 3 | 1,312 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.