text stringlengths 181 35.5k | meta dict |
|---|---|
Q:
How to automate an installation of Phusion Passenger and Nginx?
When the command:
./passenger-install-nginx-module
is run, it asks a bunch of questions when logged in to the server.
The aim is to automate this process, how can this be done if it requires specific answers during the installation?
A:
Depending on... | {
"pile_set_name": "StackExchange"
} |
Q:
VS2010 repeatedly showing animated icon
Visual Studio 2010 is repeatedly showing this animated icon in the bottom right next to the "Ln" every 2 seconds. And even if VS is minimized, it makes my cursor briefly show an hourglass every time. Can someone tell me what this icon stands for?
Edit:
Showing the icon d... | {
"pile_set_name": "StackExchange"
} |
Q:
Treat nested std::arrays as a single flat array with chained .data()
Let's say I have this little fixed-dimension matrix class:
template<size_t M, size_t N>
struct MatMN {
std::array<std::array<double, N>, M> rows;
double* begin() { return rows.data()->data(); } //The scary part
double* end() { return begin... | {
"pile_set_name": "StackExchange"
} |
Q:
Firefox cli save page
It's possible to save page page with Firefox CLI?
Something like:
firefox -new-tab http://google.com -save-page /path/
A:
I'm not aware of any really simple way to do this. You might consider looking into a browser automation tool like Selenium. Alternatively, a more general automation too... | {
"pile_set_name": "StackExchange"
} |
Q:
C# Large JSON to string causes out of memory exception
I'm trying to download very large JSON file. However, I keep getting an error message:
"An unhandled exception of type 'System.OutOfMemoryException' occurred in mscorlib.dll"
{The function evaluation was disabled because of an out of memory exception.}
Any tip... | {
"pile_set_name": "StackExchange"
} |
Q:
air trapped in sink drain?
A modest sized object had fallen into my bathroom sink causing (I assume) the sink to drain slowly. That is, at first (after dropping the item) the sink seemed to drain fine but eventually it slowed to a bare minimum.
The sink is a pedestal sink and the drain pipes are pvc with thread... | {
"pile_set_name": "StackExchange"
} |
Q:
Searched / Tried a lot: Unable to add popup display delay
[Note: I am not programming expert.]
I tried a lot and searched this platform but did not find any solution.
I need to add 30sec delay in displaying a popup box. I took script from here. The script has fade-out time and it is working fine.
Check script belo... | {
"pile_set_name": "StackExchange"
} |
Q:
MySQL wrong results with GROUP BY and ORDER BY
I have a table user_comission_configuration_history and I need to select the last Comissions configuration from a user_id.
Tuples:
I'm trying with many queries, but, the results are wrong. My last SQL:
SELECT *
FROM(
SELECT * FROM user_comission_configura... | {
"pile_set_name": "StackExchange"
} |
Q:
How to get File Navigator View in MacOS App
I have seen in many apps a simple tree navigator view, like this in Xcode:
I am creating my own IDE and would like to know if there is there a view for this?
A:
As @TheNextman said, I need NSOutlineView, which was perfect. I followed this tutorial:
https://www.raywend... | {
"pile_set_name": "StackExchange"
} |
Q:
When did we learn that stars die?
As we all know, the stars we see in the night sky might already be dead. I was wondering though, when was this fact or conclusion commonly established? Today, most people (let's assume with an above average education) would probably be aware of this fact.
When is the earliest time... | {
"pile_set_name": "StackExchange"
} |
Q:
Condition expression - how to get REPORT TYPE in condition Expression
I would like to write expression like this:
{REPORT_TYPE} == "csv" ? "'" + $F{NUMBER_VALUE} : $F{NUMBER_VALUE}
where {REPORT_TYPE} should be xls, csv etc.
Have you any idea how to get report type?
A:
You need to send a parameter from your ser... | {
"pile_set_name": "StackExchange"
} |
Q:
What are bounded-treewidth circuits good for?
One can talk of the treewidth of a Boolean circuit, defining it as the treewidth of the "moralized" graph on wires (vertices) obtained as follows: connect wires $a$ and $b$ whenever $b$ is the output of a gate having $a$ as input (or vice-versa); connect wires $a$ and ... | {
"pile_set_name": "StackExchange"
} |
Q:
Django Rest Framework - define API from an existing view
I'm writing my django app, and i have a lot of views that already returns a JSONResponse object, for example:
def power_on_relay(request):
'''View that Power on one of the available relays'''
try:
relay_id = get_or_raise(request, 'relay_id')
GPIO.se... | {
"pile_set_name": "StackExchange"
} |
Q:
How to randomly select items in a set
For my homework assignment I am supposed to randomly select items in a list. so far I have this code,
import random
room = range(0, 365)
r = random.choice(room)
mySet = set(r)
However, when I attempt to run the program, it says that " 'int' is no iterable".
I was wondering... | {
"pile_set_name": "StackExchange"
} |
Q:
NativeScript - Convert HTML string to HTML
I use NativeScript to develop a mobile application. I have a ListView with Label and I want convert text with HTML to HTML.
I try to use [innerHTML] but it's doesn't works.
A:
You can try the HTMLView Control. Check the details here in the below documentation.
https://... | {
"pile_set_name": "StackExchange"
} |
Q:
Como puedo desahabilitar una llave foranea en una tabla para hacer un truncate en slq server
quiero saber si hay una forma de como desahabilitar una llave foranea, para poder eliminar los registros de una tabla, pero cuando hago utilizo este script: alter table dbo.AMBITO NOCHECK constraint ALL --Desactivar, me si... | {
"pile_set_name": "StackExchange"
} |
Q:
RandomForest IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
I am working with sklearn on RandomForestClassifier:
class RandomForest(RandomForestClassifier):
def fit(self, x, y):
self.unique_train_y, y_classes = transfo... | {
"pile_set_name": "StackExchange"
} |
Q:
Allocating generic class in C++
I'm trying to write a Testbench that can test different implementations of an Interface. Coming from Java I would love to just specify an Interface, create some Classes that implement it and write a class Testbench<T extends MyInterface>
Transforming this approach to C++ gives somet... | {
"pile_set_name": "StackExchange"
} |
Q:
mavenでビルドしたapache-tikaのサンプルコードがエラーになる
javaとmavenの超初心者です。
Mavenを利用してapache-tikaの簡単なサンプルコードを実行させようとしましたが
以下のようなエラーとなりました
> java -jar target\tika-app-1.0-SNAPSHOT.jar
エラー: メイン・クラスne.katch.Appを初期化できません
原因: java.lang.NoClassDefFoundError: org/apache/tika/exception/TikaException
どこかで初歩的なミスを犯しているのだとと思います。ご指摘をいただけたらと思います... | {
"pile_set_name": "StackExchange"
} |
Q:
Find a hypergraph such that $|e|$ even, $|e\cap f|$ odd, and $|E|>|V|$
Here is a problem I have been working on (it comes from the standard "odd-town" problem. The idea is to show that the analogy for "even-town" doesn't work).
Find a hypergraph such that the edges have even size, the intersection of any two edge... | {
"pile_set_name": "StackExchange"
} |
Q:
argument missing && || operators in parenthesis but still working
I have come across this piece of code where the if statement contains an argument without && and/or || operators.
if (event.target.scrollTop > 0 !== isViewScrolled) {
//do something
}
How is it possible that this works? What is the logic contai... | {
"pile_set_name": "StackExchange"
} |
Q:
find couple of objects from a dataframe
How can I avoid the two for loops and optimize my code to be able to handle big data?
import pandas as pd
import numpy as np
array = np.array([[1,'aaa','bbb'],[2,'ccc','bbb'],[3,'zzzz','bbb'],[4,'eee','zzzz'],[5,'ccc','bbb'],[6,'zzzz','bbb'],[7,'aaa','bbb']])
df= pd.DataFra... | {
"pile_set_name": "StackExchange"
} |
Q:
C program incrementing variable with for loop
I am trying to learn the C programming language on my own and have to depend on the internet for some help. I am playing around with one variable and a for loop; incrementing the variable by 1, each iteration of the loop. In this example, I am confused by the fact th... | {
"pile_set_name": "StackExchange"
} |
Q:
How email sending works during user self registration in WSO2 IS?
I checked the axi2.xml file and output-event-adapter.xml file. For email OTP, it is mentioned to configure email in axis2.xml file https://docs.wso2.com/display/IS570/Configuring+Email+OTP.
But for user self-registration, it is asked to configure em... | {
"pile_set_name": "StackExchange"
} |
Q:
Rails 3 extract the domain of a link with a regex and print it in parens,
Rails -v 3.2.3
I'm working with an app that is supposed to display a description & url of a submitted link, I am using regex operators, which is something i am very new too. here is my views code:
(<%= if link.url =~ /(:\/\/) ([^\/]*)/ then ... | {
"pile_set_name": "StackExchange"
} |
Q:
Update value in JSON object using NodeJS
I've got a JSON object that's being submitted to a AWS Lambda NodeJS function. This JSON object has an apostrophe in one of the fields that I need to escape before it's being inserted into a MySQL database.
The object needs to stay intact as it's being stored as a JSON obje... | {
"pile_set_name": "StackExchange"
} |
Q:
Simple probability inequality to show
How can I show that
$ P(A \cup B) P(A\cap B) \le P(A) P(B)$ for any events A and B?
I have tried using the inclusion/exclusion principle and using conditional probability but I keep going round in circles.
Thanks
A:
Let $X=A\backslash B$, $Y=A\cap B$, $Z=B\backslash A$ be t... | {
"pile_set_name": "StackExchange"
} |
Q:
Difference between Formatter and Factory Function
Hello,
Please explain what is the difference between Factory and Formatter function. Because as I see both can be used to format or manipulate the output results. How to choose between both of them ?
Regards,
Mayank
A:
Factory functions allows you to create dif... | {
"pile_set_name": "StackExchange"
} |
Q:
How to set margin of ImageView using code, not xml
I want to add an unknown number of ImageView views to my layout with margin. In XML, I can use layout_margin like this:
<ImageView android:layout_margin="5dip" android:src="@drawable/image" />
There is ImageView.setPadding(), but no ImageView.setMargin(). I think ... | {
"pile_set_name": "StackExchange"
} |
Q:
why AJAX redirects to the new page in PHP
I have a form:
<form class="searchForm">
<div class="box_style_1">
<h4><?= Yii::t("common", "Age"); ?></h4>
<?
echo '<b class="badge">3</b> ' . Slider::widget([
'name'=>'age',
... | {
"pile_set_name": "StackExchange"
} |
Q:
Only one field appears after converting .shp to raster to .asc, in QGIS
I am a beginner in the GIS world. I tried to convert the .shp map to the raster .asc map. I did Raster-> Conversion-> Rasterize then as shown below there are only 1 of 4 fields appears. So I cannot convert the map based on the field that I wan... | {
"pile_set_name": "StackExchange"
} |
Q:
Is there a method in the LinkedIn Rest API to see what companies a person is following?
Using the Linkedin Rest API, it's possible to pull a bunch of fields from their profile, but I can't find a method that would pull the companies that they're following. Does one exist?
A:
In general, the fields available for ... | {
"pile_set_name": "StackExchange"
} |
Q:
Utilising LibVLC MediaPlayer.Event.EndReached to reset MediaPlayer when playback finishes
I'm in the process of writing an Android app activity that houses a LibVLC MediaPlayer implementation. The MediaPlayer works fine for the most part, however upon video conclusion, the MediaPlayer will become unresponsive. Fro... | {
"pile_set_name": "StackExchange"
} |
Q:
Why is this query doing a full table scan?
The query:
SELECT tbl1.*
FROM tbl1
JOIN tbl2
ON (tbl1.t1_pk = tbl2.t2_fk_t1_pk
AND tbl2.t2_strt_dt <= sysdate
AND tbl2.t2_end_dt >= sysdate)
JOIN tbl3 on (tbl3.t3_pk = tbl2.t2_fk_t3_pk
AND tbl3.t3_lkup_1 = 2577304
AND tbl3.t3_lkup_2 = 1220833)
where tbl2.t2_lku... | {
"pile_set_name": "StackExchange"
} |
Q:
Drawing a rotating triangle
I want to fill a triangle in Android using the Canvas class. The way I am doing currently works but is very laggy. I wanted to know if anybody has a faster way of doing it than my way. Thanks!
My code:
public void rotate(float angle){
if(neighbour == null)
return;
path.r... | {
"pile_set_name": "StackExchange"
} |
Q:
do you want to open or save from localhost while trying to upload the file
I am trying to upload the file on certain path.
I have written following code for this:
try
{
if (!System.IO.Directory.Exists(fileLocation))
... | {
"pile_set_name": "StackExchange"
} |
Q:
React Native retrieving API data source.uri should not be an empty string
I am trying to retrieve data from an API (https://developers.zomato.com/documentation) and get title of restaurants and an image with it. However when I try to load an image I get a warning source.uri should not be an empty string.
Here is m... | {
"pile_set_name": "StackExchange"
} |
Q:
Limits - prove or disprove
If $\lim_{x \to 0^+} f(x) = 0$ and $(\forall x>0)( \exists 0<c_x<x)$ s. t. $f(c_x)>f(x)$, and $\forall x>0, f(x)>0$ do we have a contradiction?
I tried to build a sequence of x values that approaches $0$ but its f values form an ascending sequence but failed to show that it is actually a... | {
"pile_set_name": "StackExchange"
} |
Q:
C Compile Fatal Error 'file not found' from ImageMagick Install Mac OS
I am trying to compile a C program that requires Image Magick's MagickWand.h:
#include "wand/MagickWand.h"
But my Image Magick was installed through Homebrew on my Mac so I changed the include to the actual location:
#include </usr/local/Cella... | {
"pile_set_name": "StackExchange"
} |
Q:
How to convert from huge JSON file to xml file in C#
I'm trying to convert from a huge JSON file(2GB) to xml file. I have some troubles reading the huge JSON file.
I've been researching about how i can read huge JSON files.
I found this:
Out of memory exception while loading large json file from disk
How to parse... | {
"pile_set_name": "StackExchange"
} |
Q:
remove mirai virus on router
I need some help with removing the mirai worm on my rounter. Few days ago my ISP was on cyberattacks which it have affected over 100,000 customers who couldn't be able to get access to the internet that got shutdown.
Now it show that my local ISP are CloudMosa in Satatoga, California w... | {
"pile_set_name": "StackExchange"
} |
Q:
Scroll div top on page load then set scroll to work normally
I have a chat system on my site and defaulted the message div position to always display the last message on page load. I accomplished this by using the following line of code:
msgDiv = document.getElementById('message_row_large');
msgDiv.scrollTop =... | {
"pile_set_name": "StackExchange"
} |
Q:
Can someone explain how Salesforce works with CTI? (Avaya)
I have a client who has Salesforce and uses an Avaya switch to run their call center. They enter in random call information into this old legacy program called Omni and once a week they manually update Salesforce with the info that they gathered from calls... | {
"pile_set_name": "StackExchange"
} |
Q:
align two words in a select option
I have the select below:
<select name="mySelect">
<option value="1">hello [test]</option>
<option value="2">hello2 [test2]</option>
<option value="3">hello33 [test33]</option>
<option value="4">hel [hel]</option>
</select>
How can I align the text inside the options ... | {
"pile_set_name": "StackExchange"
} |
Q:
Translating BYTE Reserved1[24] to jsctypes
This is the MSDN defintion:
typedef struct _SYSTEM_BASIC_INFORMATION {
BYTE Reserved1[24];
PVOID Reserved2[4];
CCHAR NumberOfProcessors;
} SYSTEM_BASIC_INFORMATION;
This guy converted it to this in js-ctypes:
var SYSTEM_BASIC_INFORMATION = new ctypes.StructTy... | {
"pile_set_name": "StackExchange"
} |
Q:
How to get json data from javascript file
help, im using tumblr and connect my twitter account, Tumblr gave me this file example:http://titan-theme.tumblr.com/tweets.js
my question is can i get follower_count and screen_name data? if yes how to get it?
please help me
thanks
A:
If you have only this file you shou... | {
"pile_set_name": "StackExchange"
} |
Q:
PWM flow control and thrust
If I have a water pump and a fast solenoid valve (can be open or closed) and turn on my pump at a constant voltage and apply pulse width modulation to my valve. Would the resulting thrust created at the water output be constant and can it be controlled nicely by the pulse width modulati... | {
"pile_set_name": "StackExchange"
} |
Q:
Does a concurrect exception happen to both user
if a user edits a data record and the same time another user edits the same record too and both save.
1.) Will the concurrency exception ALWAYS happen only for one user?
Actually its logical that the first wins but who is the first in a technical aspect... Is it poss... | {
"pile_set_name": "StackExchange"
} |
Q:
How to properly chain promises inside of a forEach loop in Javascript
I'm using mongo and need to do an async call for each item inside of a loop. I'd like to execute another command once all of the promises inside of the loop have completed, but so far the promises in the loop seem to be completing after the code... | {
"pile_set_name": "StackExchange"
} |
Q:
Stripe: How to set up recurring payments without plan?
First time working with Stripe API. Implementing it on WordPress using PHP and JS.
Working on a donation form. Donor should be able to choose a suggested amount (radio buttons-25,50,75,100) or pay as he/she wishes (text field after selecting 'other'). I was ab... | {
"pile_set_name": "StackExchange"
} |
Q:
grails 3.0.0 I can not create an application
I just downloaded Grails 3.0.0 (hoping to see my problems with CAS magically disappearing ;) )
I installed it under windows and then:
D:\GrailsProjects> grails -version
| Grails Version: 3.0.0
| Groovy Version: 2.4.3
| JVM Version: 1.7.0_51
and then:
D:\IntelliJProjec... | {
"pile_set_name": "StackExchange"
} |
Q:
Show that $\lim_{x\to \infty} \frac{f(x)}{g(x)}=1$
Consider $f(x)=\ln(\ln(\zeta(\exp(\exp(-x)))))$ and $g(x)=\ln(x),$ where $\zeta(x)=\sum n^{-x}$ for $\Re(x)>1.$
Show that $$\lim_{x\to \infty} \frac{f(x)}{g(x)}=1$$
I obtained $f(x)$ from $\zeta(x)$ after performing two consecutive log-log coordinate transforms ... | {
"pile_set_name": "StackExchange"
} |
Q:
How to use two conditions in "where" clause in XQuery
I'm trying to extract only those <book> data that has a certain type of <xref> type and matching a list of specific xrefs using a Xquery (I'm new to this).
Here is the input data:
<book id="6636551">
<master_information>
<book_xref>
<... | {
"pile_set_name": "StackExchange"
} |
Q:
Как сделать ЧПУ с помощью htaccess?
Есть страницы вида site.com/?page=2.
Как с помощью htaccess сделать site.com/page/2?
A:
RewriteCond нужен, чтобы не было бесконечного цикла. Нужный код редиректа можно подставить в конце RewriteRule после пробела, например [R=301]. Если планируете сохранить другие элементы que... | {
"pile_set_name": "StackExchange"
} |
Q:
postgresql "createdb" and "CREATE DATABASE" yield a non-empty database. what the fork?
First of all, I apologize if this question turns out to be painfully obvious, I'm not that postgres-savvy beyond the basics. I use postgresql as a database backend for quite a few django projects that I'm working on, and that's ... | {
"pile_set_name": "StackExchange"
} |
Q:
Left click only on Dijit MenuItem
using the basic tutorial here as example:
https://dojotoolkit.org/documentation/tutorials/1.10/menus/demo/simpleProgMenu.html
I've noticed that there's no (obvious) way to differentiate between left and right clicks. I'd like right click to do nothing, but left click to call the o... | {
"pile_set_name": "StackExchange"
} |
Q:
RenderWindow not working across multiple functions
I'm new to SFML, and have been watching a tutorial that puts everything in a single main function. When making my own program, I tried to split it into multiple functions, but it isn't working properly, can anyone explain why this works:
#include <SFML/Graphics.hp... | {
"pile_set_name": "StackExchange"
} |
Q:
Verifying Error after ADT Update
I have a project that worked for months, but I updated the ADT Plugin a few days ago and today all of a sudden the project stopped working. If I try to run it on the device, it throws a VerifyError as soon as it is started.
(the xxx is a replacement for the actual of the project na... | {
"pile_set_name": "StackExchange"
} |
Q:
Why do I get an error from this one level deep OTP tree when I start the child?
Now when I do the following I get an error status from start_child:
{_, pid} = NTree.start_link
{_, cid} = Supervisor.start_child(pid, [])
# {:error, #<PID.0.91.0>}
Why is this? I'm able to send a message like "hello world" to it and ... | {
"pile_set_name": "StackExchange"
} |
Q:
Why does = NULL not work in Oracle?
I recently realized that we need to use a special syntax IS NULL to compare a literal to NULL.
Why does = NULL not work here?
A:
Take a look at PSOUG's notes on NULL. As Fabricio Araujo hinted, NULL is not really a value like the number 4 or string 'bacon strips'. In fact, N... | {
"pile_set_name": "StackExchange"
} |
Q:
Trying to apply Ternary Operator on JSON Data with React
I am trying to apply a Ternary operator to some JSON Data which is held in a separate file locally. Below is the JSON:
[
{
"id": 1,
"company": "Photosnap",
"logo": "./images/photosnap.svg",
"new": true,
"featured": true,
"position": "Senior Fron... | {
"pile_set_name": "StackExchange"
} |
Q:
queue a azure pipeline yaml stage to execute at specific datetime
We have a multistage release pipeline which targets all environments like dev->int->qa->prod-staging slot.
For final swaping of slot we have a requirement to to run at specified datetime during non-business hrs.
How can we delay a specific stage of ... | {
"pile_set_name": "StackExchange"
} |
Q:
Your PHP Version Will Be Unsupported in Joomla! 3.3
I am using PHP Version 7.0.12 and Joomla Version 3.7.3.
And I am facing this message "Your PHP Version Will Be Unsupported in Joomla! 3.3"
As per Joomla 3.3 System requirement:
Starting with Joomla! 3.3, the minimum required PHP version is being
raised to PH... | {
"pile_set_name": "StackExchange"
} |
Q:
Is there a way to style an element such that it and all its contents will be rendered 50% faded?
I'm working on a userscript that adds a missing feature to a 3rd party website over which I have no control.
It will compute URLs based on the page and the results of some webAPI calls. These URLs will be added into th... | {
"pile_set_name": "StackExchange"
} |
Q:
A major incident was declared
A major incident was declared when winds caused two fires to merge near communication masts on Saturday.
From BBC.com
How should we interpret the main clause that a major incident was declared? Does it mean when winds caused fires and at that time somebody declared an incident or the ... | {
"pile_set_name": "StackExchange"
} |
Q:
Forest trees fitting on page
My forest looks like this but it does not fit on a page, this is my first time using this package. I am looking for suggestions to fit this into a page, hopefully they will not be too intensive because I plan on making an even bigger tree.
\documentclass{article}
\usepackage{forest}
\... | {
"pile_set_name": "StackExchange"
} |
Q:
Are there any good tools to generate a Google Sitemap?
Can you recommend any tools? Should we build our own? Should we create the sitemap manually?
A:
The Google Sitemap Generator for IIS generates a sitemaps based on actual HTTP requests to your server (unlike other sitemap generators that rely on a crawlable p... | {
"pile_set_name": "StackExchange"
} |
Q:
Ng-repeat-start in angular2 - aka repeat multiple elements using NgFor
I need to repeat several li-elements in a list in Angular2 for each item. In angular 1.x I used ng-repeat-start and ng-repeat-end for this. I can't find the right way to do it in Angular 2. There are some older blog posts about this, but their ... | {
"pile_set_name": "StackExchange"
} |
Q:
error rgding definition & no extension method for System.Web.Routing.RouteValueDictionary
I am going through tutorial at 4GuysFromRolla website regarding Sorting and Paging a Grid of Data in ASP.NET MVC 2 by Scott Mitchell. I am receiving an error CS1061: 'System.Web.Routing.RouteValueDictionary' does not contain ... | {
"pile_set_name": "StackExchange"
} |
Q:
HQL with parameters NoSuchMethodError
I am sure I am overlooking something obvious
the following static query works fine
hqlQuery = "select user from User as user where user.id = 'userid' ";
but when I parametrize the query
hqlQuery = "select user from User as user where user.id = :me ";
Query query = session.cre... | {
"pile_set_name": "StackExchange"
} |
Q:
Powered rail on a slope powering glitch?
I have placed a powered rail on a slope with a redstone torch underneath it as shown in the following two pictures.
Now as you can see, the powered rail is in fact unpowered, despite the redstone torch underneath it.
However, if I place a redstone torch next to the powered... | {
"pile_set_name": "StackExchange"
} |
Q:
How and when to use Ember.Application register and inject methods?
I'm trying to understand how to use Ember.Application register & inject methods
What use case are these functions designed for?
How are they to be used and when?
I'd really like to know!
A:
Ember by default does dependency injection when it boots... | {
"pile_set_name": "StackExchange"
} |
Q:
Struts Javascript AJAX onsuccess page update
I have a problem with updating an HTML site after an AJAX request success.
In my project I'm using old Struts 1 framework with a coolmenus JS component that produces a menu. After a form submit the server returns a block of JS code within <script> tags (among HTML) and... | {
"pile_set_name": "StackExchange"
} |
Q:
Javascript call function
I have been testing some code lately trying to understand javascript a little bit better. Then I came across the call() function wich I can't get to understand well.
I have the following code:
function hi(){
console.log("hi");
}
var bye = function(param, param2){
console.log(param... | {
"pile_set_name": "StackExchange"
} |
Q:
Alternative to Publishing on WAS in RAD
I am working on WAS on RAD 7.5 and publishing and making changes as very slow and frustrating..
Is there any other faster alternative like using eclipse and any other server to develop and eventually run it on WAS-RAD system ?
I heard somewhere we can use the dump of mysql a... | {
"pile_set_name": "StackExchange"
} |
Q:
json not outputting
I'm running this code in php
while ($row = mysql_fetch_array($result))
{
$arr = array("joke" => $row['joke'], "date" => $row['date'], "rating" => $row['rating']);
echo json_encode($arr);
}
but there's no output. I am running php 5.3.6
A:
nvm I figured it out. the way to do this is... | {
"pile_set_name": "StackExchange"
} |
Q:
Why isn't inline JavaScript code being executed in ASP.NET MVC?
This is my complete View:
@{
ViewBag.Title = "Home";
}
<div style="width:100%; height:100%" id="map"></div>
<script defer="defer" type="text/javascript">
var map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS("OpenLayers ... | {
"pile_set_name": "StackExchange"
} |
Q:
Disable native Soap class in PHP5 and use nuSoap?
I've spent the last week developing code to connect to a Web Service using the nuSoap library. I just deployed the code to production, but immediately started getting error's that I hadn't seen before. I traced the problem back to a line of code that is trying to i... | {
"pile_set_name": "StackExchange"
} |
Q:
How high (height-wise) should the oil be for frying chicken?
I thought the point of fried chicken is to have enough oil to deep fry it, but I've seen a lot of recipe discussing to fry the chicken for x-time, then flip over and fry for y-time.
Does this mean for recipes that involve flipping chicken in fryer we do... | {
"pile_set_name": "StackExchange"
} |
Q:
CSS corner ribbon without rotate
There many tutorials to make corner ribbon, and of all tutorial using transform/rotate 45 deg. It makes content inside div (font) also rotate. I don't want it. I want to make like below picture, font/symbol still stand-up.
I try to make a triangle background, but I can't make lik... | {
"pile_set_name": "StackExchange"
} |
Q:
What approach should I use to do client side filtering?
I am making the front end of a asp.net mvc3 web application. A controller action sends a database driven list to a view model which then populates a series of divs. I have a filtering section above the div list. I am not sure which approach to take to impleme... | {
"pile_set_name": "StackExchange"
} |
Q:
How can I generate all possible IPs from a list of ip ranges in Python?
Let's say I have a text file contains a bunch of ip ranges like this:
x.x.x.x-y.y.y.y
x.x.x.x-y.y.y.y
x.x.x.x-y.y.y.y
x.x.x.x-y.y.y.y
x.x.x.x-y.y.y.y
x.x.x.x is start value and y.y.y.y is end value of range.
How can I convert these ip ranges ... | {
"pile_set_name": "StackExchange"
} |
Q:
jsf dynamic component that restores state
I am trying to display HtmlInputText dynamically in a JSF page. However, I am getting
javax.faces.FacesException: Cannot add the same component twice: j_idt10:hitDyn
During the first request to the page the input text renders well. That exception happens during postback ... | {
"pile_set_name": "StackExchange"
} |
Q:
Pandas Data Frame not Appending
I am trying to append dataframes via for loop.
CODE
def redshift_to_pandas(sql_query,**kwargs):
# pass a sql query and return a pandas dataframe
cur.execute(sql_query)
columns_list = [desc[0] for desc in cur.description]
data = pd.DataFrame(cur.fetchall(),columns=columns_list)
r... | {
"pile_set_name": "StackExchange"
} |
Q:
pandas - binning data and getting 2 columns
I have a very simple dataframe. There are 2 columns, day_created (int, could change to datetime) and suspended (int, could change to boolean). I can change the data if it makes it easier to work with.
Day created Suspended
0 12 0
1 ... | {
"pile_set_name": "StackExchange"
} |
Q:
Display difference between volatile and usual variable in Java
I am trying to create an example to display the difference between volatile and usual variables like:
package main;
public class TestVolatile extends Thread {
public int l = 5;
public volatile int m = -1;
public TestVolatile(String str) ... | {
"pile_set_name": "StackExchange"
} |
Q:
systemd service script for libreoffice/openoffice
I'm trying to setup correctly a headless libreoffice/openoffice server on a debian jessie. I created a script named /etc/systemd/system/openoffice.service with the following content
[Unit]
Description=OpenOffice service
After=syslog.target
[Service]
ExecStart=/usr... | {
"pile_set_name": "StackExchange"
} |
Q:
How do you equally space out elements in a Row?
Row{
width: parent.width
spacing: ????
Checkbox{}
Checkbox{}
Checkbox{}
Checkbox{}
}
So just to be clear, the checkboxes should be spaced in such a manner that however wide the row is, it will expand or compress the spacing in accordance to t... | {
"pile_set_name": "StackExchange"
} |
Q:
Why is a JavaScript reserved keyword allowed as a variable name?
We know that let is a reserved keyword that defines a variable in JavaScript.
var let = 2;
console.log(let); // return 2
So why is this not an error?
A:
let is only a reserved word in strict mode:
'use strict';
var let = 5;
Uncaught SyntaxError... | {
"pile_set_name": "StackExchange"
} |
Q:
How to have simple google apps script send mails from Sheets from owner account regardless of who's accessing file
I've clicked around for the past few days trying to find an answer but can't seem to find one that makes sense to me (forgive me, I'm fairly new to GAS). I am trying to set up a Fantasy Golf Draft sh... | {
"pile_set_name": "StackExchange"
} |
Q:
Can polyalloy (plastic) pex fittings be used with both styles of attachment rings?
Some pex fittings are made of a type of durable plastic known as polyalloy. Examples:
These fittings appear to be plastic equivalents of their brass counterparts.
In general is it permissible to use either the copper crimp rings O... | {
"pile_set_name": "StackExchange"
} |
Q:
XML parsers used in iphone sdk
I am quite new to iphone development. I was going through tutorials on XML parsing for which NSXMLParser is used. Are there other parsers we can use for parsing XML. How do we decide which parser to use?
Regards,
Stone
A:
Standard parsers are NSXMLParser or c-based libxml. But ther... | {
"pile_set_name": "StackExchange"
} |
Q:
hook-length formula: "Fibonaccized": Part II
This is a natural follow-up to my previous MO question, which I share with Brian Hopkins.
Consider the Young diagram of a partition $\lambda = (\lambda_1,\ldots,\lambda_k)$. For a square $(i,j) \in \lambda$, define the hook numbers $h_{(i,j)} = \lambda_i + \lambda_j' -... | {
"pile_set_name": "StackExchange"
} |
Q:
SQL get unique month year combos
SELECT MONTH(sessionStart) AS Expr1, YEAR(sessionStart) AS Expr2
FROM tblStatSessions
WHERE (projectID = 187)
GROUP BY sessionStart
This returns:
11 | 2010
11 | 2010
11 | 2010
12 | 2010
12 | 2010
But I need it to only return each instance once, IE:
11 ... | {
"pile_set_name": "StackExchange"
} |
Q:
Where can I get a proper hot chocolate in Firenze-Venezia-Trieste?
I am right now in Firenze but will spend two days in Venice and two days in Trieste and I'd like to drink a proper, thick, tasty hot chocolate but everyone says they don't make it in the summer. Any ideas? In Firenze I have a one week bus pass so I... | {
"pile_set_name": "StackExchange"
} |
Q:
GetType returns diffent information than is operator uses
Cannot explain what is going on the following program. GetType is returning the type I want to return and not the original one. Does that mean we cannot rely on GetType? is operator is right though. Can anybody please explain it in detail?
using System;
na... | {
"pile_set_name": "StackExchange"
} |
Q:
Solving system of linear equations (to determine a boundry)
I'm puzzeled how to programmatically (in R) solve the following linear system:
Given $\mathbf{R} \in \mathbb{R}^{n \times n}$, $\mathbf{R}^{-1}$, and a constant $c$ what is the solution to $\mathbf{u} \in \mathbb{R}^n$ with $\mathbf{u}^T = (u_1, \ldots, ... | {
"pile_set_name": "StackExchange"
} |
Q:
Is the complex form of the Fourier series of a real function supposed to be real?
The question said to plot the $2\pi$ periodic extension of $f(x)=e^{-x/3}$, and find the complex form of the Fourier series for $f$.
My work: $$a_n=\frac{1}{2\pi}\int_{-\pi}^{\pi}e^{-x/3}e^{-inx}dx=\frac{1}{2\pi}\int_{-\pi}^{\pi}e^{-... | {
"pile_set_name": "StackExchange"
} |
Q:
Device Token - Apple push Notification Service
is device token changes each time when i opens my application?
Apple server uses the same device token every time or the new regenerated device token?
A:
You can check developer documentaion, following is mentioned there -
The form of this phase of token trust ensu... | {
"pile_set_name": "StackExchange"
} |
Q:
Calculation of integers $b,c,d,e,f,g$ such that $\frac{5}{7} = \frac{b}{2!}+\frac{c}{3!}+\frac{d}{4!}+\frac{e}{5!}+\frac{f}{6!}+\frac{g}{7!}$
There are unique integers $b,c,d,e,f,g$ such that $\displaystyle \frac{5}{7} = \frac{b}{2!}+\frac{c}{3!}+\frac{d}{4!}+\frac{e}{5!}+\frac{f}{6!}+\frac{g}{7!}$
Where $0\leq b,... | {
"pile_set_name": "StackExchange"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.