text
stringlengths
181
35.5k
meta
dict
Q: Jquery HTML/CSS Geting all spans data-name atributes This question has to do with this other here. I found part of the problem and would like someone to help me to solve it altogether. I discovered that in fact my old script works and i only need to adapt it correctly. See the following situation Using this java...
{ "pile_set_name": "StackExchange" }
Q: php combine array - arthmetically add values How do I combine these two arrays, so that the keys stay the same, but the values are arithmetically determined? Note - the keys might not always line up in each array, per my example: $Array1 = ([4] => 100, [5] => 200, [6] => 100, [7] => 400 ); $Array2 = ([2] => 300, [...
{ "pile_set_name": "StackExchange" }
Q: What could cause a "java.lang.IllegalArgumentException: Type mismatch" in GAE Query? I have two code snippets which I am trying to run on the development server of Google App Engine SDK v1.8.8 for Java. The first: return datastore.get(KeyFactory.createKey(Kinds.Provider,provider_id)); works as expected and return...
{ "pile_set_name": "StackExchange" }
Q: facebook sdk Graphrequest object returns null in android i am trying to fetch facebook user details like name, userid, email,location,gender. i am getting response in log with user information but unable to store in session or sent to another activity, like form Login Activity to Main Activity bellow id my code in...
{ "pile_set_name": "StackExchange" }
Q: How to test if zeros have changed to ones (but not the other way around) I have a binary mask which at some point I'm updating. It's ok for 1s in my old mask to become 0s but the other way around is not allowed. How can I assert using some binary operations that none of the 0s in the mask have turned into 1s? A:...
{ "pile_set_name": "StackExchange" }
Q: What is the value set for NaN, POSITIVE_INFINITY and some other constants in Double class? What is the value set for NaN, POSITIVE_INFINITY and some other constants in Double class? From the source code, I see that they are set to themselves, but how does that work? public final class Double extends Number impleme...
{ "pile_set_name": "StackExchange" }
Q: C# Setup Issue. private void ReadText(string text) { string add = "http://translate.google.com/translate_tts?tl=ta&q="; add += HttpUtility.UrlEncode(text, Encoding.GetEncoding("utf-8")); try { using (var client = new WebClient()) { try...
{ "pile_set_name": "StackExchange" }
Q: Android HttpPost javax.net.ssl.SSLProtocolException unrecognized name I am trying to post some data to an api from an Android tablet, but I keep getting an SSLProtocolException and I can't figure out the problem. This is the error I keep getting: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolExcept...
{ "pile_set_name": "StackExchange" }
Q: How is 'classOf' expression represented in scala AST I'm new to the Scala AST concepts. I need to traverse a Scala code tree that contains an expression such as: classOf[org.apache.commons.lang3.ArrayUtils] I need to be able to identify this case when pattern matching on scala.reflect.internal.Trees.Tree. For inst...
{ "pile_set_name": "StackExchange" }
Q: Cities XL not starting after windows reinstall I have reinstalled my windows XP and now cities XL is giving error "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem" Is there any solution other then reinstalling the whole game...
{ "pile_set_name": "StackExchange" }
Q: jquery showing related xml categories I have an xml file like this: <?xml version="1.0" ?> <scketchit> <categories> <category title="MANGA" /> <category title="MARVEL" /> </categories> <comics> <comic title="Comic number 1"> <date>21/02/2011</date> <cate...
{ "pile_set_name": "StackExchange" }
Q: How to set color for first row in Datagrid I have a datagrid on a wpf (mvvm) project. the datagrid sort is showing the last item added to the collection as the first row. i want to color the first row (in order to highlight new item added to the collection) I've seen some similar questions about this manner but no...
{ "pile_set_name": "StackExchange" }
Q: Precession in the vector model of angular momentum - quantum mechanics? The vector model of angular momentum in quantum mechanics says that, for example, the angular momentum vector $\mathbf{L}$ precesses about its projection on the $z$ axis, like this: We can add $\mathbf{L}$ and $\mathbf{S}$ to make $\mathbf{J}...
{ "pile_set_name": "StackExchange" }
Q: How do I call a method from another class within a listbox? In my listbox form I want to make it possible to call a method from a class in a different folder. Here is what I thought I was meant to do: public void ListBox_SelectedIndexChanged(object sender, EventArgs e) { SharedClasses.Form.FormConsole newFormC...
{ "pile_set_name": "StackExchange" }
Q: How to get table using relationships in Entity Framework I am using EF Core 2.1 and i'm trying to get Profile from Authentication but every time i get it i found it null and i don't now where is the problem. And for authentication i can get profiles. Entities: [Table("USER_AUTHENTICATION")] public class Authentica...
{ "pile_set_name": "StackExchange" }
Q: Using sqlalchemy scoped_session in theading.Thread I'm having problems using sqlalchemy together with threading. import queue import threading import sqlalchemy from sqlalchemy import create_engine, Column, Integer, String, Sequence from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm impor...
{ "pile_set_name": "StackExchange" }
Q: How to use ngModelChange with Pipe Here is the follow Html input : <input matInput [ngModel]="myDates[i][month]|number:'1.2-2'" (ngModelChange)="myDates[i][month]=$event" (blur)="singleUpdate('cargo', j + 1, myDates[i][month], i)"> in this case, when I input 1, the result become 1.00 However when I input 12, the ...
{ "pile_set_name": "StackExchange" }
Q: If then command yielding string as output in r I am trying to calculate after-tax income for each household in a data frame like this: id hhinc 1 1 53880 2 2 49501 3 3 37525 4 4 28791 5 5 91049 6 6 133000 7 7 12299 8 8 23000 9 9 58100 ...
{ "pile_set_name": "StackExchange" }
Q: Improve performance of ggplotly when plotting time-series heatmap I'm building an interactive time-series heatmap in R using Plotly and Shiny. As part of this process, I'm re-coding heatmap values from continuous to ordinal format - so I have a heatmap where six colours represent specific count categories, and tho...
{ "pile_set_name": "StackExchange" }
Q: Launcher icon in Android not showing Are there any special guidelines to put launcher icon in Android 7.1.1 ? Because I added a logo in manifest file and its showing in all Android versions but not in my phone. Anyone got a clue? A: In Manifest.xml, please check have to set icons for both android:icon="@mipmap/i...
{ "pile_set_name": "StackExchange" }
Q: git push heroku master takes forever I'm using a VM based on Ubuntu 12.04 (ruby 1.9.2p290 and rails 3.1.0) and my app work perfectly on local. I'm using git and when I try to git push heroku master it doesn't work: git push heroku master I get: "Counting objects: 435, done. Compressing objects: 100% (215/215), don...
{ "pile_set_name": "StackExchange" }
Q: Retrieve current and localized month instead of writing array of months in desired language, and doing a function to replace date('m') with localized month... I believe there should be some fast and easy way to echo current month, after all its Wordpress? I have define('WPLANG', 'hr'); A: global $wp_locale; ech...
{ "pile_set_name": "StackExchange" }
Q: escaping $ sign for String.replace At following String.replace line, lossLocation.state$ , the $ sign is removed after the replace, i need to keep the $, as it is used in the variable. '{0}'.replace( '{0}' , 'categories.Country === \'$formData.lossLocation.state$\'.toUpperCase()') It gives me "ca...
{ "pile_set_name": "StackExchange" }
Q: How to write while members of class still exist in page condition In jquery or js, preferably jQuery or js that is well supported, how can I do a while with the condition that there are still members of the class on the page. What I am doing in the suite of the while is systematically removing the elements in the ...
{ "pile_set_name": "StackExchange" }
Q: Using Python's UUID to generate unique IDs, should I still check for duplicates? I'm using Python's UUID function to create unique IDs for objects to be stored in a database: >>> import uuid >>> print uuid.uuid4() 2eec67d5-450a-48d4-a92f-e387530b1b8b Is it ok to assume that this is indeed a unique ID? Or should ...
{ "pile_set_name": "StackExchange" }
Q: Passing method parameters/arguments to method reference - bind, anonymous, named I have multiple places in my code where i use method references(i.e. just the method name with no arguments) but I need to pass it specefic arguments. I don't want to insert an anonymous method b.c. it makes the code unreadable. I've...
{ "pile_set_name": "StackExchange" }
Q: Is the use of "de" mandatory or optional here? And what function does it serve? Rien ne me met plus en transe que d'affronter un adversaire très fort. Rien ne me ferait plus plaisir que de vous revoir. Je pensais que de savoir ce qui s'était réellement passé m'apaiserait. When you say "Affronter un adversaire trè...
{ "pile_set_name": "StackExchange" }
Q: Adding together GetCount Results Is there anyway to add together GetCount Results? I am using GetCount to find the number of selected features for multiple layers but when I try to add them all together I get an error message saying it is an unsupported operand type for +: 'Result' and 'Result'. SampledFaild = arc...
{ "pile_set_name": "StackExchange" }
Q: Why does SWT Table has spaces between columns in Windows 7 I asked a similar question before (it has all the screenshot and everything): SWT Table.setLinesVisible(false) does not seem to work on Windows 7 After digging deeper, I observed two (surprising) things: It actually has nothing to do with setLinesVisible(...
{ "pile_set_name": "StackExchange" }
Q: How to disable Javascript when using Selenium by JAVA? I'm using selenium for web test by JAVA. I want to stop JavaScript on Firefox Browser,Google Chrome Browser,IE Browser. I tried this code on Firefox Browser. FirefoxProfile profile = new FirefoxProfile(); profile.setPreference("javascript.enabled", false); Web...
{ "pile_set_name": "StackExchange" }
Q: Coercing the value of a shapeless record I have a wrapper around a shapeless record. I want to extract a value from that record, and prove that it is an instance of a polymorphic type, e.g. List[_] import shapeless._ import shapeless.record._ import shapeless.ops.record._ import shapeless.syntax.singleton._ case ...
{ "pile_set_name": "StackExchange" }
Q: Is there a realloc equivalent in C++? In C, we have malloc(), free(), and realloc(). In C++ we have new(), delete() and their array versions. Is there a C++ realloc function? I'm implementing some low level stuff in embedded land and just realized there was no realloc function to pair up with the C++ functions ...
{ "pile_set_name": "StackExchange" }
Q: Select random document with filter with pymongo? I found, that to select random document, I need to use $sample command: // Get one random document from the mycoll collection. db.mycoll.aggregate( { $sample: { size: 1 } } ) but what if I need to filter documents and THEN take random one? I am processing docume...
{ "pile_set_name": "StackExchange" }
Q: div with dynamic min-height based on browser window height I have three div elements: one as a header, one as a footer, and a center content div. the div in the center needs to expand automatically with content, but I would like a min-height such that the bottom div always at least reaches the bottom of the windo...
{ "pile_set_name": "StackExchange" }
Q: Getting DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true I'm getting DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true line 1 of https://core4.gatewayedi.com/v1/caqhcoreiv/caqhcorev4.svc?wsdl error wh...
{ "pile_set_name": "StackExchange" }
Q: between query for dates not working as i want i am working on SQL query which take records between two dates "from" To "to" as show in below picture.my query working well but when i change "to" date from 24 to 23 then it does not display the record of 23 date,means last row not display. my SQL query is given bel...
{ "pile_set_name": "StackExchange" }
Q: Package listings and Perl here documents with apostrophes I sometimes write ordinary English prose in my here documents in a Perl usage sub, for example --[no]alias [don't] use the alias list in the ini file (default noalias) The problem is the a single apostrophe seems to disturb the listings package. A shor...
{ "pile_set_name": "StackExchange" }
Q: C# Get SQL Logs I've searched extensively for help but have found nothing, what I'm trying to do is backup the SQL log files (Management > SQL Server Logs) to a csv or text file. Is there a way to do this with C#? A: From http://technet.microsoft.com/en-us/library/ms187885(v=sql.105).aspx View the SQL Server er...
{ "pile_set_name": "StackExchange" }
Q: NullReferenceException in VB.NET after upgrade to 4.0 I have a VB.NET solution that I just upgraded. It was originally in .NET 1.1, I upgraded to .NET 2.0 and verified that it would build and run correctly. Then I upgraded from 2.0 to 4.0. It is still building with no errors, but when I try to run I am getting ...
{ "pile_set_name": "StackExchange" }
Q: O if do codigo php não executa só o else <form method="GET"> salário: <input type="number" name="salario"> <br> tempo de serviço (em meses): <input type="number" name="tds"> <br> n° reclamações: <input type="number" name="rec"> <br> <input type="submit" name="calcular"> </form> <?php if (!empty($_...
{ "pile_set_name": "StackExchange" }
Q: Java: Runtime.exec to get Linux distro name I would like to check distro name, but I have got problem with bash executing command. Why this code works ok and print folder content String cmd[] = {"ls","-a"}; Runtime run = Runtime.getRuntime(); try { Process proc = run.exec(cmd); BufferedReader read=new Buf...
{ "pile_set_name": "StackExchange" }
Q: Saving images to localStorage using fetch() and blob() Unfortunately there aren't any working examples of a code mentioned in the title. All found around were either a bit old-fashioned like canvas or too long. fetch('https://www.stevensegallery.com/320/240') .then(pic => pic.blob()) .then(pic => localStorage[...
{ "pile_set_name": "StackExchange" }
Q: Что за Команда sudo apt-get install software-properties-common sudo apt-get install software-properties-common что она ставит? A: Как описано в apt-show software-properties-common Это программное обеспечение обеспечивает абстракцию используемых репозиториев apt. Это позволяет вам легко управлять своими ди...
{ "pile_set_name": "StackExchange" }
Q: Sublime Text 2 doesn't stay pinned to the launcher I use Sublime Text 2 in Ubuntu. The program downloads and runs on it's own without an installer (sort of like a portable app, I guess). When I pin it to the launcher, it only stays until I restart the computer. Then I have to dig it up again and repin it. This...
{ "pile_set_name": "StackExchange" }
Q: Include arbitrary field in Rails model JSON output I'm using Rails as a REST server, and one of my models has a description field. In that model's JSON representation, I need to output both the regular description field AND an arbitrary non-DB attribute called description_markdown that is just the description run ...
{ "pile_set_name": "StackExchange" }
Q: In Python, why is my for-loop excluding the number before a specific number only when that number is the last in the array? I am working on a codingbat problem, and I am getting unexpected results when the excluded number is at the end of the array. def sum13(nums): a = [] if len(nums) == 0: return 0 fo...
{ "pile_set_name": "StackExchange" }
Q: Does a long time storage wallet need to be online? I have a offline computer that has never been connected to a network. I use this computer for long time storage of sensitive data, all data transfer to and from this computer is done by USB memory. I want to move most of my bitcoins to this computer, so will it wo...
{ "pile_set_name": "StackExchange" }
Q: What is the difference between String.Empty and "" (empty string)? In .NET, what is the difference between String.Empty and "", and are they interchangable, or is there some underlying reference or Localization issues around equality that String.Empty will ensure are not a problem? A: In .NET prior to version 2....
{ "pile_set_name": "StackExchange" }
Q: How do I treat elements in a list as variables inside a module? I want to be able to assign values to a list element inside a module. For example if I have: testscan[listin_] := Module[{zz}, Do[listin[[1]] = zz; Print[{zz, listin[[1]]}], {zz, 1, 2, 1}]] Given: testscan[{a, 1, 3, 1}] Returns: {1,a} {2,a} W...
{ "pile_set_name": "StackExchange" }
Q: TFS 2015 - Build failed due to exception in the test assemblies I am trying to run a newly created Build in TFS but i am getting an error as shown in the screenshot below : Build Configuration I tried to debug the Unit Test project on my machine and even on the TFS server, it worked fine. So i am not able to und...
{ "pile_set_name": "StackExchange" }
Q: load data from cache with NSURL doesn't work i'm trying to load a photo from my cache directory. this is the code where i write the photo into a cache folder: +(BOOL)writeAData:(NSData *)imageData atURL:(NSURL *)fileUrl { return [imageData writeToURL:fileUrl atomically:YES]; } this code works fine, but i have...
{ "pile_set_name": "StackExchange" }
Q: CURL PHP POST interferes with JSON I currently have an API script that returns JSON. It has worked up until I tried to add in a curl php POST script before it. The curl script is working on it's own, and it is also working in the API script. However the JSON code is not being returned. Is there something fundament...
{ "pile_set_name": "StackExchange" }
Q: Can't bind params using [FromQuery] ASP Net Core 2 API I'm new in ASP Net Core 2, I want to bind different parameters that come from URL query string to action parameters in my action: [HttpGet("{page}&{pageSize}&{predicate}", Name = "GetBuildingsBySearchCriteria")] public IActionResult GetBuildingsBySearchCriteri...
{ "pile_set_name": "StackExchange" }
Q: absolute ignoring parent padding I am using bootstrap and I am trying to create my own dropdown menu on right side. I Tried below css.But its ignoring parents padding.But when I use position : relative Its working fine but its pushing the text contents down.So I want absolute overlay but also Preserve the parent p...
{ "pile_set_name": "StackExchange" }
Q: Removing forks in a shell script so that it runs well in Cygwin I'm trying to run a shell script on windows in Cygwin. The problem I'm having is that it runs extremely slowly in the following section of code. From a bit of googling, I believe its due to there being a large amount of fork() calls within the script ...
{ "pile_set_name": "StackExchange" }
Q: Condensing Batch File to a Single Line I'm programatically creating a batch file. Limitations in the language I'm using (old delphi) mean I can't write to separate lines to the .bat. So my batch has to be a single line. I have read this and was able to condense a few of the lines. But using the double ampersands &...
{ "pile_set_name": "StackExchange" }
Q: How to trim off symbols from NSNumber? Im making an iOS app to do with currency. My app receives the value of maybe: $4. This value the app receives is put into an NSNumber. The trouble is the value actualy has a $ in it. How do I trim out the $ in the NSNumber? Or would I be better of putting it into an NSString?...
{ "pile_set_name": "StackExchange" }
Q: Problem with Regex.Match vs Regex.IsMatch i'm trying to replace a text which contains url's with the text with the tags and i'm trying to use something like this, but i just don't get why this is not working, maybe i'm too tired too see it. Here goes my test: [Test] public void Check() { string ex...
{ "pile_set_name": "StackExchange" }
Q: Android: Making the width and the height of a custom view equal I am using a custom view (CoordinateGridView) in XML like this: <com.android.catvehicle.CoordinateGridView android:id="@+id/coordinateGrid" android:layout_width="fill_parent" android:layout_height="fill_parent"/> I am trying to get the wi...
{ "pile_set_name": "StackExchange" }
Q: select and modify material in a three.js scene i have a scene(object) json file with this structure that i load with ObjectLoader. Once added in a scene i want to modify texture to add parameters like THREE.SmoothShading, add an envMap... i know how to find an object: var obj = scene.getObjectByName( "bas", tru...
{ "pile_set_name": "StackExchange" }
Q: How to retrieve the original file name using PowerShell Suppose I renamed multiple files by mistake and now I want change the file name as it was earlier. example: The original name of file was “Test” through PowerShell we renamed it to “Tested” and again we want to retrieve the original name back and I don’t reme...
{ "pile_set_name": "StackExchange" }
Q: Bootstrap 4 column order not working on mobile I want to use order-width-pos from bootstrap 4 but for some reason its not working on the mobile view. It works fine up until the point where it snaps to the mobile viewsize and I dont know why. https://codepen.io/anon/pen/zRpQeG <link rel="stylesheet" href="https://...
{ "pile_set_name": "StackExchange" }
Q: How to resolve Array Index OutOfBoundsException I have the below code. When I execute it, I get the below error. I run the same code in another step, it works fine, but in the current step it fails. java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 17 +++++++++++++++++++++++++++++...
{ "pile_set_name": "StackExchange" }
Q: try/except in django, good practices This part of code represents a index of my web page eg: 127.0.0.1:8000/ def IndexView(request): try: profile = request.user.get_profile() except User.DoesNotExist: return render_to_response('index.html', {'request': reques...
{ "pile_set_name": "StackExchange" }
Q: How to fetch records according to largest first How to fetch records according to largest first? Example SELECT marks FROM students marks 50 20 80 65 35 But I want to fetch details according to highest marks like this Marks 80 65 50 35 20 A: You should just user ORDER BY the column you wa...
{ "pile_set_name": "StackExchange" }
Q: How many ways can a from be filled out? In a survey, viewers are given a list of 20 TV programmes. They are asked to label their three favourites 1, 2 and 3, and to put a tick against those they have heard of (if any) from the remaining 17. In how many ways can the form be filled out? (Assume that everyone has thre...
{ "pile_set_name": "StackExchange" }
Q: Sending JSON to PHP using ajax, troubles with data my javascript won't go into my Database.php file. Anyone knows what's wrong? I know there is another thread with this question but it just doesn't work for me. I have this in javascript var Score = 5; //Score insert var postData = { "Scor...
{ "pile_set_name": "StackExchange" }
Q: What is being said in the purely Native American language scenes in Jim Jarmusch’s “Dead Man?” While Jim Jarmusch’s film Dead Man (1995) is a 19th century American period piece that contains mostly American English dialogue, there are a few scenes in the film that are spoken purely in Native American languages wit...
{ "pile_set_name": "StackExchange" }
Q: What does "do sea on classes" mean? I see this sentence on https://twitter.com/jfbastien/status/1003697787911966720 A: I've made my submissions for @cpponsea, have you? B: Sorry, I only do Sea on Classes C: you can do classes on the sea at C++ on Sea - and in class, too Google tells me nothing: do sea do sea o...
{ "pile_set_name": "StackExchange" }
Q: how to writhe a Php inside HTML with substr I write this bellow code <div class="description"><?php echo substr($data['description'],strpos($data['description'],$info['title']),100); ?></div> when I change method to this bellow code I get an error!! <?php echo'<div class="description">'.substr('.$data['descripti...
{ "pile_set_name": "StackExchange" }
Q: Installed trigger app, installed node.js, trigger says it can't run npm on Mac New Mac user account. I install the Trigger.io (TriggerToolkit) app for the Mac. It fires up a tab with the apps. I can run the iOS simulator from it - so it is plausibly working installation. I have installed node.js from the node.js w...
{ "pile_set_name": "StackExchange" }
Q: socket.io - emitting from within an anonymous function I am quite new to the world of async. I am trying to do everything with callbacks at first before using any of the libraries out there. I think I have a closure problem, but don't know what to do about it. Here is some code: namespace.on('connection', functi...
{ "pile_set_name": "StackExchange" }
Q: Contradiction in Davis–Putnam–Logemann–Loveland (DPLL) Method?! As we see on page $10,11$ and $12$ on Google Books we know about Unit Clause (UC) and Pure Literal (PL) in DPLL Algorithms. in the following example if assign value $0$ to variables is prior to assign $1$ to variables, PL and UC is used, but I think ...
{ "pile_set_name": "StackExchange" }
Q: PHP date function producing incorrect result Am currently running the following PHP version on my laptop PHP Version 7.0.31-1+ubuntu16.04.1+deb.sury.org+1 Problem is when i run the below piece of code echo date('b e, Y', strtotime('2013-02-01')); i get the following output b Africa/Nairobi, 2013 and yet it is s...
{ "pile_set_name": "StackExchange" }
Q: How to add a circle shaped button with swift? I am trying to make this simple UI Now the orange and darkblue are simple two views (the darkblue will have a nested tableview), but how would i make the button with some simple animation? Should i use CALayer or can i make use of the Interface Builder? A: I would ha...
{ "pile_set_name": "StackExchange" }
Q: Mechanize not logging in to site properly After spending the best part of 3 hours getting nowhere, i thought i would ask a question myself. i am using python and mechanize's Browser. I am trying to login to my home router. i can get to the login page, fill the password field (eg br.form['password'] = 'mypassword' ...
{ "pile_set_name": "StackExchange" }
Q: Can't deny user access to a library when he is inside the "All Users" group I'm trying to give an user access to just one folder in our main library, first I gave him permission to access the Site and then I went on the folder that I would like him to have access to and stopped inheriting the permissions, then I a...
{ "pile_set_name": "StackExchange" }
Q: mysqli - php - returning all results from multiple tables There is actually alot of answers for questions like that. But everything I found around here was to Join two tables with "like" values. But that isn't what I need. I want to query two tables, that is almost exactly the same but with different values inside...
{ "pile_set_name": "StackExchange" }
Q: Scrambled number conversion for numbers with 10 or more digits This is a quite simple piece of code. It takes an integer and decomposes its decimal digits using quotient and remainder. On each call, it prints a line with r characters 'I', where r is the last digit, then calls itself with the quotient as its new ar...
{ "pile_set_name": "StackExchange" }
Q: Does inheritance can affect performances of an application? I wonder if performances of an application could be improved by using the more superclasses you can. My question is about Kotlin, but I assume the answer will be the same for Java. Let's say you have this inheritance schema (the right class is a subclas...
{ "pile_set_name": "StackExchange" }
Q: Java GUI shows blank until resize I have written a java gui code for many options available on it. the gui is also set visible true but it doesn't show until I pick its border and drag them to resize the gui window. After manually resizing it, it shows everything. Also, the textlabels and the textfields and button...
{ "pile_set_name": "StackExchange" }
Q: Overloading [ ] with a template type I have a class that takes 2 template types, one for key (K) and one for value (V). When trying to overload square brackets, I get an error saying "no operator "[]" matches these operands. template <typename K, typename V> class MyMap { KeyPair<K, V>* Pairs; int Count = ...
{ "pile_set_name": "StackExchange" }
Q: Como preencher setText do TextView a partir de um ArrayList? Eu recebo um array com itens de interesses e devo setá-los no setText de um determinado TextView. Quero que apareçam todos os itens deste array, na tela, na horizontal. Em meu xml de layout, somente coloquei 1 textView para receber todos os itens que vie...
{ "pile_set_name": "StackExchange" }
Q: Does the property of "reflecting monomorphisms" for a functor, implies its faithfulness? I can see why If $F$ is faithful, then it reflects monomorphisms. My question is does the inverse holds? More generally, I would like to ask: What are the alternative ways of defining the faithfulness of functors (Apart fro...
{ "pile_set_name": "StackExchange" }
Q: Sextortion with actual password not found in leaks I have received one of those typical sextortion scams ("drive-by exploit", filmed by webcam (mine has tape on it), pay bitcoin etc.). The thing is that an old password of mine is included (I don't even remember where I used it), but searching the password on HaveI...
{ "pile_set_name": "StackExchange" }
Q: Android - How to get saved contact id I want to get saved contact id and i used following way to retrieve it but the problem is it's returning the wrong id. public static String addContact(FragmentActivity activity, String displayname, String mobilenumber, String homeemail) { String DisplayName = displayname; ...
{ "pile_set_name": "StackExchange" }
Q: sort не работает с std::bind Почему код не работает, если вместо 3 вставить число меньше 6. И как это можно исправить? Код должен сортировать вектор с помощью функтора std::greater, который должен применять 1 параметр. Сделать это нужно с помощью std::bind. #include <set> #include <algorithm> #include <iostream> ...
{ "pile_set_name": "StackExchange" }
Q: In Peano arithmetic, can we define inequality using successor? In Peano arithmetic (first order), we first define natural numbers using a successor function and Peano axioms, then we define addition (and multiplication), and then, we define inequality, as: $a\leq b\leftrightarrow\exists c\left(a+c=b\right)$ Is th...
{ "pile_set_name": "StackExchange" }
Q: Creating pandas series from two given pd.Series I'm having a pandas issue. So I have a pd.Series, serie_1, that looks like the following: timestamp 2010-05-01 2 2010-06-01 1 2010-07-01 2 2010-08-01 3 2010-09-01 0 2010-10-01 5 And I have another pd.Series, serie_2, that looks like the...
{ "pile_set_name": "StackExchange" }
Q: generating html from xml+xslt from jdeveloper When I am trying to generate HTML from XML+XSLT in jdeveloper 10g using a java class I am getting following error XML-22108: (Error) Invalid Source - URL format is incorrect. XML-22000: (Fatal Error) Error while parsing XSL file (no protocol: headerMenu.xsl) But when...
{ "pile_set_name": "StackExchange" }
Q: How to use `java2wsdl` on a class that `implements`? I am generating wsdl using java2wsd. My class is public class REWS {...}. I just added implements HttpSessionListener like so: public class REWS implements HttpSessionListener {...} and I started getting the NoClassDefFoundError error for HttpSessionListen...
{ "pile_set_name": "StackExchange" }
Q: How to dump all the XMM registers in gdb? I can dump the all the integer registers in gdb with just: info registers for the xmm registers (intel) I need a file like: print $xmm0 print $xmm1 ... print $xmm15 and then source that file. Is there an easier way? A: (gdb) apropos registers collect -- Specify one or...
{ "pile_set_name": "StackExchange" }
Q: Behavior of Non-Hyperbolic Equilibria? So I'm working on a differential equation problem concerning epidemics - we're using the Kermack-McKendrick model. I've reached a point where I need to sketch phase portraits near my equilibria, however, I'm a little lost with my results. After evaluating my equilibria via ...
{ "pile_set_name": "StackExchange" }
Q: How not to reload Spacy? When using Spacy and cross importing functions that use it, I would like to avoid having to reload the language models. Should I pass the loaded model (often named nlp()) as a parameter ? Or is there something more elegant / efficient to do ? E.g. of what I have today: module.py nlp = s...
{ "pile_set_name": "StackExchange" }
Q: I dropped my Nikon D5100 and the mirror was stuck ... and i was able to fix that with a small screwdriver putting it back into place with help of a youtube video. The problem i have now is that when i take a picture through the viewfinder of my camera, it looks different then when i take it via live view. I will a...
{ "pile_set_name": "StackExchange" }
Q: Expand an edittext dynamically I would like to do the following on Android: Click on an image --> an icon on the touched spot should appear When I click that spot again, an EditText should appear This EditText should expand dynamically when I type in stuff The original image should be saved with the EditText and ...
{ "pile_set_name": "StackExchange" }
Q: If $X$ is a complete, separable, and perfect metric space, then a map $f$ is topologically transitive if and only if it has a dense orbit. Let $X$ be a complete, separable, and perfect metric space. I'm trying to show that for map $f : X \rightarrow X$, topological transitivity is equivalent to having a dense orbi...
{ "pile_set_name": "StackExchange" }
Q: Is it good practice to add a column specifying test set and train set? I found a tutorial a while back but cannot locate it again that created an extra column in both the train and the test set that specified true or false for being the training set. I have the code but could not locate where I found it. titanic....
{ "pile_set_name": "StackExchange" }
Q: QmlApplicationViewer::setFixedSize does not reflect the same size in xwininfo How can one control the size of QmlApplicationViewer ? I am using QmlApplicationViewer as a launcher for QML application, and in QML, I set size as... QmlApplicationViewer viewer; viewer.setFixedSize(1280,720); but on X11 side, if i q...
{ "pile_set_name": "StackExchange" }
Q: Recommended approaches for making my code swiggable? I'm currently refactoring a Tcl plugin library written in C++. Originally the code was hand-written. A second library exists that does the same thing for Java. The refactored library will be a single C++ library that can be used to create bindings to different l...
{ "pile_set_name": "StackExchange" }