text
stringlengths
175
47.7k
meta
dict
Q: jquery to get last highlighted element value I have a number of list items called selectedli having with the css background-color: #efefef; I want to get the value of the last highlighted list item that has the selectedli class applied to it. This is my code... <script src="http://ajax.googleapis.com/ajax/libs/jqu...
{ "pile_set_name": "StackExchange" }
Q: Dreamweaver Regex Find and Replace with Regular Expression I have many instances throughout my site where I have inadvertently included the following code: if (isset(htmlspecialchars($_GET['u']))) I need to do a widespread find/replace to turn that code into this: if (isset($_GET['u'])) I am trying to use the co...
{ "pile_set_name": "StackExchange" }
Q: Unexpected module 'BrowserAnimationsModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component annotation This is my app.module i try to complete whole instructions in material.angular.io import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core';...
{ "pile_set_name": "StackExchange" }
Q: In Season 6: Why does Qyburn take this approach? In Game of Thrones season 6, what is the significance of Qyburn's 'little birds' murdering Pycelle? Making him perish in the wildfire would have been less complicated. A: There's nothing explicit spelling it out that I'm aware of and no giveaway line, but killi...
{ "pile_set_name": "StackExchange" }
Q: Installing strapi project on windows, incompatible module λ npx create-strapi-app strap-test --quickstart Creating a new Strapi application at C:\Users\Jell\strap-test. Creating a quickstart project. Creating files. Error while installing dependencies: warning strapi > boom@7.3.0: This module has moved and is now...
{ "pile_set_name": "StackExchange" }
Q: CSS to blur the background color into a light, opaque blue I have a div which sits in another div which I am trying to color the background of and have it be about 50% of the solid color #0F7BD5, and then blur into a more transparent version of that color. I have come up with this CSS but it's showing a sharp edg...
{ "pile_set_name": "StackExchange" }
Q: How can I add arbitrary `data-` attributes to a block's `edit()` container? For example: Before: <div id="block-fc502ca9-0d7b-440c-959c-3da152db0192" class="wp-block editor-block-list__block" data-type="wordcamp/schedule"> After: <div id="block-fc502ca9-0d7b-440c-959c-3da152db0192" class="wp-block editor-block-lis...
{ "pile_set_name": "StackExchange" }
Q: std::pair as a template argument? C++ I have a class that is a template, using the argument: template <class X> Can I template this class to be of type std::pair < W, Z>? I am getting an unresolved external symbol error, and trying to track down the cause. A: A little example of passing a pair into a template. #...
{ "pile_set_name": "StackExchange" }
Q: Fuzzy-match List of People I am trying to see if a movie is the same between two pages, and to do so I would like to compare the Actors as one of the criteria. However, actors are often listed differently on different pages. For example: On this page, https://play.google.com/store/movies/details?id=cSdcb2KOH74, t...
{ "pile_set_name": "StackExchange" }
Q: Vectorized solution to save pandas DataFrame by row as Django model objects Seeking guidance on vectorized solutions to create Django model objects from a pandas DataFrame with one per row. I've looked for similar questions and associated answers. I found https://stackoverflow.com/a/34431482/2193381 but don't want...
{ "pile_set_name": "StackExchange" }
Q: Youtube api thumbail size ordering changed? This just happened and I'd like someone to confirm it before I go changing all my site code... Using Zend framework to get YouTube videos and then VideoEntry and later getVideoThumbnails() the original thumbnail size array used to return in size order (smallest to bigges...
{ "pile_set_name": "StackExchange" }
Q: Time of another machine In c# when we use DateTime.Now the property value is current date & time of local machine how can get the time of another machine with IP address or machine's name A: You can achive by writing a service that gives you the current time? or connecting to remote machine and sending some wmi...
{ "pile_set_name": "StackExchange" }
Q: Switching between web and touch interfaces on Facebook login using Omniauth and Rails 3 The situation: Using Rails 3 and OmniAuth, I have an app that authenticates using the Facebook strategy. This app has been built to work equally-well for web and mobile interfaces (ala Jquery-Mobile). The challenge is to get Om...
{ "pile_set_name": "StackExchange" }
Q: Uploadify setting file size limit I am working on a project i have used uploadify control for file uploading,i have to set file size limit to 5MB, i've seen its documentation Here I tried setting 5MB but still when i am selecting file around 3MB it is showing file size error I also tried setting value without any...
{ "pile_set_name": "StackExchange" }
Q: querying to check for integer values in ruby on rails I want to execute this query in rails app Video.where("category= 'film' AND grant = 1").order('created_at DESC').page(params[:page]).per_page(10) here grant stores an integer value. and I am getting following error Mysql2::Error: You have an error in y...
{ "pile_set_name": "StackExchange" }
Q: How to hide child element clicking outside dynamically? I can hide child element with add every child element this code: window.addEventListener('mouseup', function(event){ let children = parent[0].children[0] if (event.target != children && event.target.parentNode != children){ children.style.display = 'none'...
{ "pile_set_name": "StackExchange" }
Q: Using scrollTop to show pixels scrolled Im wanting to to display the number of pixels a user has scrolled in my site by using the scrollTop method in jQuery. I would like the number of pixels to appear in a class called 'pixels'. Therefore I could have <p><span class="pixels"><!--number of pixels here--></span> P...
{ "pile_set_name": "StackExchange" }
Q: Resistance issue in a triac-optocoupler switch I have made the following circuit to control my water pump with Arduino(UNO R3). I have tried many resistors (calculated myself) to limit current in the optocoupler and triac, but failed to carry the load for a long time. At one time either resistor get burned or tria...
{ "pile_set_name": "StackExchange" }
Q: ocaml mutual recursion error I am new to Ocaml and want help with recursive function defined on a recursive data type. I have defined a data type as follows type 'a slist = S of 'a sexp list and 'a sexp = Symbol of 'a | L of 'a slist The function(subst) I'm writing checks for a symbol a in the defined...
{ "pile_set_name": "StackExchange" }
Q: How much energy needed to push a volume of water? I am trying to solve a situation, where I'd like to know how much energy would be needed to push a mass of water out of a container. Here's an image to help understand: The water tank has a height of 2 meters, length of 6 meters, and width of 4 meters. If a piston...
{ "pile_set_name": "StackExchange" }
Q: how to cast a nvarchar to decimal and get average I have a database table which contains 8 columns. First column is the customer name, and the others are scores but they are stored in nvarchar columns(unfortunately). the reason to store decimals in nvarchar columns is that if there is no score for a customer, they...
{ "pile_set_name": "StackExchange" }
Q: WPF MenuItem.Click breaks after parenting I am trying to dynamically populate a Menu control (which resides in a ControlTemplate) with various MenuItems (all created in code) but I am running into some weird problems. If the MenuItems are all created as root items, they fire their Click event successfully. But as ...
{ "pile_set_name": "StackExchange" }
Q: Regex pattern to match a word based on previous and next word? I am trying to highlight a word based on the previous and next word matching with specific customer requirements. A word should be highlighted only when previous and next word doesn't start with CAPS. I have created regex "(?!\bA-Z\b)\sSouls+(?!\s[A-Z,...
{ "pile_set_name": "StackExchange" }
Q: ¿Como validar los datos de un json al deserealizar? Tengo una funcion que recibe un string ,el string es un json, En la cual necesito validar los datos del json que me envian a la funcion ,este es mi json ,hay un array llamado productos ojo. {"comprobante_tipo":1,"comprobante_emision":"10-05-2017","comprobante_...
{ "pile_set_name": "StackExchange" }
Q: Can't open applications menu The applications menu in the top left corner of the screen will not open: if clicked nothing happens, the hotkey also does not work. I am on elementary OS 0.3.1 Freya (64-bit) Quad-Core Intel® Core™ i7-4500U. A: I've encountered this problem before: it's caused by slingshot crashing ...
{ "pile_set_name": "StackExchange" }
Q: iScroll is not detecting mouseup http://jsfiddle.net/zyVUU/ In the fiddle, if I start dragging the div, then keeping the mousedown go to the over CSS box, leave the mouse (mouseup) and then come back to the orange div, the scroller follows the mouse. It is not detecting the mouseup event. How can I force it? A: ...
{ "pile_set_name": "StackExchange" }
Q: master consuming 100% CPU in Rmpi program I'm using the Rmpi (v. 0.6-2) package to parallelize my R (v. 2.15) code. I have the following peace of code: library(Rmpi) source("slaveFunction04.r") mpi.spawn.Rslaves(nslaves=2) mpi.bcast.Robj2slave(slaveFunction04) mpi.remote.exec(slaveFunction04()) mpi.close.Rslaves()...
{ "pile_set_name": "StackExchange" }
Q: Not Being able to clear the JTextArea(using actionlistener when enter key is pressed. the text area is left with a new line(\n)) I am making a mini project for my college assignment. I am making a Local Chat application to chat over the LAN network. Everything works fine except one little problem. I am using to te...
{ "pile_set_name": "StackExchange" }
Q: Merge from other fork I've forked a repository, and made some changes. Now, the repository I originally forked has had updates, and I want to make some more changes and put in a pull request. My question is, how can I merge what I've done so far with the original repo that I forked? A: I normally add the origina...
{ "pile_set_name": "StackExchange" }
Q: Why does this code to modify a string not work? With c-style strings, how do you assign a char to a memory address that a character pointer points to? For example, in the example below, I want to change num to "123456", so I tried to set p to the digit where '0' is located and I try to overwrite it with '4'. Than...
{ "pile_set_name": "StackExchange" }
Q: Raspberry PI SPI read from Arduino slave with wiringPI2? I've got wiringpi2 and the the wiringpi2 python wrapper installed on the NOOBS Raspbian PI distro. The Adafruit 4 channel logic level converter kept the PI safe from 5v and sending data to the Arduino was as simple as this on the PI side: import wiringpi2 wi...
{ "pile_set_name": "StackExchange" }
Q: How to download existing SqlCe Db and use in Windows phone understand an existing SQlCe Db which has data in it can be copied into project and used later on. Now , I have a different approach. can I download the SqlCe Db with Data from a website into Wndows phone. I use this : BackgroundTransferRequest void Downl...
{ "pile_set_name": "StackExchange" }
Q: F# & Plivo - Could not load type "Plivo.API.RestAPI" I'm currently trying to write a simple F# app that will send a message from one number to another. I've been working around this error for a while but can't seem to get it working. Here's what I have: open Plivo.API open RestSharp let plivoApi = new RestAPI("M...
{ "pile_set_name": "StackExchange" }
Q: How to delete all line not containing a pattern or another pattern I know I must use the command :v, but I don't find on internet the right key to match 2 patterns. I'd like to run this kind of command: :v/OneWord .or. AnotherWord/d A: Just combine them with \|, which stands for alternating branches: :v/OneWord\...
{ "pile_set_name": "StackExchange" }
Q: What is the best way to store and export click stream data in almost real time Let us say I have a website which is getting lots of hits. I need to store the click data in some database so that it can be used for reporting and monitoring purposes. The click data will contain information like who is referring the u...
{ "pile_set_name": "StackExchange" }
Q: Why does SLRequest to get Twitter followers crash on iOS 6.1 but not 7.1 I tried to load a list of the user's Twitter followers. It loads fine on iOS 7.1, but crashes on iOS 6.1. The line that crashes is performRequestWithHandler: and the error is -[__NSCFNumber length]: unrecognized selector sent to instance 0xcb...
{ "pile_set_name": "StackExchange" }
Q: Show that $ \sum_{n\in \mathbb {S}} \frac{1}{n} $ is convergent Let $\mathbb {S} =\left \{ 1,2,3,...,9,11,12,...,19,21,...99,111,112,113... \right \} $ i.e, the positive integers set which contain zero digit is omitted. Now show that $ \sum_{n\in \mathbb {S}} \frac{1}{n} $ is convergent . I really don't have no i...
{ "pile_set_name": "StackExchange" }
Q: How to disable RTL support in Android Studio (editing source code)? Issue: my project supports 68 languages, several of which are RTL languages (Farsi, Arabic, Hebrew, etc.). We use Crowdin for translation of our base English text. Sometimes when I import the latest translations, my strings.xml file contains impro...
{ "pile_set_name": "StackExchange" }
Q: In a byte, how to swap the 4 higher bits with its 4 lower bits I had an interview yesterday. One of the question i've been asked was: how can one replace the 4 higher bits of a byte with its 4 lower bits. We're talking on native C here, btw. For example, consider the following byte: AB The output should be: BA Wel...
{ "pile_set_name": "StackExchange" }
Q: List.split output trouble I was practicing some coding and I decided to make a parrot translator. The basic point of this game is, that after every word in a sentence, you should put the syllable "pa". I had written the code for that: print("This is the PARROT Translator!") original = input("Please enter a...
{ "pile_set_name": "StackExchange" }
Q: Pixel value stored in image is getting changed automatically. If image is again opened in another function PreProcess data function returns a list of ASCII value of data. def preprocess_data(data): data_list = [] for ch in data: data_list.append(list(format(ord(ch), '08b'))) return data_list Here I am trying ...
{ "pile_set_name": "StackExchange" }
Q: Does killing civilians increase the difficulty of the police response? Occasionally when I accidentally kill civilians be it collateral damage or I just don't want to deal with them... Bain sometimes says: Hey! They're gonna bring in the big guns if you kill civilians! Or They're gonna come down harder on us ...
{ "pile_set_name": "StackExchange" }
Q: Size of structure which contains bitfields is different on different compiler I ran the below program on VS and on GCC. #include <stdio.h> int main(void) { struct bitfield { unsigned a : 3; char b; unsigned c : 5; int d; }bit; printf("Size = %d\n", sizeof(bit)); ...
{ "pile_set_name": "StackExchange" }
Q: Does a file structure that is mostly Header files slow down anything besides compilation? Does a file structure that is mostly header files (90% of your code being header-only) slow down anything besides compilation? Some people argue that it could cause inlining of most code in case of speed optimizations and so ...
{ "pile_set_name": "StackExchange" }
Q: Saving Web.Config Changes using SPWebConfigurationModification in SharePoint 2010 I have seen numerous examples on some SharePoint blogs regarding the use of the SPWebConfigurationModification class to modify SharePoint's web.config. However, I noticed some examples call the update method at different times. For e...
{ "pile_set_name": "StackExchange" }
Q: Calling this.PageRenderControl throws "A page can have one server-side form tag" I need to generate a pdf with html page contents. I have the following code in Pre_render event: StringWriter sw = new StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw); this.Page.RenderControl(hw); string pageContent = sw...
{ "pile_set_name": "StackExchange" }
Q: DisplayModeProvider issues Using DisplayModeProvider to choose between views for "Desktop", "Tablet" and "Phone" in a MVC5 web application. It is my understanding that this class selects the correct provider in order and uses the first provider that returns True. However, when I step through the code, I find the...
{ "pile_set_name": "StackExchange" }
Q: How to theme table inside vertical tabs? I have a simple test module: function tabletabs_menu() { $items['tabletabs'] = array( 'title' => 'Table Tabs', 'page callback' => 'drupal_get_form', 'page arguments' => array('tabletabs_form'), 'file' => 'tabletabs.module', 'access arguments' => array(...
{ "pile_set_name": "StackExchange" }
Q: commandLink with ajax doesnt work in JSF2 I have problem with f:ajax tag. I want to show and hide some data after click on commandLink but i get error: My code: <h:form prependId="false" id="contactDataForm"> <h:commandLink value="Edit" action="#{cc.attrs.userBB.showHideEditForm()}"> <f:ajax render=...
{ "pile_set_name": "StackExchange" }
Q: Is there a shortcut to Gmail Contacts? I often update my contact list. Currently I have to Open Gmail Open contacts link Is there a quicker way to do this? A: Google is very good about doing redirects with subdomains. Have you tried contacts.google.com? A: Here's a keyboard shortcut: When you are in Gmail, h...
{ "pile_set_name": "StackExchange" }
Q: Clean way to parse a string (bunch of coordinates) into a list of floats in python? I was writing code that was looking uglier and uglier to take this string: "69.766357,21.026979 70.303459,14.286892 71.782379,15.119740 71.216835,22.351538" and parse it into a list that looked like this: pos = [[69.766357,21.0269...
{ "pile_set_name": "StackExchange" }
Q: Why does google.com look different on blackberry & phonegap vs. blackberry & browser I'm tyring to get phonegap up and running on blackberry storm (9530 simulator). I had been testing my webapp from withing BB's built in browser, and it was looking ok, but then it totally bit once I tried to look at the some code...
{ "pile_set_name": "StackExchange" }
Q: C# use System.Type as Generic parameter I have a list of types (System.Type) which need te be queried on the database. For each of this types, I need to call the following extensionmethod (which is part of LinqToNhibernate): Session.Linq<MyType>() However I do not have MyType, but I want to use a Type instead. W...
{ "pile_set_name": "StackExchange" }
Q: H2 Database vs SQLite on Android Because of the lack of Unicode support on the embedded SQLite database in Android I am mostly interested in performance and stability of H2 Database vs Android SQLite Are you guys using it? Should I be aware of any H2 database shortcomings? A: Things are much better than I have e...
{ "pile_set_name": "StackExchange" }
Q: How do I move this slideshow to the center (horizontally) of the page? I've already tried multiple answers on previous questions, but I can't seem to find out how to move my slideshow to the center of the page (horizontally). If I try to do so with text-align: center; it doesn't work. I am not that good in HTML an...
{ "pile_set_name": "StackExchange" }
Q: HTML Table CSS generates differently in browser than in Email I'm trying to stylize an HTML table with some directly in the HTML - (I know it's bad practice, I don't have the option of a .css file to work with), as I'm doing it directly in the body of an email. I'm having trouble with getting a gradient background...
{ "pile_set_name": "StackExchange" }
Q: Linux system() call seen to sporadically block We have a multithreaded embedded application which, due to hardware constraints too mundane to discuss here, must remount its filesystem to be RW whenever it outputs to a file. We are currently doing this via a system() call, and running the mount command. However, fr...
{ "pile_set_name": "StackExchange" }
Q: OpenCV - Making a video from existing images I have an array of numpy array images named images. Let's say for the discussion's sake that - images = [cv2.imread("data/frame" + str(i) + ".jpg") for i in range(15)] Where data is a directory with frames from a video. I then try to save them as a video, using the f...
{ "pile_set_name": "StackExchange" }
Q: Android: Best way to get instant location once per use I always had some difficulties to find a good way for the instant location of the device. What I want to do is once per use of the app (e.g. when the onCreate of an activity is called) i want to know the coordinates of the device in that exact moment and never...
{ "pile_set_name": "StackExchange" }
Q: Is SingleLiveEvent actually part of the Android Architecture Components Library? I have been using the SingleLiveData class which can be found here. My questions are: Is SingleLiveData is actually part of the Android Architecture Components? Is it a good idea to use it? A: Is SingleLiveEvent actually part of t...
{ "pile_set_name": "StackExchange" }
Q: recvfrom() gets empty buffer even though the client sent nothing client: argv[1]: ip address, argv[2]: port number, argv[3]: file name The client first sends argv[3] to the server and send the file in packets in UDP connection. Once it finds there's no data read it gets out of the loops and is terminated. server: ...
{ "pile_set_name": "StackExchange" }
Q: What are some techniques to avoid script approvals with a Jenkins workflow Groovy script? The following script for the Jenkins Workflow plugin: def mapping = readFile 'a file' mapping.eachLine { def line = it.tokenize('|') sh "${line[1]}" } requires script approvals: staticMethod org.codehaus.groovy.r...
{ "pile_set_name": "StackExchange" }
Q: VB.NET For Loop too slow when grabbing XML I am getting values from an XML file (a resources file), and basically inserting them into a datatable. I have 679 keys to get from the resource file, and this takes 3.41 seconds. I was wondering if there is any way of making this loop faster. I have tried the Parallel.F...
{ "pile_set_name": "StackExchange" }
Q: textbox with textchanged event firing I have two textboxes with textchanged events. When I enter characters in first textbox and press enter, the textbox1_textchanged event is fired. Then I enter some characters in the second textbox and press enter, the textbox2_textchanged event fires as well. However, when I...
{ "pile_set_name": "StackExchange" }
Q: Criar relatório com código de barras Preciso criar um relatório no Jasper Studio com código de barras porém não estou conseguindo de nenhuma forma ler o código de barras que o relatório esta gerando, minha dúvida é, qual o padrão de código de barras que devo utilizar, e como devo configurá-lo no Jasper Studio para...
{ "pile_set_name": "StackExchange" }
Q: iOS SwiftUI: Correctly stack NavigationView with ScrollView and ZStack? So I've been playing around with SwiftUI and I can't seem to stack NavigationView correctly with ScrollView and ZStack. I'm trying to achieve a view with a .black background. Code below: MainView.swift var body: some View { NavigationView...
{ "pile_set_name": "StackExchange" }
Q: Best user group for developer domain users What is the best user group for Visual Studio 2010 developers? Now we have added them as Member of Domain Users but under certain situations they need admin account. We would like to give them more control on their machine but not on the domain network, of course. Thanks....
{ "pile_set_name": "StackExchange" }
Q: Confused on a proof that $\langle X,1-Y\rangle$ is not principal in $\mathbb{Q}[X,Y]/\langle 1-X^2-Y^2\rangle$ I'm getting stuck on a passage in my notes. The claim is that the ideal $P=\langle X,1-Y\rangle$ is not principal in $\mathbb{Q}[X,Y]/\langle 1-X^2-Y^2\rangle$. This follows since $P^2=\langle X^2,X-X...
{ "pile_set_name": "StackExchange" }
Q: How to merge two File[] with different folders into a single File[] in Java I'm trying to list files from two different directories in an Android device in order to upload them to a server. To do that, I'm getting the directory files under a File type and then throwing both listFiles() into correspondents File[] ...
{ "pile_set_name": "StackExchange" }
Q: OpenTK GlControl, depth peeling, black viewport I am making an opengl program in c# using OpenTK, implementing transparent effect on simple objects, using depth peeling algorithm. There is a sample code of depth peeling in web from NVIDIA, in c++, I simplified it and worked fine. But when I port the code to c#, th...
{ "pile_set_name": "StackExchange" }
Q: ClassFormatError when invoking defineClass with bytes read using JarInputStream read method I am using the following method to read bytes from jar entries (containing class files only). There is no jar file inside the jar. private List<byte[]> readFromJarFile(File cp) { List<byte[]> cbytes = new ArrayList<byt...
{ "pile_set_name": "StackExchange" }
Q: angularjs show sidebar on some routes and hide in others I'm trying to utilize ng-if to include side bar in some of my singlepage app pages and hide it from other. the html is : <body ng-app="simpleapp"> <div id="wrapper"> <!-- Navigation --> <div ng-include="'./include/sidebar.htm...
{ "pile_set_name": "StackExchange" }
Q: Why it removes certain items from the list? I am new to python and i was just writing a programm to get an input like : 1 2 3 4 5 6 7 8 9 I wanted to remove the integers which are bigger than 2 and this was my code: a = input() b =a.split() for i in range(len(b)): b[i] = int(b[i]) for i in b: if i >...
{ "pile_set_name": "StackExchange" }
Q: infix to postfix I've been trying to figure out this problem. I have an assignment to make a basic calculator. To do so i need the instructions in postfix. I have found some code online, which worked but used gets(). I tried replacing the gets... but the program no longer works. Here is the code, i was hoping so...
{ "pile_set_name": "StackExchange" }
Q: Picture or photo viewer on my Web site Lets say I let the customer upload up to 5 pictures. I'm looking for a good way to let visitors see the images one by one. I've seen some.. where there are thumbnails on the side/bottom (that looks like a vertical/horizontal film strip) and the default picture is the large o...
{ "pile_set_name": "StackExchange" }
Q: Declare new type Jboss Drools i need declare a new type in my drl like this example. package com.sample import com.sample.DroolsTest.Message; declare Variavel valor : Integer end rule "Hello World" when m : Message( status == Message.HELLO, myMessage : message ) -----> v : Variavel() Problem...
{ "pile_set_name": "StackExchange" }
Q: How do you use the string class in a source file? I am currently working on a c++ program with multiple files. (A main file, a header, and a source file) I have included the string class in my files, yet my program is not compiling. It is giving me errors, saying that string is undefined, but I have clearly includ...
{ "pile_set_name": "StackExchange" }
Q: r2pipe won't prompt for user input like the binary does in r2 debugger mode Have a functioning r2pipe script, but there's a need for hitting crtl-c to continue near the breakpoint(not a major issue,) however the script does not pause for input when the crackme asks for user input like it does in regular r2 command...
{ "pile_set_name": "StackExchange" }
Q: Detecting mouse click on div with Javascript without side-effects I want to detect whenever someone clicks in a div (essentially I want to know when a user is interacting with a section of text on my site, be that by selecting some text or clicking on a link), but I don't want to interfere with what the user is do...
{ "pile_set_name": "StackExchange" }
Q: How to increase the number of farmers I'm already doing the level 3 offline quests and I still only have 1 farmer working for me. I would have expected an additional farmer by now. Are there specific quests that I need to do or monsters I need to hunt? A: Getting more cats for working the farm seems to be based...
{ "pile_set_name": "StackExchange" }
Q: How to merge 2 dataframe base on a third dataframe containing multiindex I have 2 dataframe and i want to merge them. my join keys are index and they are third dataframe. the two dataframe : df1 = pd.DataFrame({'A' : [1,2,3] }) df2 = pd.DataFrame({'B' : ['A','B','C']}) the dataframe containing index list: df3 = p...
{ "pile_set_name": "StackExchange" }
Q: Replace dashboard widgets with banner ad I know it's probably not encouraged, but is there a way to replace the standard dashboard widgets (Recent Drafts, Quickpress, etc.) with a standard image banner ad? I know how to add new dashboard widgets, but I want this to be a plain image with no surrounding widget. A: ...
{ "pile_set_name": "StackExchange" }
Q: Best way to parse an XML String in Java? I am parsing a string in Java using javax.xml.parsers.DocumentBuilder. However, there is not a function to parse a String directly, so I am instead doing this: public static Document parseText(String zText) { try { DocumentBuilderFactory dbFactory = Document...
{ "pile_set_name": "StackExchange" }
Q: DFA Minimization: Finding all equivalence classes of $\mathsf{R_L}$ for language $011(0+1)^*011$ How do we find all equivalence classes of $\mathsf{R_L}$ for a language? Say I'm trying to look for all equivalent classes for the regular language $\mathsf{L}$ is $011(0+1)^*011$. Here's an example they give us in th...
{ "pile_set_name": "StackExchange" }
Q: Using one Samsung Gear Two DUID for multiple accounts Samsung requires developers to register a DUID (Device Unique Identification) to a developer account to be able to test apps on the actual watch. My question is. Can one DUID be registered on multiple accounts? This is the scenario: I have a watch and working o...
{ "pile_set_name": "StackExchange" }
Q: How to get the key and value from associative array into a one dimensional array eg. ['key' => 'value', 'key2' => 'value2'] to ['key', 'value', 'key2', 'value2'] Also, how do I get comma separated string from said array? A: Try to do something like that foreach ($yourArray as $key => $value) { echo $...
{ "pile_set_name": "StackExchange" }
Q: Convert array of string in array on long with closure I have this string: String t="123;123;123" And I want to convert it in a list of Long, what I did so far is this: t.split(";") Which gives me back an array of String, now I'd like to convert it in an array of Long. I'd like to know if there is a way to do it ...
{ "pile_set_name": "StackExchange" }
Q: Allow autorotation on just one view controller In my project I have allowed only portrait rotation, but for one ViewController I would like to enable also landscape. I'm presenting this ViewController as ModalViewController, I've tried using methods - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrien...
{ "pile_set_name": "StackExchange" }
Q: SQLCLR TVF that calls web service is getting error 401: Unauthorized I am calling a web service from a SQLCLR TVF in SQL Server 2008 R2. On the IIS server this service has open permissions. When tested using GET or POST requests on a browser the web service works as expected. However, when the function calls the ...
{ "pile_set_name": "StackExchange" }
Q: How to rerender component in useEffect Hook Ok so: useEffect(() => { }, [props.lang]); What should I do inside useEffect to rerender component every time with props.lang change? Solution: I solve this problem in changing some idea of problem (I use another function to work's well with language change. A: ...
{ "pile_set_name": "StackExchange" }
Q: Angular & Jasmine: how to test that a $q promise chain was resolved I have a Service that expose a function that receives a parsed CSV (using papaparse) and promise that reflects the parsing status: If the file was missing mandatory fields, the promise is rejected Otherwise, It parses each row into an item and a...
{ "pile_set_name": "StackExchange" }
Q: Express Middleware I'm a beginner in Express framework and having some difficulty with the code flow. I have following code in app.js app.use('/', index); app.use('/login', login); app.use(require('./routes/authenticate_user')) app.use('/user', userDetails); Problem is that If a user enters an invalid route suppo...
{ "pile_set_name": "StackExchange" }
Q: What happens if 7 Soldiers block a Phyrexian Obliterator? This is a situation I am confronted with more often than I want to. My opponent attacks me with his Phyrexian Obliterator (5/5). The card says: Trample; Whenever a source deals damage to Phyrexian Obliterator, that source's controller sacrifices that many p...
{ "pile_set_name": "StackExchange" }
Q: parse error on input ‘::’ when making an explicit type definition for a function which accepts multiple arguments I am working on a project in Haskell for the first time and I am working on translating over my ADT into the code properly, however when I am writing the explicit type definitions for my functions and ...
{ "pile_set_name": "StackExchange" }
Q: Why does "docker push" push several images and where? I have private repo on docker hub named alek/test. On my Mac: $ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE alek/test 0.1 dc1a7cc41129 33 minutes ago 643 MB nod...
{ "pile_set_name": "StackExchange" }
Q: Dynamically injected form field does not get submitted while form submission <%= simple_form_for @product, method: :post, url: save_item_path do |f| %> <tr> <td> Category </td> <td> <%= f.input :category_id, collection: Category.all, label: false, prompt: 'Select...
{ "pile_set_name": "StackExchange" }
Q: How are external interrupts vectored on a powerpc processor? Maybe the question should be, are external interrupts even vectored on the PowerPC at all? I've been looking at http://www.ibm.com/developerworks/eserver/library/es-archguide-v2.html, 'book 3', trying to figure out how the processor locates the appropri...
{ "pile_set_name": "StackExchange" }
Q: Remove "Source" from CKEditor UI Source Dialog plugin I'm using CKEditor (v4.7.0 - custom build) and I have added the Source Dialog plugin (http://ckeditor.com/addon/sourcedialog). What is the best way remove the word "Source" from the toolbar UI? e.g. from this: To this: I'm using the jQuery adaptor and initia...
{ "pile_set_name": "StackExchange" }
Q: Rails: How to avoid AbstractController::DoubleRenderError when using live update / Faye? I'm using Private Pub which is a gem built on top of Faye for live updating through my controller. I'm having trouble to be able to make a fallback for the Live Update Render, in case Faye server failed to serve. Is there anyw...
{ "pile_set_name": "StackExchange" }
Q: find() a value of an ajax response(HTML)?(javascript) I've been working on developing a web program(javascript) which can grab specific data from a web page(form) and make a statistic pie chart. I called jQuery API to Get the html content and find specific "td" and "tr" data from the received html. However the htm...
{ "pile_set_name": "StackExchange" }