text
stringlengths
15
59.8k
meta
dict
Q: How to get and convert back user's birthdate to/from a NSTimeInterval? Suppose, my birthdate is (mon/day/year) 10-05-1932 (as NSDate), how to convert this to NSTimeInterval. Again, how to convert back that NSTimeInterval to NSDate back? I tried using different methods of NSDate but haven't succeed yet. What I'm doin...
{ "language": "en", "url": "https://stackoverflow.com/questions/32398053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I retrieve disk information in C#? I would like to access information on the logical drives on my computer using C#. How should I accomplish this? Thanks! A: If you want to get information for single/specific drive at your local machine. You can do it as follow using DriveInfo class: //C Drive Path, this is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/412632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: Nesting flexbox layout causes scrollable area to misbehave I've read various questions about scrolling within flexbox but I seem to have a slightly more complicated version of what I've seen. I have an editor that uses flexbox and contains a toolbar with many components that is scrollable, and this works fine on it...
{ "language": "en", "url": "https://stackoverflow.com/questions/66202625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I DRY out this Ruby Code How can I DRY out the following Ruby Code: x = 'a random string to be formated' x = x.split('^')[0] if x.include?('^') x = x.split('$')[0] if x.include?('$') x = x.split('*')[0] if x.include?('*') I'm looking for the amazingly elegant ruby one liner but I'm having a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/15648460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a magic method that gets called when I write **object_identifier? Consider the use of the double-star notation in python: instance = NotDictionary(name="", description="") print( **instance ) Is there any way I can control the resulting value of the expression **instance In python? What methods or what p...
{ "language": "en", "url": "https://stackoverflow.com/questions/32596270", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: error when defining function inside another function in fortran For some use I need to define a function inside another function inside a fortran module. A sample code for easy comprehension is module func implicit none contains real function f(x,y) real x,y,g real function g(r) real r g=r end function g f=x*g(y...
{ "language": "en", "url": "https://stackoverflow.com/questions/60995301", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: connection oracle 11g with java 8 (eclipse) I can't import java.sql.*; because it said that this package is not accessible although I put ojdbc6 and also I tried ojdbc8 in the classpath but it isn't work; [ I mention that I have oracle 11g and jdk 10 & eclipse 4 ] A: How did you add your ojdbc driver ? A typical wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/61313068", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: UITableView Content Offset Increasing Unexpectedly I have a UITableView embedded in a navigation controller. When i segue from the TableView onto the next screen, i store the offset such that if i press the 'back' button, the offset on the original view remains the same, and it doesnt scroll up to the top. var table...
{ "language": "en", "url": "https://stackoverflow.com/questions/34984425", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: nginx not serving correct react build content I have a react app. When I build my app via the dev server (localhost: 3000), the app is served correctly with the correct styling etc. However, when I serve via nginx (via docker) I get a completely different UI? Does anyone know why this may be? I don't think it is a d...
{ "language": "en", "url": "https://stackoverflow.com/questions/74577930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Azure Functions scaling and concurrency using Queue triggers and functionAppScaleLimit on the Consumption Plan I have an Azure Function app on the Linux Consumption Plan that has two queue triggers. Both queue triggers have the batchSize parameter set to 1 because they can both use about 500 MB of memory each and I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64795612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Lambda referencing itself Suppose I have a global function pointer like so: void (*Callback)(My_special_t*); If I want to assign it a lambda I do so like so: Callback = [](My_special_t* instance) { //Useful stuff }; What I really would like to do is something like this: Callback = [](My_special_t* instance) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/49833691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Installing JSON::XS on Mac OSX I hope you're all ready for a long adventure through my frustration: I'm using Perl 5.10, on Mac OSX : Snow Leopard, with XCode 3.2.6. What I am trying to do is use the module JSON::XS in a program. This is the first time that I've ever done something with Perl, so I look up some simpl...
{ "language": "en", "url": "https://stackoverflow.com/questions/12718104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Does Netsh.exe command overwrite existing firewall rules? I'm using a netsh command that add a firewall rule on windows 2012 r2 server. My command is like this: Netsh.exe advfirewall firewall add rule name="name" protocol="TCP" localport=1234 dir=in enable=yes action=allow What happen if i already have a rule with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/49729193", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to deploy a multi-page react application in IIS server? I have created a multipage application using reactjs and have manage the routing using react router-dom. I tested it using npm start and it is working fine. The pages are properly redirecting. But when I run "npm run build" and add it to IIs server, only th...
{ "language": "en", "url": "https://stackoverflow.com/questions/74219446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get nearest location based on user location from array of lat, long: react, leaflet I have a react app that shows bike stations. I want to display nearest stations on dashboard. Is there any easier way to do that with react ? A: You can loop through all markers and look which has the shortest distance. map.d...
{ "language": "en", "url": "https://stackoverflow.com/questions/71310635", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: how to write to .txt file in UWP vb.net i am trying to have a .txt file containing a single line with a number on it. i need this txt file to be editable by the program and to be installed with it. the .txt file will be completely overwritten when the number needs to be replaced. how can i do this? all other tutoria...
{ "language": "en", "url": "https://stackoverflow.com/questions/41705000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How to get distinct dates (yyyy-mm-dd) using AutoFixture I have a test case where I need 4 distinct dates to build my objects. Everything I found seem to tell that AutoFixture always generate unique elements but the thing is when it generates dates, it does so considering everything down to ticks. The result is that...
{ "language": "en", "url": "https://stackoverflow.com/questions/58773017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Avoiding clashing of events by comparing their time and venues This might be easy for some of you but for me its a big hitch: What I want to do is make sure two events don't clash by comparing their dates and venues. Here is what I have done so far: <?php require_once (LIB_PATH.DS.'database.php'); require_on...
{ "language": "en", "url": "https://stackoverflow.com/questions/19723588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using dplyr to summarise a running total of distinct factors I'm trying to generate a species saturation curve for a camera trapping survey. I have thousands of observations and do most of my manipulations in dplyr. I have three field sites, with observation records of different animal species from a number of week...
{ "language": "en", "url": "https://stackoverflow.com/questions/42778960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Extract PNG from a PDF file using PyPDF2 and Pillow: not enough image data Using the code I found in this post, which corrects this example code, I'm trying to extract images on all pages of a PDF file. Now I'm getting an error for PNG images (works for JPG) at the second line of this piece (Image.frombytes): if xOb...
{ "language": "en", "url": "https://stackoverflow.com/questions/71738571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: cannot read property of undefined when trying to read from array object I am writing an jasmine test in angular 8 and getting error cannot read property of undefined. Its trying to read property of array object. I have tried initialising but it doesn't seem to work. I am trying to initialise component.myData Test fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/60525480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to change literals of type xsd:date to xsd:dateTime using Python? I have a graph which uses Literals of datatype xsd:date to save dates. However I want to use an .owl version of that graph in a reasoner, and the reasoner only accepts the xsd:dateTime format. Is there any way to change the datatype of my date lit...
{ "language": "en", "url": "https://stackoverflow.com/questions/72411111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to change StatusBar font color in wxWidgets? I want to display an error message in red on status bar if a user action results in error. I have tried setting the forground color to red but the it still displays the message in default black font. How do make the font color red on statusbar? I'm using wxWidgets 2.8...
{ "language": "en", "url": "https://stackoverflow.com/questions/3773281", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to develop Windows Phone 8 applications using the WP8 SDK on Windows 7 Is there any work around so developers who does not have Windows 8 can develop for windows phone using Windows Phone SDK 8.0? A: Unfortunately, it is currently not possible to develop for Windows Phone 8 on Windows 7. In the syste...
{ "language": "en", "url": "https://stackoverflow.com/questions/15292172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Pandas: Re-indexing after picking those that meet a condition I'm trying to learn more about re-indexing. For background context, I have a data frame called sleep_cycle. In this data frame, the columns are: Name, Age, Average sleep time. I want to pick out only those who's names begin with the letter 'B'. I then wan...
{ "language": "en", "url": "https://stackoverflow.com/questions/70409701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: setsockopt() equivalent for non-socket file descriptors? Is anyone aware of an equivalent to setsockopt() that works on non-socket based file descriptors? Specifically, consider this block of code: int on = 1; setsockopt(socketfd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(int)); All fine and dandy, and now we can avoi...
{ "language": "en", "url": "https://stackoverflow.com/questions/38289467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: deprecation errors when running rspec tests after updating to rails 5.0.0 I just upgraded an application from rails 4 to rails 5.0.0, however now when running my rspec tests I'm getting these deprecation warnings (they don't show up when running my server): DEPRECATION WARNING: alias_method_chain is deprecated. Plea...
{ "language": "en", "url": "https://stackoverflow.com/questions/38922455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why cannot marshal struct with auto layout I encountered an odd behaviour when marshalling a struct with auto layout kind. For example: let's take a simple code: [StructLayout(LayoutKind.Auto)] public struct StructAutoLayout { byte B1; long Long1; byte B2; long Long2; byte B3; } public static voi...
{ "language": "en", "url": "https://stackoverflow.com/questions/31857624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unable to cast object of type 'System.DBNull' to type 'System.String'. I have a problem at hand here that I can't seem to figure out. I have this Button which fires a OnClick. On this event I'm calling a stored procedure in the SQL server. Before creating a new record I have a check in place to see if the already ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/12545599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Node Express: axios shows Request failed with status code 404, even if the request was completed(failed to redirect) I am using axios to send a post / put request to a Express route. put const handleSubmit = async (e) => { e.preventDefault(); const data = new FormData(e.currentTarget); c...
{ "language": "en", "url": "https://stackoverflow.com/questions/70918064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to check the length of each child in a list and conditionally apply a class to the children of another I've been searching and searching for the solution to this, but I'm quite new to javascript and I must be missing something obvious. What I'm trying to do is check each nth-child li by number to see whether the...
{ "language": "en", "url": "https://stackoverflow.com/questions/17801760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: React-sound doesn't work on mobile I use the npm package 'react-sound' - it's fine and easy to configurate. But! It doesn't work on mobile devices. I tested that on android phones and iPad. Maybe someone had the same problem, or idea how to resolve this? A: By default, a restriction on mobile prevent you from pla...
{ "language": "en", "url": "https://stackoverflow.com/questions/39204894", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Safe Calls in Kotlin with Array is confuse There is an array: notes: Array<KeyValueNote>? and I use the Kotlin 1.0.5-2 in the following code. I want if (notes != null) { for (note in notes) { // Put the note to the payload Json object only if the note is non-null. payloadJson.put(note.key, note.v...
{ "language": "en", "url": "https://stackoverflow.com/questions/40826449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jsTree Clear Tree, Rebuild Tree jsTree appears to be a beautiful lightweight jquery Tree building package, but after working with it for a few days it really left a sour taste in my mouth for the lack of clear and useful documentation online. I'm including the following methods below in case any future devs are tryi...
{ "language": "en", "url": "https://stackoverflow.com/questions/37314713", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Set color to a QTableView row void MyWindow::initializeModelBySQL(QSqlQueryModel *model,QTableView *table,QString sql){ model = new QSqlQueryModel(this); model->setQuery(sql); } With this method i can set a QSQlQueryModels to my QTableviews. But How i can set color to a row based on a cell value? A...
{ "language": "en", "url": "https://stackoverflow.com/questions/10219739", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Thymeleaf Form Request method 'POST' not supported, HTTP Error = Method Not Allowed, status=405 I am new into Thymeleaf and here I made a Form using Thymeleaf but running into this issue. I read many many articles but didn't find any solution. Here's my Controller Class -> @Controller public class SavingUser{ @Au...
{ "language": "en", "url": "https://stackoverflow.com/questions/68767187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to modify or remove older commit in Git? From past few days i had kept on adding and committing files in my local. My branch is now 16 commits ahead of 'origin/master'. I wanted to push them to my git repo but one of the file being very large my push command fails. Is there any way to remove that commit from th...
{ "language": "en", "url": "https://stackoverflow.com/questions/43278008", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a tool for previewing both LaTeX and MetaPost files? I'm trying to find a tool for Windows that I can use to preview .tex and .mp files as they are saved. Does such a tool exist? I have TeXworks installed which has a handy build button (this displays the result in another window), but I'd rather use Emacs. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/3894944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: VBA (Excel) 2010: specific script how-to, dealing with range comparisons I have 3 columns that follow these rules: * *Any cell in Col A may be empty, otherwise it contains a string. *If a row in Col A is empty, that row in Col's B and C will be empty. *If a row in Col A is populated, That row in Col B will be p...
{ "language": "en", "url": "https://stackoverflow.com/questions/28054092", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Converting Unix timestamp to hours All, I have a database field which actually computes the time spent from the time the quiz started to the current time. This was done at some point of time (recorded as current time) and now I have an Unixtimestamp value for it i.e. Suppose the start time was 5/5/2011 1pm and the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/5904612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Get access token facebook-sdk I'm trying to figure out, how to log in to facebook account and get access token so I can post into my groups. To create a GraphAPI instance, I need to check access_token I need and put it into the code. I'm curious whether is it possible to use username and password to get the access_...
{ "language": "en", "url": "https://stackoverflow.com/questions/29705475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Creating a loop in JS for a web application I'm trying to loop this function at least ten times but can't seem to get it to work on my web application. I am learning JS at school and this is as far as i've come $(function fade_in_pictures() { for (int i = 0; i < 10; ++i) { $('.wi2').delay(2000).fadeIn(0); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/56213648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Resource leak not closed I'm using Eclipse, and doing the function below, it happens that I'm opening a Scanner, and then, in the end I close it, but Eclipse keeps saying that it is not closed "resource leak: 'scanner' is not closed". I can do it with try with resources, and the warning disappears, but I want to und...
{ "language": "en", "url": "https://stackoverflow.com/questions/66431637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Loading a shared library in a same directory with the executable file In Windows, an executable(.exe) which needs a shared library (.dll) can be run when the exe and dll files are in a same directory. In Linux, even though the executable and the shared library(.so) are in the same directory, Linux always looks for i...
{ "language": "en", "url": "https://stackoverflow.com/questions/54569976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to DRY a Bootstrap view I'm looking for a better way to effectively DRY my Rails views that use Bootstrap 3.0 Here's the HAML code of the view: %h1 Profiles .visible-xs %table.table.table-striped %tbody - @profiles.each do |profile| %tr %td = profile.name %td{...
{ "language": "en", "url": "https://stackoverflow.com/questions/23426714", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: change image in a div with Onclick in React I have several divs with an image inside each of them and I have an onCLick on the wrapping div, which executes two functions -clickHandler() and toggleCollapse2(). The idea is that the image in the div represents a styled ticked box which replaces the image of the empty b...
{ "language": "en", "url": "https://stackoverflow.com/questions/58302737", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python - Split List into a Dictionary I am trying to split a big list into a dictionary. Given a list with say 363 elements I want to divide them such that each key in the dictionary will have a list of 10 values. So a list of 363 elements will have 37 keys (rounded up to nearest 10).The keys will start from 1 and g...
{ "language": "en", "url": "https://stackoverflow.com/questions/28521731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Enriching Gensim W2V with spatial Information (such as geo-location) Anyone have experince, or idea of the best way to train a W2V model , while enrichnig is with geo-location context (using Gensim library)? * *I have a dataset of scripted conversations from different english specking coutries. *I would like to t...
{ "language": "en", "url": "https://stackoverflow.com/questions/75106776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Unable to change the link of a button using Javascript Hello I am a total newbie (I don't code) and I made a wordpress website in two different languages (french and english) using the Polylang plugin. But I am facing the following problem : in my website, there is a button linking to a Facebook page in english and...
{ "language": "en", "url": "https://stackoverflow.com/questions/59695232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Use of M2M Table and relationship to get specific data in sqlalchemy I have Table # File : MyRelations.py ACC_ADD_TABLE = Table('acc_add_rel', METADATA, Column('acc_id', ForeignKey('acc.id'), nullable=False), Column('add_id', ForeignKey('address.id'), nullable=False), PrimaryKeyCo...
{ "language": "en", "url": "https://stackoverflow.com/questions/8922118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Responsive WYSIWYG editor in jquerymobile website and mobile app I'm struggling but i couldn't find a single rich text editor which is compatible with jquerymobile and Cordova. I Have a container div now i want to put editor in it and the width and height of editor should change if container div width and height c...
{ "language": "en", "url": "https://stackoverflow.com/questions/22685250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: found button but unable to click on it I have a methods which fills facebook sign up for and should to press "Create an account" button. It seams that it founds button, but due to unclear reason unable to click on it code of button is: <button type="submit" class="_6j mvm _6wk _6wl _58mi _3ma _6o _6v" name="websubm...
{ "language": "en", "url": "https://stackoverflow.com/questions/46724944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: apache beam running locally but unable to read data from csv in Python import apache_beam as beam from apache_beam.options.pipeline_options import PipelineOptions p = beam.Pipeline(options=PipelineOptions())lines = p | beam.io.ReadFromText('file:///C:/Users/Lenovo/Desktop/dataflow.csv') Apache beam is running locall...
{ "language": "en", "url": "https://stackoverflow.com/questions/52790021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Parallel processing data analysis - Is there a benefit to having more splits than processor cores? I am using a naive Bayesian classifier to predict some test data in R. The test data has >1,000,000,000 records, and takes far too long to process with one processor. The computer I am using has (only) four processors ...
{ "language": "en", "url": "https://stackoverflow.com/questions/48590763", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Speed up a Laravel query where a field from relationship matches at least all elements of a given array I'm using the query below to get all results matching at least all elements of an array: $colors_array = ['red', 'green', 'blue']; Foo::with('colors') ->whereHas( 'colors', function ($query) use ($color...
{ "language": "en", "url": "https://stackoverflow.com/questions/64770925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CMD.exe consumes all the CPU, blocking other CMD.exe to execute We have some Batch scripts (.bat) in Windows to execute the “backups” and “archive log” for the databases. These scripts are called from Tivoli periodically. For each executed script, the process creates a sub session in order to load the DB2cmd environ...
{ "language": "en", "url": "https://stackoverflow.com/questions/8229015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to Group Documents by a Field and Calculate Count in mongodb using java How to write the below aggregation query in java.Can anyone please help me out regarding this ... My documents in mongodb: { "_id" : ObjectId("56d6b5849d6e45832c36482a"), "name" : "abc", "count" : 100 } { "_id" : ObjectId("56d6b5899d6e45832c...
{ "language": "en", "url": "https://stackoverflow.com/questions/35740592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Stored procedure select VS select from external connection I am trying to find the pros and cons of using stored procedures instead of SQL queries from an external connection, but I am unable to find any direct comparison. * *What is the benefit of using stored procedures instead of SQL queries from an external co...
{ "language": "en", "url": "https://stackoverflow.com/questions/70522863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Hibernate gives a strange ClassCast exception (using Transformers) This code: @Override public List<FactCodeDto> getAllFactsWithoutParentsAsFactDto() { String completeQuery = FactCodeQueries.SELECT_DTO_FROM_FACT_WITH_NO_PARENTS; Query query = createHibernateQueryForUnmappedTypeFactDto(completeQuery); Li...
{ "language": "en", "url": "https://stackoverflow.com/questions/33433345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: RxJava: Observable and default thread I have the following code: Observable.create(new ObservableOnSubscribe<String>() { @Override public void subscribe(@NonNull final ObservableEmitter<String> s) throws Exception { Thread thread = new Thread(new Runnable() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43436640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to use a for loop to display an image depending on a position in an index? This is inside a react-native project: I have a progress bar that has 10 positions, and each position as a possibility of three states - incomplete, active, complete. There is an image that corresponds to each of those states. I was think...
{ "language": "en", "url": "https://stackoverflow.com/questions/49784029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CORS Configuration Flask, Angular and NGINX I'm trying to upload an angular application to a digital ocean droplet using nginx. This app consumes an API in flask. In local everything works pretty well, but on the VPS is not working. It says something about Cross-origin request blocked: Same origin policy does not al...
{ "language": "en", "url": "https://stackoverflow.com/questions/63495626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Difference between SomeValue {get;} = true; vs SomeValue => true; in Properties In C# you could declare a property in two ways that seem very similar: public string SomeProperty => "SomeValue"; vs public string SomeProperty { get; } = "SomeValue"; Is there a difference between these two? (Ignoring the fact that "S...
{ "language": "en", "url": "https://stackoverflow.com/questions/39260137", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: OrientDB: Select unique vertices but retain the edges I am trying to do the following weird thing. I have a group of edges that point towards a group of vertices, but there is some repetition - multiple edges point to the same vertices. Given a SELECT command that gives me the list of edges, I want to: * *SELECT ...
{ "language": "en", "url": "https://stackoverflow.com/questions/40027603", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Use if/else statement without else branch I don't know how to use if else in this case. When score > 10, stop insert. Else continue insert as normally. But what is the syntax to do that? CREATE TRIGGER invalidScore ON dbo.dbo_score AFTER INSERT AS DECLARE @score DECIMAL; SET @score = (SELECT s.score FROM Inserted s)...
{ "language": "en", "url": "https://stackoverflow.com/questions/59024580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting Warning on Play Store for using WRITE_CALL_LOG permission in android app I'm working on a project based on cloud backup which saves and restore user's call log. It was working fine for the previous version but now getting following warning. I added a description before taking permission from the user but sti...
{ "language": "en", "url": "https://stackoverflow.com/questions/51035148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: panels expanded in viewport in my west region panel there is smth. like the task panel here: http://dev.sencha.com/deploy/dev/examples/tasks/tasks.html the data is loaded from 2 different 's containing only with links the first "task" group is always expanded to all the height of the document, though there are much...
{ "language": "en", "url": "https://stackoverflow.com/questions/4531801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to append to array in for loop? How can I append my results in this array so I can use it later ? var animalQuestion = [(orderlist: Int, questionid:String, question: String, description: String)]() This is my array which I declared in my class above. let stmt = try db.prepare("SELECT * FROM allquestion_other w...
{ "language": "en", "url": "https://stackoverflow.com/questions/47788432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Sl4A Selecting running application from notification window I have a SL4A program I have written. I have one issue before i'm ready to publish it. For some reason when the app is running, if I home screen out of the app, I see it running in the notification area, but when I select it nothing happens. However if...
{ "language": "en", "url": "https://stackoverflow.com/questions/12169546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Values of the synthetic control created by Synth package in R I'm using the Synth package in R. I properly created my dataprep.out and synth(dataprep.out). Following, I created my path.plot and it's very fine. Now I want to find the values estimated by Synth for my outcome variable for each time period. Where can I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75440536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: File Upload Error in Asp.net VB I am trying to add a fileupload control to my aspx page so the user can add pictures, but when I am implementing the code behind on VB the fileuploader controler is not recognized. I have this on aspx page inside a formview: <InsertItemTemplate> <div id="TaskScreenError"> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/9771320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: image rotation going to wide off of my screen how to keep static or shorten width? Hello guys I was wondering if anyone has a quick fix to my image rotating way to far off my screen and causes my app to have scroll bars and not appealing to the eye maybe have the image just spinning in place to make my formatting is...
{ "language": "en", "url": "https://stackoverflow.com/questions/34245087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Choosing marker size in Matplotlib I am doing a scatter plot with square marker in matplotlib like this one: . I want to achieve something like this: Which means I have to adjust the marker size and the figure size/ratio in such a way that there are no white space between markers. Also there should be a marker pe...
{ "language": "en", "url": "https://stackoverflow.com/questions/16819193", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to sort search results by relevance in javascript I'm building a custom search, as of now if I enter "The R" I get the result list with The Fellow ship of the Ring first, because the phrase "the ring" it's in its .text. I want The Return of the King to be first. Is there a way I can give more relevance to the .n...
{ "language": "en", "url": "https://stackoverflow.com/questions/61857573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ttk Button: relief of the button is not taking effect I have button defined as below: button_style = ttk.Style() button_style.configure("button_style.TButton", relief=tk.RAISED, width = 20, padding=6, font=('Helvetica', 12) ) self.button = ttk.Button (self.myContainer1, text="Browse", style...
{ "language": "en", "url": "https://stackoverflow.com/questions/44025234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to change the size of the file from kilobyte into gigabyte using php i have here a code that saves a file the size is kilobyte but i want a size of a file that have a size into gigabyte but i do not know how to change it. i need a help from you because im a beginner in the php and i don't know how to change the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/28879583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: MVC3 gives a Blank chart My LoggedUserHome.Controller has this action for chart public ActionResult GetGender() { var AllGender = new List<string>(from c in db.tbl_Profile select c.sex).ToList(); var Groping = AllGender .GroupBy(i => i) .Select(i => new { sex = i.Key, Cou...
{ "language": "en", "url": "https://stackoverflow.com/questions/11921187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Xamarin Android load local html file with routing How can I load local html file with routing in Android Webview? The url looks like this: file:///android_asset/Content/index.html/#/first-view file:///android_asset/Content/index.html/#/second-view I tried with this code but it's not working: AppWebView.LoadUrl("fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/51279392", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Calling base component's methods/features Having Base.vue <template><div>{{ name }}</div></template> <script> export default { data() { return {name: 'Example Component'}; } }; </script> And Extended.vue: <script> import Base from './Base.vue'; export default { extends: Base, data() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/67403046", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: I get "IndexError: list index out of range" when installing Pandas in python So, I installed pandas with cmd : but when I try to import it i get this error: Traceback (most recent call last): File "C:/Users/Uros/Desktop/fasda.py", line 1, in import pandas ModuleNotFoundError: No module named 'pandas' ...
{ "language": "en", "url": "https://stackoverflow.com/questions/59142961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Generate TIE cells with Yosys? I am using Yosys to synthesise my RTL design which includes a couple of literal constants, such as tied output ports as in the following code: module my_module ( input a, input b, output c, output d); assign c = a & b; assign d = 1'b1; endmodule In this case, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/33336463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Python Pandas match exact pattern I'm trying to match a pattern with a column of a dataframe pattern='pgk' df = pd.DataFrame([['merged_pgk', 10], ['merged_Pgk', 3], ['merged_pgk_stim', 12], ['merged_Scp1', 5]], columns=['condition','count']) I want the row where pattern is in the column condition. df[df['condition'...
{ "language": "en", "url": "https://stackoverflow.com/questions/62590794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to find duplicate items in list<>? I have: List<string> list = new List<string>() { "a", "a", "b", "b", "r", "t" }; How can I get only "a","b"? I tried to do like this: List<string> list = new List<string>() { "a", "a", "b", "b", "r", "t" }; List<string> test_list = new List<string>(); test_list = list.Disti...
{ "language": "en", "url": "https://stackoverflow.com/questions/15866780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: WPF GradientBrush? How Many type of gradient brushes are available like LinearGradientBrush, SolidColorBrush? and when we create a GradientStop how the offset works? LinearGradientBrush LGB = new LinearGradientBrush(); LGB.StartPoint = new Point(0, 0); LGB.EndPoint = new Point(0, 1); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/1420043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: GWT application generating IE insecure item warning Our service runs over HTTPS and we're currently experimenting with running a compiled GWT-application within it, only client side, no RPC:s. It is included within an IFRAME, which seems to be recommended (here for example: http://developerlife.com/tutorials/?p=231 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/4286517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Error retrieving data from a remote database in PHP How can I solve the problem shown in the table? This happened while I was trying to retrieve data from my database. In my java code, the json array that I try to call is null. db_connect.php <?php class DB_CONNECT{ // constructor function __construct() { // c...
{ "language": "en", "url": "https://stackoverflow.com/questions/28913471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Find Hours Between Startdate and Enddate of different table TimeSheetData timesheetdata = new TimeSheetData(); TimeSheet timeSheet = new TimeSheet(); TimeSheetData timesheetdata = new TimeSheetData(); timeSheet.StartDate = thisWeekStart; timeSheet.EndDate = thisWeekEnd...
{ "language": "en", "url": "https://stackoverflow.com/questions/47588250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How to know if email was sent from intent In my app, I'm creating an intenet to send an email... it looks like this final Intent emailIntent = new Intent(Intent.ACTION_SEND) .putExtra(Intent.EXTRA_EMAIL, new String[]{mBuilder.mEmail}) .putExtra(Intent.EXTRA_SUBJECT, mB...
{ "language": "en", "url": "https://stackoverflow.com/questions/40563941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Asp.net - Starting server with Kestrel on OS X I have not worked with Asp.net before. I'm trying to get an MVC Project running on my machine. I'm running OS X 10.9.3. I tried following the instructions in this tutorial: http://docs.asp.net/en/latest/tutorials/your-first-mac-aspnet.html But when I run $ dnx . kestrel...
{ "language": "en", "url": "https://stackoverflow.com/questions/32209117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can someone explain this css margin behaviour? A friend of mine had a problem with this simple html/ css task: http://jsfiddle.net/kaHzY/6/ The problem was that the .headline 's margin-top was pushing down the #main div although it should directly follow the nav without any space between. Adding a div .inner with a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/17155254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Overcome VBA InputBox Character Limit The current function I use to collect text InputBox can't accept more than 255 characters apparently, and I need to be able to collect more than that? Is there a parameter or different function I can use to increase this limit? A: To be pedantic, the Inputbox will let you type ...
{ "language": "en", "url": "https://stackoverflow.com/questions/2969516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Proper method to timing how long a sorting algorithm takes (Using Java) I'm testing sorting arrays to see literally how fast different sorting arrays take. I want to weed out the erroneous times, so ideally I would like to start a timer, run the sort in a loop of say 100 times, stop the timer, then divide by 100 to...
{ "language": "en", "url": "https://stackoverflow.com/questions/9561110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Getting graphics object to draw with buffer strategy I've made a JFrame with a canvas on it and I want to draw on that canvas. At a later date the canvas will be updating many times a second so I am using a buffer strategy for this. Here is the code: package mainPackage; import java.awt.Canvas; import java.awt.Colo...
{ "language": "en", "url": "https://stackoverflow.com/questions/47377513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Async Loop seems to partially parallel I'm trying to implement a function, which slices a file into chunks and then sends them to my backend one after another. The function has to hash each file & validate if the hash is already known before starting the upload. The following code is the code part, where my problema...
{ "language": "en", "url": "https://stackoverflow.com/questions/67427015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Return Array from Function in Swift So im a bit new to swift and object-c as well and was wondering if someone could help me out a bit. I'm used to creating usually a utils file where I have functions I use often in programming. In this case im trying to call a function from another swift file and return an array of...
{ "language": "en", "url": "https://stackoverflow.com/questions/31691433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: RobotFramework - Handle 2 Browser tabs at the same time and test them I have this problem where i need to test a functionality of my web app with 2 tabs open and check if I update someting on tab 1 Tab 2 refreshes, I am trying to get this done using the Press key keyword. I am targeting the body of and Using the Asc...
{ "language": "en", "url": "https://stackoverflow.com/questions/51842127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to create CosmosDB User Defined Function programmatically I know how to create CosmosDB databases and collection using ARM templates. I have a UDF (User Defined Function) that I would like to deploy using an ARM template as well but it doesn't seem to be supported. Am I missing something? Is there a different wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/56158535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Roslyn Refactor Find References to a method As part of a refactor project I am working on I need to replace calls to Obsolete methods with correct calls. This has worked for other calls but I have hit a problem with my current one. I need to replace all calls to the following: [Obsolete("use string.IsNullOrWhiteS...
{ "language": "en", "url": "https://stackoverflow.com/questions/49636079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Python Scripts is not running after working C Project and VSCode IntelliSense is on Partial Partial Mode So I was just done editing my C project in VS Code, and I went to work back on my Python project in VS Code, but now Python scripts is not working or running anymore or even showing anything on the output window ...
{ "language": "en", "url": "https://stackoverflow.com/questions/71729250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Sounds using audio in my simple javascript game won't play The following is an excerpt from my little game (which all works apart from the sound, no errors in Chrome either, console.log proves code is run)??? <!DOCTYPE html> <html> <head> <title> Final Game Code + HS RA</title> </head> <body> <script> var myAu...
{ "language": "en", "url": "https://stackoverflow.com/questions/61883537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }