text
stringlengths
15
59.8k
meta
dict
Q: How to extract particular properties from generic list based on property name sent as string array? I have a Generic List of type List<InstanceDataLog> which has huge number of properties in it. I want to pass names of a few properties to a method and want to extract a refined List from within this list. public void...
{ "language": "en", "url": "https://stackoverflow.com/questions/40863405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Getting started with JSON in .net and mono I would like to keep a custom configuration file for my app and JSON seems like an appropriate format*. I know that there are JSON libraries for .NET, but I couldn't find a good comparative review of them. Also, my app needs to run on mono, so it's even harder to find out ...
{ "language": "en", "url": "https://stackoverflow.com/questions/3926079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Need a way to add a button to this android xamarin sample I used this sample here : https://github.com/xamarin/xamarin-forms-samples/blob/master/CustomRenderers/View/Droid/CameraPreview.cs to get a camera feed on my project. On the IOS part, I easily added a takepicture button over the camera feed. Im trying to do t...
{ "language": "en", "url": "https://stackoverflow.com/questions/50767653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Not able to load keycloak authentication page from application, calling protected resource with ajax request I have configured keycloak for IAM with gatekeeper as a proxy. When I call protected resource from my angular application through ajax request, it's not redirecting me to login page of keycloak, although in b...
{ "language": "en", "url": "https://stackoverflow.com/questions/63751399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Required Field Missing. PHP Paypal REST API I'm currently trying to use the PHP PayPal REST API. However, it seems I am unable to pass a list of items through a transaction because "required field(s) are missing". $item = new Item(); $item->setQuantity("1"); $item->setName("stuff"); $item->setPrice("305.00"); $item-...
{ "language": "en", "url": "https://stackoverflow.com/questions/16075411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Argument 1 passed to setArchived() must be an instance of bool, boolean given I have this property /** * @ORM\Column(columnDefinition="TINYINT DEFAULT 0 NOT NULL") */ private $archived; on save Doctrine execute this: /** * @ORM\PrePersist * @ORM\PreUpdate */ public function updatedDefaults() { if($this->g...
{ "language": "en", "url": "https://stackoverflow.com/questions/24633508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Regex in online test tool works well, but misses many matches when applied in application As the title says, my regex in the online tester works, but it is less effective (i.e. missing some matches) when I use it in my application. I am working on an application to get quotes from wikiquotes and present them to a u...
{ "language": "en", "url": "https://stackoverflow.com/questions/48841623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to access physical file in OrchardProject? I have a blog that is using the OrchardProject CMS. One thing I noticed is that if I add a file to the root of my website, and access it via www.example.com/test.html, I get a 404 error. Does OrchardProject have a restriction on this? A: You need to put a handler entr...
{ "language": "en", "url": "https://stackoverflow.com/questions/29663994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why does cv2 mask + imwrite reduce image detail? I have a 1.17 Gb tiff ('heatmap') which I want to crop to the outline of another 425.7 Mb tiff ('pavement'). The heatmap contains subtle color shading that I want to keep in the final image. I'm using a bitwise_and operation to apply the pavement image as a mask, and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64163118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: conan install --build fails due to mismatching versions even after changing default I am using conan to handle dependencies and I have already been able to compile and run the project by running individual steps like source and build. I however want to be able to install and build in a single step, and for that purp...
{ "language": "en", "url": "https://stackoverflow.com/questions/68605531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to populate a table in SQL In table 1 of my database is a column called Product Title, some of the products have the same name. However, they have different prices. There is also a column called Product Version. This could be filled with Sale Price, Master Retail Price, Black Friday Price. For all of the the pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/44232365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Recursive xmlhttp Request Not Changing I'm not sure what's happening here. I've hit a wall while trying to debug this. I have the below xmlhttp request and have set it up to do a recursive call every 3 seconds to a public API. The problem I'm having is every call returns the exact same object, but if I refresh the p...
{ "language": "en", "url": "https://stackoverflow.com/questions/28416108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: javascript/jquery simple search engine - implement a simple search engine, data stored in an array Question is Edited! I have stored all products name in an Array in object format. I have a input[type=text], too. I need a simple code to search among this array. SQL command is like : (SELECT name FROM tbl_product WHE...
{ "language": "en", "url": "https://stackoverflow.com/questions/62262138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Outer Joins of dataframe Need to join one main dataframe in such a way that for a given primary data is not present in all others data frames then row from main frame should not be returned . Example is shown in excel. In example you will find org code 876 is removed A: You could do an inner join of main_df with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75597527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: where best to define enumerations java? Is there a "best practice" for the place at which an enum should be defined in java? One option is to have a separate .java file for each enum, and any class that uses that enum can include it. example: Direction.java: public enum Direction { INPUT, OUTPUT, UNKNOWN } Type...
{ "language": "en", "url": "https://stackoverflow.com/questions/27369145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Svelte component async loading in version 3 I would like to ask you a question about updating a simple example from version 2 to version 3. This example of svelte v2 async component loading works (https://codesandbox.io/s/0ooo3z8nqp), but this one written for v3 doesn't (https://codesandbox.io/s/615zv3xp33). Any c...
{ "language": "en", "url": "https://stackoverflow.com/questions/56010077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Room dao cannot resolve table name and method I'm trying to implement a simple database using Room and Dao, this is what I did My entity: public class Note { @PrimaryKey(autoGenerate = true) private int id; @ColumnInfo(name = "title") private String title; } I have also generated all getters and s...
{ "language": "en", "url": "https://stackoverflow.com/questions/73508562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: need to read the json arrays inside the object using java I am trying to read the JSON using java but unable to do that. So need to write a java code read the JSON file where arrays are inside the object. "exclusion":{ "serviceLevelList":[ "SIS98", "C4P","SNTP" ], "pid":[ "ABC", "DEF" ] } A: Use JSON...
{ "language": "en", "url": "https://stackoverflow.com/questions/54664416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How to tell if a param was passed assuming it was a constant? I am using this code (note: HELLO_WORLD was NEVER defined!): function my_function($Foo) { //... } my_function(HELLO_WORLD); HELLO_WORLD might be defined, it might not. I want to know if it was passed and if HELLO_WORLD was passed assuming it was as ...
{ "language": "en", "url": "https://stackoverflow.com/questions/18200992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Autopopulate a set of generic many to many fields in Django? I'm trying to combine this answer and this one, with a bit of for looping. On creating a character, I want to add all possible skills with a value of 0 but I'm getting confused on how to follow the above answers. I have this mixin: class CrossCharacterMixi...
{ "language": "en", "url": "https://stackoverflow.com/questions/28437208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Run Angular and ASP.NET Web API on the same port I am currently using angular to issue API call to an API server running ASP.NET. However, I have a cross-origin issue as for angular development, I am using localhost. While in the production version they will all run under the same domain using IIS. Is there a way t...
{ "language": "en", "url": "https://stackoverflow.com/questions/50753407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Creating an Indexvariable in R based on several Indexvariables I'm looking for a fast and easy alternative in R to create new Indexvariables out of several existing Indexvariables. Eg: var1 var2 var3 newvar 0 1 1 1 0 0 0 0 1 0 0 1 1 1 1 1 1 0 9 1 1 9 9 1 0 9 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/33759188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get dataset from prepare_data() to setup() in PyTorch Lightning I made my own dataset using NumPy in the prepare_data() methods using the DataModules method of PyTorch Lightning. Now, I want to pass the data into the setup() method to split into training and validation. import numpy as np import pytorch_ligh...
{ "language": "en", "url": "https://stackoverflow.com/questions/67441163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Laravel 302 redirection when I do a POST I am having a problem with Laravel. I try to do a POST with JQuery to my Controller, but when I do that, I recieve a HTTP 302 code (found), and after that It creates a GET to the same controller URL. Here there is my code: WizardController.php class WizardController extends C...
{ "language": "en", "url": "https://stackoverflow.com/questions/51132595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP Email Form Formatting I have, with the help of a few users here - created a form that sends data (name, checkbox awnsers) to my email. However, when I recieve the email it is wrongly formatted and thus not very useful to me. My code is below: PHP (mailer.php) <?php if(isset($_POST['submit'])) { $to = "myemail@e...
{ "language": "en", "url": "https://stackoverflow.com/questions/23927239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I stop brute-force attack to keep documents secure inside folder? Example: if we hit the link of any document then we can easily download it. for example backup.sql inside the backup folder of the website then we can download it by hitting URL www.example.com/backup/backup.sql I don't know which type of docu...
{ "language": "en", "url": "https://stackoverflow.com/questions/57058856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: SQLDependency Onchange event always firing without data change I'm using it on a console project. .NET Framework: 4.5 In my test code, SQLDependency onChange always firing although there is no data changes in Database. class Program { private static string _connStr; static void Main(string[] args) { _connStr =...
{ "language": "en", "url": "https://stackoverflow.com/questions/29726738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Plot day events from date and value in Gnuplot I have data of this format: 2011-06-22 22:33:19 23 15 2011-06-23 09:46:13 12 79 2011-06-24 12:31:09 31 4 2011-06-24 17:34:10 7 2 2011-06-25 16:42:43 44 14 2011-06-25 20:26:52 54 9 2011-06-26 19:34:29 217 28 How can I create a histogram of daily activities...
{ "language": "en", "url": "https://stackoverflow.com/questions/6563251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Azure B2C Impersonated User access token to call web API? I am successfully using the Impersonation custom policy (https://github.com/azure-ad-b2c/samples/tree/master/policies/impersonation) to get an ID token for the user I am trying to impersonate. However, when I call a web API (that is also secured by Azure B2C)...
{ "language": "en", "url": "https://stackoverflow.com/questions/75550573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Merging two mostly similar adapters for recyclerview I have two adapters that adapt to a recycler view depending on different conditions. I want to merge them. The issue is that I created first in the same file as the activity where it is being used and the other is in a new file. Take it as follows: DefaultAdapter ...
{ "language": "en", "url": "https://stackoverflow.com/questions/58716686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: statsd architecture for a distributed system I am studying to use the graphite - statsd - collectd stack to monitor a a distributed system. I have tested the components (graphite-web, carbon, whisper, statsd, collectd and grafana) in a local instance. However I'm confused about how I should distributed these compone...
{ "language": "en", "url": "https://stackoverflow.com/questions/32719081", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Creating a mailto link in codebehind for a dynamically generated gridview I am working on an internal directory service for my school and am having a problem creating "mailto:" links on a dynamically generated gridview from the codebehind. After tinkering around for a while with this, I found out that Hyperlinkfield...
{ "language": "en", "url": "https://stackoverflow.com/questions/24249863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ChartJS v2: Scale value at click coordinates (time scale) I have a time-base line chart and I'm attempting to obtain the values for each scale at the click coordinates. My onClick function specified in ChartJS options: onClick: function(event, elementsAtEvent) { console.log(event, elementsAtEvent, this); var...
{ "language": "en", "url": "https://stackoverflow.com/questions/37141313", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why does a Rust macro re-exported from another crate work unless there's a dependency conflict I'm writing a Rust crate for internal company use that wraps the excellent Tokio tracing crate, with a bit of additional functionality. Not only do I re-export the macros in tracing, but I also add a few of my own that in...
{ "language": "en", "url": "https://stackoverflow.com/questions/60305272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Why does C++ has an additional class name declaration? why do we have to declarer a class name in C++ like: class MDT_DECL Transfer{ // declaration goes here }; ? What's the reason for the <DIRNAME>_DECL? I see it's especially used when the code needs to be compiled in Windows A: You don't have to. But in win...
{ "language": "en", "url": "https://stackoverflow.com/questions/11693338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Python Reading JSON as Binary I need to parse a file with JSONs in it. File format is txt and content is like below: {"key_1":"value_1", ....., "key_n":"value_n"} {"key_1":"value_1", ....., "key_n":"value_n"} ...... There is no association between JSONs they are just in the file consecutively. They also includes no...
{ "language": "en", "url": "https://stackoverflow.com/questions/59248219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why ZipEntry fails to work in Jelly Bean I have a ZIP file of 140 MB containing about 40 thousand MP3 files. I use the following code to play a certain file inside the ZIP file without decompressing it: String fullPath = Environment.getExternalStorageDirectory().getPath() + "_audio_.mp3"; String path = Environment.g...
{ "language": "en", "url": "https://stackoverflow.com/questions/19655841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to make jQuery UI Draggable/Droppable work properly in this case I have a floating toolbar with tools buttons in it. The toolbar itself is draggable using its header with title "Basic tools". Below the toolbar there is a workspace filling the whole page. Buttons on the toolbar are draggable too and droppable to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/11754221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why my csv file doesn't pass the internal CSVHelper test? i'm trying to use CSVHelper inside my project. I created that files: * *JobApplicationMap.cs *JobApplicationModel.cs *ICsvParserService.cs *CsvParserService.cs *JobApplicationCSV.cs *Constants.cs But after executing the JobApplicationCSV.WriteCSV metho...
{ "language": "en", "url": "https://stackoverflow.com/questions/64211271", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to ignore mv error? I'm making a Makefile that moves an output file (foo.o) to a different directory (baz). The output file moves as desired to the directory. However since make won't recompile the output file if I type make again, mv gets an error when it tries to move the non-existent empty file to the directo...
{ "language": "en", "url": "https://stackoverflow.com/questions/3143635", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Add data two tables Sequelize Here its my problem. I create a Api rest in nodejs where i manage my database. I have 3 tables: bets, users and users-bets (this one link bets with users). Well my problem is when im using Sequelize to do this. In my webpage, its an Angular2 app, i want to create a new bet so when i fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/44263515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I see if any values in one data frame exist in any other data frame? I have eight data frames, all of which contain an id field and I want to know if any of the id values are common among all eight data frames. I'm not looking for an intersection (where the values are common across all data frames); I simply...
{ "language": "en", "url": "https://stackoverflow.com/questions/67987370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: storing user data in firebase with unique identifiers I have a publicly accessible app. No sign in is required but I need a way to store user data in the database as an object associated with a unique key. From what I understand, tokens would be a way to get a unique identifier from firebase(??) I tried creating an ...
{ "language": "en", "url": "https://stackoverflow.com/questions/50264732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Programmatically selecting radios in jQuery buttonset makes it break down I'm building an editor function on a website using a jQuery buttonset based on radio buttons. When I load the item into the editor I need to set the selected radio button and then, of course, the user can change the option and it get's saved i...
{ "language": "en", "url": "https://stackoverflow.com/questions/18954824", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Crash with iOS 8 SceneKit Assets when building over command line I am building a 3D game over command line with. My script works for all other applications without a problem. Unfortunately the built IPA of the game crashes when I start it on my iPhone. If I build it with the Xcode GUI, it works fine. This error only...
{ "language": "en", "url": "https://stackoverflow.com/questions/25913156", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to get the optional parameter values from a constructor using reflection? Given a class like this: public abstract class SomeClass { private string _name; private int _someInt; private int _anotherInt; public SomeClass(string name, int someInt = 10, int anotherInt = 20) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/14009359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I find a .NET remoting memory leak on select machines? The memory leak is not happening on every machine, but reliably on a couple at my work, and it's looking like close to 10% in the field. I have a product that uses a Windows service to monitor user input to launch alerts, paired with a visual application ...
{ "language": "en", "url": "https://stackoverflow.com/questions/1840090", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JQuery - Clear Textboxes I have a drop down list and two textboxes on an ASP.Net MVC 3 view. The drop down lists numbers from 1 to 10. The two textboxes are both wired up to use the JQuery Datepicker. When the user selects an option from the drop down, I would like JQuery code to clear the values in the two textboxe...
{ "language": "en", "url": "https://stackoverflow.com/questions/5079344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Error while buliding pysha3 with pip? ERROR: Failed building wheel for pysha3 when I try to install with pip install pysha3, I get the error "ERROR: Failed building wheel for pysha3". I did already install the Windows build tools. I can't find much help on Google unfortunately. I am on Windows 11. Here is the log ` ...
{ "language": "en", "url": "https://stackoverflow.com/questions/74369660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Gekko: MINLP - Error options.json file not found I am trying to solve a MINLP problem using first the IPOPT solver to get an initial solution then the APOPT to get the mixed integer solution. However, I get the following error when calling the APOPT solver: Error: Exception: Access Violation ...
{ "language": "en", "url": "https://stackoverflow.com/questions/67431986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to convert sample in AWS Lambda from javascript to Java? I currently am trying to convert this javascript sample: javascript 'use strict'; exports.handler = (event, context, callback) => { callback(null, {"speech": "hello lambda js"}); }; output from hitting test button in aws lambda { "speech": "hel...
{ "language": "en", "url": "https://stackoverflow.com/questions/45361091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Kendo UI - custom grid filter: checkbox doesn't work on each click [UPDATE] After I did as in: http://dojo.telerik.com/aqIXa when I click for example ProductName filter, and then select and deselect all items, go to other fields example Unit Price,click select and deselect all I turnback to Product Name field, and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/39510466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Does superclass constructor exist (but not inherited) in subclass? We are able to invoke super() from subclass constructor. Since subclass IS-A superclass , and there is only 1 object created ( new Subclass()) does this imply superclass constructor exists, although it cannot be inherited, in subclass? A: Constructo...
{ "language": "en", "url": "https://stackoverflow.com/questions/29318092", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to call a PHP function in an URL of ajax? I have written a PHP code having single function with an echo statement and I wish to call that function as a url in ajax code. I tired doing this. <html> <head> <title>Writing PHP Function</title> <script> $.ajax( { url : lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/27519266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-7" }
Q: How to redirect a page from '/' route to main '/dashboard' route automatically after first sign in angular js? I have auth.js page which decides which route to direct to after login.I am using ui-router for routing.Now the thing is after login user details are captured and the route accordingly changes.Here if I cha...
{ "language": "en", "url": "https://stackoverflow.com/questions/36146875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get the data from log file using udp appender How to send log details by using udp appender in wowza Media Server . i have uncomment the udp appender in log4j.properties and added serverAccessUDP to root. but i Cant view the result.Where i Can Get the Result? Anybody Help Me Thanks in Advance? A: By usin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7777358", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to save server state of CGI application? I have a cgi web program (in C) that prints out different error messages to a log file. If the program is run again and runs into he same error, I do not want the same error message to log again. I'm looking at different options and any advice is appreciated. Thanks. -Coo...
{ "language": "en", "url": "https://stackoverflow.com/questions/2225579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ViewPager fragmentstatepageadapter getItem isn't passing correct position I have created a viewpager layout, a class that extends FragmentActivity and a fragment. What I want is that each fragment get's passed in what position it is within the viewpager. So first viewpager is created getting the argument 0, second g...
{ "language": "en", "url": "https://stackoverflow.com/questions/14116977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Most viewed product I am trying to find most viewed product as per user ID. If two products have been viewed for the same number of times then the most recent viewed product is to be selected. I have the following coding: #tabulating most viewed product by an user in the last 15 days df_most_viewed_product= new_df.g...
{ "language": "en", "url": "https://stackoverflow.com/questions/68237537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Take and save screenshot with html javascript I'm trying to take a screenshot and save it in a specific folder in my local computer with an onclick in a button, using HTML and JavaScript (or JQuery). A: There's no way to save DOM elements as an image (unless you just use Firefox or something), but you can convert t...
{ "language": "en", "url": "https://stackoverflow.com/questions/63308982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: gcloud app deploy fails with only [ERROR] I've been running python 2.7 apps on GCP for about 5 years and deploying using the App Engine Launcher. Now that AEL is deprecated I'm trying to deploy via gcloud and get "ERROR: (gcloud.app.deploy)" * *I can use gcloud to run the project locally so I have confidence that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/63837650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: My Flutter App is Not Working on Android 11 But Working fine in emulator as well as android 8 || (OS Error: Operation not permitted, errno = 1) Here is My Code import 'package:flutter/material.dart'; import 'package:screenshot/screenshot.dart'; import 'package:sweld/globals.dart'; import 'package:geolocator/geolocat...
{ "language": "en", "url": "https://stackoverflow.com/questions/69314305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: regex get text from next line I'm looking for a way to find text on the next line of a certain string using regex. Say I have the following text: Note: Just some text on this line Some more text here. I just want to get the text 'Just some text on this line'. I don't know exactly what the other text will be, so ...
{ "language": "en", "url": "https://stackoverflow.com/questions/15528352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Max application memory Limit in iPad? I have created iPad application which downloads images using web service. But my application crashes somewhere during manipulating with high quality images. So my question is - what is max memory limit for application running on iPad? When does the application hit LowMemoryWarni...
{ "language": "en", "url": "https://stackoverflow.com/questions/3585094", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Packages to verify the re-rendering in es5 components other than "WhyDidYouRender" Right now I'm using the WhyDidYourender package to verify the component re-rendering but there are few components in my repo that uses es2015. WhyDidYouRender is not working in es2015 components. Seeing below error: TypeError: Class ...
{ "language": "en", "url": "https://stackoverflow.com/questions/60268732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Security - Method returns internal array - Sonar security warning - even when I am returning a clone The below return statement gives me a Sonar security warning even when I am not returning the original array but a clone of it. What is the "correct" way to do this? public String[] getList() { return list!=n...
{ "language": "en", "url": "https://stackoverflow.com/questions/29895191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Elasticsearch aggregation using Java api Hi I am trying to do query on elastic search by following the sql query and I want to implement same logic using Java API select dttime, avg(cpu) from table cpustats where server="X" and dttime="Y" group by dttime,cpu Now I have the following Java code but it does not return...
{ "language": "en", "url": "https://stackoverflow.com/questions/24964361", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: QML rotating a Gauge needle - pivot correctly I am trying to rotate a Gauge needle, but instead of pivoting at the base of the needle which have a circle with cross.. needle is pivots around the tip of the needle.. please see the attached image.. tip of the image is fixed/pivots but base is rotating.. please suggest...
{ "language": "en", "url": "https://stackoverflow.com/questions/58393454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Response from Postman shows 200, But Android returns 403 I was trying to develop an android app using Volley, The api I used to communicate is working fine when I checked with POSTMAN and retrieves 200 . But when I use the same API in my App its returns me 403 "Forbidden" <p〉You don't have permission to access /AP...
{ "language": "en", "url": "https://stackoverflow.com/questions/54649618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Cocoa: loading a bundle in which some classes inherit from a custom framework SHORT VERSION: How can I load classes during runtime from a bundle, when those classes inherit from superclasses not defined in the bundle, but from another framework which was loaded prior? When loading my framework, classes contained th...
{ "language": "en", "url": "https://stackoverflow.com/questions/6824213", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: VSCode pylint not displaying relative import failures I am running a Django application in VSCode, using pylint, and the relative imports errors are not displaying. They were before I installed a newer version of VSCode. I have tried changing user settings and also workspace settings, but still can't get the error...
{ "language": "en", "url": "https://stackoverflow.com/questions/56531077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ListViewItem ItemSelectionChangedEvent Fires 4 times [e.Selected fires twice] leads to Win32 Exception Unhandled I am using a button and a listview to display a list of options to the user. Selection is made with a mouse click, the listview removes its self from the .Controls array + un-registers eventlistener and l...
{ "language": "en", "url": "https://stackoverflow.com/questions/6605682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Start EC2 for specific time XX hours and then terminate A customer requested an  EC2 instance for XX hours. I created an on-demand EC2 instance and I sent the credentials to the user. He used it for a short lived calculation. How can I terminate that EC2 instance exactly after XX hours? Thank you in advance. A: The...
{ "language": "en", "url": "https://stackoverflow.com/questions/61963932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to avoid spurious 'unused parameter' warnings in TypeScript I've encountered this a bunch and have finally decided to figure out what the right way to do it is. If I have an abstract parent class that declares a method, and then some of the concrete sub-classes implement real logic in their implementation (and,...
{ "language": "en", "url": "https://stackoverflow.com/questions/50266006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How Can I Terminate a Thread Using a Throw Exception Method - Python I found some code online that will stop a thread via an exception after a wait period of some time. def raise_exception(self): thread_id = self.get_id() res = ctypes.pythonapi.PyThreadState_SetAsyncExc(thread_id, ctypes.py_object(Sy...
{ "language": "en", "url": "https://stackoverflow.com/questions/55639104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unable to POST data using TLS 1.2 I am trying to POST data to a server who is just using TLS1.2 When i am running the code i am getting the following response from server. HttpResponseProxy{HTTP/1.1 415 Unsupported Media Type [Date: Wed, 07 Sep 2016 17:42:57 CST, Server: , Strict-Transport-Security: max-age=63072000...
{ "language": "en", "url": "https://stackoverflow.com/questions/39376712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Mapping attributes using @JsonProperty when binding play.data.Form from JsonNode I have the following class public static class Thing { @JsonProperty("_name_") String name; } and I'm trying to bind it to the form and get instance of this class this way ObjectNode node = Json.newObject(); node.put("_name_", ...
{ "language": "en", "url": "https://stackoverflow.com/questions/27060882", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PaypalPlus iFrame integration with Payment Logos How can I add the payment logo to the PaypalPlus iFrame integration? We have 2 extensions for PaypalPlus, the old one shows payment logos for Paypal, direct debit etc. but the new one not. (The Image has class class="paymentMethodIcon") In all SDK & Integration guid...
{ "language": "en", "url": "https://stackoverflow.com/questions/42230832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: create distinct objects in a loop in js var subject = [] ; var subjectTemplate = {GUID:"", Title:"", Description:""}; for (var x = 0; x < 5; x++) { var clsSubject = subjectTemplate; clsSubject.GUID = id.generateRandomNumber() clsSubject.Title = "Intorduction to js"; clsSubject.Description = "Subject ...
{ "language": "en", "url": "https://stackoverflow.com/questions/57581806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Rails - Running tests with unexpected results - should be failing but instead its passing I am doing Hartl's tutorial. https://www.railstutorial.org/book/static_pages On section 3.3.3 I am running test but running into unexpected results. In my static_pages_controller_test.rb I have the following: test "should get a...
{ "language": "en", "url": "https://stackoverflow.com/questions/34160948", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to make two UIGestures respond simultaneously on two different views? I have View (A) has two subviews: view B and view C. View (B) that has a UILongPressGestureRecognizer and View (C) has a UIPanGestureRecognizer and is hidden by default. When I long press on a View B, view C is shown (isHidden = false). Now, w...
{ "language": "en", "url": "https://stackoverflow.com/questions/49415107", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Outlook Manifest functional in web Outlook, won't properly install in desktop Outlook I'm working on an Outlook Add-In. I've been working so far in the web version, but my understanding is that a manifest that functions in Web should automatically also function in Desktop. However, I'm encountering an issue where I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/59200376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Injecting application level dependency into node module I'm trying to create package from higher order components that are currently in application. The issue is that in some of those components application routes are being used ( through helper that imports all the routes and returns url based on route name ). I ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/58264884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I create an HTML list in a D3.js SVG container Here is the code I am working on. I want to plot events for a certain year as an unordered list. Is it possible to do using d3.js? Code- var mevent = svg.append("text") .attr("class", "year mevent") .attr("text-anchor", "end") .attr("y", heig...
{ "language": "en", "url": "https://stackoverflow.com/questions/18890040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL Server SMO script generation throwing deadlock error I have a huge database with nearly 16k tables. Some of these tables are transnational tables and always receive some insert/select/update queries.I am using SMO to transfer the definition of all these 16K tables to some test database. But my code is failing wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/39129216", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to calculate number of post which have particular meta_key? I am using repeatable meta boxes what i want to achieve is display number of post which have particular meta key such as Country Pakistan City Islamabad Age 12 Age 12 Meta key "Age" is used in 2 posts. No i want structure like Age in Post 2 , Islamabad...
{ "language": "en", "url": "https://stackoverflow.com/questions/54928149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using C++ to receive int inputs and displaying the larger and smaller number The instructions are to * *Write a program that consists of a while-loop that (each time around the loop) reads in two ints and then prints them. Exit the program when a terminating 'I' is entered. *Change the program to write out the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/34576602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Get C Code Stack Trace in Go Program I'm using the rana/ora oracle driver in my Go program to query some Oracle tables. The program somehow always gets SIGSEGV from a C library after running for a while and exits on segfault. It also gets a lot of query timeouts (context deadline exceeded) before it hits segfault er...
{ "language": "en", "url": "https://stackoverflow.com/questions/43727349", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Different effects of ORDER BY clause on two servers My query: SELECT * FROM table GROUP BY id; id field is a primary key, of course; In 9.4.4 I get expected error: column "table.name" must appear in the GROUP BY clause or be used in an aggregate function BUT! In 9.4.5 it works, like in MySQL. Can anybody tell me ...
{ "language": "en", "url": "https://stackoverflow.com/questions/35031563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Google Apps Script - Use Column Name (not In row1) rather than column number I have an Apps Script linked to my Google Sheet which grabs a range from one sheet and copies it to another. The issue I face now (and one that cannot be reasoned with) is that users will add columns to the destination sheet. What I am try...
{ "language": "en", "url": "https://stackoverflow.com/questions/69254915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Insert contents of a file in middle of another file with Python? There is already a question on SO that explains how to insert a line into the middle of a python file at a specific line number. But what if I have 2 files. inputfile.txt and outputfile.txt (which already has some text) and I want to insert all of inpu...
{ "language": "en", "url": "https://stackoverflow.com/questions/51353969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is SparseArray good for resource id keys? Is it advisable to use a SparseArray when the integer keys are resources id's? Or is it aimed at keys with lower numbers? Yes, I know the definition of SparseArray, and the compiler always issues a warning when one uses ArrayList with integer keys, advising to use SparseArra...
{ "language": "en", "url": "https://stackoverflow.com/questions/16756935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How Do I Ensure a Candidate Latin Square Is a Valid Damm Operation Table I am attempting to write a function in Scala that takes a valid Latin Square as input and then returns a Boolean value indicating whether the input Latin Square is a valid instance of an operation-table for the Damm Algorithm, or not. The Damm ...
{ "language": "en", "url": "https://stackoverflow.com/questions/72341050", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unable to set full-text index to 'active' in table-designer In SQL Server 2008 R2 Management Studio, I have set my database to be full-text indexed and ran the command EXEC sp_fulltext_database 'enable' along with creating a catalog. When I open the table design mode, and right click the Primary Key, then click Fu...
{ "language": "en", "url": "https://stackoverflow.com/questions/30243955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: It gives this error while running: undefined is not a function (evaluating '_reactNativr.default.createElement') This section of code is not running it always return en error saying undefined or not a function in the render function(). Heading 'use strict'; import React, { AppRegistry, StyleSheet, Text,...
{ "language": "en", "url": "https://stackoverflow.com/questions/54548608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Wordpress SQL query different results I added a custom Visual Composer element and want to output a result of a query. However when I output this query(1) it gives other results then when I output this query(2). // declared vars global $wpdb; $nn = '{{ post_data:ID }}'; $nn1 = (string)$nn; 1) $results2 = $GLOBAL...
{ "language": "en", "url": "https://stackoverflow.com/questions/41427896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to Solve PHP7.2 use of undefined constant priority warning In trying the next PHP 7.2 release out on my site (previously we've been on 7.1 with no problems) I noticed that one of our older scripts suddenly began throwing up this warning. Warning: Use of undefined constant priority - assumed 'priority' (this will...
{ "language": "en", "url": "https://stackoverflow.com/questions/47605881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ERLANG - Pattern Matching specifc pattern in unknown size list Ok now I think Im getting warmer, I have to pattern match whatever comes in. So if I had say Message = = [[<<>>], [<<"10">>,<<"171">>], [<<"112">>,<<"Gen20267">>], [<<"52">>,<<"20100812-06:32:30.687">>]] And I was looking to pattern match the field...
{ "language": "en", "url": "https://stackoverflow.com/questions/3471684", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Getting multiple ints from string I have a string: "3, V, 11, H, 21, H" and I am trying to get int first = 3 int second = 11 int third = 21 I'm not exactly sure how to do this since the numbers could be one or two digits, there are non-digit characters between the numbers, and I have to capture multiple numbers. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/20598935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Facebook api shows only statuses of the last year i'm working with a facebook app that aims to show all user statuses, after a couple of questions here on stackoverflow , i got this (almost )working. The problem is that graph api show only statuses of last year. Is not a script problem because if i use the Graph A...
{ "language": "en", "url": "https://stackoverflow.com/questions/26263944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }