text stringlengths 175 47.7k | meta dict |
|---|---|
Q:
Publishing an ASP.NET Website using buildpublisher
I am using the Cruise Control BuildPublisher task to publish a 2005 ASP.NET website. The Website has no warnings and if I run the Publish WebSite from within the IDE it works fine.
When I publish through Cruise Control however it only publishes the bin folder and... | {
"pile_set_name": "StackExchange"
} |
Q:
Try_Convert for SQL Server 2008 R2
I'm using SQL Server 2008 R2 and have a VARCHAR column I want to convert to DECIMAL(28,10) using CONVERT. But many of those rows are badly formatted, so it is not possible to parse them to a number. In that case I just want to skip those by setting result to 0 or NULL.
I know the... | {
"pile_set_name": "StackExchange"
} |
Q:
meaning of "takes"
What does "takes" mean in this context?
Alys includes this mobile writing in a so-called ‘personal repertoire of possible behaviour while walking the streets of London Town’. It forms the final section of the publication, Seven Walks, which documents a major ‘London project’ commissioned by Arta... | {
"pile_set_name": "StackExchange"
} |
Q:
Left Join on Associative Table
I have three tables
Prospect -- holds prospect information
id
name
projectID
Sample data for Prospect
id | name | projectID
1 | p1 | 1
2 | p2 | 1
3 | p3 | 1
4 | p4 | 2
5 | p5 | 2
6 | p6 | 2
Conjoint -- holds conjoint information
id
title
projectID
Sample ... | {
"pile_set_name": "StackExchange"
} |
Q:
Razor Class Library in ASP .Net Core 2.1.1
I used to embed some of my Razor views for mailing in a class library which was using ASP .Net Core 2.1.0-preview1-final and it was working fine.
Here is the configuration in the .csproj file:
Since I upgraded the .Net Core version to 2.1.1 which is the final one, I can ... | {
"pile_set_name": "StackExchange"
} |
Q:
transform div into h2 span jQuery
I have a div with a generated title dynamic title
<div class="title">dynamic content</div>
and i would like to transform it like so:
<h2 class="title"><span>dynamic content</span></h2>
Would that be doable in jQuery?
A:
This should do it.
$('div.title').replaceWith(function() ... | {
"pile_set_name": "StackExchange"
} |
Q:
Creating nested list in python for a string field
I have the following input data.
I can create nested list for all other fields exept the last field. The last string field can also contains space in between words(example: Hello! welcome ).
input = ['a1 a2 a3 a4 Hello! welcome','b1 b2 b3 b4 how are you','c1 c2 c... | {
"pile_set_name": "StackExchange"
} |
Q:
Value update in manager.dict not reflected
I expect the following code to print [{0: 100}],
since it do the plus in updateList for a hundred time
In turn, it prints [{0: 0}]
what's the problem and how to rectify it?
from multiprocessing import Process, Lock, Value,Manager
class myWorker:
def __init__(self, loc... | {
"pile_set_name": "StackExchange"
} |
Q:
calling include function in echo statement
I am using whole code in php so i am using echo statement for displaying divs in html but how could i call php include function in echo statement to call a page see the code below:-
echo "<div style='position:relative;border:1px solid #A5BEBE;background-color: white;'>
... | {
"pile_set_name": "StackExchange"
} |
Q:
QTP Keyword driven basic example
I have been looking for very basic keyword driven test..i do not understand well how you can separate the test specifically from application so its reusable. In my understanding, the QTP commands like "navigate" are keywords. But how to create my own independent ones? I would be ve... | {
"pile_set_name": "StackExchange"
} |
Q:
Android purpose of Handler Thread
I was just wondering why the Handler has to take an instance of a Runnable ? After all a Handler purpose is place work from one thread into another Thread. What is the purpose of using a Third thread, a Runnable to accomplish this ?
Kind Regards,
A:
I think I understand your con... | {
"pile_set_name": "StackExchange"
} |
Q:
How to prevent lxml.etree.HTML( data ) from crashing on certain type of data?
I'm running etree.HTML( data ) like below for lots of different data contents. With a specific data conent, however, lxml.etree.HTML will not parse it, but go into an infinite loop and consume 100% CPU.
Does anyone know exactly what in t... | {
"pile_set_name": "StackExchange"
} |
Q:
get current url outside of router-outlet
I want to get current url. For that I'm doing
constructor(public router: Router) { ... }
ngOnInit() { console.log(this.router.url); }
and it works ok. But now I want to move it to layout component which is parent of every component. And I have <router-outlet></router-outl... | {
"pile_set_name": "StackExchange"
} |
Q:
How to generate new address for new contract created by constructor
I'm trying to resolve a problem and google is not useful this time.
On my localhost truffle + testrpc I have a contract which returns a new instance of a new contract.
import 'contracts/MyBasicContract.sol';
contract Factory {
function createC... | {
"pile_set_name": "StackExchange"
} |
Q:
single responsibility principle and code readability
While trying to stick with single responsibility rule, my classes have started to look like this
$productImage = new ProductImage(// holds all rules for product image only
new ImageFile( // makes sure given file is an image file
... | {
"pile_set_name": "StackExchange"
} |
Q:
how to compare output of two ls in linux
So here is the task which I can't solve. I have a directory with .h files and a directory with .i files, which have the same names as the .h files. I want just by typing a command to have all .h files which are not found as .i files. It's not a hard problem, I can do it in ... | {
"pile_set_name": "StackExchange"
} |
Q:
What can I learn from these WW1 shell cases?
We found these two shell cases in my parents garage. They were allegedly brought back from France by my great grandfather, but that’s all we know and we’d really like to know more about them and wondering if anyone can help please? The larger shell has a diameter of 85m... | {
"pile_set_name": "StackExchange"
} |
Q:
Far-future fantasy novel where a character turns out to be an android
I'm looking for a book which mostly belongs to the fantasy genre but has a sci-fi background.
Over the course of the story it is revealed that it's set in our far future and that all the fantasy creatures that appear were once genetically engine... | {
"pile_set_name": "StackExchange"
} |
Q:
Grab and drop object
I'm trying new things and I'm stuck to find a way to drag and drop objects. My player is a square and he have a hand attached. Here is an example:
That red thing in the arm is the "hand", when I press shift it turns green. I made the detection like a ground check. Here is the code:
void Updat... | {
"pile_set_name": "StackExchange"
} |
Q:
Properly using / handling DateTimeOffset in MongoDB
public class ScheduledEvent : Event
{
public DateTimeOffset StartDateTime { get; set; }
}
StartDateTime = 5/27/2013 2:09:00 AM +00:00 representing 05/26/2013 07:09 PM PST
What's recorded in MongoDB:
> db.ScheduledEvent.find().toArray()
[
{
... | {
"pile_set_name": "StackExchange"
} |
Q:
Is there a guide/convention to the markup being used in the lua official documentation?
I consistently have a really hard time reading official documentation when it's related to coding. I generally don't understand it unless it's paired with an example. I am seeking clarification on what kind of conventions are i... | {
"pile_set_name": "StackExchange"
} |
Q:
Uniform bound on Fourier series
This is from Fourier Analysis by Stein and Shakarchi, section 3, exercise 19. I am trying to prove that $\sum_{0<|n|\le N} e^{inx}/n$ is uniformly bounded in $N$ and $x\in [-\pi,\pi]$. Following the suggested approach, I start with
$$\frac 1 {2i} \sum_{0<|n|\le N} \frac{e^{inx}}{n} ... | {
"pile_set_name": "StackExchange"
} |
Q:
Matlab: Is it possible to create signal handlers (.m scripts)
I've looked through the documentation, etc, but I'm not seeing anything obvious. I'd like to have a signal handler that can intercept ^C, ^\, or some other keypress that could be used to interrupt a long-running script (each discrete computation is typ... | {
"pile_set_name": "StackExchange"
} |
Q:
How to generate pdf from docbook 5.0
I've written a docbook 5.0 document with the header:
<?xml version="1.0" encoding="UTF-8"?>
<book version="5.0" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:svg="http://www.w3... | {
"pile_set_name": "StackExchange"
} |
Q:
WebApi REST service on IIS using Autofac, error on first call made
I'm having an issue with a WebAPI project hosted on IIS that serves a REST API.
The project uses Autofac to take care of creating the controllers. This works fine and has no issues.
However, after a certain amount of time (rather long, hard to time... | {
"pile_set_name": "StackExchange"
} |
Q:
Pricing IRS: bootstrapping zero rate (spot rate) from the swap curve
I would like to ask about swap zero curve calculation algorithm used by Bloomberg. Below is a plain vanilla EUR IRS. I want to calculate >= 2 year spot rates from the market rates. I don't know how to bootstrap them for the valuation date = 04/14... | {
"pile_set_name": "StackExchange"
} |
Q:
How to change div background color, when hovering on button which is present in the same div?
I'm trying changing div color when button is hover. code is working if the button is present outside div, but i need button in the same div?
Code :
.card {
height: 20em;
width: 10em;
border: 1px solid #222;
}
... | {
"pile_set_name": "StackExchange"
} |
Q:
Error in code conversion from C# to C++/CLI
I'm try to convert a simple code of C# to C++/CLI, but when I try to build the converted code, i got this erros:
1>------ Build started: Project: Compiler2, Configuration: Debug Win32 ------
1> Source.cpp
1>Source.cpp(21): error C2143: syntax error : missing ';' before ... | {
"pile_set_name": "StackExchange"
} |
Q:
Can I increase a buttons onclick-area programmatically?
Sometimes I have a button in my UI that it is so small that it is difficult to click. My solution so far has been to add a transparent border around the button in photoshop. Just increasing the padding on the button does not work, since this will also stretch... | {
"pile_set_name": "StackExchange"
} |
Q:
Generic method for types
I have the following interface:
public interface Caster{
public boolean tryCast(Object value);
}
and its implementations:
public class IntegerCaster{
public boolean tryCast(Object value){
try{
Integer.class.cast(value);
return true;
} cat... | {
"pile_set_name": "StackExchange"
} |
Q:
preg_match pattern dosn't work in php v 5
i am using php version 5.4.45 .
i test this code in php version 7 and work true but not work in version 5.4.45
$string = '9301234567';
if( preg_match('/^\9\d{9}/', $string) )
{
$string = '0+1'.$string ;
return $string ;
}
in v7 return :
0+19301234567
but in v5.... | {
"pile_set_name": "StackExchange"
} |
Q:
How to control alignment of DataTable inside of a PanelGrid?
I've got a multi-column panelGrid setup, with dataTables as each of the columns. Each of the dataTables is a different length. This results in the panelGrid stretching out to fit the largest dataTable (so far, that's good). The remaining dataTables ar... | {
"pile_set_name": "StackExchange"
} |
Q:
Using a variable URL in a JSON-call, not working?
I'm trying to make a simple weather app and it seems I can't access any information using my variable for the JSON-link. Heres my code:
$(document).ready(function() {
var key = 'a91a892f1f2a1aa3f7409a78f72af675';
var locationURL = 'http://ip-api.com/json';
... | {
"pile_set_name": "StackExchange"
} |
Q:
Create a file programmatically
I am working on a cron job that is creating a backup file. I want to move the file to the private file directory but I am having trouble figuring out how to do this. The cron job creates a file in a folder called /temp in the root of my site. I've been trying to use file_save_uplo... | {
"pile_set_name": "StackExchange"
} |
Q:
Skip nan and shift elements in a pandas dataframe row
I have a dataframe like this [![Dataframe looks like this][1]: https://i.stack.imgur.com/R7GmM.png
Now I want to skip nan's and so that data shift towards left i.e. [![formatted dataframe should be like this] [1]: https://i.stack.imgur.com/yGYIy.png
I am not a... | {
"pile_set_name": "StackExchange"
} |
Q:
server side c# method is not calling from ajax - asp.net
I am trying to cal a c# method using ajax as below.
<a href="#divrecentQ" id="linkdivrecentQ" onclick="lnkClick();" aria-controls="divrecentQ" role="tab" data-toggle="tab">Click here</a>
Here is the method in JS
function lnkClick() {
alert("call... | {
"pile_set_name": "StackExchange"
} |
Q:
(webpack)/buildin/module.js Module build failed: Error: ENOENT: no such file or directory,
In an attempt to resolve another issue, which is still unresolved (see here), I attempted to add webpack 4.15.x to my code. Instead of the desired result, it immediately broke my code and gave me this error (webpack)/buildin... | {
"pile_set_name": "StackExchange"
} |
Q:
Number of distinct elements in an array
This is my solution to find the Number of distinct elements in an array. Is there away fast way to do this? It run-time is O(N).
public int DistinctNumberOfItems( int[] A ) {
if (A.length == 0) return 0;
if(A.length == 1) return 1;
Set<Integer> ... | {
"pile_set_name": "StackExchange"
} |
Q:
addEventListener и getElementsByClassName
Здравствуйте.
есть html:
<div id="arr">
<div class="test">sdvsdvsdv</div>
<div class="test">4349567294</div>
</div>
нужно с помощью addEventListener, getElementById и document.getElementsByClassName без использования JQUERY при клике на <div class="test"></div> пол... | {
"pile_set_name": "StackExchange"
} |
Q:
Will screen sharing work across different ISPs and over the Internet?
I’m just beginning to learn the use of screen sharing between two Macs.
Today I’ve successfully implemented it with two different computers on my desktop, using the "Sharing" section in System Preferences.
What I wonder about now is, once those ... | {
"pile_set_name": "StackExchange"
} |
Q:
Professor gave me a higher grade than I deserved. What should I do?
During one of my undergraduate semesters I was pretty depressed (for various personal reasons) and was struggling with completing my coursework. One class in particular didn't have a final exam, there was a just a final essay to turn in worth 25% ... | {
"pile_set_name": "StackExchange"
} |
Q:
How to get the "available software sites" in eclipse programmatically
I want to check in which "available software sites" is installed in my eclipse. (for example- check is CDT installed on my eclipse) through C++ via QT.
I know how to do that from eclipse (Help -> install new software -> available software sites ... | {
"pile_set_name": "StackExchange"
} |
Q:
Share a value between two different hooks
I have 2 hook functions in my module: hook_views_pre_render() and hook_form_alter(); in hook_views_pre_render(), I retrieve some data about what nodes that are available that I need in hook_form_alter().
I'm looking for a way to pass the data from hook_views_pre_render() t... | {
"pile_set_name": "StackExchange"
} |
Q:
How to troubleshoot user error messages?
What is the best way to troubleshoot errors encountered by users? Normally, I try to reproduce the error in an System administrator User Account to see the output in the Developer Console. This way, I can look at every validation rules, workflow, triggers and apex classes e... | {
"pile_set_name": "StackExchange"
} |
Q:
Android emulator close using telnet via appium script
I am trying to close Android emulator using telnet command via Appium script but after executing the telnet command waiting for manual input for "kill" command.
Unable to execute the "Kill" command along with Appium script.
Runtime.getRuntime().exec("telnet loc... | {
"pile_set_name": "StackExchange"
} |
Q:
Updating List of Entity Entries of DialogFlow Agent via API
Have been looking for a way to programmatically update our agent's entity entries for a certain entity type through the DialogFlow API. The purpose is to automate the updating of our entity entries on a scheduled basis (as our entries will be changing dai... | {
"pile_set_name": "StackExchange"
} |
Q:
AutoMapper e ViewModel com campos iguais
Tenho uma Viewmodel (UsuarioGrupoViewModel) onde irei mostrar dados de usuário e de grupos na mesma View.
O problema é que tanto a entidade Usuário quanto a entidade Grupo tem o campo Nome, como trato isso?
Obs: estou usando AutoMapper e minhas Viewmodels ficam na camada de... | {
"pile_set_name": "StackExchange"
} |
Q:
Strange bug with OpenLayers + CloudMade
I am trying something fairly simple, you can see a demo here:
http://www.jsfiddle.net/VVe8x/19/
This bug only appears in Firefox, so to see it press either one of the links once (it will take you to either NY or Israel) then press the other link.
The bug is that it will not ... | {
"pile_set_name": "StackExchange"
} |
Q:
own Configurations Server build with Spring Boot
Does anyone of you now how I can build my own Configurations Server as a microservice to store and load .properties Files ?
I find the Spring Cloud Config really interesting but there you use git as the target and in my case it would be just a Filesystem ..
Thanks f... | {
"pile_set_name": "StackExchange"
} |
Q:
alarm manager stop when change system clock
I have a service that runs in background. I am using alarm manager to start this service. It works fine but when i change the system clock in my device or in the simulator the alarm manager stops.
public void startAzanService() {
Calendar cal = Calendar.getInstance();
In... | {
"pile_set_name": "StackExchange"
} |
Q:
Comparing two optimization problems
Consider the following two optimization problems with all $a_i$ and $b_i$ non-negative.
$\max\limits_{x_i \in [0,1]} \sum\limits_{1\leq i\leq n} a_ix_i -
(\sum\limits_{1\leq i\leq n} b_ix_i)^2 $ and
$\max\limits_{x_i \in [0,1]} \sum\limits_{1\leq i\leq n} a_ix_i -
\sum\limits... | {
"pile_set_name": "StackExchange"
} |
Q:
HP pavilion keyboard driver is missing
My friend has an old HP Pavilion g6-1a52nr Notebook PC, 64 bit, the laptop's keyboard driver went missing after updating windows 10, the keyboard no longer works.
Windows updater can't find it, we tried several driver downloaders like Dumo and driver booster and easy drivers ... | {
"pile_set_name": "StackExchange"
} |
Q:
Nginx - src/core/ngx_sha1.h:19:17: no such file or directory
I try to install nginx with nginx-push-stream-module
./configure --prefix=/etc/nginx --add-module=../nginx-push-stream-module
make
make install
After I run 'make', I got this message:
In file included from src/core/ngx_crypt.c:12:0:
src/core/ngx_sha1.h:... | {
"pile_set_name": "StackExchange"
} |
Q:
Scroll Bar should go to bottoop m whenever a new item is entered in the window at the bottom
I have a control like chat control in my project & the scroll bar should be set to bottom whenever a new message is entered at the bottom. Right now, the message is getting added but the position of scroll bar remains same... | {
"pile_set_name": "StackExchange"
} |
Q:
handsontable / javascript - Disable new rows being added by dragging
I have a handsontable table which is dynamic, meaning data can be added after initiation. The problem is, however, that new rows can be added to the table when dragging down while clicking the corner of a cell. How would I prevent users from expa... | {
"pile_set_name": "StackExchange"
} |
Q:
Simplest/fastest way to check if value exists in DataTable in VB.net?
I have a DataTable (currently with multiple columns but I could just grab one column if it makes it easier). I want to check if a String value exists in a column of the DataTable. (I'm doing it many times so I want it to be reasonably fast.)
Wha... | {
"pile_set_name": "StackExchange"
} |
Q:
Upgrade my Database
I have a database on my apps, but I have 2 problems:
The Database name don't correspond to which i writted:
An error:
sqlite returned: error code = 1, msg = table demandes has no column named dateEnvoie, db=/data/data/(package)/databases/google_analytics_v4.db
My code :
// All Static variab... | {
"pile_set_name": "StackExchange"
} |
Q:
Getting a date + 3 days ( using specific date) SQL
I'm trying to get the next available day after a result set.
This is the query I'm using but is totally wrong:
SELECT DateID = ROW_NUMBER() over (order by B.Date_Key) , B.ClosingDate, C.dates AS RecDay
FROM DIM_DATE B JOIN [dbo].[WorkDay_Calendar] C on C.... | {
"pile_set_name": "StackExchange"
} |
Q:
Jquery select next and prev img
I worked on a little jquery function but i'm a little stuck. What I'm trying to do is when I click on next and prev link to show me the next and previous img based on the img with the class="clicked". I know I can use the find() function but I dont really know how to implement it.
H... | {
"pile_set_name": "StackExchange"
} |
Q:
How to find inheritance of modes?
As an example, let's use latex-mode, that inherits from tex-mode, that inherits from text-mode. Is there a command, that would take as input latex-mode and give me parent and grand-parent? Or, other way around, is there a command that would take text-mode as input, and give me chi... | {
"pile_set_name": "StackExchange"
} |
Q:
Asseration failed error while searching for Active Sound
I want to get PlaybackTime from FActiveSound class. However i always get this error:
Assertion failed: IsInAudioThread()
when i call this:
FActiveSound* ActiveSound = AudioDevice->FindActiveSound(AudioComponent->GetAudioComponentID());
My question is why ... | {
"pile_set_name": "StackExchange"
} |
Q:
What does =& mean in PHP?
Consider:
$smarty =& SESmarty::getInstance();
What is the & for?
A:
It passes by reference. Meaning that it won't create a copy of the value passed.
See:
http://php.net/manual/en/language.references.php (See Adam's Answer)
Usually, if you pass something like this:
$a = 5;
$b = $a;
$b =... | {
"pile_set_name": "StackExchange"
} |
Q:
How to change build Action for files using MSBuild
We are using NHibernate in our project and need all .hbm.xml files to be embedded resources.
To automate this boring task we added this target definition to our project file:
<Target Name="BeforeBuild">
<ItemGroup>
<EmbeddedResource Include="**\*.hbm.xml... | {
"pile_set_name": "StackExchange"
} |
Q:
Need help solving a problem with Genetic Algorithm
I have this program that simulate a soccer penalty kick between 2 teams.
-The goal is 24 x 8 with coordinate (0,0) at the bottom left corner.
-Each team has 5 kickers and 1 goalkeeper (for convenience, I'll call the 2 team Team A and Team B)
-Team A - there are 5 ... | {
"pile_set_name": "StackExchange"
} |
Q:
Passing HTML and CSS to Javascript
I need to find a way to pass the visible div to javascript. This may not even be the best way to accomplish what I'm trying to accomplish, so I'm open for other suggestions.
All my site content opens in a single overlay. When a button is clicked in the navigation, that content op... | {
"pile_set_name": "StackExchange"
} |
Q:
Simple T4 generation for Simple POCO
I'm looking for a tutorial, guidance or software that can generate simple POCO's for some SQL Server tables for use in ASP.NET MVC. Something like this:
1) Keep a list of the table names in the SQL Server database that should have a POCO generated
2) Feed the list to some prog... | {
"pile_set_name": "StackExchange"
} |
Q:
Laravel 5 model deleting event ignoring attributes when soft deleting
Something I find puzzling in Laravel 5 is how it handles the the deleting event and any changed attributes. Basically a soft delete is just an update of the deleted_at column on the table. I was trying to be clever and also include the user ID... | {
"pile_set_name": "StackExchange"
} |
Q:
Rails: Sorting Associated Records Dynamically
Tried looking for a way to sort associated records from parent model, but only came up with static ways by hardcoding the sort in the model file itself. Like this example: Rails sorting associated records
But I want to sort 'on the fly' using a table like this RailsCas... | {
"pile_set_name": "StackExchange"
} |
Q:
Fields and FieldLinks return the same two values for all Content Types
I have an application that loads all of my content types into a drop down list. When an item in the drop down list is selected I would like to get a list of the columns for that content type but each one only returns Title and ContentType. He... | {
"pile_set_name": "StackExchange"
} |
Q:
Why state cannot be part of Presenter in MVP?
I read http://www.codeproject.com/KB/architecture/MVC_MVP_MVVM_design.aspx and it said:
As powerful as they are, both MVC and
MVP have their problems. One of them
is persistence of the View’s state.
For instance, if the Model, being a
domain object, does not k... | {
"pile_set_name": "StackExchange"
} |
Q:
Anyone seen a list of tricky Haskell exercises?
Are there any lists of tricky Haskell exercises that use monads in surprising ways floating around? I'm most interested in simple 'work out what this line of code does' or 'do this in point free using this monad' type questions.
A:
Try to figure out why the progra... | {
"pile_set_name": "StackExchange"
} |
Q:
The use of individuals in set theory
I wonder if there is some advantage in using individuals when defining set theory and if this has something to do with the use of classes. This is essentially because I have seen that some books start by defining the empty set whereas others consider it to be a primitive symbol... | {
"pile_set_name": "StackExchange"
} |
Q:
Exception: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) using C++
The problem is as the picture shows
vector<int> printMatrix(vector<vector<int> > matrix) {
if (matrix.empty()) {
return vector<int>();
}
this->matrix = std::move(matrix);
int startRow = 0, lastRow = this->matrix.siz... | {
"pile_set_name": "StackExchange"
} |
Q:
How to call class methods that do not exist in php?
I just want to create function just like getFieldname() that is in magento.
For Ex:
In Magento
getId() - returns value of ID field
getName() - returns value of Name field
How can I create like that function? Kindly help me in this case..
I want to do just Like Be... | {
"pile_set_name": "StackExchange"
} |
Q:
How to implement a confirm dialog in WinJS and return the user's choice
Using WinJS I'm trying to display a message to the user who has just hit a 'continue' button that they haven't answered the question asked. That displays a dialog (Windows.UI.Popups.MessageDialog) with two buttons, which allow the user to choo... | {
"pile_set_name": "StackExchange"
} |
Q:
In JSF2, how to know if composite component has children?
I'm writing a composite component, you have a special tag named:
<composite:insertChildren />
Which inserts all the component's children there. Is there any way to know whether the component has children? Like a boolean value that could go on a "rendered" ... | {
"pile_set_name": "StackExchange"
} |
Q:
Public SSH keys not working for all users on same server
I have a VPS on which I have multiple "users" (all me, for different things). I configured my local SSH public keys and used ssh-copy-id to copy to all of them. I am able to login without a password prompt only for some of them, however, and it's driving me ... | {
"pile_set_name": "StackExchange"
} |
Q:
Why this loop freezes my browser?
Why browser hangs executing this?
for(var i= 9007199254740993;i<9007199254740994;i++) {
console.log(i);
}
A:
The integers you are trying to use are larger than 2^53. JavaScript cannot represent those integers precisely. Lets have a look at the console:
> var i = 90071992547... | {
"pile_set_name": "StackExchange"
} |
Q:
Possible input padding bug in Firefox
I have three main elements on my page.
Two spans and an input field.
All three elements have the same padding and font-size, but the input field is taller than the two spans by one pixel (in Firefox). It looks perfectly fine in Chrome.
This "bug" may be because I'mm using Goog... | {
"pile_set_name": "StackExchange"
} |
Q:
Can't insert content after specific division. Backbone.js
Here is what I've got:
ProductListView.js
define(['jquery', 'underscore', 'backbone', 'views/ProductView', 'views/PaginatorView'], function($, _, Backbone, ProductView, PaginatorView) {
var ProductListView = Backbone.View.extend({
className: 'pr... | {
"pile_set_name": "StackExchange"
} |
Q:
Need help deciphering C syntax
I have worked on several projects in college on C, but never used it in professional capacity.
Recently I started reading through cpython's source code and the following syntax confused me: github
What does PyAPI_FUNC(int) PyToken_OneChar(int); the part before the function name mean?... | {
"pile_set_name": "StackExchange"
} |
Q:
Any easy ways to play an audio file on a remote PC
I have a requirement to remotely trigger the playing of an audio file on a remote PC.
The PC in question may not be on the same domain as the triggering system. It may be running either XP or Vista. The audio file can be on the remote machine.
I have all of the lo... | {
"pile_set_name": "StackExchange"
} |
Q:
Java Quartz 2.2.2 missing method
I’m trying to create a task scheduler. I use Quartz. I followed this example.
I make the dependence in maven (tested 2.2.1 and 2.2.2) and my class HelloJob implements Job.
I have
public class HelloJob implements Job{
public void execute(JobExecutionContext context) throws JobE... | {
"pile_set_name": "StackExchange"
} |
Q:
(Munkres) Clarification with respect to what a saturated subset means (quotient maps)
In Munkres, Section 22 (The Quotient Topology) he says the following:
Another way of describing the quotient map is as follows: We say that a subset $C$ of $X$ is saturated (with respect to the surjective map $p:X \rightarrow Y)$... | {
"pile_set_name": "StackExchange"
} |
Q:
How can I access the value of 'imageCaption' field of a ATNewsItem object?
How can I access the value of imageCaption field of a ATNewsItem object?
I tried news_item_obj.getField('imageCaption') but the result is always None.
A:
You are only getting the field itself, not the value. Just use the accessor:
news_it... | {
"pile_set_name": "StackExchange"
} |
Q:
Periodicity of a constant signal!
This can be a very silly question, but I'm quite confused:
If we take the Fourier transform of any constant signal, we get an impulse at zero, which says that its frequency is zero and, hence, it is non-repeating and its period is infinity.
By the definition of a periodic signal,... | {
"pile_set_name": "StackExchange"
} |
Q:
The malfunction concerning making sub-section in this Beamer TeX?
In this Beamer TeX, the plane frames are recognized as subsections of the section "Open Questions" such that in the headline there are 5 small circles under the name of the section. Why does that happens? How to correct it?
\documentclass{beamer}
\u... | {
"pile_set_name": "StackExchange"
} |
Q:
Unlist a list within a list of data.frames into a single data.frame
dat <- list(list(structure(list(ID = 1, Gender = structure(1L, .Label = "Male", class = "factor"),
Phrase = structure(1L, .Label = "Hello", class = "factor"),
Phrase2 = structure(1L, .Label = "Goodbye", class = "factor")), .Names = c("ID... | {
"pile_set_name": "StackExchange"
} |
Q:
Different length and merge
I have two datasets (one for each population: sellers vs buyers). They are built in the same way.
FOR BUYERS (TYPE 2)
period subject genderb gp matchp treatment type p1 p2 suminte partner
1 1 0 2 48 404 2 7 8 NA 4
1 3 1 2 48 ... | {
"pile_set_name": "StackExchange"
} |
Q:
comparing datarow value with a string in if
I have an application which stores a user selected value to the value in my dataset filled datatable. I need to set another column in the table based on this comparison. But the comparison is not working. It always returns false, not entering in the if condition.
foreach... | {
"pile_set_name": "StackExchange"
} |
Q:
Open .pdf using node-webkit
I'd like to know how to open in my operating system a .pdf with Node-Webkit and PDFKIT.
The Node-Webkit app create the .pdf at the root of the project, I just would like to open and print it...
var pdf = require('pdfkit');
var fs = require('fs');
( function($){
$(document).ready( ... | {
"pile_set_name": "StackExchange"
} |
Q:
On my Magento store I cannot login on the frontend and cannot add items to my shopping cart after upgrading to 1.4.2. Any ideas what's wrong
I have just upgraded my Magento shopping cart to 1.4.2. Since the upgrade when I try to login on the frontend the page refreshes, but there's no evidence of being logged in. ... | {
"pile_set_name": "StackExchange"
} |
Q:
Calling a PHP variable in jQuery
I'am developing a zoom tool in my shopping cart and I am stuck on how to call a PHP variable in a jQuery function.
Here's my code :
jQuery(document).ready(function($){
$('#image1').addimagezoom({ // single image zoom
zoomrange: [3, 10],
magnifiersize: [800,300],
magnif... | {
"pile_set_name": "StackExchange"
} |
Q:
Write comma-delimited text file in vba, elegantly
I just have to ask this for once...
Is there a more elegant way of having your output comma-delimited, than the tried and tested & "," & we always use?
print #myTextFileNumber, myValue1 & "," & myText2 & "," & myValue3
A:
the command you are looking for is write ... | {
"pile_set_name": "StackExchange"
} |
Q:
Show that $m=6k+5$ has at least one prime divisor of the form $6n+5$
What's the best way of approaching this kind of questions?
A:
Imagine factoring $m$ into primes.
$m$ cannot have $2$ or $3$ as a factor (why?)
All other primes are equivalent to $1$ or $5 \pmod 6$
If you multiply together numbers equivalent to... | {
"pile_set_name": "StackExchange"
} |
Q:
Why C++ operation priority is different when dealing with objects or primitive types ++a*b/b-- - a
I confused why the two identical expressions give different results? The only difference is only that in the expression () I use custom primitive wrapper types.
I'm providing code for clarity:
struct Int {
in... | {
"pile_set_name": "StackExchange"
} |
Q:
Winning strategy to a Nim-variant game
Given the following variant to the game of Nim:
The game begins with n-heaps of m-stones each.
The player, every turn, must remove either k-stones from a heap if the number of stones in that heap is greater or equal to k, or as many stones as he desires from any non-zero he... | {
"pile_set_name": "StackExchange"
} |
Q:
Jtable and MySql
I'm getting and error when i'm try to do the below coding. I can't understand the this netbeans error. The error is as follows.
Mar 21, 2013 2:28:19 AM timetable.generator.JFTTGenerator6 jButton2ActionPerformed
SEVERE: null
java.sql.SQLException: Before start of result set
at com.mysql.jdbc.SQLErr... | {
"pile_set_name": "StackExchange"
} |
Q:
Acceptable Light Loss for SMF
I'm having some trouble finding a definite answer. I use a light loss tester to test our fiber (we dont have an otdr) and am unsure as to the acceptable light loss for 1310 SMF. So far I've figured out anything under 1db loss works. Anyone know a better reference?
A:
The exact power... | {
"pile_set_name": "StackExchange"
} |
Q:
PHP - Get values from Array in a loop
I'm working with an array and would like to grab the value for a few elements in each member of the array as I loop through them. Here's what the array looks like:
[Invoices] => SimpleXMLElement Object
(
[Invoice] => Array
(
[0] => Simpl... | {
"pile_set_name": "StackExchange"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.