text
stringlengths
15
59.8k
meta
dict
Q: Set src depending on url I want to set the souce based on the url ex: <script type="text/javascript" src="test"></script> **i can not add to this if (window.location.href.indexOf("test") > -1) { src="myScriptcc.js"; } A: You can do like this <script type="text/javascript"> if ( window.location.href...
{ "language": "en", "url": "https://stackoverflow.com/questions/61373645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: How can I refresh fullcalendar after insert a row in mysql without refresh the page? my problem is that I do an ajax petition to insert a event to mysql, so if everything is ok I wanted to refresh (refetch events) fullcalendar to see the new insert without refresh page. Besides, I am using TimeGrid View and version ...
{ "language": "en", "url": "https://stackoverflow.com/questions/56129240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: IF else Stored procedure confusion This is a table name a b c normal loan status abc 50 60 70 normal bcd 50 50 50 loan what i want first is to get total of values of columns a,b and c in accordance with their status.. meaning; total amount of name with status normal should come u...
{ "language": "en", "url": "https://stackoverflow.com/questions/25302641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: res.send and res.render calls I am trying to determine if i can call res.send(data) and then res.render('reports') simultaneously. To explain further in detail, when i route to '/reports', first on my server side i making a REST call to an API which returns back json data. Now i want this json data to be accessed o...
{ "language": "en", "url": "https://stackoverflow.com/questions/30847070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Count within the aggregate SUM() I have a table with 1000 rows. Columns exist are ID, DBID, TalkTime. I am doing: SELECT DBID, SUM(TalkTime) FROM Incoming_Calls GROUP BY DBID This condenses down to approximely 18 rows. I want to know how I can count the number of records present within each grouping. So for example...
{ "language": "en", "url": "https://stackoverflow.com/questions/15480817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Swift adding attachment for multipart/form-data POST Swift 5, Xcode Version 10.2.1 (10E1001) Hi everyone, I'd appreciate any help on this. I'm creating a call to post an attachment (PNG) to my POST call. I'm making the call to ServiceNow. If I use the same keys in the body as PostMan the call in Postman works fine...
{ "language": "en", "url": "https://stackoverflow.com/questions/56464795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: some issues with index range, python student project? def f3(): root.withdraw() viewest.deiconify() #import cx_Oracle con=None cursor=None try: con=cx_Oracle.connect("system/abc123") cursor=con.cursor() sql="select * from students" cursor.execute(sql) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/60481070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Do access subforms that are not visible still update/requery? If not, can this be behavior be configured? I have an old Access database that is being upgraded to work with Access 2007. The client is complaining that it is slow now. I am looking for ways to optimize it. There is one subform that is in a particular ...
{ "language": "en", "url": "https://stackoverflow.com/questions/3058688", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: API-Platform: Multiple primary key with swagger - getting error This question on GitHub I'm trying to add second field into parameters without custom controller for entity with multiple primary key and getting error ... Now step-by-step: DB table: create table measure_types ( id varchar(10) not n...
{ "language": "en", "url": "https://stackoverflow.com/questions/60475383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: EF UpdateRange() not working with deleted child collections public Class Parent { public int Id {get;set;} public string Name {get;set;} public ICollection<Child> Children {get;set;} } public Class Child { public int Id {get;set;} public int ParentId {get;set;} public string Name {get;set;} ...
{ "language": "en", "url": "https://stackoverflow.com/questions/67553492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to work with a spring java project without internet necessity? Hello brothers in code. Always when I try to work with no internet connection (some times this goes down in my network) I do a question to myself... "There's a way to configure a spring maven java project without internet connection necess...
{ "language": "en", "url": "https://stackoverflow.com/questions/48593133", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Should TypeScript's mapped types have a value for every key? I am wondering whether every key in a mapped type should have a defined value. I would not expect this to be the case as it would require indefeasibly many values. However, then I'd expect Partial<T> to be assignable to a mapped type T, which it is not. Ad...
{ "language": "en", "url": "https://stackoverflow.com/questions/56560321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Display different login page based on requirements in Phonegap android apps? My Phonegap application login page contains a few input fields like username, password, url, device type, etc... that the user has to enter to activate the application when he logins for the fist time. The next time on the user has to enter...
{ "language": "en", "url": "https://stackoverflow.com/questions/11449832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: multiple definition in header file Given this code sample: complex.h : #ifndef COMPLEX_H #define COMPLEX_H #include <iostream> class Complex { public: Complex(float Real, float Imaginary); float real() const { return m_Real; }; private: friend std::ostream& operator<<(std::ostream& o, const Complex& Cpl...
{ "language": "en", "url": "https://stackoverflow.com/questions/2727582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: Django Rest Framework - React - Unable to login immediately after logout This is very strange. I have a react front end and a django backend with djangorestframework and django-allauth for authentication. Everything works fine from Postman. But in the browser when I successfully sign in, successfully sign out, and t...
{ "language": "en", "url": "https://stackoverflow.com/questions/62288112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Inject service in app.config? I want to inject a service into app.config any idea please ?I want to inject a service into app.config any idea please ?I want to inject a service into app.config any idea please ? app.js 'use strict'; angular.module('crud', [ 'ngRoute', 'angular-jwt', 'ngSails', 'ngMessages'...
{ "language": "en", "url": "https://stackoverflow.com/questions/37059087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: python/Scipy Interpolation of 3D scattered data I want to implement a interpolation of a 3D scattered data using python. Such as, z[0,0] = 1, z[0,4] =2, z[2,2]=4, z[4,0]=3, z[4,4]= 2 (X like structured 2D vectors with z value) and interpolate these data so that I can derive a z value between this (x,y) coordinate li...
{ "language": "en", "url": "https://stackoverflow.com/questions/63470111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Appending data to a Google Sheet using Python I have 3 different tables I'm looking to directly push to 3 separate tabs in a Google Sheet. I set up the GSpread connection and that's working well. I started to adjust my first print statement into what I thought would append the information to Tab A (waveData), but no...
{ "language": "en", "url": "https://stackoverflow.com/questions/74756517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Quickest way to delete text from a string in python based on a list? Maybe regex? Hi I have a very long string that has the following structure: "IF ( ISFILTERED ( Table1[Column_1] ), VAR ___f = FILTERS ( Table1[Column_1] ) VAR ___r = COUNTROWS ( ___f ) VAR ___t = TOPN ( MaxFilters, ___f, Table1[Column_1]) VAR _...
{ "language": "en", "url": "https://stackoverflow.com/questions/74041286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Download in CSV File using PHP I am trying to convert MySQL table to csv and download it from server. i have uploaded this script on server. <?php //export.php require 'db_connection.php'; header('Content-Type: text/csv; charset=utf-8'); header('Content-Disposition: attachment; filename=data.csv'); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/51801179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to update data in server database in same field in iphone I am updating my data but it not updating why it happen i want if any register user want to change data old to new then i give a update page where the user change there data but except username i try lot byt it's not updata data to server databasetable ...
{ "language": "en", "url": "https://stackoverflow.com/questions/6422924", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Chrome Extensions "chrome.storage.local" data updating trouble I am working on one chrome extension and i need to use local storage to send data from options page to background scritps. Options page script: function addToStorage(key, val){ let obj = {}; obj[key] = val; chrome.storage.local.set( obj, fun...
{ "language": "en", "url": "https://stackoverflow.com/questions/64081262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why do R and statsmodels give slightly different ANOVA results? Using a small R sample dataset and the ANOVA example from statsmodels, the degrees of freedom for one of the variables are reported differently, & the F-values results are also slightly different. Perhaps they have slightly different default approaches?...
{ "language": "en", "url": "https://stackoverflow.com/questions/28755617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Success and failure actions when downloading a file in MVC A button on my page calls a controller method that returns a file, like so: // Update number of downloads in database // Return the file return File(filedata, contentType); In the view, this button is defined as: <img onclick="location.href ='@Url.Action("D...
{ "language": "en", "url": "https://stackoverflow.com/questions/35150052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: NSMutableDictionary overrides the first value This is my sample code here i calculated break time for two entries.if i add a another entries means it is overriding the previous break time ..i dont know where i am doing wrong This is my first sample i got this for 2 entries This is my second sample i got this for 3...
{ "language": "en", "url": "https://stackoverflow.com/questions/35216783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Converting Invalid DateTime I need to Convert DateTime from UTC to local time, For that I had Validated the date time before converting to local time using TimeZoneInfo IsInValidTime method. I'm getting Invalid date time for a particular date time, How to convert this date to a valid one? Here is the Sample code: _t...
{ "language": "en", "url": "https://stackoverflow.com/questions/15611580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to verify multiple CSS attributes in one method I'm a newbie setting up a python selenium framework and am wondering if I should collect and verify CSS attributes more tidily? I currently have the verify css function set up in the base page and these methods which define the individual css attributes in the cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/47722143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: yum install failed and corrupted the original yum I was trying to install yum-3.4.3 using commands make && make install, but it failed with showing the following log: infra-bld4:/tmp/hxu2/yum-3.4.3> make for d in rpmUtils yum etc docs po; do make PYTHON=python -C $d; [ $? = 0 ] || exit 1 ; done make-3.79.1-p7[1]: En...
{ "language": "en", "url": "https://stackoverflow.com/questions/17665790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do i speed up a python nested loop? I'm trying to calculate the gravity effect of a buried object by calculating the effect on each side of the body then summing up the contributions to get one measurement at one station, an repeating for a number of stations. the code is as follows( the body is a square and the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7744065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Release unused memory sql server 2014 memory optimized table My system Microsoft SQL Server 2014 (SP1-CU4) (KB3106660) - 12.0.4436.0 (X64) Dec 2 2015 16:09:44 Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 (Build 9600: ) (Hypervisor) I use two tabl...
{ "language": "en", "url": "https://stackoverflow.com/questions/34767405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: OpenGL cube coloring I created a cube using OpenGL2.0. I want it has six different color on its each face. I followed some example and draw one cube. Everything goes well except the color of the cube. Color of each face mixed together and only red and green are shown. It looks really wired and I did't see any people...
{ "language": "en", "url": "https://stackoverflow.com/questions/37668017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to call GET/POST method programatically using spring I want to call GET/POST method programatically from within the java class using Spring. I have done this stuff in Servlet class before but I am not clear how to do this with spring. I went through some related tutorials but I am still not cleared. Can any one ...
{ "language": "en", "url": "https://stackoverflow.com/questions/26210993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: zabbix monitor JMX C3P0 tokenid the key is: jmx["com.mchange.v2.c3p0:identityToken=2yaf3o9m1taosztt7mari|2294069,name=2yaf3o9m1taosztt7mari|2294069,type=PooledDataSource",maxPoolSize] but the identityToken changed when restart the tomcat. is there a macro to define it,adapt when changed? enter image description her...
{ "language": "en", "url": "https://stackoverflow.com/questions/43064059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Copying a string to a struct member I can't figure out how to copy a string from inputString to newNode->data. My struct looks like this: typedef struct node { char *data; struct node *left; struct node *right; } node; And the function in questions looks like this: node* addToTree(char inputString[]) {...
{ "language": "en", "url": "https://stackoverflow.com/questions/53152341", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Excel VBA Data organization with splitting and duplication In Microsoft Excel, I am looking to use VBA code to sort through large amounts of data that is not optimally organized Currently, I have data that looks like this: Poor Data Organization However, I would like to process the data to this: Correct Data Organiz...
{ "language": "en", "url": "https://stackoverflow.com/questions/44013032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Python dictionary modification This is a python code def build_person(first_name, last_name, age=None):      Return a dictionary of information about a person. person = {'first': first_name, 'last': last_name}      if age:          person['age'] = age      return person I understand everything but th...
{ "language": "en", "url": "https://stackoverflow.com/questions/70288163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Enum 2-ways binding with a Combobox I am trying to do a simple 2-ways binding with an enum to a Combobox but haven't found anything that works with my code so far. My enum (C#): public enum CurrenciesEnum { USD, JPY, HKD, EUR, AUD, NZD }; The property the Enum should set / is bound to: private string _ccy; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/15678212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: WCF with Flash tutorial I'm a beginner in WCF, which I have chosen instead of Web Services because all articles and blogs I've read seem to point out that ASMX is old news. I have read a bit about the differences between old Web Services and WCF, and I got the general idea. I also took the MSDN WCF tutorial which se...
{ "language": "en", "url": "https://stackoverflow.com/questions/3306744", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: POST variable to another class I have a search function using XPath, when results are shown a check box is also echoed. <form name="save" method="POST" action="saveProcess.php"> <?php foreach ($holidays as $holiday) { $resultTable .= "<p><a href=\"{$holiday->link...
{ "language": "en", "url": "https://stackoverflow.com/questions/10041753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the difference between Pointer and strings? What is the difference between a pointer and array or they are same? As a array also works with poiter arithematic so it can be said that an array is nothing but pointer to its fitst element. A: They both are different by the following differences:- int array[40];...
{ "language": "en", "url": "https://stackoverflow.com/questions/33804935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: java.lang.OutOfMemoryError: GC overhead limit exceeded in PYSPARK My scenario of spark job is to connect to PostgreSQL database, read the data from PSQL and performing aggregations after reading the data. In this process I am able to establish database connection successfully and while selecting rows from a table I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/50099195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Unit test ViewModel using repository pattern and LiveData I want to write a unit test for my viewmodel class : class MainViewModel( repository: ShowRepository ) : ViewModel() { private val _shows = repository.shows val shows: LiveData<MyResult<List<Show>>> get() = _shows } Here is my repository...
{ "language": "en", "url": "https://stackoverflow.com/questions/62601770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Who calls autorelease pool Who calls autorelease pool or who manages it. I call autorelease on my variable which is inside a function, but who manages this autorelease call, the calling function, or the caller function or who does? A: First of all, if you are saying autorelease, don't. Stop using manual memory mana...
{ "language": "en", "url": "https://stackoverflow.com/questions/30960398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: Migrating to spring 3.1.4 and Hibernate 4.2.8 SpringSessionContext.currentSession throws HibernateException: No Session found for current thread I'm migrating to spring 3.1.4 and Hibernate 4.2.8 and all of my dao and services classes are annotated with @Transactional correctly (my application works correctly with sp...
{ "language": "en", "url": "https://stackoverflow.com/questions/20528683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using anonymous runnable class code goes in deadlock state but with lambda it works fine I am trying to find out the cause behind below mentioned code. Here if I create Thread using anonymous inner class it goes into deadlock state but with lambda expressions it works fine. I tried to find the reason behind this beh...
{ "language": "en", "url": "https://stackoverflow.com/questions/40241074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: matplotlib - Shunt x-axis labels I have data in a numpy record array: a = np.array([(29.40818036, '1'), (34.96458222, '2'), (16.05225074, '3'), (13.23025364, '4'), (6.340924671, '5+')], dtype=[('f0', '<f8'), ('f1', 'S2')]) And I'm plotting a bar graph like this: plt.bar(np.arange(5)+0.5,a['f0'],width...
{ "language": "en", "url": "https://stackoverflow.com/questions/23650971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Make iPhone status bar disappear when displaying a modal view? I want to display a modal view, and want it to cover the iPhone's status bar. I tried setting the modal view controller's wantsFullScreenLayout property to YES; I also set its parent's property to YES as well. This doesn't work, presumably because the mo...
{ "language": "en", "url": "https://stackoverflow.com/questions/2188401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Type Inference with "auto;" * *From Wikipedia What is the use of the keyword auto in this case (below) if not automatic type deduction? struct SomeStruct { auto func_name(int x, int y) -> int; }; auto SomeStruct::func_name(int x, int y) -> int {return x + y; } *What are some of the situations one needs to e...
{ "language": "en", "url": "https://stackoverflow.com/questions/15510126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Get element by name which has $key PHP <input type="number" min="0" max="500" value="" name="qty<?php echo $key ?>" id="<?php echo $key ?>" onChange="findTotal()" /> JS function findTotal() { var arr = document.getElementsByName('qty'); .... } How do I get element by name which has $key inside? A: Let's ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43729422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: laravel 5.2 the next 3 events from today I want to set up an event calendar. The user must see that the next 3 events from today therefore, when the date is past, the event disappears how to do? thank you My controller: class AccueilController extends Controller { public function affichePage() { $agenda ...
{ "language": "en", "url": "https://stackoverflow.com/questions/52132038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Transform Flutter Barcode Result single line into list i have code like this return DefaultTabController( length: 4, child: Scaffold( appBar: AppBar( title: Text("Halaman Dashboard"), actions: <Widget>[ IconButton( onPressed: () { signOut(); }...
{ "language": "en", "url": "https://stackoverflow.com/questions/64165423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: tensorflow/keras training model keyerror Ok, from the top here's the imports that I use import keras from keras import layers from keras.models import Sequential import pandas as pd from sklearn.model_selection import train_test_split I then get the data from a csv using pandas and then split the necessary fields i...
{ "language": "en", "url": "https://stackoverflow.com/questions/51816624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to merge adjacent polygons I'm using a Javascript implementation of Fortune's algorithm to compute voronoi cells (https://github.com/gorhill/Javascript-Voronoi). My sites to compute are points on a map (so (lat,lng)). I first made the projection (lat,lng) -> (x,y), I then computed the voronoi cells and made the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/36280774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Rails + Github - How to keep 'personal' development hotfixes/tweaks uncommited/tracked? I do alot of personal development tweaks on code on my side, like adding an account automatically, opening up sublime in a certain way when there's an exception (with a rescue_from from an ApplicationController), and other misc t...
{ "language": "en", "url": "https://stackoverflow.com/questions/34675811", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why updating an android app can make it appear twice? I made a lot of changes to my app : databases scheme, graphics, code, etc. The biggest is the package name that I renamed to a total different one. The applicatgio got the same name and Id in the manifeste.xml file and the apk got the same name, with the same dig...
{ "language": "en", "url": "https://stackoverflow.com/questions/887226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Wordpress subdomain and multisite Ok, here is the situation i can´t solve: I have a WP multisite running on a server with 3 domains and 3 sites, and in that server i also have a subdomain running it´s own WP. So, let´s say i have this MU sites: site_1.com site_2.com site_3.com And also i have this subdomain: blog.s...
{ "language": "en", "url": "https://stackoverflow.com/questions/24435726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Non-type template parameter and std::enable_if_t I'm trying to make some persistence stuff and I have a struct like this: struct EntityPersistence { template <typename Archive> void persist(Archive &ar, Entity &) { } }; Then, in my class Entity I have something like this: static const EntityPersiste...
{ "language": "en", "url": "https://stackoverflow.com/questions/54596990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why PyObject_IsInstance always return 0 in my sample code I write a sample to learn python, but when call PyObject_IsInstance, this function always return 0. Here's my c code ReadBuf.c #include "Python.h" static PyObject* Test_IsInstance(PyObject* self, PyObject* args){ PyObject* pyTest = NULL; PyObject* pN...
{ "language": "en", "url": "https://stackoverflow.com/questions/21874018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Parsing XML references in Delphi I used Delphi 2006 data binding wizard to create a interface for an XML configuration file. Later on I realized that some repeated parts of the XML can be separated from the main file and referenced where needed. The resulting XML looks something like this: <?xml version="1.0" encodi...
{ "language": "en", "url": "https://stackoverflow.com/questions/1411625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Spring JPA REST sort by nested property I have entity Market and Event. Market entity has a column: @ManyToOne(fetch = FetchType.EAGER) private Event event; Next I have a repository: public interface MarketRepository extends PagingAndSortingRepository<Market, Long> { } and a projection: @Projection(name="expanded"...
{ "language": "en", "url": "https://stackoverflow.com/questions/41807631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Cyclomatic complexity for Visual Studio 2008 Is there any tool for showing the cyclomatic complexity for Visual Studio in the left hand bar where the debug symbol goes? I seem to remember there was an addin for Resharper but don't think it works in 4.5 Has anyone seen any similar tools, other than the built in supp...
{ "language": "en", "url": "https://stackoverflow.com/questions/873485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Java: difference between `Class.getDeclaringClass` and `Class.getEnclosingClass` Here's the javadoc for these two methods, and I'm having trouble understanding the difference between. Is it possible for the declaring class and immediate enclosing class to be different?
{ "language": "en", "url": "https://stackoverflow.com/questions/50559803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Upgraded to ASP.NET Core 3.1, getting error about System.Text.Json I have recently upgraded from ASP.NET Core 2.2 to ASP.NET Core 3.1. Locally, everything seems to work ok, but I have issues when deploying to IIS. The error I am receiving in the Event Viewer is Application: w3wp.exe CoreCLR Version: 4.700.19.56402...
{ "language": "en", "url": "https://stackoverflow.com/questions/59375881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: sed unterminated `s' command in subprocess.call I have to use python's subprocess.call module for this script. I need look in a file for the following string: "absolute/path/to/your/lib" and replace it with the following: /var/www/twiki/lib My script is below, but when I run it, I get the output: sed: -e expressi...
{ "language": "en", "url": "https://stackoverflow.com/questions/19981840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Where can I find a good introduction to timezones I have to write some code working with timezones. Is there a good introduction to the subject to get me started? A: Also answered at What every developer should know about time (which includes the referenced screenshots). With daylight savings time ending today, I t...
{ "language": "en", "url": "https://stackoverflow.com/questions/4362192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: problems with bcrypt-ruby I'm new to rails and am trying to write the part of an app that handles all the nasty account stuff that I can use for all my future apps (I wasn't able to find a boilerplate that did that for me.). Anyways. I've got bcrypt installed and I'm trying to register a new user. I created a route ...
{ "language": "en", "url": "https://stackoverflow.com/questions/20207535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Python not recognizing my edited BOTO file I am following the instructions that are in this link in order to create a Google Cloud storage bucket through Python. https://cloud.google.com/storage/docs/xml-api/gspythonlibrary I have followed all of the instructions and created a boot file with all of my credentials. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/36907364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How Do I Force Excel To Open A Log File As Text? I am trying to load a log file into Excel as it has timestamps in ms and I need to use Excel to convert them to something readable. However, it also has an xml tag near the top <?xml version='1.0' encoding='UTF-8'?> so Excel thinks it is an xml file, tries to open it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/60658264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java EE: Eclipselink transaction missing I have a maven based Java EE project that should run on GlassFish v3. There is a JSF ManagedBean that injects an EJB service. ManagedBean calls one of the injected EJB's method on button click where some JPA operation happens (creation of new entity object, persisting, flushi...
{ "language": "en", "url": "https://stackoverflow.com/questions/15341128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Optional query strings in ASP.NET Web API? I'm trying to handle these requests with the same controller action: * *localhost:52000/api/messages *localhost:52000/api/messages?page=1 *localhost:52000/api/messages?date=2019/29/11&page=1 I made a controller action as following: [Route("api/messages")] [HttpGet] pub...
{ "language": "en", "url": "https://stackoverflow.com/questions/58970764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET Identity - Forcing a re-login with security stamp So from What is ASP.NET Identity's IUserSecurityStampStore<TUser> interface? we learn that ASP.NET Identity has a security stamp feature that is used to invalidate a users login cookie, and force them to re-login. In my MVC app, it is possible for admins to a...
{ "language": "en", "url": "https://stackoverflow.com/questions/24570872", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: MVC Pattern JButton ActionListener not Responding So I'm trying to create a simple test program where the user can enter something into a JTextField, click the "add" JButton, and a JTextArea will add the users string to the the JTextArea (continuously appending with new line). I added the actionListener for the butt...
{ "language": "en", "url": "https://stackoverflow.com/questions/29506025", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I load Excel files selectively? I have an SSIS package that needs to lookup two different types of excel files, type A and type B and load the data within to two different staging tables, tableA and tableB. The formats of these excel sheets are different and they match their respective tables. I have thought ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Make web notification also working in smartphone browser? I have this code which allows me to send web notifications to the current page via a azure http static site. But i want the notification also to work with a mobile browser on the smartphone. It seems not to work there. Is there any solution or alternative way...
{ "language": "en", "url": "https://stackoverflow.com/questions/56255921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to unload a table with a field with ROWID datatype? I have to unload a table which contains field with ROWID datatype. I could not unload the table through QMF as it is not supporting this data typr. Is there any other way to unload the table? A: In DB2, ROWID serves more of an internal function to the RDMS tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/1001269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Selecting data based on status - sometimes a certain status must be accepted let's say I have a tabel with the following structure: ID | Date | Name | Status | Attribute A | Attribute B Now I want to select all rows from that tabel - however, if there are two items from the same data and with the same name - where o...
{ "language": "en", "url": "https://stackoverflow.com/questions/19428105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to change the Logging settings in Web.config on Windows Azure for all Web Roles? ASP.NET application on Windows Azure. The application is scalable and runs on 1..N Web role instances. We have log4net write to the Windows Event log and have Windows Azure Diagnostics consolidate to Azure storage. At the moment the...
{ "language": "en", "url": "https://stackoverflow.com/questions/13621787", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Doing an upsert in oracle SQL based on 2 fields I've the following SQL statement for an oracle DB (actually a list of statements like that). INSERT INTO SCHEMA_ABC.TBL_DATA (username, data_id, version) SELECT username, 12345, '1.0' FROM SCHEMA_ABC.TBL_USER; In the DB some combination of the username and ID are al...
{ "language": "en", "url": "https://stackoverflow.com/questions/57662938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: test if display = none This does not work, should it? Or can you stop the error if another line could do the same: function doTheHighlightning(searchTerms) { // loop through input array of search terms myArray = searchTerms.split(" "); for(i=0;i<myArray.length;i++) { // works. this line works...
{ "language": "en", "url": "https://stackoverflow.com/questions/2975073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: boto3 pricing returns multiple values for same type of instances I am trying the following code to get the prices of instances in my region: import boto3 import json my_session = boto3.session.Session() region = boto3.session.Session().region_name print "region : ",region pricing_client = boto3.client("pricing") ...
{ "language": "en", "url": "https://stackoverflow.com/questions/55122776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CSS: stop text in unordered list from wrapping on ipad I have the following unordered list: <ul> <li>some text</li> <li style="overflow:hidden;white-space: nowrap;">some long text</li> <li>other text</li> <li>more text</li> </ul> which displays like the following in a normal browser some text | some long text | oth...
{ "language": "en", "url": "https://stackoverflow.com/questions/13965208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Webpack build not updating contents on Apache server I have an Angular2 webpack project which works fine in local(webpack-dev-server) but once I deploy to my server(Apache), and run "npm run build", the build does not get updated(no errors shown).I tried removing my dist folder but still no change.No changes made to...
{ "language": "en", "url": "https://stackoverflow.com/questions/44817801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Foursquare API - Tastes When I try to send a GET request to Foursquare API below, I get "No matching endpoint." error. I have validated my tokens and everything seems normal. Any advices? REQUEST URL https://api.foursquare.com/v2/users/USER_ID/tastes RESPONSE MESSAGE { "meta": { "code": 404, "er...
{ "language": "en", "url": "https://stackoverflow.com/questions/29754994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() when using an if statement For some backstory I am writing a program that involves a grid of squares that can all be of various colors, I decided that I would store the colors in a NumPy array (i have basically no...
{ "language": "en", "url": "https://stackoverflow.com/questions/68647244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: React-native & Async Storage : App crashes every 5-10 min and all data lost on Android I made my first app with React-native / Redux / Async Storage. Everthing works fine on my Android 10.0 Emulator API 29 but in a real device (Samsung S9 or Galaxy Tab), the app crashes every 5-10 min in first situation (see below) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/70210947", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: synchronize servlet sessions I've created a web app that uses OAuthentication to log in to Twitter and the login process works successfully on a single servlet. On that servlet I get the session for the user. However, once I move to another servlet for the first time and try to get the session again, a new one is c...
{ "language": "en", "url": "https://stackoverflow.com/questions/3679354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to train CNN on LFW dataset? I want to train a facial recognition CNN from scratch. I can write a Keras Sequential() model following popular architectures and copying their networks. I wish to use the LFW dataset, however I am confused regarding the technical methodology. Do I have to crop each face to a tight-...
{ "language": "en", "url": "https://stackoverflow.com/questions/59675052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to compensate for space left by a relatively positioned element? (Without making a mess) I have these three elements: Now, my layout mandates that element .b (by the way, if it's important, they're all html <section>s) is somewhat superimposed on element .a. So I decide to apply position: relative to it, then ...
{ "language": "en", "url": "https://stackoverflow.com/questions/32592794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Parsing modified MNIST in the form of CSV for Conv Neural Network I'm planning on using this modified version of MNIST for benchmarking research, but they are currently in .mat format. So, I've read on StackOverflow that MatlabRecordReader actually isn't that robust, and that it's far smarter to change the data into...
{ "language": "en", "url": "https://stackoverflow.com/questions/51344016", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Bootstrap select plugin is not working I am trying to use this Bootstrap-Select Plugin. I have created a fiddle also according to the demo, http://jsbin.com/anepet/1/edit But i am totally blank and not understand why this is not working, the appearance of select list is not changing, can anybody please help me out? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/15727401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Passive Link in Angular 2 - equivalent In Angular 1.x I can do the following to create a link which does basically nothing: <a href="">My Link</a> But the same tag navigates to the app base in Angular 2. What is the equivalent of that in Angular 2? Edit: It looks like a bug in the Angular 2 Router and now there is...
{ "language": "en", "url": "https://stackoverflow.com/questions/35639174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "192" }
Q: How can I compare two lists of means in a dataframe, by row I am trying to compare with t-test, two list of gene expressions mean values. My matrix is built like this col1 <- c(6.7 , 8.4, 3.1) col2 <- c(7.7, 8.8, 3.6) matrix <- cbind(col1, col2) rownames(matrix) <- c("gene1", "gene2", "gene3") I want to get the p v...
{ "language": "en", "url": "https://stackoverflow.com/questions/56701313", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to implement pinch to zoom and flick with momentum for a drawing (graph) Core Graphics app? In my app, I drew a graph using Core Graphics (inside a view, inside a view). Not a graphing calc app though, it graphs patient data and marks it every six months, and it is larger than the screen, so the user needs to ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/6434835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CodeBlocks - How to add an icon to a C program? I have a small C console program and I want to add an .ico file to it, so that the executable looks nice. How can I do this in CodeBlocks with MinGW/gcc? A: I could not find relevant help via google that a total beginner (like me for C) could follow, so I will Q&A t...
{ "language": "en", "url": "https://stackoverflow.com/questions/49164595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Array.pop - last two elements - JavaScript I have a question using Array.pop function in JavaScript. Array.pop removes and returns the last element of an Array. My question is then: is it possible to remove and return the last TWO elements of array and return them instead of the last? I am using this function to ret...
{ "language": "en", "url": "https://stackoverflow.com/questions/46764953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: adding typings to a imported json file import { CharacterDataStructure } from "../../Typings/Interfaces" declare module "../../Data/Characters/Raw_Characters.json" { export = CharacterDataStructure } import RawCharacters from "../../Data/Characters/Raw_Characters.json" As you can see, I want to add a type to...
{ "language": "en", "url": "https://stackoverflow.com/questions/71700317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can I use non-constant array size for class members? in the code below, uint16_t sine[ANGULAR_RESO] throws an error non static member reference must be relative to specific object struct class BLDCControl { public: uint16_t ANGULAR_RESO; uint16_t sine[ANGULAR_RESO]; uint16_t pwm_resoluti...
{ "language": "en", "url": "https://stackoverflow.com/questions/61491959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Visual Studio call stack always off by a line I've been noticing that the call stack in VS always seems to be off by a line. Once I step into a function the line number for the stack frame I just left gets incremented and points to the next non-empty line. Then if I double click that frame in the Call Stack window i...
{ "language": "en", "url": "https://stackoverflow.com/questions/42943008", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Android Camera preview has 'laces' or 'Mosaic' on the border use SurfaceTexture,Why the picture cannot full fill up the screen? I want to make camera preview only, but some reason causes the problem like the picture shows below: I use a subclass of GLSurfaceView to preview. From the picture we can see the picture c...
{ "language": "en", "url": "https://stackoverflow.com/questions/51296592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to access slider menu from another activity? Hi I am working with android applications.I have a slider menu in my library project.I had integrated it with another project and I need to access the same slider menu in my new project.I tried with calling intent, but it calls the full activity.I need only slider men...
{ "language": "en", "url": "https://stackoverflow.com/questions/22754374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }