title stringlengths 10 150 | body stringlengths 17 64.2k | label int64 0 3 |
|---|---|---|
How can I dynamically name an array in Javascript? | <p>I am using jQuery and JSON to pull data from a database. Each row of the database is a different product and each product has a number of properties associated with it.</p>
<p>What I'm trying to do in js, is create a named array for each product containing all of the products properties. I know how to pull the data... | 0 |
How can I find all products without images in Magento? | <p>I have some thousand products and want to find all products without an image. I tried to search for (no image) in the admin products grid, but no result. How can I make an SQL query that disables all these products?</p> | 0 |
How do I fix the 'Out of range value adjusted for column' error? | <p>I went into phpMyAdmin and changed the value for an integer(15)field to a 10-digit number, so everything should work fine. I entered the value '4085628851' and I am receiving the following error:</p>
<blockquote>
<p>Warning: #1264 Out of range value
adjusted for column 'phone' at row 1</p>
</blockquote>
<p>It ... | 0 |
JQuery add link to text | <p>Is there a way in JQuery to select text from the html document and add a link around it?</p>
<p>Many Thanks,
Nav</p> | 0 |
Delete button for each table row | <p>I manage to succesfully read and display data from my database with the following code:
<a href="http://pastebin.com/rjZfBWZX" rel="nofollow">http://pastebin.com/rjZfBWZX</a>
I also generate a delete button for each row of the table :) Clicking the delete button calls "obrisi.php" which is supposed to delete that r... | 0 |
AngularJS get formatted date in ng-model | <p>I have following text input filled by model value in timestamp:</p>
<pre><code><input type="datetime" ng-model="workerDetail.dateOfBirth" class="form-control" id="date_of_birth" />
</code></pre>
<p>It displays value in input as given timestamp. </p>
<p>I would like to convert value which is visible in inpu... | 0 |
Change Toolbar color in Appcompat 21 | <p>I am testing out the new Appcompat 21 Material Design features. Therefore I've created a Toolbar like this:</p>
<pre><code><android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_my_toolbar"
androi... | 0 |
How to countercheck a Boost Error Code appropriately? | <p>I have a callback function which is bound to a <code>boost::asio::deadline_timer</code>. Now the function is called when the timer is cancelled or it expires. Since I need to distinguish between this two cases I need to check the passed Error code. The basic code would be like this:</p>
<pre><code>void CameraComman... | 0 |
How to instantiate, initialize and populate an array in TypeScript? | <p>I have the following classes in TypeScript:</p>
<pre><code>class bar {
length: number;
}
class foo {
bars: bar[] = new Array();
}
</code></pre>
<p>And then I have:</p>
<pre><code>var ham = new foo();
ham.bars = [
new bar() { // <-- compiler says Expected "]" and Expected ";"
lengt... | 0 |
Fullscreen video without black borders | <p>The problem I have is that the video always gets black bars on the sides or on the top/bottom depending on the screen size. </p>
<p><img src="https://i.stack.imgur.com/umS4u.png" alt="enter image description here"></p>
<p><em>Any idea how to get it full screen always without showing that annoying black bars?</em> ... | 0 |
How to use "routerLinkActive" with query params in Angular 6? | <p>I have a problem in Angular: I have three links, one of them has query params (due to using a resolver). If I click the first and the third link, the <code>routerLinkActive</code> is set. If I click the second link <code>routerLinkActive</code> is set too. But if I change the query parameter inside the component <co... | 0 |
Create .ics file dynamically | <p>I made a website for a client where they can post events. Instead of manually creating .ics files from iCal for every event and uploading it, I though it would be better to pull it out of the database and automatically create a .ics file automatically with PHP.</p>
<p>I can pull information from the database (no pr... | 0 |
Can I automatically start a task when a folder is opened? | <p>Does VS code support starting a gulp-watch task on startup? I'd like to start the watcher when I open the editor.</p> | 0 |
Cartesian Product in c++ | <p>I have been searching for weeks on how to come up with piece of code which I could applied the cartesian product. Let's say I have two arrays : </p>
<pre><code>int M[2]= {1,2};
int J[3] = {0,1,2};
</code></pre>
<p>So the code will takes those two arrays in apply the rule M X J
therefore we will have the pairs (1,0... | 0 |
Why it is impossible to divide Integer number in Haskell? | <p>This code</p>
<pre><code>(4 :: Integer) / 2
</code></pre>
<p>will lead to error:</p>
<pre><code> No instance for (Fractional Integer) arising from a use of ‘/’
In the expression: (4 :: Integer) / 2
In an equation for ‘it’: it = (4 :: Integer) / 2
</code></pre>
<p>Why?</p>
<p>I need to specify </p>
<pr... | 0 |
JavaFX: what is the best way to display a simple message? | <p>In my application I need to display a warning/info message, but I don't know a simple way to do that because there is no JOptionPane or similar component on JavaFX.</p>
<p>There is a Popup class, but you have to set many parameters to get a decent layout/position/background color/etc for a simple message... So I wa... | 0 |
How do I install python_ldap on 64 bit windows 7? | <p>I'm using python 2.7.6 and in my code I have a line:</p>
<pre><code> import psycopg2.extensions
</code></pre>
<p>which I've installed using pip. Next, my editor tells me, that psycopg2 requires python_ldap=2.4.19.
However, in the PyPI repository, there's only a 32 bit version, which doesn't work, since my Windo... | 0 |
Google play developer console crash reports | <p>I am looking for an API to pull my app's crash reports programmatically and I can't seem to find if this exists or not. I read through the google play developer API docs but it seems like it's for publishing your app and managing game related actions. </p>
<p>Anyone know if there is an API available for crash repor... | 0 |
DataFrame error: "overloaded method value filter with alternatives" | <p>I am trying to create a new data frame by filter out the rows which is null or empty string using the code below:</p>
<pre><code>val df1 = df.filter(df("fieldA") != "").cache()
</code></pre>
<p>Then I got the following error:</p>
<pre><code> <console>:32: error: overloaded method value filter with alternati... | 0 |
DataGridViewTextBoxColumn add commas in numeric cell | <p>How can I have my datagrid automatically add commas to a cell to format the numbers. I tried changing the format of the defaultcellstyle to numeric but it didn't help.</p>
<p>I'm looking for it to do something like</p>
<p>user enters 503412.45</p>
<p>The number display changes to 503,412.45</p>
<p><strong>UPD... | 0 |
Knockout.js mapping JSON object to Javascript Object | <p>I have a problem mapping a Json object recieved from the server into a predefined Javascript-object which contains all the necessary functions which are used in the bindings</p>
<p>Javascript code is the following</p>
<pre><code>function Person(FirstName, LastName, Friends) {
var self = this;
self.FirstNam... | 0 |
Drawing an object using getGraphics() without extending JFrame | <p>How can I draw an object without a class (which extends <code>JFrame</code>)? I found <code>getGraphics</code> method but it doesnt draw the object.</p>
<pre><code>import javax.swing.*;
import java.awt.*;
public class Main {
public static void main(String[] args) {
JFrame frame = new JFrame();
f... | 0 |
How to send JWT token as authorization header in angular 6 | <p>Currently I used this static code in component .ts file but this one is not work. It returns unauthorized(401). But when I pass token as query string it works fine. Please give a working example for component .ts file.</p>
<pre><code> import { HttpClient, HttpResponse ,HttpHeaders} from '@angular/common/http';
... | 0 |
How to set environment variable in React JS..? | <p>I am new to React JS. I am trying to build war file from React App but stuck somewhere below. It gives me below errors.</p>
<pre><code>Creating an optimized production build...
Treating warnings as errors because process.env.CI = true.
Most CI servers set it automatically.
Failed to compile.
./src/Home.js
Li... | 0 |
C#: How do you send OK or Cancel return messages of dialogs when not using buttons? | <p>C#: How do you send OK or Cancel return messages of dialogs when not using buttons?</p>
<p>How would you return the OK message in the condition of a textbox that will proceed when the user presses Enter, and will send Cancel when the user presses Ctrl+Q? </p>
<p>Disregard:
solution- this.dialogresult = dialogresul... | 0 |
How can I iterate through an array of strings using VB? | <p>Here's my code so far:</p>
<pre><code>Dim i As Integer
Dim stringArray() as String
stringArray = split("Hello|there", "|")
For i = 0 To stringArray.Length()
' Logic goes here
Next
</code></pre>
<p>VB6 doesn't seem to like me using <code>stringAray.Length()</code> and gives me a compile error message like <cod... | 0 |
How to change fonts in matplotlib (python)? | <p>It sounds as an easy problem but I do not find any effective solution to change the font (not the font size) in a plot made with matplotlib in python.</p>
<p>I found a couple of tutorials to change the default font of matplotlib by modifying some files in the folders where matplotlib stores its default font - see <... | 0 |
Is there a way to simulate GROUP BY WITH CUBE in MySql? | <p>MySql supports GROUP BY WITH ROLLUP which will return aggregates for the last x of the n columns in the group by but does not support GROUP BY WITH CUBE to take all combinations of the n columns and take aggregates.</p>
<p>I can simulate this by doing unions of GROUP BY WITH ROLLUP queries, but MySql is materializi... | 0 |
TypeScript D3 v4 import not working | <p>I am trying to build a tiny JS library on top of D3 to draw a line chart. I am fairly new to the whole scene, but I thought I'd learn best by jumping in the "deep end".</p>
<p>Here is the content of my <code>package.json</code></p>
<pre><code>{
"name": "d3play02",
"version": "1.0.0",
"description": "",
"ma... | 0 |
How to implement "make install" in a Makefile? | <p>So here's the repo I'm working with: <a href="https://github.com/Garuda1/unixlib" rel="noreferrer">https://github.com/Garuda1/unixlib</a></p>
<p>I'd like to know where my compiled lib (<code>unixlib.a</code>) and where my header (<code>unixlib.h</code>) should be so as to be able to use the lib (under Linux-x86 or ... | 0 |
How to add a new row to c# DataTable in 1 line of code? | <p>Is it possible to add a new row to a datatable in c# with just 1 line of code? I'm just dummying up some data for a test and it seems pretty slow to have to write something like this:</p>
<pre><code>DataTable dt= new DataTable("results");
DataRow dr1 = dt.NewRow();
dr1[0] = "Sydney";
dt.Rows.Add(dr1);
DataRow dr2 =... | 0 |
How to make cheat sheets in Latex? | <p>I want to make cheat sheets for my personal use. I want to use this opportunity to get a good hand on <a href="http://en.wikipedia.org/wiki/LaTeX" rel="noreferrer">LaTeX</a> too. (I am already comfortable making simple documents math related in LaTeX.)</p>
<p>Now I want to try making cheat sheets in LaTeX. But I do... | 0 |
In Python how should I test if a variable is None, True or False | <p>I have a function that can return one of three things:</p>
<ul>
<li>success (<code>True</code>)</li>
<li>failure (<code>False</code>)</li>
<li>error reading/parsing stream (<code>None</code>)</li>
</ul>
<p>My question is, if I'm not supposed to test against <code>True</code> or <code>False</code>, how should I see... | 0 |
Where can I find the error logs of nginx, using FastCGI and Django? | <p>I'm using Django with <a href="https://en.wikipedia.org/wiki/FastCGI" rel="noreferrer">FastCGI</a> + nginx. Where are the logs (errors) stored in this case?</p> | 0 |
Disabling field analyzing by default in elastic search | <p>Is it possible to enable indexing of elastic search fields selectively for a type? </p>
<p>Through the mapping settings for a specific index, one can set the property </p>
<p>{ "index" : "not_analyzed" }</p>
<p>For a specific field. Since my document has too many fields and is likely to change structure in the f... | 0 |
android: Data refresh in listview after deleting from database | <p>I have an application which retrieves data from DB and displays it in a list view. I have a custom adapter for the same. So when I press the "delete" button, a delete button for each row in the list is displayed. If I press that, the particular row gets deleted in the DB and the same should be reflected in the listv... | 0 |
How to access request query string parameters in javascript? | <p>I've seen numerous solutions that utilize RegEx, and to be quite frank, that seems ridiculously excessive since javascript is so versatile.</p>
<p>There must be a simpler way to access request parameters.</p>
<p>Could somebody demonstrate for me?</p> | 0 |
import .step file with three.js | <p>I would like to import a file ".step" to use it with Three.js but I don't know how to do it</p>
<p>I didn't found any topic, only "first step, second step "</p>
<p>Any one could help me please ?</p> | 0 |
Play mp3 file with javascript onClick | <p>I am playing mp3 file just javascript onClick.</p>
<p>Bellow is my code:</p>
<pre><code>//Music File 1
<audio id="id1" src="01.mp3"></audio>
<button onClick="document.getElementById("id1").play()">Play</button>
<button onClick="document.getElementById("id1").pause()">Stop</button&g... | 0 |
Paperclip::Errors::MissingRequiredValidatorError with Rails 4 | <p>I'm getting this error when I try to upload using paperclip with my rails blogging app.
Not sure what it is referring to when it says "MissingRequiredValidatorError"
I thought that by updating post_params and giving it :image it would be fine, as both create and update use post_params</p>
<pre><code>Paperclip::Erro... | 0 |
How to display data of objects in JSP | <p>I have stored some user details through a register form into db (hibernate and spring). I want to display the user details of all users in a separate JSP page.Could anyone please tell me how to do that? </p>
<p>Below is my code of controller</p>
<pre><code>@Controller
public class RegisterController {
@Autowi... | 0 |
Restricting XML Elements Based on Another Element via XSD | <p>I believe this has to do with <code>keyref</code> but I'm not for sure, and I am really not sure that it can be done at all.</p>
<p>For example, say I have myElement1 and myElement2. If there are no myElement2 in the XML file, then myElement1 must exist, otherwise it is optional.</p>
<p>Is there any way to force ... | 0 |
RecyclerView ClassNotFound | <p>I tried to add RecyclerView and CardView into my project</p>
<pre><code>dependencies {
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:support-v13:21.0.0'
compile 'com.android.support:cardview-v7:21.0.0'
compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'com.viewpagerindica... | 0 |
Check whether a string is parsable into Long without try-catch? | <p><code>Long.parseLong("string")</code> throws an error if string is not parsable into long.
Is there a way to validate the string faster than using <code>try-catch</code>?
Thanks</p> | 0 |
What is the point of Redux Promise and Redux Promise Middleware? | <p>I've searched high and low but can't find a clear answer.</p>
<p>I've managed to wrap my head around the mechanics of Redux, <em>but</em> when I've come to the point of API calls and async action creators, I'm stuck with middleware in context of Promises.</p>
<p>Can you help me get the mess right?</p>
<p>Cotradic... | 0 |
Node.js TypeError: Cannot read property 'path' of undefined | <p>I've looked at a lot of answer for this same question, but I haven't found a working solution yet. I am trying to make a web app that you can upload files to using express and multer, and I am having a problem that no files are being uploaded and req.file is always undefined.</p>
<p>Express and multer version as:
... | 0 |
Assign C array to C++'s std::array? (std::array<T,U> = T[U]) - no suitable constructor exists from "T [U]" to "std::array<T,U>" | <p>I am trying to assign a C array to a C++ std::array.</p>
<p>How do I do that, the cleanest way and without making unneeded copies etc?</p>
<p>When doing</p>
<pre><code>int X[8];
std::array<int,8> Y = X;
</code></pre>
<p>I get an compiler error: "no suitable constructor exists".</p> | 0 |
jQuery Mobile after page is shown event | <p>I'm new to jquery Mobile (I'm familiar with jquery though) and I cannot find an event that runs after the page is shown. I'm using jStorage to store some data and I want on load to check if there is any data and if there is to show something different in the page (like add elements to a list).</p>
<p>But the $(docu... | 0 |
ORDER BY ASC with Nulls at the Bottom | <p>I'm writing an SQL query that connects a schools table to a districts table. Simple One-To-Many relationship where each school is attached to one district. My query is as follows:</p>
<pre><code>SELECT
schools.id AS schoolid,
schools.name AS school,
districts.id AS districtid,
districts.name AS... | 0 |
Delete data older than 10 days in elasticsearch | <p>I am new to elasticsearch and I want to delete documents in my elasticsearch index which are older than 10 days. I want to keep only last 10 days of data.So is there any way to delete last 11nth day index automatically.
What I have tried..</p>
<pre><code>DELETE logstash-*/_query
{
"query": {
"range": {
"@t... | 0 |
Gnuplot , pm3d with contour lines | <p>i am 3d plotting a matrix with some values, and i need to add contour lines to the plot, is there a simple gnuplot command to do this? </p>
<p>I tried the command: "set contour base" but only 1 line came up, i think it should be many lines. See matlab picture</p>
<p>When i plot it in gnuplot i only get 1 contour l... | 0 |
Does Redis persist data? | <p>I understand that Redis serves all data from memory, but does it persist as well across server reboot so that when the server reboots it reads into memory all the data from disk. Or is it always a blank store which is only to store data while apps are running with no persistence?</p> | 0 |
How To Generate TCP, IP And UDP Packets In Python | <p>Can anyone tell me the most basic approach to generate UDP, TCP, and IP Packets with Python?</p> | 0 |
UITableViewController select header for section | <p>I have a <code>UITableView</code> with multiple sections. Each section has a section header (a custom view) is there an easy way to detect when someone selects the section header? (Just like <code>didSelectRowAtIndexPath</code>, but for the header?)</p> | 0 |
How should we test exceptions with nose? | <p>I'm testing exceptions with nose. Here's an example:</p>
<pre><code>def testDeleteUserUserNotFound(self):
"Test exception is raised when trying to delete non-existent users"
try:
self.client.deleteUser('10000001-0000-0000-1000-100000000000')
# make nose fail here
except UserNotFoundExcep... | 0 |
text-overflow: ellipsis not working | <p>This is what I tried (see <a href="http://jsfiddle.net/kaJ3L/" rel="noreferrer">here</a>):</p>
<pre><code>body {
overflow: hidden;
}
span {
border: solid 2px blue;
white-space: nowrap;
text-overflow: ellipsis;
}
</code></pre>
<p>Essentially, I want the span to shrink with ellipsis when the window ... | 0 |
iOS 8 - UIPopoverPresentationController moving popover | <p>I am looking for an effective way to re-position a popover using the new uipopoverpresentationcontroller. I have succesfully presented the popover, and now I want to move it without dismissing and presenting again. I am having trouble using the function:</p>
<pre><code>(void)popoverPresentationController:(UIPopover... | 0 |
XSLT replace double quotes in variable | <p>Just to clarify, I am using XSLT 1.0. Sorry for not specifying that at first.</p>
<p>I have an XSLT stylesheet where I'd like to replace double quotes with something safe that's safe to go into a JSON string. I'm trying to do something like the following:</p>
<pre><code><xsl:stylesheet version="1.0" xmlns:xsl="... | 0 |
Oracle VirtualBox terminated unexpectedly, with exit code -1073741819 (0xc0000005) | <p>My VirtualBox virtual machine suddenly doesn't work, instead producing an error. I don't know what is causing this error; I searched Google for a solution, but failed. I have already reinstalled it, uninstalled, rebooted and reinstalled, but to no avail.</p>
<p>What can I do to solve this problem?</p>
<h2>Logs:</h... | 0 |
Getting the value or index of Combobox item? | <p>I am trying to make my GUI display information depending on the item chosen in the combobox. <code>PySimpleGUI</code> cookbook says that I should be using <code>GetSelectedItemsIndexes()</code> method, but when I try using it:</p>
<pre><code>window.Element('_COMBOBOX_').GetSelectedItemsIndexes()
</code></pre>
<p>I... | 0 |
How to parse http response body to json format in golang? | <p>I get an response body. the format of the body is as below:</p>
<pre><code> [
{
"id":1,
"name":"111"
},
{
"id":2,
"name":"222"
}
]
</code></pre>
<p>I want to parse the body to json struct, my code is as below... | 0 |
Trigger syntax and IF ELSE THEN | <p>I'd like to create a trigger which count the number of rows with a specific id (id_ort).
If it found more than 5 rows, I need to increment a variable.</p>
<h2>Trigger Syntax</h2>
<pre><code>BEGIN
DECLARE nb INT;
DECLARE nba INT;
SET nba =0;
SET NEW.`VPLS_ID_NodeB` = CONCAT("21100", LPAD(NEW.`VPLS_ID_NodeB`,4,0... | 0 |
How to check/uncheck radio button on click? | <p>I want to be able to uncheck a radio button by clicking on it.</p>
<p>So, if a radio button is unchecked, I want to check it, if it is checked, I want to uncheck it.</p>
<p>This does not work:</p>
<pre><code>$('input[type=radio]:checked').click(function(){
$(this).attr('checked', false);
});
</code></pre>
<p... | 0 |
Get single row in JPA | <p>How to get single row from entity in JPA?</p>
<p>Table: Employee</p>
<pre><code> @Id
private int empId;
private String empName;
...
</code></pre>
<p>JPA by default return List. I`m trying to fetch single row.</p>
<p>EmployeeRepository :-</p>
<pre><code> public Employee findByEmpName(String... | 0 |
Ansible condition when string not matching | <p>I am trying to write an Ansible playbook that only compiles Nginx if it's not already present and at the current version. However it compiles every time which is undesirable.</p>
<p>This is what I have: </p>
<pre><code>- shell: /usr/local/nginx/sbin/nginx -v 2>&1
register: nginxVersion
- debug:
var=ngi... | 0 |
Codeigniter load view in new tab | <p>How to implement a search engine where search results should load in a new tab using code-igniter.I have a search form in my view and i need to load the results in a new tab. Currently am loading view using $this->load->view();</p> | 0 |
Check if arraylist is sorted | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://stackoverflow.com/questions/3047051/how-to-determine-if-a-list-is-sorted-in-java">How to determine if a List is sorted in Java?</a> </p>
</blockquote>
<p>In java I have array list with names, how do I check if it sorted? I don't want it t... | 0 |
Using javascript to set value of hidden field then access value from serverside c# code | <p>I am using a nested html unordered list styled as a drop down. When the a tag within the inner lists list item is clicked it trigger some javascript which is supposed to set the value of a hidden field to the text for the link that was clicked.</p>
<p>The javascript seems to work - I used an alert to read the value... | 0 |
How to delete table *or* view from PostgreSQL database? | <p>I have a name of table or view in PostgreSQL database and need to delete in in single pgSQL command. How can i afford it?</p>
<p>I was able to select form system table to find out if there any table with such a name but stuck with procedural part:</p>
<pre><code>SELECT count(*) FROM pg_tables where tablename='user... | 0 |
Jquery how to append and remove on a div click event | <p>I am new to using jquery and would like to know how to append and also remove the IDs from divs using the click event and appending to html. In the code below I have been able to append the IDs from clicking on a div, but am not sure how to remove. Whichever divs are highlighted yellow should be the ones that are ap... | 0 |
WCF readerQuotas settings - drawbacks? | <p>If a WCF service returns a byte array in its response message, there's a chance the data will exceed the default length of 16384 bytes. When this happens, the exception will be something like</p>
<blockquote>
<p>The maximum array length quota (16384)
has been exceeded while reading XML
data. This quota may be... | 0 |
What is a Trusted Connection? | <p>What is a trusted connection in terms of SQL Server 2005 (Trusted vs Windows Auth)?</p> | 0 |
How does getWriter() function in an HttpServletResponse? | <p>In the method <code>service()</code>, we use</p>
<pre><code>PrintWriter out = res.getWriter();
</code></pre>
<p>Please tell me how it returns the <code>PrintWriter</code> class object, and then makes a connection to the Browser and sends the data to the Browser.</p> | 0 |
Output single character in C | <p>When printing a single character in a C program, must I use "%1s" in the format string? Can I use something like "%c"?</p> | 0 |
How to Disable future dates in Android date picker | <p>How to Disable future dates in Android date picker</p>
<p>Java Code :</p>
<pre><code>mExpireDate.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// To show current date in the datepicker
final Calendar mcurrentDate = Calen... | 0 |
Can't read an XML file with simplexml_load_string | <p>I have been trying to read the xml file, but it is giving me a strange error.
My XML is as follows</p>
<pre><code><?xml version='1.0' encoding='UTF-8'?>
<response>
<url>http://xyz.com</url>
<token>xxxxxxx<token>
</response>
</code></pre>
<p>To read this I am using ... | 0 |
The multi-part identifier could not be bound | <p>I've seen similar errors on SO, but I don't find a solution for my problem.
I have a SQL query like:</p>
<pre><code>SELECT DISTINCT
a.maxa ,
b.mahuyen ,
a.tenxa ,
b.tenhuyen ,
ISNULL(dkcd.tong, 0) AS tongdkcd
FROM phuongxa a ,
quanhuyen b
LEFT OUTER JOIN ( ... | 0 |
Open downloaded file on Android N using FileProvider | <p>I've got to fix our App for Android N due to the FileProvider changes. I've basically read all about this topic for the last ours, but no solution found did work out for me.</p>
<p>Here's our prior code which starts downloads from our app, stores them in the <code>Download</code> folder and calls an <code>ACTION_VI... | 0 |
Facebook API - How to get user's address, phone #? | <p>Is anyone able to get facebook user's address, phone # using FQL or Graph api?</p>
<p>Have tried the following FQL and was able to get 'Current City' and 'Hometown' which are under 'Basic information' but not the 'Address' or 'Phone' which are under 'Contact Information'.</p>
<p><code>SELECT name,first_name,last_n... | 0 |
Log4j formatting: Is it possible to truncate stacktraces? | <p>I want to log only the first few lines of Exceptions in my program. I know, I can do something like this to print only the first 5 lines of a stacktrace:</p>
<pre><code>Throwable e = ...;
StackTraceElement[] stack = e.getStackTrace();
int maxLines = (stack.length > 4) ? 5 : stack.length;
for (int n = 0; n < m... | 0 |
How do I remove all tinymce instances at startup? | <p>I'm dynamically creating and destroying textareas for this purpose. However, when I create a textarea and then an instance of it in tinymce--then come back to the page again, it doesn't work. I've found that the solution is to simply remove any existing instance of that same name, but I was wondering if it's possibl... | 0 |
Flexbox center and bottom right item | <p>I'm trying to achieve the following result using flexbox:
<a href="https://i.stack.imgur.com/r4AVy.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/r4AVy.jpg" alt="Flexbox demo"></a></p>
<p>I tried the with the following html but I can't get it to work.</p>
<pre><code><div class=" flex-center">
... | 0 |
how to handle multiple namespaces with different URI in XSD | <p>I have an XML (first.xml) which looks like ::</p>
<pre><code> <?xml version="1.0" encoding="utf-8"?>
<saw:jobInfo xmlns:saw="com.analytics.web/report/v1.1">
<saw:jobStats>...........</saw:jobStats>
<saw:detailedInfo> .....</saw:detailedInfo>
<... | 0 |
How to access the folder path in web config using c# | <p>How can i access the folder path from web.config using c# code.
here is a sample code.</p>
<p>how to place this path in web config <code>C:\\whatever\\Data\\sample.xml</code></p>
<p>i have to read this path from web config.</p>
<pre><code>string folderpath = ConfigurationSettings.AppSettings["path"].ToString();
... | 0 |
JMeter: How to count JSON objects in an Array using jsonpath | <p>In JMeter I want to check the number of objects in a JSON array, which I receive from the server. </p>
<p>For example, on a certain request I expect an array with 5 objects.</p>
<p>[{...},{...},{...},{...},{...}]</p>
<p>After reading this: <a href="https://stackoverflow.com/questions/13745332/count-members-with-j... | 0 |
What's the right way to reference a parameter in Doxygen? | <p>I have the following Doxygen documentation for a function:</p>
<pre><code>/**
@brief Does interesting things
@param[in] pfirst The first parameter: a barrel full of monkeys
@pre
"pfirst" must have been previously passed through BarrelFiller()
*/
</code></pre>
<p>Note that <code>pfirst</code> is a para... | 0 |
Reading from the stream has failed - MySqlException | <p>I'm trying to open a connection to a MySql database using the following code piece:</p>
<pre><code>string connectionString = "Server=ip_number;Database=database_name;Uid=uid;Password=password";
MySqlConnection connection;
connection = new MySqlConnection(connectionString);
connection.Open();
</code></pre>
<p>And h... | 0 |
Blazor - show confirmation dialog before delete/update? | <p>In the following Blazor (server-side) code snips. How to prompt the confirmation dialog?</p>
<pre><code><tbody>
@foreach (var r in lists)
{
var s = r.ID;
<tr>
<td>@s</td>
<td><button class="btn btn-primary" @onclick="() => DeleteSym... | 0 |
[Docker]: Connecting PHPMyAdmin to MySQL doesnt work | <p>I'm trying to connect a PHPMyAdmin-Container to a MySQL-Container to view the databases.</p>
<p>I have started the MySQL container via <code>$ docker run --name databaseContainer -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql</code> </p>
<p>and the PHPMyAdmin-Container via <code>$ docker run --name myadmin -d --link... | 0 |
Python: simple list merging based on intersections | <p>Consider there are some lists of integers as:</p>
<pre><code>#--------------------------------------
0 [0,1,3]
1 [1,0,3,4,5,10,...]
2 [2,8]
3 [3,1,0,...]
...
n []
#--------------------------------------
</code></pre>
<p>The question is to merge lists having at least one common element. So the results only for the ... | 0 |
Change background color with a loop onclick | <p>here is my js fiddle : <a href="http://jsfiddle.net/pYM38/16/" rel="nofollow">http://jsfiddle.net/pYM38/16/</a></p>
<pre><code> var box = document.getElementById('box');
var colors = ['purple', 'yellow', 'orange', 'brown', 'black'];
box.onclick = function () {
for (i = 0; i < colors.length; i++) {
... | 0 |
Return in foreach showing only 1st value | <p>I have problem. In my function, return shows only first player from server. I wanted to show all players from server, but i cant get this working. Here is my code:</p>
<pre><code>function players() {
require_once "inc/SampQueryAPI.php";
$query = new SampQueryAPI('uh1.ownserv.pl', 25052); // Zmień dane obok!... | 0 |
Prevent redirect to /Account/Login in asp.net core 2.2 | <p>I am trying to prevent the app to redirect to <code>/Account/Login</code> in asp.net core 2.2 when the user isn't logged in.</p>
<p>Even though i write <code>LoginPath = new PathString("/api/contests");</code> any unauthorized requests are still redirected to <code>/Account/Login</code></p>
<p>This is my S... | 0 |
ESLint error - ESLint couldn't find the config "react-app" | <p>Me with my team, start a new React Project using the create-react-app bootstrap command.
We add the eslint section on the project but we stuck with annoying error that we never found it before now.
When we launch the command </p>
<pre><code> yarn run lint
</code></pre>
<p>Here the error:
<a href="https://i.stack.... | 0 |
How to Auto size Excel ClosedXml cells in c# | <p>I am trying to resize cells so that it fits the maximum length of the text using <code>ClosedXMl.Excel</code> but the cell is giving me this error message:</p>
<blockquote>
<p>Severity Code Description Project File Line Suppression State
Error CS0119 'IXLRangeBase.Cells()' is a method, which is not v... | 0 |
My .bashrc file not executed on Git Bash startup (Windows 7) | <p>This is what I did:</p>
<pre><code>cd ~
touch .bashrc
notepad .bashrc
</code></pre>
<p>and the content of my .bashrc is (found on the web somewhere):</p>
<pre><code>SSH_ENV="$HOME/.ssh/environment"
# start the ssh-agent
function start_agent {
echo "Initializing new SSH agent..."
# spawn ssh-agent
ssh... | 0 |
Reset git settings | <p>When I try downloading <a href="https://git01.codeplex.com/casablanca" rel="noreferrer">this</a> git repo I keep getting <code>error: RPC failed; result=56, HTTP code = 200</code> and I think this is because I messed up some settings (i was playing about with <code>--config</code> and <code>--bare</code> today)</p>
... | 0 |
How do I retrieve output from Multiprocessing in Python? | <p>So, I'm trying to speed up one routine by using the Multiprocessing module in Python. I want to be able to read several .csv files by splitting the job among several cores, for that I have:</p>
<pre><code>def csvreader(string):
from numpy import genfromtxt;
time,signal=np.genfromtxt(string, delimiter=',',unpa... | 0 |
How can I display a dialog above the keyboard | <p>I'm a newbie with android, I write an application which using the Dialog to display data when user select on one thing. This is how the dialog looks:</p>
<p><a href="https://docs.google.com/file/d/0B3NUAgD0tB0YOS16azFCWXdSVVE/edit" rel="noreferrer">https://docs.google.com/file/d/0B3NUAgD0tB0YOS16azFCWXdSVVE/edit</a... | 0 |
Tool for comparing 2 binary files in Windows | <p>I need a tool to compare 2 binaries. The files are quite large. Some freeware or trial tools I found on the Internet are not convenient to use for large files. Can you recommend me some tools?</p> | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.