text
stringlengths
175
47.7k
meta
dict
Q: python: proper use of dictionaries i try to create a function, which generates random int-values and after a value appeared twice the function should return the number of all generated int-values. I have to use a dictionary. This is my code so far: def repeat(a,b): dict={} d=b-a+2 for c in range(1,d): ...
{ "pile_set_name": "StackExchange" }
Q: What do "Fragile" stickers on checked baggage do? When traveling by air and checking bags, some airlines will let you declare an item as fragile and put stickers on the box or bag. How common is this policy? What do the fragile stickers do (i.e. how do they change the baggage handling process)? Is this generally r...
{ "pile_set_name": "StackExchange" }
Q: Unix shell script to search for error codes in thousand files then print the count in text file I need to find both 150+ eventType and errorCodes in 1700 files each day. That means i have to loop over 1700 files to find the occurrence count of 150+ eventType/errorCode and put those counts in a text file as a dail...
{ "pile_set_name": "StackExchange" }
Q: Is it possible to use a monospaced font for an information focused webpage? Monospaced fonts are used mainly for code editors and other special purposes and not usually for normal web pages, like an online newspaper for instance. I ponder however with the idea to do this and would like to know: Can a monospaced fo...
{ "pile_set_name": "StackExchange" }
Q: Managing multiple instances of Resque and Redis I am trying to have God monitor two instances of Resque, one for production and one for staging. So I start two Redis instances on system boot: redis_6379 and redis_6380. Then I'm using Daemontools to start and monitor God. My God script looks something like this: G...
{ "pile_set_name": "StackExchange" }
Q: Fit image to paragraph width Let's say I have the following css .text{ position:absolute; padding: 0 25px; background: rgba(255,255,255,.6); } And following html <div class = "row"> <div class = "col-md-6"> <div class = "text"> <h3>Title 1</h3> <p> L...
{ "pile_set_name": "StackExchange" }
Q: AsyncTask Thread_Pool_Executor on Android API <11 Im trying to allow my app to run on older versions of Android, Specifically API 10. I've downloaded the support packages and used them to solve a few problems but im struggling to fix this one: Field requires API level 11 (current min is 10): android.os.AsyncTas...
{ "pile_set_name": "StackExchange" }
Q: Why is `JSON.parse` not throwing exception? We have been using JSON.parse for a while now and we just updated to the latest version. We are getting the following error. Has the functionality been updated to return nil instead of throwing a ParserError? 2.3.0 :001 > gem 'json', '2.0.2' => true 2.3.0 :002 > require...
{ "pile_set_name": "StackExchange" }
Q: Repo preferences over one to another? if a same software (different version) are present in two repos both added in sources.list then which one will get installed when I run install command apt-get install x ? Also how can I choice one repo over another if both provide application with same name ? A: (This...
{ "pile_set_name": "StackExchange" }
Q: Change cells value in Datatables in selected rows only - Prime For Record Action I m trying to target some cells values only in selected row or rows. I have tried a code as explained in the following snippets but it keeps targeting the first row, not the selected one, Please excuse me as the checkbox in the table ...
{ "pile_set_name": "StackExchange" }
Q: Grails output directory I want to create war using grails, but by default it creates war file in target directory. I want to deploy my war into Tomcat. Is it possible? Thanks A: In the grails-app/conf/BuildConfig.groovy file you can specify the war like this: grails.project.war.file = "target/${appName}-${appVe...
{ "pile_set_name": "StackExchange" }
Q: Symfony2 post-update-cmd gives "An error occurred when generating the bootstrap file" I am currently on Symfony2 2.3.7. When I run the composer update command. In the post-update-cmd a script is run to update symfony2. But it fails: Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap han...
{ "pile_set_name": "StackExchange" }
Q: Overload resolution failed because no accessible 'New' is most specific for these arguments: I have a usercontrol with a repeater. Originally in page load I had code which grabbed data from the database and bound to the repeater. I now want to take this functionality outside of the usercontrol so that I can have m...
{ "pile_set_name": "StackExchange" }
Q: How do I populate my view model? I'm using MVC to build a basic application for use in a veterinary clinic. The application has a screen where staff can see a pet's appointment history and add appointments. The history portion is wired up and works fine. I see a list of all previous appointments and can navigate i...
{ "pile_set_name": "StackExchange" }
Q: LinqDataSource with complex SQL I have a rather long combinations of SQL statements to give me a 3 row result that I want to use in a Telerik Ticker. The Telerik Ticker as far as I can see will only accept Linq or Entity data sources. So I have a Ticker with as DataSourceID = "LinqDataSource1" which has an OnSelec...
{ "pile_set_name": "StackExchange" }
Q: how to create database in my salesforce's site.com and how to use it? I'm planning to make little web on salesforce that sells e-magazines. But i don't know how to create database and use it. I'm using 30 days free trial of salesforce. Help me. A: Salesforce has wrapped database engine which runs under each sale...
{ "pile_set_name": "StackExchange" }
Q: Create complex rules in infopath form I have an infopath form with two dropdown lists and depending on the vaues I have to choose the value in another third dropdown list, I have 40 possible combinations and I don't want to create 40 rules to rule the final dropdown list, there is a logic like a switch condition l...
{ "pile_set_name": "StackExchange" }
Q: Analyzing of x86 output generated by JIT in the context of volatile I am writting this post in connection to Deep understanding of volatile in Java public class Main { private int x; private volatile int g; public void actor1(){ x = 1; g = 1; } public void actor2(){ put_o...
{ "pile_set_name": "StackExchange" }
Q: Convert MYSQL query to PHP Query I have been trying to get this to work for some time. I'm just stumped. Here is the original MYSQL and then the PHP Ive been working on. MYSQL: SET @COD_PAIS = 3; SET @F_HASTACORTE = '2012-03-31 01:00:00'; SELECT mcarteras.DES_CARTERA_CC AS 'Short Name of Fund' ...
{ "pile_set_name": "StackExchange" }
Q: How to launch Anbox? I understand, that Anbox is in super alpha, but I need help. I cannot launch it. There is terminal entries: $ anbox launch [EE 2017-04-27 16:03:20] [launch.cpp:76@operator()] Anbox session manager service isn't running! $ anbox session-manager [EE 2017-04-27 16:03:44] [session_manage...
{ "pile_set_name": "StackExchange" }
Q: Securing Authentication Tokens Stored in the Server-Side Database I'm working on extending a web application with a RESTful HTTP-based API. We decided to require the client to supply an authentication token in each request (instead of using sessions or other multi-step authentication schemes like OAuth). E.g.: POS...
{ "pile_set_name": "StackExchange" }
Q: Draw arrow at the end of elbow connector on Canvas I have implemented elbow connector tool to be drawn on canvas, the elbow connector is working properly however i want to show arrow at the end of elbow connector. I have added the arrow at the end of line but some how i am not able to get proper angle for arrow en...
{ "pile_set_name": "StackExchange" }
Q: OpenID on Stack Overflow Is OpenID on Stack Overflow private, or can other users tell what email address posted the question? A: email address is private, not shown
{ "pile_set_name": "StackExchange" }
Q: Why is CLOCKS_PER_SEC not the actual number of clocks per second? I have just written this short C++ program to approximate the actual number of clock ticks per second. #include <iostream> #include <time.h> using namespace std; int main () { for(int i = 0; i < 10 ; i++) { int first_clock = clock();...
{ "pile_set_name": "StackExchange" }
Q: Getting a content script to append image on page load I've just start out learning how to make extensions for google chrome. I have a very basic understanding so far, so I wanted to try something small. Right now I am trying to get an image to append to a specific div on a specific page everytime that page loads....
{ "pile_set_name": "StackExchange" }
Q: Getting to know the caller is from which DLLs Currently, I have a C++ exe project, which dynamic load N DLLs. Those DLLs will perform calling to the functions which is re-inside exe project. Now, within my exe project, I wish to know the callers are coming from which DLLs. Is it possible to do so using any availab...
{ "pile_set_name": "StackExchange" }
Q: Position TextBox in Chart in Excel to the top / left -4 I have a chart in excel. Inside this chart there is a textbox. I want to position this textbox to the upper left corner of the chart. When I do this manually and read out the properties .Top and .Left I get -4 as a response. If I try setting these two propert...
{ "pile_set_name": "StackExchange" }
Q: How to check if a IEnumerable is sorted? How to check if a IEnumerable is sorted? bool IsSorted<T>(IEnumerable<T> enumerable) { ??? } A: One example of such method could be: static bool IsSorted<T>(IEnumerable<T> enumerable) where T : IComparable<T> { T prev = default(T); bool prevSet = false; for...
{ "pile_set_name": "StackExchange" }
Q: Can't see online meeting created using GraphAPI in Outlook Calendar I have created an online meeting using GraphAPI by using token acquired by following the steps in documentation. But those meetings are not displayed in Outlook calendar. Is there any way to view it in calendar? A: Online meetings are only the r...
{ "pile_set_name": "StackExchange" }
Q: Rename factor levels based on condition in R Let's say that we have the following dataframe: data1 <- data.frame(S1 = sample(c("A", "B", "C"), size = 20, replace = TRUE), S2 = sample(c("A", "B", "C"), size = 20, replace = TRUE), number = rnorm(20, 10, 100)) There's also thi...
{ "pile_set_name": "StackExchange" }
Q: JTable height calculation Solution jtable.getHeight does not include header element jtable.getRowHeight include margin and the example has 15px actual height, not 14px More clear example RO 16 R1 16 R2 16 HEIGHT 48 INTERCELL java.awt.Dimension[width=1,height=1] MARGIN 1 I have JTable with 3 rows. Each row is 16px...
{ "pile_set_name": "StackExchange" }
Q: print(1 >> (10 ^ 0xAAAA)) is 0. However, it is different in c language For python: print(1 >> (10 ^ 0xAAAA)) The result is 0. For c language: int main(int argc, const char * argv[]) { long int x=10; long int a = x ^ 0xAAAA; int b = 1 >> a; printf("a: %x\n", a); printf("b: %d\n", b); } The result b=1. F...
{ "pile_set_name": "StackExchange" }
Q: Prototype and YUI I saw a reference on a company intranet recently that "You should use YUI instead of prototype". (formerly Prototype was company recommended JS framework). Is that because YUI builds on/extends Prototype? Or merely implements a super-set of its functionality? A: YUI is a completely separate li...
{ "pile_set_name": "StackExchange" }
Q: Is Google Cloud SQL fault tolerant when there is replica? I'm running a Google Cloud SQL instance ("mysql-master") and it has one replica. ("mysql-replica") Web apps on another servers read and write data on the Cloud SQL instance. While mysql-master is restarting, can app servers read and write data? I want to ru...
{ "pile_set_name": "StackExchange" }
Q: Size of the category of cohomology theories I'd like to understand the structure of the functor category Coh whose objects are cohomology functors from a category of Spaces to the category of graded commutative rings GCR. Spaces could be any of the familiar geometric categories: topological spaces, manifolds, alge...
{ "pile_set_name": "StackExchange" }
Q: Let P denote the set of all polynomials in the real variable x which varies over the interval [0, 1]. What is the closure of P in C[0, 1] Let P denote the set of all polynomials in the real variable x which varies over the interval [0, 1]. What is the closure of P in C[0, 1] (with its usual supnorm topology) pleas...
{ "pile_set_name": "StackExchange" }
Q: Ternary Statements in Javascript: pitfalls of no assignment? Sometimes I use ternary statements to simplify & reduce the length of my code. Ternary statements are traditionally used to assign a value to a variable, but in JS I can also write ternary statements with no assignment to execute differing outcomes bas...
{ "pile_set_name": "StackExchange" }
Q: MouseMotion Sensor Method Call I have encountered a problem, for which no matter how long I study the API's of the class and superclasses, I can not figure out. Suppose I wish to design a sort of a game where the mouse motion controls the motion of a block that is used to bounce a ball, which then destroys multi c...
{ "pile_set_name": "StackExchange" }
Q: Separate font for chapter and text I need to use a serif font - eg Times (New Roman) or Palatino - for the main text and a sans serif font - eg Helvetica or Arial - for headings and labelling diagrams, etc. How do I get this format ? In my class file, I have this: \RequirePackage{sectsty,caption} \ifthenelse{\boo...
{ "pile_set_name": "StackExchange" }
Q: Como hago para que todas las imagenes de un carusel tengan las mismas medidas? Editado <section id="carousel"> <div id="carousel-home" class="carousel slide" data-ride="carousel"> <ol class="carousel-indicators"> <li data-target="#carousel-home" data-slide-to="0" class="active"></li> <li data-targe...
{ "pile_set_name": "StackExchange" }
Q: Kohelet citation - better peace and poor then rich and without peace I remember that there is some citation in Kohelet meaning "better peace and poor then rich and without peace", but cannot recall the exact source... Does someone remember? A: Perhaps you refer to Koheles 5:11: מְתוּקָה שְׁנַת הָעֹבֵד, אִם-מְעַ...
{ "pile_set_name": "StackExchange" }
Q: Cufon Nested Hover Problem When using multiple lists and hover states the 'parent' Cufon style replaces the child. In the following example, when you hover the Second Level link it will be replaced by a different weight. Is there an option I can set so that the nested style stays the same or is this a bug/limitati...
{ "pile_set_name": "StackExchange" }
Q: Batch Script inserts un-needed spaces padding special character I have a very simple script that inputs a user name and password. Some passwords contain special characters such as:!,@,#,$,^,&,*,(,),_. The issue is when they enter one of these characters it pads the character with blank spaces on either side inside...
{ "pile_set_name": "StackExchange" }
Q: How to remove duplicate entries in ASP.Net MVC Index View table I have the following scenario: I have a Contact with properties FirstName and LastName. A Contact can have multiple PhoneNumbers and as many EmailAddresses. I have identified these as 3 entities with common relationships. Please see the table definit...
{ "pile_set_name": "StackExchange" }
Q: nchor Link to Local File? (DEAD LINK not working in FireFox but in IE) This Java code, "<a href='file:///" + curBP.get_build_path() + "'>" + curBP.get_build_path() + "</a>" is outputted to the browser. On the page, the HTML is: <a href="file:///\\path\to\shared\file">Shared File</a> However, it does not open the...
{ "pile_set_name": "StackExchange" }
Q: Why does C# allow trailing comma in collection initializers but not in params? Valid syntax: var test = new List<string> { "a", "b", "c",//Valid trailing comma }; Invalid syntax: private void Test(params string[] args) { } Test( "a", "b", "c",//Invalid trailing comma ); Is it a matter of synta...
{ "pile_set_name": "StackExchange" }
Q: Калькулятор на python с tkinter. import tkinter from tkinter import * root = Tk() numbers = Entry(root, width = 2) number2 = Entry(root, width = 2) key_plus = Button(text = "+") key_minus = Button(text = "-") key_multiply = Button(text = "*") key_divon = Button(text = ":") Claculete = Button(text = "calculte") o...
{ "pile_set_name": "StackExchange" }
Q: Need regular expression to match specific pattern in notepad++ I want search for specific pattern like 'constant_string' : some_string. 'constant_string' : this will be constant part in pattern & some_string it may change. I want to find for this pattern 'constant_string' : some_string and replace with 'constant_...
{ "pile_set_name": "StackExchange" }
Q: jpgraph Warning (2): file_exists() [function.file-exists]: open_basedir restriction in effect I'm having a trouble on making the jpgraph's image work on the web. When I run it in localhost the jpgraphs works but when I uploaded it there is an error message: Warning (2): file_exists() [function.file-exists]: open...
{ "pile_set_name": "StackExchange" }
Q: Simulate a double chance bet with two single bets If you bet on the result of a soccer match, you usually have three possibilities. You bet 1 - if you think the home team will win X - if you think the match ends in a draw 2 - if you think the away team will win Lets say we have the following soccer match with th...
{ "pile_set_name": "StackExchange" }
Q: Java Program for Prime numbers Problem In this project you will write a Java program that reads a positive integer n from standard input, then prints out the first n prime numbers. We say that an integer m is divisible by a non-zero integer d if there exists an integer k such that m = k d , i.e. if d divides eve...
{ "pile_set_name": "StackExchange" }
Q: Inscribed Square in Inscribed Circle in Square A square has an inscribed circle which has an inscribed square in, as shown. Show that the area of the white bit is approximately 28.5% of the whole shape. I started by calling the circle's radius r, so the length and width of the blue square is r and the area is $r^...
{ "pile_set_name": "StackExchange" }
Q: Get JSON Object by string I wrote a function which take an id of the link as a name of JSON dataset. $('.link').click(function() { var dataset = $(this).attr("id"); for (var i = 0; i < chart.series.length; i++) { chart.series[i].setData(lata.dataset[i].data); } }); But in this case dataset is ...
{ "pile_set_name": "StackExchange" }
Q: How do I map URL paths to directories on my server? At the moment I have a directory containing various web-facing products, such as a Drupal site, a wiki, etc, something like this. /srv/www /srv/www/blog /srv/www/wiki /srv/www/sometestphpapp At the moment, I've got one apache2 virtualhost config in /sites-availab...
{ "pile_set_name": "StackExchange" }
Q: Ignoring bots when tracking events in Rails app I am tracking events through Mixpanel in my Rails app. For example, my controller looks something like class HomeController < ApplicationController def index track_event "Visitor: View Landing Page" end end The problem is that the app gets hit by a number of...
{ "pile_set_name": "StackExchange" }
Q: how to make startup application to open the folder or inode/directory after booting? I think it will be awesome if after login the folder that locate not at the same localhost / can open it self like and application as skype and others. do we can make it because if this one works for it , it will help others peopl...
{ "pile_set_name": "StackExchange" }
Q: How to check a jointJS element not based on type but on stencil name instead I want in Rappid to make a check when inserting an element inside Paper, if this element is Workitem or Activity but the only similar check I found in Rappid documentation is: if (cell.get('type') !== 'link'){//Do something} which checks ...
{ "pile_set_name": "StackExchange" }
Q: Rescale a function Lets assume that $A_1$ a function with maximal value $M$ and minimal value $m$ with $M \neq m $ How can i find the transformation that maps this function to $A_2$ with $N$ as new maximal value and $0$ as new minimal value? A: First we want to "move" the function "down" by $m$, so we take $A_1-...
{ "pile_set_name": "StackExchange" }
Q: Pluralization bug in chat transcript only In a normal chat session, time lapses between messages will be represented like so: But in the transcript of the same thing (pixel-perfect, this is the same image except for the pluralization bug (which I'm about to mention)), there's a pluralization bug (freehand circle ...
{ "pile_set_name": "StackExchange" }
Q: Java: BufferUtil? I'm trying to use this class with JOGL. It references BufferUtil, which I can't find anywhere. I found documentation, but no actual code. Eclipse doesn't suggest to import it from anywhere. What do I have to do to be able to use this code? A: In NeHe tutorials for JOGL, there are many places us...
{ "pile_set_name": "StackExchange" }
Q: jQuery Autocomplete with images :a small customization I am a newbie in jQuery. I am trying to use the auto complete jQuery pluggn in my ASP.NET page .I downloaded the sample from the site and trying to rewrite it from PHP to ASP.NET Can any one help me to rewrite it ? <script type="text/javascript"> $().ready(f...
{ "pile_set_name": "StackExchange" }
Q: custom UIView how-to with IB / Xcode 4.5.1 and iOS Simulator 6.0 I know that there are several questions similar to this but I am finding that most of them don't work with current IB / iOS or are not complete. I want to have a custom UIView that has a nib but am failing of getting this hooked up properly. I have s...
{ "pile_set_name": "StackExchange" }
Q: django model field comment in database this is the model class(django version 2.0) class Host(models.Model): host_id=models.CharField(max_length=20,primary_key=True) host_label=models.CharField(verbose_name="linux_host_label",max_length=255) the table structrue in database mysql> show create table dashboa...
{ "pile_set_name": "StackExchange" }
Q: Find the number of integer solutons to $x_1 + x_2 + x_3 + x_4 + x_5 + x_6 = 60$. Find the number of integer solutons to $x_1 + x_2 + x_3 + x_4 + x_5 + x_6 = 60$ if $x_1 \geq2, x_2\geq 5, 2\leq x_3\leq 7, x_4\geq 1, x_5\geq 3, x_6\geq 2$. Here is my approach: If you let $M = \{\infty x_1, \infty x_2, \infty x_3, \...
{ "pile_set_name": "StackExchange" }
Q: Conversion of RDD to DataFrame using .toDF() When CSV data read using SparkContext (Not sqlContext) I am a pure new guy in SparkSQL. Please help me anyone. My specific question is that if we can convert the RDD hospitalDataText to a DataFrame(using .toDF()) where hospitalDataText has read the csv file using Spark...
{ "pile_set_name": "StackExchange" }
Q: Cygwin, via SSH, is missing a system variables A bunch of system variables are missing in Cygwin when using ssh. Some that I noticed include: A proper PATH including the Visual Studio paths. VS80COMNTOOLS TEMP TMP PROCESSOR_ARCHITECTURE PROCESSOR_IDENTIFIER PROCESSOR_LEVEL PROCESSOR_REVISION FP_NO_HOST_CHECK PSM...
{ "pile_set_name": "StackExchange" }
Q: Prove that $f$ is a first degree polynomial Let a polynomial $f$ be in $\mathbb{Z}[x]$. Assume that for every $n \in \mathbb{N}$ $f(x)=n$ has at least one integer solution. Than prove that $$f(x) = \pm x + c$$ I really don't know to start. Thanks in advance! A: Let $f(x)=a_0+a_1x+...+a_kx^k$ where we shall assum...
{ "pile_set_name": "StackExchange" }
Q: Does Gremlin.NET support submitting async bytecode? There are extension functions for submitting queries asynchronously in Gremlin.Net, some get string which is not recommended and others use RequestMessage which is not as readable as using GraphTraversal functions. Is there a way to submit a query like the one be...
{ "pile_set_name": "StackExchange" }
Q: Security considerations for my personal password manager My security knowledge is kind of limited but I might learn something.I´m planning to create an ajax application where I encrypt/decrypt passwords client-side with a typed master password using a javascript AES library and then send/retrieve the encrypted da...
{ "pile_set_name": "StackExchange" }
Q: How to find cell value based on row and Column ID in excel VBA Need a VBA Sub to find a cell value based on Row and Column ID. In the example below I need to select the value where East and RT3 intersect which is 80. A B C D E 1 null RT1 RT2 RT3 RT4 2 North 31 40 78 11 3 South 32 41 ...
{ "pile_set_name": "StackExchange" }
Q: In Android how to pass ListAdapter values to onItemClick? I've got a functioning search interface on my app. Now I'm trying to make each search result list item clickable and display in a new activity. I've got them clickable, but I can't figure out how to pass the ListAdapter values (records) into the onItemClick...
{ "pile_set_name": "StackExchange" }
Q: Does Shani Sade Sati really affects? Does Shani's Sade Sati really affects our luck. I have heard from many people that Shani's Sade Sati have ill effects on our luck and career. What is it and What's its origin? Also what are the remedies for it to lower its affect? A: Shani dev ( शनि देव ) is one of the Navagr...
{ "pile_set_name": "StackExchange" }
Q: Parallel top ten algorithm for distributed data This is an interview question. Suppose there are a few computers and each computer keeps a very large log file of visited URLs. Find the top ten most visited URLs. For example: Suppose there are only 3 computers and we need the top two most visited URLs. Computer A:...
{ "pile_set_name": "StackExchange" }
Q: Quickbooks API Explorer - How To Link Transactions To Invoices? Using the QuickBooks Online v3 API (https://developer.intuit.com/apiexplorer?apiname=V3QBO) How do I create a payment and then link that payment to an existing invoice using the API Explorer? I'm using sandbox for all my testing. For example, I create...
{ "pile_set_name": "StackExchange" }
Q: Access bookmarks bar with keyboard shortcuts a la Safari Pretty much the only reason I still choose to use Safari over Google Chrome is the ability to access your bookmarks with keyboard shortcuts. For the first 9 bookmarks in your bookmarks bar, you're able to do CMD+1 for the first, CMD+2 for the second, etc. I'...
{ "pile_set_name": "StackExchange" }
Q: Classic asp "Application debugging is disabled" in visual studio 2015 I try to debug a classic asp website, but Visual Studio 2015 says "application debugging is disabled" in the solution explorer when I connect to iisexpress process. I tried to follow this guide: link A: The difference with Visual Studio 2015 i...
{ "pile_set_name": "StackExchange" }
Q: What is the FPD bit on the PDP-10? When an interrupt happens on a PDP-10 right, as on many other architectures you get the program counter pushed onto the stack. Actually, the program counter includes many status bits in the upper half of the word, similar to early ARMs. Well one of these bits is the "First Part ...
{ "pile_set_name": "StackExchange" }
Q: How to build a form with a dynamic number of inputs I want to call a function that creates a form based button with a dynamic number of hidden inputs. I'm struggling with it and hope that someone can point me in the right direction. Here is the background: I have a function that I call to return a button with a...
{ "pile_set_name": "StackExchange" }
Q: wattmeter average power Average power can be measured by wattmeter, so why in the attached example it doesn't function properly- doesn't show 0 W? A: To corectly measure power on a three phase system (without neutral) you need two wattmeters. For a purely reactive load, one wattmeter will read positive X watts a...
{ "pile_set_name": "StackExchange" }
Q: Distance between stars Epsilon Eridani and Tau Ceti? I am working on a story. It would be helpful if someone could provide the distance in light years between star Epsilon Eridani and star Tau Ceti. A: As answered by Wolframalpha, (as linked by chirlu) The distance between Tau Ceti and Epsilon Eridani is 5.45 li...
{ "pile_set_name": "StackExchange" }
Q: How to assign variable to merged Pandas dataframe within function I'd like the dataframe passed into this function to be modified. def func(df): left_df = pd.DataFrame([[1, 2], [3, 4]], columns=['A', 'B']) right_df = pd.DataFrame([[5, 6], [7, 8]], columns=['C', 'D']) df = pd.merge(left_df, right_df, ho...
{ "pile_set_name": "StackExchange" }
Q: What is the SQL used to create the Running Vusers graph in LoadRunner Analysis? In HP LoadRunner Analysis, there is a running vusers graph that shows the current number of virtual users that are running throughout the test. An example graph is shown below. Does anyone know what is the SQL used to create the data ...
{ "pile_set_name": "StackExchange" }
Q: Bitwise operator to convert 0 to 1 and 1 to 0 In C, suppose I have an unsigned char A which can be either 0 or 1. I would like to find a bitwise logical operator that will convert A to !A. Note: I am using this code on a GPU, where bitwise operators are very cheap compared to logical operators. i.e. XOR is much ch...
{ "pile_set_name": "StackExchange" }
Q: Angular 2 - AuthService.loggedIn is not a function Hey guys would really appreciate some help , I was doing this tutorial from Auth0: https://auth0.com/blog/angular-2-authentication/ It's regarding authentication with Angular 2. and my code is exactly the same as the repo but I keep getting this error: error-messa...
{ "pile_set_name": "StackExchange" }
Q: ColdFusion 11 - consuming axis-1 web services We are moving from CF9 to CF11. One thing that has changed is that CF11 now publishes and consumes axis-2 web services, while CF9 worked with axis-1 web services. So, we have a bunch of axis-1 web services that we would rather not go back and re-factor. We have seen...
{ "pile_set_name": "StackExchange" }
Q: how to redirect http://www to https://www - nginx I'm going to redirect http://www.example.com to https://www.example.com. in nginx server-block I have below snippet: server { listen 80; server_name www.example.com example.com; return 301 https://www.$host$request_uri; } In case example.com it works properly and ...
{ "pile_set_name": "StackExchange" }
Q: Endless redirect loop when trying to redirect user to /en with navigator.language I've got a German Wordpress website (http://website.de) and made an English version of every page with TranslatePress (http://website.de/en). Now I tried to get the language of every user in JQuery with navigator.language and redirec...
{ "pile_set_name": "StackExchange" }
Q: Hadamard direct mapping of input to output in $\theta$ and $\varphi$ form I was wondering what would be an equation for Hadamard operation for a single qubit, given the input as the current $\theta$ (0 to $+\pi/2$) and $\varphi$ ($-\pi$ to $+\pi$) and output expected in $\theta$ and $\varphi$ with same ranges. Mos...
{ "pile_set_name": "StackExchange" }
Q: Using MS Access VBA Function using Query in VB6 I have defined a Function in MS Access database. I am using that function in Query. I saved that query as "Query1". This query runs successfully in MS Access. But, when I call the same query from VB (using ADO), it is giving me error: Run-time error '-2147217900 (800...
{ "pile_set_name": "StackExchange" }
Q: How to synchronize rotation on multiple images in JavaFX Canvas I have multiple objects that I want to draw rotated together. When they are at 0 degrees (facing straight), they are good, but when they aren't, it looks like this: I am using this code to rotate: private void rotate(GraphicsContext gc, double angle...
{ "pile_set_name": "StackExchange" }
Q: Is there an easy way to know what line of jQuery script called an event? I'm working on a drupal module (irrelevant) and I'd like to recreate a javascript/jQuery event. If I use chrome and go to event listeners I see the jQuery script is called on line 57, however this doesn't really help as: The script is minifi...
{ "pile_set_name": "StackExchange" }
Q: UITableView load more when scrolling to bottom like Facebook application I am developing an application that uses SQLite. I want to show a list of users (UITableView) using a paginating mechanism. Could any one please tell me how to load more data in my list when the user scrolls to the end of the list (like on ho...
{ "pile_set_name": "StackExchange" }
Q: Estimating exterior camera parameters by matching lines using least square estimations (Lowe, 1991) I'm new to computer vision and graphics. I want to estimate exterior camera parameters using non-linear least square estimation as suggested by "Lowe, David G. "Fitting parameterized three-dimensional models to imag...
{ "pile_set_name": "StackExchange" }
Q: Why doesn't this div apply its height and width properties? I have some images, each one inside their parent div. When I try to set the width and height of the parent div, it does not change size. Why? How can I set its size? Codepen of the below: .SNSicon { width: 600px; height: 600px; display: inline;...
{ "pile_set_name": "StackExchange" }
Q: send email with active job and sidekiq I have an active job that sends an email class UpdateEmailJob < ActiveJob::Base queue_as :default def perform() NotificationsMailer.create_client("mymail@gmail.com").deliver end end Then on my code I call the perform later method UpdateEmailJob.perform_later I a...
{ "pile_set_name": "StackExchange" }
Q: Why doesn't lazy evaluation break this code? add <- function(x) { function(y) x + y } adders <- lapply(1:10, add) adders[[1]](10) In the above code Wickham claims in Advanced R that because function arguments are lazily evaluated x will be 10 for all of the closures that are created by lapply(1:10, add). But th...
{ "pile_set_name": "StackExchange" }
Q: Javascript comprobar vector aleatorio Saludos, he creado una función en Js que cuando el usuario introduce los números funciona perfectamente, pero cuando esa función es llamada pero en vez de introducir los números, se han generado aleatorios no funciona, sale un " undefined " : function comenzar(){ va...
{ "pile_set_name": "StackExchange" }
Q: When I resize browsers window, my div gets down to bottom and a big space comes in top When I resize browsers window, my div gets down to bottom and a big space comes in top. I want that my div should remain in center of page even if resize the size of window lesser than size of div. In my school they haven't teac...
{ "pile_set_name": "StackExchange" }
Q: Managing content for multiple users within ArcGIS Collector App? I have a hundreds of people collecting data. Each user has an ArcGIS Online login. I want to be able to filter content visible in the ArcGIS Collector App based on the logged in user, but don't want the maintenance burden of having a different web m...
{ "pile_set_name": "StackExchange" }
Q: MYSQL SUM(IF) with group by NAME but some NAME wanna makes sum I have one question in SQL. This is the query. SELECT Customer, SUM(IF(date_format(OutputDate, '%Y') = 2020 AND date_format(OutputDate, '%m') = 3, SupplyPrice, 0)) AS March FROM (SELECT Customer, OutputDate, SupplyPrice FROM `TableOutput`) ...
{ "pile_set_name": "StackExchange" }