text stringlengths 181 35.5k | meta dict |
|---|---|
Q:
Create category based on keyword in R
I have a dataframe containing two columns: 1st column is the keyword and 2nd is the associated category.
keywords <- c("keyword1", "keyword2", "keyword3")
categories <- c("category1", "category2", "category3")
lookup_table <- data.frame(keywords, categories)
I would like tha... | {
"pile_set_name": "StackExchange"
} |
Q:
Bash script to move files
I'm a beginner and I need help.
I'm trying to make a script to move some files from one directory in another directory.
Before to create the script I tested the command and it was working:
mv /path/to/source /path/to/destination
After I've made the script with nano:
#!bin/bash/
echo "mv... | {
"pile_set_name": "StackExchange"
} |
Q:
How would I derive the closed form for this?
In a simple martingale betting strategy you double your bet each time you lose until you win. Let's say you use a martingale strategy in a series of coin flip bets. Let $X$ be a random variable that denotes the number of flips to win. Let $p$ be the probability of a hea... | {
"pile_set_name": "StackExchange"
} |
Q:
Intercept Paste Event on JavaFx HTMLEditor
Hello I want to know how to intercept the Paste Event in the JavaFX HTMLEditor.
A:
You can't. The HTMLEditor uses a WebPage internally. Basically during a paste event it sends a "paste" command via
private boolean executeCommand(String command, String value) {
retur... | {
"pile_set_name": "StackExchange"
} |
Q:
Sign a package .deb with Certificate .p12
I packaged a java application under ubuntu in .deb I would like to sign it.
under windows I use signtool.exe to sign the
.exe with command : signtool.exe sign / f cert.p12 / p passwordcert app.exe .
Is there a similar command to sign under linux?
Thank you for your help.
... | {
"pile_set_name": "StackExchange"
} |
Q:
Minimum value of : $\left|\sin{x}+ \cos{x} + \sec{x} + \tan{x} + \cot{x} + \csc{x}\right|$
Find the minimum value of :$$\left|\sin{x}+ \cos{x} + \sec{x} + \tan{x} + \cot{x} + \csc{x}\right|.$$
What I have tried is trying to simplify the expression into a $\sin{2x}$ form but it did not go well. I guess there is mu... | {
"pile_set_name": "StackExchange"
} |
Q:
i386-mingw32-g++: error trying to exec 'cc1plus': execvp: No such file or directory
If I compile this QT c++ program in SuSE Linux
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
When I type
i386-mingw32-g++ helloworld.cpp
I get the following error
i386-ming... | {
"pile_set_name": "StackExchange"
} |
Q:
How to make a specific region from picture box as grid of a specific number of cells in C#
The following is the code to make a grid of 100 cells for a region of 500*500 of a picture box. This region start from x = 300 y = 200 and end in x = 800 y = 700. Each cell side equal to 50 pixel.
//makes grid in picture bo... | {
"pile_set_name": "StackExchange"
} |
Q:
error c2106: '=' : left operand must be I-value
I am trying to do an if statement in a for loop and it gives me the following issue: "error c2106: '=' : left operand must be I-value" next to each of my if loops.
#include <iostream>
#include <cmath>
#include <vector>
using namespace std;
// Function of given equa... | {
"pile_set_name": "StackExchange"
} |
Q:
Sonatype nexus downloaded jars location
I have deployed Sonatype nexus war file to my Tomcat 7. Then add all need info to the pom.xml and all work good. I can download jars from my own nexus repo. Now nexus works as proxy - its download external dependence etc.
Where I can found jars which nexus download? I mean w... | {
"pile_set_name": "StackExchange"
} |
Q:
How can I decipher a ciphered text?
I got the following ciphered string:
MDExMDExMTEwMTExMDAwMDAxMTAwMTAxMDExMDExMTAwMDEwMDAwMDAxMTEwMDExMDExMDAxMDEwMTExMDAxMTAx MTAwMDAxMDExMDExMDEwMTEwMDEwMQ==
Now I would like to decipher this string into original one. How can I do this? and I don't know about which algorithm ... | {
"pile_set_name": "StackExchange"
} |
Q:
Datepicker for Bootstrap (select Week only and making it work in IE)
I'm using this date picker:
http://www.eyecon.ro/bootstrap-datepicker/
2 questions:
Anyone know how to make it work in Internet Explorer? It just
doesn't, try it.
How can I configure it such that it selects entire
weeks? (if a person selects a ... | {
"pile_set_name": "StackExchange"
} |
Q:
What's the pattern? roots and powers of n?
I won't hold it against anyone if this is considered a bad question but I just don't know how else to put it and really want to know.
1st case:
n = positive integer
a = $\sqrt n$
b = 1
2nd case:
n = positive integer
a = $b^2$
b = $\sqrt[3]n$
c = 1
With each new case a new... | {
"pile_set_name": "StackExchange"
} |
Q:
Delete specific stack activity
In my application I have a sequence of 5 activitys, which from the second, there is the restart button, this should go back to first, the problem is that the stack still holds, which creates a problem, since the user can click back. Clearing the entire stack is not an option as there... | {
"pile_set_name": "StackExchange"
} |
Q:
Get the frequency of a word from a string
so I'm having problem with finding the frequency of a word in a string. I'm trying to ask the user to input the string and the word. Let's say the user entered plopewdsplopewds and the word is "pewds" which is repeated twice.
The string.split() method here won't work.
I'm ... | {
"pile_set_name": "StackExchange"
} |
Q:
Elseifs being skipped in Lua
I started to work on a little Game-Dev project in Lua, and am having trouble with this part of my code:
if genrel == RPG and langl == BASIC and topicl == WAR then
review = math.random(2, 5)
review2 = math.random(2, 5)
review3 = math.random(2, 3)
mone... | {
"pile_set_name": "StackExchange"
} |
Q:
getting the number of unique values
I have some text files with two columns. first column is the position of amino acids and the second column is the name of amino acids.I would like to get the total number of each amino acids from all files. I need only unique values. In the following example, total no:of LEU is ... | {
"pile_set_name": "StackExchange"
} |
Q:
How is the coop partner useful in single player?
Binding of Isaac: Rebirth supports a coop player, but I don't have anybody to play with!
I do have a controller plugged in however. Can coop game mechanics aid me in single player?
A:
Yes. Here is a number of ways, in increasing order of ridiculousness:
Double us... | {
"pile_set_name": "StackExchange"
} |
Q:
Displaying hebrew characters with SQL collation SQL_Latin1_General_CP850_BIN2
We have a remote database that is out of our control.
The database contains Hebrew characters. It's collation is: SQL_Latin1_General_CP850_BIN2
When we open the SQL management studio - we see gibberish.
We asked the database owner (a dif... | {
"pile_set_name": "StackExchange"
} |
Q:
Is Tachyon by default implemented by the RDD's in Apache Spark?
I'm trying to understand Spark's in memory feature. In this process i came across Tachyon
which is basically in memory data layer which provides fault tolerance without replication by using lineage systems and reduces re-computation
by check-pointin... | {
"pile_set_name": "StackExchange"
} |
Q:
Demonstration of a theorem in geometry
I need to demonstrate what happens when a and b>90 grades
Theorem 2.4 Been a and b angles
a) a=b if they are perpendiculars and both are acute or obtuse angles.
b) they are supplementary if they are parallels and one of them is acute and the other is obtuse.
The thing I can ... | {
"pile_set_name": "StackExchange"
} |
Q:
Should I use "c" or 'c' for single characters when working with strings?
A very simple question. Does it have anything to do with performance? Something else?
System.out.println('c');
System.out.println("c");
Which, why?
System.out.println("Letter: " + "c");
System.out.println("Letter: " + 'c');
Which, why?
A:
... | {
"pile_set_name": "StackExchange"
} |
Q:
Random number between range in shell
How I can generate random number between 0-60 in sh (/bin/sh, not bash)? This is a satellite box, there is no $RANDOM variable, and other goods [cksum, od (od -vAn -N4 -tu4 < /dev/urandom)].
I want to randomize a crontab job's time.
A:
How about using the nanoseconds of syste... | {
"pile_set_name": "StackExchange"
} |
Q:
Which pattern should be used for editing properties with modal view controller on iPhone?
I am looking for a good pattern for performing basic property editing via a modal view on the iPhone.
Assume I am putting together an application that works like the Contacts application. The "detail" view controller display... | {
"pile_set_name": "StackExchange"
} |
Q:
Assigning values to a model dynamically
I gave it a try but it did not worked.
I am having two grids and a button. Initially the second grid will remain empty and the first grid will have some records.. When I select a few records in the first grid and click on the button, then the second grid should get populated... | {
"pile_set_name": "StackExchange"
} |
Q:
First timer Swing application, need help implementing the application logic
I've made the Swing 'face' for a program that does electrical calculations. It's looking great, but I now seem faced with a bewildering set of options as to how to implement the underlying calculation. The code is getting alittle long, so ... | {
"pile_set_name": "StackExchange"
} |
Q:
Pure Fullscreen CSS Slideshow with double fade in/out effect for displaced elements on background slide elements
I'm trying to have this slide show jsfiddle with cover background images slides and displaced text on it, working without the auto loop animation, only by buttons.
All elements of the slideshow have sep... | {
"pile_set_name": "StackExchange"
} |
Q:
Endomorphisms of $\mathbb{Z}/6\mathbb{Z}$
I have a question, which may be trivial, but I really don't understand how I should solve the next exercise:
List all group endomorphisms of $\mathbb{Z}_6$.
I consider that I must write down all the functions $f\colon \mathbb{Z}_6\to\mathbb{Z}_6$. But which is the gener... | {
"pile_set_name": "StackExchange"
} |
Q:
Select options with new lines issue
I have the following rails code (it uses simple form):
<%= f.input :color, collection: custom_colors.split(/\n/).reject(&:empty?) %>
custom_colors comes from a text area where users are asked to enter entries seperated by new lines.
The issue: This displays correctly, however, w... | {
"pile_set_name": "StackExchange"
} |
Q:
Nested functions within an object javascript
I am trying to add an additional function to my object. I am getting an error of undefined. I am confused. I want to be able to enter this line and have the object function execute.
var Button = System.Windows.Forms.Control.TabControl();
Button.TabPages.Add();
This ... | {
"pile_set_name": "StackExchange"
} |
Q:
Acessar function declarada na controller da directive pelos objetos transclude
Estou tentando criar uma directive que tem seu scope isolado, mas que tenha algumas funções que ela estará responsável de fazer p/ directive. É uma div que contém uma table e um botão "Adicionar" ao clicar no adicionar abrirá abaixo da ... | {
"pile_set_name": "StackExchange"
} |
Q:
list and dictionary: which one is faster
I have the following pieces of code doing the sorting of a list by swapping pairs of elements:
# Complete the minimumSwaps function below.
def minimumSwaps(arr):
counter = 0
val_2_indx = {val: arr.index(val) for val in arr}
for indx, x in enumerate(arr):
... | {
"pile_set_name": "StackExchange"
} |
Q:
Set a variable while buiding SASS with gulp?
I use the following in gulp to build a CSS file from a SASS (*.scss) file :
var gulp = require('gulp')
, sass = require('gulp-sass');
var colortheme = 'blue';
gulp.task('build_css', function() {
return gulp.src(['resources/assets/sass/app/' + colorth... | {
"pile_set_name": "StackExchange"
} |
Q:
How to convert an XPS file using PHP or Python?
How to convert an XPS file to BMP, JPG, OR PDF using PHP or Python?
A:
There is a library for reading XPS; libxps. No bindings for PHP or Python mentioned, though.
It is used by the Evince reader, which can presumably print to PDF.
On windows, you can view XPS docu... | {
"pile_set_name": "StackExchange"
} |
Q:
Minimize $\| ACE \|$ by geometrical means
I have the following figure
Where $AB=10$m, $BD=12$m and $DE=12$m. The point C can slide
along the segment BD. Now the problem is to minimize the distance from A to D
going along the dashed line. The problem can be solved using simple analysis and differentiation. Let $... | {
"pile_set_name": "StackExchange"
} |
Q:
ERROR TypeError: Cannot read property 'flag' of undefined
I have a problem with loading images in Angular 4, I found how to solve it by creating a variable in the ts file and using [src]="variablename". However, I have now another problem, I want to set the variable using a concatenation but with the code that I h... | {
"pile_set_name": "StackExchange"
} |
Q:
Placing a Module to a Certain Block in Drupal 7
I'm new to drupal and familiar with Joomla and Wordpress. I'm little bit confused with how drupal works when placing some kind of module to a certain block in drupal 7. Say that I want to place the search box in a footer block of the theme, what are the steps for doi... | {
"pile_set_name": "StackExchange"
} |
Q:
Seating friends around a dinner table
This problem came from a Putnam problem solving seminar.
If each person in a group of n people is a friend of at least half the people in the group, then show that it is possible to seat the n people in a circle so that everyone sits next to friends only.
My idea was to use ... | {
"pile_set_name": "StackExchange"
} |
Q:
Separate a single vector of vectors into individual vectors in clojure
I have a single vector of vectors and I want to separate them into individual vectors.
[["1" "2" "3"] ["a" "b" "c"]]
;;=> ["1" "2" "3"] ["a" "b" "c"]
[["1" "2" "3"] ["a" "b" "c"] ["10" "20" "30"]]
;=> ["1" "2" "3"] ["a" "b" "c"] ["10" "20" "30... | {
"pile_set_name": "StackExchange"
} |
Q:
Datetimepicker value cannot be stored in Access Database
I am new to MS-Access and C# and I am having a problem in inserting a new record into my database from my DateTimePicker as the c# program is giving the following error:
Insert into statement is not correct.
So I was wondering: how can I solve this problem... | {
"pile_set_name": "StackExchange"
} |
Q:
Get network data with nodejs
I am looking for a way to get complete data from the network of my own website with nodejs, exactly like in the network tab of the chrome devtool.
But, surprinsingly, I cannot find any information about it.
What I need is actually to get data from requests made by an iframe located on... | {
"pile_set_name": "StackExchange"
} |
Q:
How to prevent Wordpress 3.9 / TinyMCE 4 from stripping
Up until WP 3.9 I could specify inline Stylesheets using <style> tags in WP's "Text" tab, which would survive switching to WYSIWYG.
From WP 3.9, TinyMCE will strip <style> tags upon switching to WYSIWYG.
I've tried the following as MU plugin, but it doesn't ... | {
"pile_set_name": "StackExchange"
} |
Q:
Prove the arithmetic-geometric mean inequality by maximizing the product for a fixed sum
I have seen proofs for the AM-GM inequality. However, I am asked to prove
\begin{equation*}
(x_{1}x_{2}...x_{n})^\frac{1}{n}\leq\frac{x_{1}+x_{2}+...+x_{n}}{n}
\end{equation*}
And $x_i > 0$ by "maximizing $x_{1}x_{2}...x_{n}$ ... | {
"pile_set_name": "StackExchange"
} |
Q:
find parity with inversion of permutation (14)(256)
For the permutation
$$\pi= \begin{bmatrix} 1& 2& 3 &4& 5& 6 \\ 4 & 6& 3 & 1 & 2 & 5\end{bmatrix}$$
Find the number of inversions and parity.
$\pi=(14)(256)=(14)(25)(26)$. It is suppose to be odd.
Double check with parity and bernard's example
A:
There is ano... | {
"pile_set_name": "StackExchange"
} |
Q:
How to use internally authorize Google API for OAuth in my facebook app
I am building a Facebook application using Django where I am using Blogger API. So, all I want is to just read the data from a public blog (my blog).
I tried to read the documentation and found that we have 3 types of authentication mechanisms... | {
"pile_set_name": "StackExchange"
} |
Q:
Read a SciFi book called THE ALTER EGO in 1960 but can't find it
I read this book in the 1960s. It was about someone who was killed. But people's minds were 'backed up' and recorded. So when you are reconstructed, your mind is restored from your latest backup. Of course you don't remember what happened. The name o... | {
"pile_set_name": "StackExchange"
} |
Q:
Filling array with numbers from given range so that sum of adjacent numbers is square number
Problem: Fill all the cells using distinct numbers from <1,25> set, so that sum of two adjacent cells is a square number.
(source: http://grymat.im.pwr.wroc.pl/etap1/zad1etp1213.pdf; numbers 20 and 13 have been given)
I'v... | {
"pile_set_name": "StackExchange"
} |
Q:
How to change data in cell in dynamic UITableView xcode project?
I have a Dynamic Prototypes Table view that has different cells, I'm adding the cells to the table view and I want to change their content. All the tutorials I find is for a tableview with only one type of cell, but I have 8 different types. How woul... | {
"pile_set_name": "StackExchange"
} |
Q:
SDL_ttf textures in vector affects other's destination rectangle
I was following Lazy Foo' tutorial to create text using ttf font, and everything was fine, but I needed to create several text lines in several different places with different font size and color, so I decided to use vector. Here is my code of TextTe... | {
"pile_set_name": "StackExchange"
} |
Q:
Is the set of sum over a diagram is uncountable set?
Consider the following diagram:
Let $0<x<\frac{1}{2}$
Note that $[.]$ is not box function
It is easy to see that $1$ split into $x$ and $(1-x)$. In next stage $x$ split into $x^2$ and $x(1-x)$ and $(1-x)$ split into $x(1-x)$ and $(1-x)^2$. Note that I do not wr... | {
"pile_set_name": "StackExchange"
} |
Q:
Permissions denied from adding files to server
I'm using dploy.io to deploy github files to my live server but I keep getting an error regarding permissions.
I'm on Ubuntu (14.04) and /var/www/html user:group is set to www-data:www-data to work with HHVM and Nginx. Is there a way that I could add an existing user,... | {
"pile_set_name": "StackExchange"
} |
Q:
symfony credentials issue with sfDoctrineGuard 5.x
I am using sfDoctrineGuard 5.x and I have configured my module credentials in security.yml like this:
all:
is_secure: true
credentials: [ admin ]
and my app/backend/config/security.yml:
default:
is_secure: true
I have tested using:
$this->getUser()->hasPer... | {
"pile_set_name": "StackExchange"
} |
Q:
Java Web Start Splash Screen Does Not Show Up
I have been digging all day in Oracle forum posts and other threads and answers to the question mentioned in the title. Is there a viable/certain answer on how to fix such an issue. My JNLP file is correct, I have tried to replace the double quote characters with singl... | {
"pile_set_name": "StackExchange"
} |
Q:
Express.js response status code with jsonp payload
I have a MEAN-stack backend where I'd like to respond with
return res.status(400).jsonp({
message: 'Parsing failed.',
code: '123'
});
When an angular app uses this JSONP endpoint and encounters this particular error, it receives a 400 but without its payload... | {
"pile_set_name": "StackExchange"
} |
Q:
Strange jump on map after click
I have a strange problem with Here maps (JS).
After catching a click event on another element in the page (ex: custom bubble or search field) the map starts to flick like in the gif below
Example : https://i.imgur.com/kKrtwMj.gif
Any idea?
Thanks
A:
I found a temporary solution.
... | {
"pile_set_name": "StackExchange"
} |
Q:
Is static Initializer in JAVA a closure
I was wondering if static Initializer in Java as shown below is a closure which groovy built on to implement the language.
public class className{
static{
}
}
Thanks.
A:
No. That is a block. Groovy also has these.
class A {
static {
println "static init block... | {
"pile_set_name": "StackExchange"
} |
Q:
If the left regular representation of a finite group G contains an odd permutation, then G has a subgroup of index 2
I got to the point where I showed: $$[\pi(G):A_G \cap \pi(G)]=2$$
I have a trouble convincing myself of the final step. So if $\pi:G \rightarrow S_G$ is faithful (i.e. $\pi$ is injective), then $G$ ... | {
"pile_set_name": "StackExchange"
} |
Q:
Cant get data from intlTelInput
Im trying to get extension from intlTelInput plugin on submit, but for some reason it returns empty. Here is an example: https://jsfiddle.net/msfk6top/
And the code:
<link rel="stylesheet" href="https://intl-tel-input.com/node_modules/bootstrap/dist/css/bootstrap.min.css?7">
<link r... | {
"pile_set_name": "StackExchange"
} |
Q:
How to print a char a certain number of times?
I am trying to create code that takes a user-inputted number, and store it as an int. I then print out 'int' number of lines, with 'int' number of 'char' in each of them. So say for example, the inputted number was 3, it would then output
XXX
XXX
XXX
However, when I ... | {
"pile_set_name": "StackExchange"
} |
Q:
PDF toUnicode cmap table restore
I have multiple pdf files without 'toUnicode' cmap table. Absence of cmap table restricts me from copying the text from pdf files.
As far as I know, there is a possibility to add 'toUnicode' mapping in pdf file, but in my case adding static values is not an option, different files... | {
"pile_set_name": "StackExchange"
} |
Q:
Onde fazer a conexão com o banco de dados?
No padrão MVVM onde devo fazer a conexão com o banco de dados, no View, no Model ou no ViewModel?
A:
Quando você usa o padrão MVVM, um aplicativo é dividido nas seguintes camadas:
Camada Model
A camada model inclui todo o código que implementa a lógica central do apli... | {
"pile_set_name": "StackExchange"
} |
Q:
Casting vs using the 'as' keyword in the CLR
When programming interfaces, I've found I'm doing a lot of casting or object type conversion.
Is there a difference between these two methods of conversion? If so, is there a cost difference or how does this affect my program?
public interface IMyInterface
{
void A... | {
"pile_set_name": "StackExchange"
} |
Q:
Deleting class file when program is running?
One program of java is running and it has infinite loop. Now while program is running I delete the class file of that program so what will happen? Will program continue as it is or it will stop..?
A:
dont worry, nothing happens. It is stored in JVM while running.
| {
"pile_set_name": "StackExchange"
} |
Q:
Could the Stargate Program have stolen a DHD from an uninhabited planet?
In "48 Hours" they destroy the last functioning DHD on Earth in order to save Teal'c, however at the same time they establish at least a rudimentary knowledge about how to hook up and unhook a DHD device. It has also been proven in many other... | {
"pile_set_name": "StackExchange"
} |
Q:
On free shipping how to apply tax in woo commerce
I have set free shipping above 200$ in my eCommerce site but, I want to apply taxes which is not applying in my cart or checkout page.
A:
You can enable tax from woocommerce settings
1.Go to: WooCommerce > Settings.
2.Select the Enable Taxes checkbox.
3.Save ch... | {
"pile_set_name": "StackExchange"
} |
Q:
Using getElementsBy??Name in Excel VBA
I'm attempting to use VBA to scrape the link to a .gif file from this HTML fragment:
<div class="row">
<div class="col-md-12">
<div id='imageDiv' style='width:99%'>
<img style='width:99% !important; border:5px solid silver;' src="http://ww... | {
"pile_set_name": "StackExchange"
} |
Q:
razor assignment error
if(Request.QueryString["UserId"] !== WebSecurity.CurrentUserId){
Response.Redirect("~/AdminError");
}
what is wrong with the above expression ? Please help
it says
Compiler Error Message: CS1525: Invalid expression term '=='
A:
There's an extra = sign. !== is not legal in C#, != is.
T... | {
"pile_set_name": "StackExchange"
} |
Q:
how i do infinity parent - child foreach loop in angular?
I want to do foreach for following json:-
const TREE_DATA: FoodNode[] = [
{
name: 'Fruit',
children: [
{name: 'Apple'},
{name: 'Banana'},
{name: 'Fruit loops'},
]
}, {
name: 'Vegetables',
children: [
{
... | {
"pile_set_name": "StackExchange"
} |
Q:
How to iterate over a nested list
Hi I have a hibernate query which is giving me a list with type List<List<integer>>.
How can I iterate this? My hibernate query is:
String SQL_QUERY = "select DISTINCT cbl.franchiseId,cbl.resellerId from
CustomerBusinessLocation cbl where cbl.cmcustLocId in (:locationId)";
... | {
"pile_set_name": "StackExchange"
} |
Q:
Is there a non-null subset where $f$ has the sign of its integral?
Consider a measurable function $f: X \to \mathbb{R}$. Let $A$ be a measurable set s.t. $\mu (A) > 0$. Assume that $$\int_A f \, \mathrm{d}\mu > 0.$$
Is there a measurable set $B \subset A$, $\mu (B) > 0$ such that $f(b)>0$ for all $b \in B$?
A:
... | {
"pile_set_name": "StackExchange"
} |
Q:
finding the root of high CPU load
The output of top command shows that CPU load is about 82!. The system has 32 cores. Normally, each core increment the load by one.
How can I find out what is exactly happening?
top - 11:20:43 up 88 days, 17:03, 1 user, load average: 81.82, 82.88, 83.36
Tasks: 755 total, 6 run... | {
"pile_set_name": "StackExchange"
} |
Q:
SELECT SQL table retrieved by an IF statement
Hella all,
What I want to do is something like that, I will have an SQL table depending on my parameter,
DECLARE @find varchar(30)
SET @find = 'no'
SELECT * FROM
(
if @find = 'yes'
(
SELECT * FROM myTable
WHERE ID= '5882'
)
ELSE
(
SEL... | {
"pile_set_name": "StackExchange"
} |
Q:
Decrypt Java Payload
I found some destructive activity on my JBoss server and after a lot of google searching I found this exploit https://www.exploit-db.com/exploits/36575/ .
I know the attacker uses this exploit to upload a shell on my server and I upgraded my JBoss server and the problem was solved successfully... | {
"pile_set_name": "StackExchange"
} |
Q:
avformat_open_input function crashing
I'm trying to open a file using avformat_open_input and it crashes even if the file exists.
av_register_all();
AVFormatContext *avFormatContext;
if (avformat_open_input(&avFormatContext, argv[1], NULL, NULL) < 0)
{
av_log(0, AV_LOG_FATAL, "Wasn't possible opening the fil... | {
"pile_set_name": "StackExchange"
} |
Q:
Reducing the number of queries from 2 to 1
Is it possible to use 1 query instead 2? Or this way is better? (for speed)
<?
$q1 = mysql_query("SELECT name,url,id FROM gallery") or die(mysql_error());
if (mysql_num_rows($q1) > 0) {
while ($row = mysql_fetch_array($q1)) {
echo 'IMAGES FROM '.$row['name'];
... | {
"pile_set_name": "StackExchange"
} |
Q:
How to take the sum of groups of cells from one column based on a matching criteria in another column?
I have data that looks like this.
Weight Zip
23 88762
45.3 34957
37.6 87293
212.45 34957
58.3 87293
92.45 88762
I am trying to sum the weights... | {
"pile_set_name": "StackExchange"
} |
Q:
Translate URLENCODED data into UTF-8 in PHP
I've got a string that is in my database like 中华武魂 when I post my request to retrieve the data via my website I'm getting the data to the server in the format %E4%B8%AD%E5%8D%8E%E6%AD%A6%E9%AD%82
What decoding steps to I have to take in order to get it back to the usabl... | {
"pile_set_name": "StackExchange"
} |
Q:
How do I define a gradient for a custom op working on complex tensors in tensorflow?
If you have a tensor of complex numbers, tensorflow already has an op to get the magnitudes of those complex numbers (tf.abs). Now I want to add a function that calculates the angle of each number. This function is easy to impleme... | {
"pile_set_name": "StackExchange"
} |
Q:
combo box posting selection not value not other page submit
I have a Select/Combo Box that I use to select the number of records to display on a page. In order to cover the 'All' option I pass the ID and the Number Selected in the value field.
<?php //get info for results per page combo box //
$stmt = $db->... | {
"pile_set_name": "StackExchange"
} |
Q:
How to tell gradle jdk must be 1.8 without setting a JAVA_HOME like ant
I read this post
How do I tell Gradle to use specific JDK version?
which seems to miss the point. Developers should be responsible for setting their own JAVA_HOME to where they installed it which is different on different OS.
What I would lik... | {
"pile_set_name": "StackExchange"
} |
Q:
No 'Access-Control-Allow-Origin' header with Microsoft Online Auth
I am trying to make a simple request to get an access token using the Microsoft graph OAuth endpoint. When I send the simple request below I get
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'localhost:8080/... | {
"pile_set_name": "StackExchange"
} |
Q:
Jquery hide and show css class but only content inside current div, not any other
I have loop in wordpress that generates a div with two divs inside and a hide and a show element like below -
<div class="vacancy-desc">
<div class="short-desc">
Content
</div>
<div class="full-desc">
Conten... | {
"pile_set_name": "StackExchange"
} |
Q:
How should I pronounce programming language names (like "Java") and technical terms (like "JSON") in Spanish?
In Spanish, English names are usually pronounced following English rules. E.g. we pronounce "Peter" as "piter" (that's to be read in plain Spanish, i.e. "pee-ter").
However, some tech-related words like pr... | {
"pile_set_name": "StackExchange"
} |
Q:
Sorting and Paging on repository
I have a simple ASP.NET MVC application which has possibility to search, filter and page a list of vehicle makes. I implemented sorting, filtering and paging on controller (on "Index" action) following the tutorials from kudvenkat on youtube https://www.youtube.com/watch?v=srN56uxw... | {
"pile_set_name": "StackExchange"
} |
Q:
How to reference an instance of a struct inside of itself?
For example, say I wanted to make a genetics simulator and I had this very simple struct
public struct person{
string name;
int age;
string hairColor;
person father;
person mother;
}
so that later I could reference the person Joey's ... | {
"pile_set_name": "StackExchange"
} |
Q:
Twitter OAuth redirects to my callback url
I am trying to use OAuth to connect to twitter in my iphone app . I have setup everything and the login popup pops up, however after logging in, it redirects to my callback url. Tapping the cancel button simply reopens the login screen. How do I make a callback url to get... | {
"pile_set_name": "StackExchange"
} |
Q:
jQuery if not '0'
$(".test").css('cursor','pointer');
<div class="test>0</div>
<div class="test>1,000</div>
How do I apply this to the elements that are not 0?
A:
$(".test").filter(function() {
return this.innerHTML != '0';
}).css('cursor','pointer');
DEMO
Correction to your HTML
<div class="test">0</div> ... | {
"pile_set_name": "StackExchange"
} |
Q:
Como trabalhar com validação de dados no Laravel
Atualmente estou trabalhando com Laravel 5.5, entretanto, essa pergunta se aplica a "todas as versões" em razão da sua generalização.
Minha dúvida é: estou utilizando $this->validade para validar os dados vindos do form. Qual seria a receita para escolher entre usar... | {
"pile_set_name": "StackExchange"
} |
Q:
SQL - left join SELECT with SELECT COUNT(*)
I need to count the number of rows in track_plays that have a particular track_ID and join this in with my query that selects lots of data from various tables.
Here's what I have so far;
SELECT
T.ID,
T.url,
T.name,
T.pic,
T.T_ID,
COUNT(P.T_ID) AS... | {
"pile_set_name": "StackExchange"
} |
Q:
Using PHP in HTML pages without messing up Character Encoding
I'm using various php codes in most of html files from our website. I want html files treated as php, thefore I've added this line to the .htaccess
AddHandler application/x-httpd-php5 .html .htm .php
Now, everything is fine, my html files evaluate the... | {
"pile_set_name": "StackExchange"
} |
Q:
Can't read bytes from protobuf message in javascript
I need to encode/decode bytes in a protobuf message using javascript.
Strings work fine as shown, but when using bytes in the message definition I can see the data is contained in the decoded bytebuffer (printDebug shows this), but I haven't been able to extract... | {
"pile_set_name": "StackExchange"
} |
Q:
Using Cookie Expire with IF and ELSE PHP, echo not working on ELSE
Why?
I'm attempting to setup an Adword Campaign with my WordPress website, pretty easy stuff but I want to be able to SWITCH contact forms depending if they visited the site using AdWords or Bing/Google SERPS.
So the idea is that if they visit http... | {
"pile_set_name": "StackExchange"
} |
Q:
import mysql data to kubernetes pod
Does anyone know how to import the data inside my dump.sql file to a kubernetes pod either;
Directly,same way as you dealing with docker containers:
docker exec -i container_name mysql -uroot --password=secret database < Dump.sql
Or using the data stored in an existing docker c... | {
"pile_set_name": "StackExchange"
} |
Q:
Java Swing Responsive Absolute Positioning
I am newby to java swing gui and I cannot figure out this problem
Lets assume I Have a Jframe size 100,100 I have 4 button positions
left top widht height
button1 0 0 10 10 // left up
button2 90 0 10 10 // right up
button3 45 45 10 10 // mid... | {
"pile_set_name": "StackExchange"
} |
Q:
android scrollview thumbnail size
I am using scrollview and trying to set thumbnail for the scorllview.
As the size of thumbnail is little large thus it is not showing up properly.
I have tried to set the size of scrollbar but results are still the same.
A:
When I said "not showing up properly" I mean to say tha... | {
"pile_set_name": "StackExchange"
} |
Q:
Getting DrawerLayout to Slide over the ActionBar
I have a sliding drawer menu in an activity, which has an actionbar with some tabs on it.
I'd like to get the sliding drawer to slide over the tabs , not below them.
This is what it looks like right now...
Any ideas on how this could be done?
Note: I understand ... | {
"pile_set_name": "StackExchange"
} |
Q:
libxml x path expression not interpreted
I've got the following xml text
<?xml version="1.0" encoding="UTF-8"?>
<projects type="array">
<project>
<created-on type="date">2012-01-17</created-on>
<id type="integer">8860795</id>
<last-changed-on type="datetime">2012-01-17T01:37:25Z</last-changed-on>
<... | {
"pile_set_name": "StackExchange"
} |
Q:
Swift: JSON parsing not showing up in UILabel but can see in output window using Alamofire
I'm new to coding and not seem to show Daily quotes to UILabel.
Using http://quotes.rest/qod.json
output console is showing the result but nothing is there in UILabel.
Any help is greatly appreciated.
Below is JSON format f... | {
"pile_set_name": "StackExchange"
} |
Q:
Google Maps / Assets / Grid
I'm attempting to insert an Assets field, Grid data along with some other text input fields into a Info Box in a Store Locator page. My code is as follows:
{exp:gmap:results order_by="distance" sort="asc" parse="inward" cache_post="false"}
{if has_searched}
{results}
{exp:gm... | {
"pile_set_name": "StackExchange"
} |
Q:
Does this peripheral exist? Bluetooth To 3.5mm audio
I'm looking for a device that receives audio via bluetooth and outputs it via 3.5mm audio jack. The purpose of this would be to plug it into my car's 3.5mm audio jack and leave it there, and connect to it via iPhone to route music through it to the car. Does thi... | {
"pile_set_name": "StackExchange"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.