text
stringlengths
181
35.5k
meta
dict
Q: how to add the database to wx.grid of wxpython? I have tried to add the database in the following way. import sys import sqlite3 # --- constructor # -------------- self.m_grid1 = wx.grid.Grid( self.m_panel6, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 ) # Grid self.m_grid1.CreateGrid( 6, 3 ) called from a b...
{ "pile_set_name": "StackExchange" }
Q: SQL Query Grabbing data from two tables My code right now is this $extract = mysqli_query($dbc, "SELECT * FROM items"); $numrows = mysqli_num_rows($extract); while($row = mysqli_fetch_assoc($extract)) { $id = $row['i_id']; $iname = $row['i_name']; echo "<tr><td><a href='capture.php?item_id=$id'>$in...
{ "pile_set_name": "StackExchange" }
Q: What is the reason behind Gita favoring the SAtvika way over others? Usually people who have read Gita, would say that NishKAma Karma is the way of "Karma yoga". Numerous verses suggest that, NishkAma Karma is SAtvika way of life. SakAma karma is RAjasika way & Vikarma is TAmasika way. Even attempting to perform A...
{ "pile_set_name": "StackExchange" }
Q: Deduct from total pool of hours and minutes in Excel I am trying to have a cell which has a given number of hours and minutes allocated and then add events which deduct from that time and show the total hours and minutes left. For example if I had 240 hours & 40 minutes and took 40 minute appointment and another 3...
{ "pile_set_name": "StackExchange" }
Q: Laravel 5.3: Use a array field from a controller in the view for trans() I have a form, which is sending the data of the form to a controller using POST. The controller returns the array of data using this line: return view('pages.result', compact('request')) The view displays me the correct array with all data, ...
{ "pile_set_name": "StackExchange" }
Q: How to get logged UserID in asp.net MVC and display it in hidden text box I can get username using @user.identity.name from table user but i need to get UserID instead of Username. how to do it?. i tried the following code in my controller but it returns 0. My Controller: public ActionResult Index() { ...
{ "pile_set_name": "StackExchange" }
Q: Построение единого запроса MYSQL для удаления всех символов, кроме цифр и букв в WordPress Друзья, помогите разобраться. При включении кеша на wordpress, адрес типа: mydomain.com/?p=123 превратился в mydomain.com/Hello-World Но вот ведь не задача, есть такие ссылки как: mydomain.com/Hello.-World mydomain.com/Hello...
{ "pile_set_name": "StackExchange" }
Q: JList selection, successive items are marked as selected when popup is introduced in-between I have a JList and JTextArea pair. Based on the selected item on JList, Data will be displayed in JTextArea. But for some data, user inputs are needed, and are collected by a JOptionPane. The problem is when I traverse JLi...
{ "pile_set_name": "StackExchange" }
Q: Does the temperature during ice melting change? I did an online test for physics and one of the questions was: Salt was added to ice. Because of it the ice melted. What was happening with temperature DURING the process of melting? The right answer was that temperature was lowering. Can please someone explain why...
{ "pile_set_name": "StackExchange" }
Q: Concrete types - as described by Stroustrup - C++ Programming Language 4th ed I'm having a hard time with this concept. What is Stroustrup getting at here? What is special about a class whose "representation is part of its definition"? What does a "concrete type" contrast with? (I assume it contrasts with "abstr...
{ "pile_set_name": "StackExchange" }
Q: Jquery slider inside popup dosen't work I am trying to program a slider inside a popup box. I am using Jquery. The popup works and it pops as i want to. For the slider I use the Swiper jquery library. If i test the code inside the popup div by it self the slider works great, but there must be some collision there....
{ "pile_set_name": "StackExchange" }
Q: Vim - how to store and execute commonly used commands? If I wanted to process a batch of text files with the same set of commands for example: :set tw=50 gggqG Can I save the above and run it with a shortcut command? A: If you want to use it only once, use a macro as specified in some of the other answers. If ...
{ "pile_set_name": "StackExchange" }
Q: Como alterar objetos do URL via JavaScript? Tenho um sistema de busca no meu site usando o Google Custom Search, e para definir a pesquisa por imagens, é acrescentado no URL: #gsc.tab=1. Como eu crio um sistema em JS que pode ser executado via link que adiciona isso no URL? A: Não tenho certeza se é isso que voc...
{ "pile_set_name": "StackExchange" }
Q: ValueError + repetition I can't figure out I am new to programming. I have to write a script for a calculator. I have two issues with it: My 3rd prompt to enter a number repeats itself, and I am not sure why. I get a ValueError instead of the calculation but I can't figure out what I am doing wrong. This is my c...
{ "pile_set_name": "StackExchange" }
Q: How can I get arrays returned from laravel foreach instead of a json array? I'm trying to return an array of values using laravel foreach based on input values. This is my expected output [ [ "number": 2567046807891, "message": "THis is a test", "sender": "Oasis Agrib" ], [ "number": 2567822489...
{ "pile_set_name": "StackExchange" }
Q: debian: aptitude install sshfs > Couldn't find any package whose name Why aptitude don’t found sshfs? And how can I install sshfs via aptitude? Pleas, without 3rd-Partys. https://packages.debian.org/en/wheezy/sshfs I typed this: root@s18:~# aptitude update Hit http://security.debian.org wheezy/updates Release.gpg ...
{ "pile_set_name": "StackExchange" }
Q: g++ optimization makes the program unable to run I implemented a path planning algorithm based on D*-Lite. When I do not turn on optimization (-O0), the program can run normally. But when I turn on the optimization level (-O1/2/3), the program cannot be terminated. In Visual Studio, both debug mode and release mod...
{ "pile_set_name": "StackExchange" }
Q: POST collection type data from silverlight to aspx page. I have a problem posting the data from silverlight to the aspx page which is in same domain. I need to open aspx page in a new tab that needs data of type combination (id, amount) like 3-XX-YY-ZZ, 12 4-XX-YY-ZZ, 20 5-XX-YY-ZZ, 15 etc...[many] and process...
{ "pile_set_name": "StackExchange" }
Q: What constitutes proof of relationship/intention to marry for a UK immigration visa? Being disabled, I don't really have to worry so much about funds or some of the more complicated issues with getting my partner over to the UK (from the USA). But there is one thing that concerns and confuses us: Proof of relation...
{ "pile_set_name": "StackExchange" }
Q: Set WordPress permalinks directly in httpd.conf? Is is possible to configure WordPress permalinks directly in Apache httpd.conf? I have a server situation (Apache 2.2.3 CentOS PHP5.1.6) where I can't use .htaccess for performance reasons, but can use httpd.conf. The admin says that mod_rewrite is enabled, but Allo...
{ "pile_set_name": "StackExchange" }
Q: Attempt to invoke virtual method 'android.content.Context android.support.v4.app.FragmentActivity.getApplicationContext()' on a null object reference Following is my code for my fragment, i get the above error of null exception /** * Created by USer on 09-04-2016. */ public class FeaturedFragment extends and...
{ "pile_set_name": "StackExchange" }
Q: How seriously do we take the finger-inspection in Havdala? After saying the blessing over fire during Havdala, we do something (customs vary) involving looking at our fingers by the light of the Havdala candle. I'm wondering how seriously we take this part of the ritual. In particular: If the person making Havdal...
{ "pile_set_name": "StackExchange" }
Q: How to create a page with just one post? I am creating a small blog using Flask. But I didn't find any tutorials or information that would solve the following problem: Create a dynamic page with just one post. I want this page to appear only a complete post, that is, coming out of a database. Without showing all a...
{ "pile_set_name": "StackExchange" }
Q: send html + JS in ajax im using jQuery load() method to send another html to my webpage. The html being loaded contains Javascript generated HTML. Im using this function to load the html: $(document).ready(function(){ $("img#links").click(function(){ $("div#content").load("links.html"); }); }); Th...
{ "pile_set_name": "StackExchange" }
Q: Python - how to check if weak reference is still available I am passing some weakrefs from Python into C++ class, but C++ destructors are actively trying to access the ref when the real object is already dead, obviously it crashes... Is there any Python C/API approach to find out if Python reference is still alive...
{ "pile_set_name": "StackExchange" }
Q: How can I block linked ads on Google Chrome Some days back I suddenly got ads in Google Chrome whenever I try to open any page. After searching online how to block ads, I found one adblock extension. I have installed adblock and it was working fine and ads were blocked. But today I am getting linked ads. What do I...
{ "pile_set_name": "StackExchange" }
Q: How to tell whether elaboration has completed at a breakpoint? When I hit a breakpoint in a VLAB script, how can I find out if I have caused elaboration to finish or not, yet? My script reaches a statement that raises an error: Error: (E529) insert module failed: elaboration done (The command that causes this is v...
{ "pile_set_name": "StackExchange" }
Q: What is the best comparison algorithm for comparing the similarity of arrays? I am building a program that takes 2 arrays and returns some value showing to what degree they are similar. For example, images with few differences will have a good score, whereas images that are vastly different will have a worse score...
{ "pile_set_name": "StackExchange" }
Q: Assembler. Распознавание эмуляции среды Некоторые программы(например, антивирусные) эмулируют изолированную среду для PE файлов. Как можно при помощи Assembler распознать такую среду? Идеально было бы кусок кода, но буду вполне доволен и описанием алгоритма. Заранее спасибо. A: Если я правильно понял вопрос, то ...
{ "pile_set_name": "StackExchange" }
Q: Converting from double to single Given 64 bits which represent a number in IEEE 754 double precision format, what is the algorithm for converting them to 32 bits which represent the same number, but in IEEE 754 single precision format (perhaps with loss of precision)? Also, is there an easy way to perform this con...
{ "pile_set_name": "StackExchange" }
Q: How to prove to friend I have solution to puzzle (without revealing it)? My friend Paul set me this arithmetic puzzle: To make 21 from the numbers 1, 5, 6, 7. You can use the operations add, subtract, multiply, divide as well as brackets. You must use each number once. After I solved it myself, I set the puzzle ...
{ "pile_set_name": "StackExchange" }
Q: Convert EPS to SVG I'm looking for a free tool to convert EPS (encapsulated postscript) to SVG (scalable vector graphics). I am aware that I can convert EPS to PDF with Ghostscript, then import the PDF with Inkscape and save the result as SVG. However, I want a simpler workflow with less tools, basically I want a ...
{ "pile_set_name": "StackExchange" }
Q: Error running Libreoffice 6.0.5. Did ubuntu 18.04 fix itself after I looked up the version number? I followed these instructions: How do I install LibreOffice 6 in Ubuntu? In Terminal, I typed libreoffice. This error appeared: /usr/lib/libreoffice/program/oosplash: error while loading shared libraries: libuno_s...
{ "pile_set_name": "StackExchange" }
Q: Calling sys_read two times [Nasm, Linux] Twice i try to read character from input, the first time "call getUserAction" works fine, but the main problem is, that the system didn't call the second read func, it just exits. Here is a little part of my code SECTION .bss buffer resb 1 SECTION .text global _...
{ "pile_set_name": "StackExchange" }
Q: Should I dispose EventRecords from a EventLogReader? Should dispose be called on the events that come back from the ReadEvent method of EventLogQuery? var eventLogQuery = new EventLogQuery("application", PathType.LogName) ; using (var logReader = new EventLogReader(eventLogQuery)) { ...
{ "pile_set_name": "StackExchange" }
Q: Can I override "hide and disable all items on the desktop"? Is it possible to add shortcuts and/or windows components to the desktop if "hide and disable all items on the desktop" is enabled via GPO? For example, if I have a few specific program icons I want to show up and nothing else, what is the best way to acc...
{ "pile_set_name": "StackExchange" }
Q: Probability in a fixed die I have that transition matrix is $$\begin{bmatrix}0&\frac{1}{5}&\frac{1}{5}&\frac{1}{5}&\frac{1}{5}&\frac{1}{5}\\\frac{1}{5}&0&\frac{1}{5}&\frac{1}{5}&\frac{1}{5}&\frac{1}{5}\\\frac{1}{5}&\frac{1}{5}&0&\frac{1}{5}&\frac{1}{5}&\frac{1}{5}\\\frac{1}{5}&\frac{1}{5}&\frac{1}{5}&0&\frac{1}{5}...
{ "pile_set_name": "StackExchange" }
Q: Leak detection simple class Basic idea is to use a Class, with static methods to add and remove references in a static vector, that keeps track of these references, and check that vector upon exit. The class is detecting intentional leaks that I create, but maybe you can find a case where it does not detect the le...
{ "pile_set_name": "StackExchange" }
Q: How can I remove a tag without deleting the docker image itself? Every time I pull an image, there are two tags pulled. Like this: centos 6 f07f6ca555a5 4 weeks ago 194.6 MB centos <none> f07f6ca555a5 4 weeks ago 194.6 MB How can I remove the later tag only? $ docker info Containers: 2 Running: ...
{ "pile_set_name": "StackExchange" }
Q: Java ftpclient application doesn't connect I am new to android and java programing. I write following code to connect to ftp server public class NewMainActivity extends Activity { TextView Display; //declare a public FTP client object. public FTPClient mFTPClient = null; @Override protected void onCreate(Bundle sa...
{ "pile_set_name": "StackExchange" }
Q: Ghost light following main light at point of origin I have a spotlight in my OpenGL project, the light currently shines down the -z axis like a ceiling light, towards the floor, which is just a big quad. I currently have a cube at the origin of the light, that follows the light around, so I can see exactly where ...
{ "pile_set_name": "StackExchange" }
Q: Inertial and non-inertial reference frames My book states that: A reference frame attached to earth is not inertial because it is revolving around the sun and it is rotating about its own axis. Don't we need a specified observer's frame to comment on other frames? If the observer's frame was on Earth won't Ea...
{ "pile_set_name": "StackExchange" }
Q: Nested JSON from a input form I've been looking around for quite some time but I can't seem to find a way how to best create a nested JSON from client side input fields of sorts. The end JSON i'd like to create should look like: { "DiaryEntry": [ { "Date": "2019.xx.01", "Time": "14:00", "...
{ "pile_set_name": "StackExchange" }
Q: How do I check another empire's FTL method? There are three different methods of FTL: Warp Hyperdrive Wormholes. It's useful to know what method other empires use, for defense, etc. While it's easy to tell at a glance if they use wormholes (because of the presence of wormhole stations), is there a method to t...
{ "pile_set_name": "StackExchange" }
Q: Why storing users passwords at all? I occasionally see questions asking how to safely store user passwords for a web application (using an RDBMS, I'm not talking of Facebook or Twitter). The usual answer is "salt the password, then hash it with a strong algorithm such as TDES or SHA512". My question is : As an RDB...
{ "pile_set_name": "StackExchange" }
Q: Make Parallel Ajax requests return response in order i want to make multiple ajax requests using jQuery that appends table rows into a table but i want their response in order for (i=0;i<5;i++) { //variables tempString, start_value updated here after every loop iteration $.post( 'results.php', ...
{ "pile_set_name": "StackExchange" }
Q: AS3 Automatically move object to another object when dragged EDIT: My problem seems at first a bit confusing. Look at this SWF, then you will surely understand my problem. http://www.fastswf.com/AL5D5ZA Try to drag the green object (which is pDRA, the red one is pCOMPLETE) As you can see only pComplete moves, but ...
{ "pile_set_name": "StackExchange" }
Q: Saving long detail in DB or in file? Developing an asp.net site on .NET Framework 4.0 and SQL SERVER 2008. When my admin member saves detail about project from HTMLEditorExtender where do i save it? Can i save this in Database? (varchar has 8000 chars) Detail can be large. or in File? What is the best practice? ...
{ "pile_set_name": "StackExchange" }
Q: MPVolumeView, avoid displaying "No Volume Available" I have a project with a MPVolumeView in it. It is set up, and it works, the only thing is that when I mute the device, the text "No Volume Available" comes up instead of the MPVolumeView. I would rather like the slider of the MPVolumeView to be disabled when the...
{ "pile_set_name": "StackExchange" }
Q: Automated check for question quality What would cause a question to receive the following message: Oops! Your question couldn't be submitted because: It does not meet our quality standards. (When I added a few words to my question, it was accepted, so I'm guessing my original question was too short. Still, it wou...
{ "pile_set_name": "StackExchange" }
Q: Css z-index sub menu I have a dropdown menu but my problem is that my sub-menu is hidding his parent's item when it appears. How can I fix it ? I tried with z-index but it doesn't work. I also tried to increase the margin-top of the sub-menu but the problem is that it becomes unreacheable. .menu { list-style: ...
{ "pile_set_name": "StackExchange" }
Q: Why does English need an article before any noun? In my native language, we can say: I have dog Because I don't want to say a dog (one dog, how many dogs) or the dog (that dog, the listener don't care which dog). p.s. after 3 years later, I have to say, why I ask this question, is I still cannot grasp how to use...
{ "pile_set_name": "StackExchange" }
Q: How can i set the location of minor ticks in matplotlib I want to draw a grid on the x-axis in a matplotlib plot at the positions of the minor ticks but not at the positions of the major ticks. My mayor ticks are at the positions 0, 1, 2, 3, 4, 5 and have to remain there. I want the grid at 0.5, 1.5, 2.5, 3.5, 4.5...
{ "pile_set_name": "StackExchange" }
Q: Cancelling and restarting a task I have read a few articles about this but I am currently none-the-wiser. I'm working on an application where there is a TabControl located on the form. When the user clicks on a tab page, I would like the background process to run off of the UI thread (as the process can take sever...
{ "pile_set_name": "StackExchange" }
Q: Zenoss MySQL Query - Events per hour I am working on some trending/analysis tools, and would like to query the events MySQL database for an events per hour metric so that I can send the metric out as a datapoint in graphite. Because some events will be in the status table, while others in the history table, I came...
{ "pile_set_name": "StackExchange" }
Q: Filter and list specific file names I generated a list of files by writing the following code: files = [file for file in Path(main_directory).rglob('*filename*v*.xlsx')] It retrieves a list of files : files[0] = .../2018/filename 2018 v 1.xlsx files[1] = .../2019/filename 2019 v 5.xlsx files[2] = .../2020/filenam...
{ "pile_set_name": "StackExchange" }
Q: Rcpp - Capture result of sregex_token_iterator to vector I'm an R user and am learning c++ to leverage in Rcpp. Recently, I wrote an alternative to R's strsplit in Rcpp using string.h but it isn't regex based (afaik). I've been reading about Boost and found sregex_token_iterator. The website below has an example...
{ "pile_set_name": "StackExchange" }
Q: Vim colors too bright (terminal) I have a problem with Vim and iTerm2, the colors are too bright (for ALL themes). It works with both Terminal.app and MacVim, so I guess it must be some setting in iTerm2 I've completely missed. The picture below shows you the difference (iTerm2 to the left, MacVim / Terminal.app ...
{ "pile_set_name": "StackExchange" }
Q: how to write '&' in html without converting to '&'? I need to ignore the character escaping and actually write &amp in my text. Is there a way to escape the escape? A: You can use &ampamp for writing &amp
{ "pile_set_name": "StackExchange" }
Q: How to retrieve all usernames alongside a boolean flag for each user to indicate their membership to a group? I am trying to build a page which allows the admin user to toggle membership to a particular group for each user. I aim to do this with AJAX functionality. I am using Django 2.2. I have implemented an AJAX...
{ "pile_set_name": "StackExchange" }
Q: Using Saboteur after Bridge in Dominion In Dominion I play a combo: Any card which gives me an additional 2 actions, then Bridge folloewed by Saboteur. Bridge makes any card in my hand cheaper (i.e. cost $1 less) and cards in other players' hands, which is directly stated in the card's description. What about card...
{ "pile_set_name": "StackExchange" }
Q: Javascript object constructor doesn't register argument Why do the isSingleand household arguments not seem to pass to the appropriate properties of the Person object when creating them and pushing them to kidsArr at the end of the script inside the switch while the instances created earlier in the script and bein...
{ "pile_set_name": "StackExchange" }
Q: Android multiple lists using @id/android:list I've got a new List of things that needs to be clicked but this one isn't working. onListItemClick is never called. I have another one in my app that has been working as expected and I can't figure out what the difference is. It occurs to me that maybe there's some con...
{ "pile_set_name": "StackExchange" }
Q: How do you send a signal to a remote process in python? I've seen the signal module, it seems alright for installing signal handlers and setting up alarms but is sending a signal to another process done via, for example os.system('kill -s SIGUSR2 8269') And then is there a simple way to do this if the process is ...
{ "pile_set_name": "StackExchange" }
Q: onload redirect aleatorio Gostaria de criar uma função que carregasse uma página aleatória de um determinado endereço. Algo do tipo www.meusite.com/(numeros entre 0-100).html Acho que a função deveria criar a tag A, depois preencher com o texto www.meusite.com/ + random number + .html; e no final ser ativada por o...
{ "pile_set_name": "StackExchange" }
Q: Changing one event listener to another? I am new to jquery and I was wondering if it s possible to change all click events (for elements within a specific div) to double click events using jquery? Many thanks in advance. function isTouchDevice(){ return (typeof(window.ontouchstart) != 'undefined') ? true : false...
{ "pile_set_name": "StackExchange" }
Q: How to deserialize YAML with YAMLDotNet? I want to deserialize this YAML with YAMLDotNet. It have sequence and nested mapping. data.yml people: - name: "John" age: 20 - name: "Michael" age: 21 - name: "William" age: 22 network: address: "192.168.1.1" port: 1234 param: paramNumber: 10...
{ "pile_set_name": "StackExchange" }
Q: The sum of all the odd numbers to infinity We have this sequence: S1: 1+2+3+4+5+6.. (to infinity) It has been demonstrated, that S1 = -1/12. Now, what happens if i multiply by a factor of 2? S2: 2+4+6+8+10+12.... (to infinity). I have 2S1, which is equal to -1/6 On this, we can create a equation for the odd number...
{ "pile_set_name": "StackExchange" }
Q: Conditional gem dependencies Is it possible to conditionally set a dependency on a gem at install time? Here's my situation which will hopefully clarify the question. There is a gem I maintain that depends on the json gem. However, I frequently use jruby which has a port of the json gem that's called json-jruby. T...
{ "pile_set_name": "StackExchange" }
Q: How to merge values from an array by position looping I'm looking to append the values of two arrays by their respective positions [0] and [1]. For example - firstArray = [“John”, “Sam”] and secondArray = [“Smith”, “Thomas”]. I would like the output to read as John Smith and Sam Thomas. I've tried creating a loop ...
{ "pile_set_name": "StackExchange" }
Q: python 2.7 chained conditions If Else not working. What's wrong? I can't figure out why the following doesn't work. # Example print "So, yes or no?" answer = raw_input() print answer if answer == "Yes": print "Yes indeed!" elif answer == "yes" or "y": print "Oh yeah!" elif answer == "No": p...
{ "pile_set_name": "StackExchange" }
Q: Serializing C# model with a custom list to JSON I have a model with a list that I need to serialize to JSON in order to send a request to a web service. The problem is that in my model I have a list that need to be serialized in a specific format. My class looks like the following: [DataContract()] public class St...
{ "pile_set_name": "StackExchange" }
Q: How to show a tensor is symmetric What is the best method for showing that a tensor is a symmetric tensor? For instance, I would like to show that the second fundamental form $$II_{ab}=\nabla^T_a \hat{n}_b \big\vert_\Sigma$$ where $\Sigma$ is a restriction to a hypersurface is a symmetric tensor. I thought about u...
{ "pile_set_name": "StackExchange" }
Q: List folder ftp sort() expects parameter 1 to be array My code: function listar_pastas($pasta) { $this->lista = ftp_nlist($this->conexao,$pasta); sort($this->lista); foreach ($this->lista as $objeto) { if($this->verificar_pasta($objeto)) { $pastas[] = $objeto; } ...
{ "pile_set_name": "StackExchange" }
Q: Fat-Free-Framework global variables and functions I'm new to fat free framework and i'm a little bit confused about the global variables. $f3->route('GET /@page','display'); function display($f3) { echo 'I cannot object to an object' . $f3->get('PARAMS.page'); }; $f3->run(); Here i'm using GET ...
{ "pile_set_name": "StackExchange" }
Q: How to pair a beer with a glass? I have recently begun to learn somethings about beer and I suddenly noticed that, for a while now, I have always been served similar types of beer on different looking beer glasses... which is confusing me. It could be human error, but it's got me wondering what beer glasses should...
{ "pile_set_name": "StackExchange" }
Q: How to install dkim-filter by apt-get? In tutorial, DKIM is installed by sudo apt-get install dkim-filter I wonder why on my Ubuntu 10.10, I am unable to do this as I receive error of E: Unable to locate package dkim-filter How can I install DKIM by apt-get? A: Maybe because it is not there anymore in 10.10: P...
{ "pile_set_name": "StackExchange" }
Q: Optimising sorting time in half an hour interval arrays I have developed a small function that will sort array of objects that have lastAccessedTime datetime information into sortedData array that holds same informations but placed in half an hour intervals (preparedData is an array that will hold only start and ...
{ "pile_set_name": "StackExchange" }
Q: a very strange question in mathematica I am doing this in mma v7.0: r[x_] := Rationalize[x, 0]; N[Nest[Sqrt, 10., 53] // r, 500] It gave me 1.000000000000000222044604925031308084726333618164062500000000000000000 However, if I go one step further N[Nest[Sqrt, 10., 54] // r, 500] I got all zeros. Does anybody know ...
{ "pile_set_name": "StackExchange" }
Q: Proguard can't find referenced class after migration to Kotlin I'm getting which looks to be a simple ProGuard error saying that a referenced class can not be found. The error happened just after migrate the class from Java to Kotlin. Warning: com.x.android.ui.ads.offerwall.OfferWallLoader$initIronSrc$1$1$run$1$1:...
{ "pile_set_name": "StackExchange" }
Q: Insert a value into a link at the given index Given the class Link, class Link: """A linked list. >>> s = Link(1, Link(2, Link(3, Link(4)))) >>> len(s) 4 >>> s[2] 3 >>> s Link(1, Link(2, Link(3, Link(4)))) """ empty = () def __init__(self, first, rest=empty): ...
{ "pile_set_name": "StackExchange" }
Q: Filter an array by comparing its property value with another array in angular/typescript I have two arrays //1st one tasks.push({ ID: 1, Address: "---", Latitude: 312313, Longitude: 21312 }); tasks.push({ ID: 3, Address: "---", Latitude: 312313, Longitude: 21312 }); //2nd one agentTasks.push({ID:2,AgentID: 2,TaskI...
{ "pile_set_name": "StackExchange" }
Q: Depth-first search I have a suffix tree, each node of this tree is a struct struct state { int len, link; map<char,int> next; }; state[100000] st; I need to make dfs for each node and get all strings which I can reach, but I don't know how to make. This is my dfs function void getNext(int node){ for(map<char,i...
{ "pile_set_name": "StackExchange" }
Q: Help proving a function is continuously differentiable So i have a function $$f:\mathbb{R} \rightarrow \mathbb{R}$$ that's differentiable at x=0 and for $x,y \in \mathbb{R}$ let this be true: $$f(x+2y)=2f(x)f(y)$$ So how can i prove that this function is continuously differentiable? I thought i could use any of...
{ "pile_set_name": "StackExchange" }
Q: CSS Positioning for jquery player I have a jQuery player on my front page that seems centered and ok for me in Chrome and Safari. But everyone else is seeing it on the left side of the screen for some reason. I tried different variations of positions like absolute, relative and tried margins without positions..not...
{ "pile_set_name": "StackExchange" }
Q: Does the "Urgent wish for children" card in Caverna allow construction of all types of dwellings? The B side of the "Wish for children" card titled "Urgent wish for children" requires you to build a "Dwelling" prior to family growth. Dwelling is written with a capital D on the card. Does that mean that you are req...
{ "pile_set_name": "StackExchange" }
Q: Matlab ( Input as string -> function -> plot it ) GUI I'm trying to get a function from edit text, then write it as function so I can plot it. However, What I did isn't working :(. Please if you can help me with this. Can you fix the problem here. I'm trying to get the function from a user as string then write ch...
{ "pile_set_name": "StackExchange" }
Q: is it possible to direct connect a client and server with 10GBASE CX4 copper cables? Server has two 10GBASE-CX4 ports. client has 10GBASE CX4 HBA. can theybe directly connected with a CX4 cable without the need for a switch? like SAS Infiband connectors? A: Yes, it works perfectly fine without a switch. Give eac...
{ "pile_set_name": "StackExchange" }
Q: the domain for $\dfrac{1}{x}\leq\dfrac{1}{2}$ What is the domain for $$\dfrac{1}{x}\leq\dfrac{1}{2}$$ according to the rules of taking the reciprocals, $A\leq B \Leftrightarrow \dfrac{1}{A}\geq \dfrac{1}{B}$, then the domain should be simply $$x\geq2$$ however negative numbers less than $-2$ also satisfy the origi...
{ "pile_set_name": "StackExchange" }
Q: Assistance with jquery .children Im creating some buttons rollovers and for "graceful degradation" sake, and for the sake of not writing code for EVERY image rollover etc, im trying to write better more efficient code. That said, what im wanting to do is that with a few lines of code, that my rollovers become a bi...
{ "pile_set_name": "StackExchange" }
Q: Merging small polygons with the biggest adjacent ones I want to merge the RED polygons with the YELLOW polygons. But i want to merge the one red polygon with the adjancent polygon with yellow one. This polygons are in one Feature class but classified in atributes. I am trying many methods but it doesnt work or i d...
{ "pile_set_name": "StackExchange" }
Q: Extract only text content from a web page I need to extract all the text content from a web page. I have used 'document.body.textContent'. But I get the javascript content as well.How do I ensure that I get only the readable text content? function myFunction() { var str = document.body.textContent alert(str...
{ "pile_set_name": "StackExchange" }
Q: Solr stats facet left out some values I want to facet over products in Solr and want to retrieve statistics about the categories. My schema has got a field called categories, a multiValued field. the problem is, that the statistics left out a bunch of categories. Am I wrong with following query? Obviously, but how...
{ "pile_set_name": "StackExchange" }
Q: AWS SQS - Append data to message on retries I have a SQS queue which is accessed by a lambda. I'm leveraging the retry capability provided by SQS using redrive policy and forwarding the message to a dead letter queue on max retries. I would like to append additional data to the message on each retry , but would li...
{ "pile_set_name": "StackExchange" }
Q: Element by Element Matrix Multiplication in Scala I have an input mllib matrix like, matrix1: org.apache.spark.mllib.linalg.Matrix = 1.0 0.0 2.0 1.0 0.0 3.0 1.0 1.0 2.0 1.0 0.0 0.0 The dimensions of matrix1 is 3*4. I need to do an element by element matrix multiplication with another matrix so that dime...
{ "pile_set_name": "StackExchange" }
Q: making citrix run with squid Scenario: Our employees are on on-site assignment with company X. Company X has placed them behind a squid proxy for any internet-related access. There are a couple of applications that our employees need to access via citrix hosted in our organization. If they access it using a data-c...
{ "pile_set_name": "StackExchange" }
Q: oracle database AUDIT doesn't show SQL text and bind values Based on this tutorial I have configured auditing on a database with these options: AUDIT ALL BY db BY ACCESS; AUDIT SELECT TABLE, UPDATE TABLE, INSERT TABLE, DELETE TABLE BY db BY ACCESS; AUDIT EXECUTE PROCEDURE BY db BY ACCESS; I prepare query from jav...
{ "pile_set_name": "StackExchange" }
Q: type conversion error, c# I am using Advanced Matrix Library in C#. NET@ http://www.codeproject.com/KB/recipes/AdvancedMatrixLibrary.aspx?msg=4042613#xx4042613xx. library css file is like using System; namespace MatrixLibrary { public class Matrix { private double[,] in_Mat; public Matrix(in...
{ "pile_set_name": "StackExchange" }
Q: MongoDB _id length getting as 25 I am trying to remove a document from MongoDB using nodeJS. My code flow is as below: 1.The user can delete a particular student. 2.So I have pulled all the student documents fron the DB and stored in students object. 3. User can filter the search with the textbox provided and can...
{ "pile_set_name": "StackExchange" }
Q: Circular reference problem Singleton I'm trying to creating a Singleton class like below where MyRepository lies in separate DAL project. It's causing me a circular reference problem because GetMySingleTon() method returns MySingleTon class and needs its access. Same way I need MyRepository access in constructor o...
{ "pile_set_name": "StackExchange" }