text
stringlengths
15
59.8k
meta
dict
Q: Combine two codes into one - check if url exist / login I have written a code to relink depending on the user input (token). For example: if the user inserts 1234, and presses enter or presses the button login. The website will redirect to: example.com/login/1234. Now I want to combine it with a url check. So if the...
{ "language": "en", "url": "https://stackoverflow.com/questions/56546740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to run LLVM bitcode generated from Haskell source code I'm trying to run LLVM bitcode generated from Haskell source code instead of compiling the code to a native binary on macOS. I have following file: $ cat hello_world.hs main = putStrLn "Hello world!" And I'm using following steps to create the .bc file: $...
{ "language": "en", "url": "https://stackoverflow.com/questions/56322704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Identifying path of current JSF / XHTML page I need something that will uniquely identify my JSF (XHTML) page. I know that I have: String URI = servletRequest.getRequestURI(); This gives my full path, but that doesn't help if I use PrettyFaces or any other URL changing library. A: You can use UIViewRoot#getViewId...
{ "language": "en", "url": "https://stackoverflow.com/questions/12371100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Next and prev slide I have the following html - <div id='slides'> <div id='slide1'>Slide1!</div> <div id='slide2'>Slide2!</div> <div id='slide3'>Slide3!</div> </div> I am able to slide between the divs by using this technique with three buttons btnSlide1, btnSlide2, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/32224346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MySQL ORDER BY date and team I would like to order by date and then team in a MySQL query. It should be something similar to this: SELECT * FROM games ORDER BY gamedate ASC, team_id AND it should output something like this: 2010-04-12 10:20 Game 1 Team 1 2010-04-12 11:00 Game 3 Team 1 2010-04-12 10:30 Game 2 Team 2...
{ "language": "en", "url": "https://stackoverflow.com/questions/2620397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Memory Still Valid? I have a C++ class defined as Now, assume that I am newing up the memory of the map sessionConnections in the constructor itself. My question is that pointer value of connCtx stored in the map of m_sessionConnections will be always there and not go out of scope, once it is returned from the fun...
{ "language": "en", "url": "https://stackoverflow.com/questions/8292188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: PHP variable declaration shorthand (similar to JavaScript) In JavaScript, I can do this: var somevar = { propertyTwo : false, propertyThree : "hello!" } var test = somevar.propertyOne || somevar.propertyTwo || somevar.propertyThree alert(test); //displays "hello!" Is there a similar functionality in PHP f...
{ "language": "en", "url": "https://stackoverflow.com/questions/17454884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: wordpress customized theme, default add image in full width I have written a very basic theme, and want to make sure for every new post, when an image is added, the default attribute would be "width=100%". any hints please? A: Your individual posts will probably have a class or id on them - if not you need to add o...
{ "language": "en", "url": "https://stackoverflow.com/questions/48359333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to click on a particular cell in selenium web table having dynamic id Web Table will look like - I would like to click on Edit button for Steve Smith . <table style="width:100%"> <tr> <td>Steve</td> <td>Smith</td> <td>Edit</td> </tr> <tr> <td>Mark</td> <td>Jackson</td> <td>Edit </...
{ "language": "en", "url": "https://stackoverflow.com/questions/33125531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: terraform apply trying to destroy launch configuration that is deleted manually I've deleted couple of launch configurations from AWS console which I didn't need. Now with an updated terraform script, terraform apply tries to deleted launch configurations that are deleted manually and fails. Prior to terraform apply...
{ "language": "en", "url": "https://stackoverflow.com/questions/56435354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Added GWT to web app. Other devs complain about compile time. What should I tell them? I recently added GWT to our project to implement an Ajax feature of our web app. The other devs are complaining about the extra time GWT compile adds to the build and are asking why I didn't use JSON and jQuery instead. What sho...
{ "language": "en", "url": "https://stackoverflow.com/questions/3602992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: coding asp page for avoid of hack all of us know that most of attacks to websites is from their URL. i saw some websites code their page for example we see http:/www.*.com/code/ instead of http:/www.*.com/code/code.aspx how do that? every one can give me some tutorials that tell how can i do that in asp.net? A: T...
{ "language": "en", "url": "https://stackoverflow.com/questions/7692732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: DDD and Microservices - data flow and structure I'm trying to create a simple blogging platform and at the same time learn more about DDD and Microservices, so I wanted to ask you about two advises in this context: * *One of the business rules I assumed in my project is that only users in roles Publicist and Admin...
{ "language": "en", "url": "https://stackoverflow.com/questions/70275427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Square brackets in keras model output shape I've recently encountered this when looking at a model's summary. I was wondering, what's the difference between [(None, 16)] and (None, 16)? Why does the Input layer have such input shape? Source: model.summary() can't print output shape while using subclass model A: Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/63272292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Visual Studio stating "Microsoft is not a class or namespace name" I am using Visual Studio 2019 and developing in C++. I have installed Microsoft Cognitive services by following this walkthrough and my pakcages.config looks correct. Now when following this tutorial to use cognitive speech, my c++ solution will not ...
{ "language": "en", "url": "https://stackoverflow.com/questions/66429583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Scrape website that requires button click I am trying to scrape this website. Unfortunately, the data that I want to scrape using rvest is hidden behind a button (the plus symbol). I tried to do it with the rvest package and I use the following code: library(rvest) url <- 'https://transparency.entsoe.eu/generation/r...
{ "language": "en", "url": "https://stackoverflow.com/questions/42983649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Using Pandas to pd.read_excel() for multiple worksheets of the same workbook I have a large spreadsheet file (.xlsx) that I'm processing using python pandas. It happens that I need data from two tabs (sheets) in that large file. One of the tabs has a ton of data and the other is just a few square cells. When I use p...
{ "language": "en", "url": "https://stackoverflow.com/questions/26521266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "362" }
Q: Does valarray have contiguous memory alignment? Does valarray have contiguous memory alignment? I want to pass a valarray to a function (from IPPS), which only takes pointers, by passing &myValarray[0]. But therefore I should be sure, that valarray's memory alignment is contiguous. Thanks! A: Assuming you're aski...
{ "language": "en", "url": "https://stackoverflow.com/questions/11143109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Drawing a circle on a pictureBox from another winform I have two winforms in my application. One of the forms has a picturebox with a jpg loaded of our building plan. The main form has code that does facial recognition identifying people coming into certain areas. I have been asked to modify this program to show ...
{ "language": "en", "url": "https://stackoverflow.com/questions/56482346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PowerShell EWS API | How to download attachments? In the code below, I am able to retrieve the subject of the email but unable to download the attachment. I am not even able to output the name of the attachment. The attachment is a WAV sound file. Import-Module "C:\Program Files\Microsoft\Exchange\Web Services\2.2\M...
{ "language": "en", "url": "https://stackoverflow.com/questions/74665413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Create R Correlation Matrix with RevoScaleR package (multithreaded) functions in SQL Server I am trying to create correlation matrix using SQL Server 2016 R Services. Since that i will have large amount of data, i want to use the new Rx version of standard R "cor" function. This is the function that i want to use: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/51520501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can i get sum of each elements in tuple Python For example i have a tuple t = ((1, 1), (1, 1), (1, 1)) How can i get sum of all this elements with only one loop I would like to get 6 A: You can map with sum, and get the sum of the result: sum(map(sum, t)) # 6 Or if you prefer it with a for loop: res = 0 fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/60774862", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Pycharm keeps giving name 'class' is not defined error I have tried to see every possible solution for this but for some reason none of them have worked. I am doing Learn Python the Hard way exercise 49. I made my own parser and it works when I run it via pycharm, when i open the console or powershell and try to imp...
{ "language": "en", "url": "https://stackoverflow.com/questions/41404463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I build a follow system in Firestore I switch from Firebase realtime database to Firestore In the realtime database, I was using this code for the follow system: checkFollowingStatus(user.getUID(), holder.followButton) holder.followButton.setOnClickListener { if(holder.followButton.text.toString(...
{ "language": "en", "url": "https://stackoverflow.com/questions/65054319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Row by row calculation Dumb question, but I am a bit rusty in Python. So I wrote the following code: df = pd.read_csv(mypath ) for index, row in df.iterrows(): if row['Age'] < 2: Total = row['Input'] * 1.2 elif row['Age'] > 8: Total = row['Input'] * 1.1 else: Total = row['Input'] ...
{ "language": "en", "url": "https://stackoverflow.com/questions/67872477", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Spring @ConditionalOnBean does not work correctly with @RefreshScope I have following classes: public class ClassA { } @Configuration public class config(){ @RefreshScope @Bean public ClassA classA() { return new ClassA(); } } @Component @ConditionalOnBean(ClassA.class) public ClassB ...
{ "language": "en", "url": "https://stackoverflow.com/questions/72829400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Python error in calling the function I have a class have these two methods: def whatIsYourName(self): print 'my name is class A' def whatIsYourName(self, name): print 'my name is {0}, I am class A'.format(name) I can call the second one. But when I call the first one like this: x = myClass() x...
{ "language": "en", "url": "https://stackoverflow.com/questions/21328029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Problems with Ethernet shield + arduino I am currently trying some simple (ready) programs from Arduino examples regardin the ethernet shield. I am still getting no result. Am always receiving that I am not connected or a blank serial monitor. Does anyone knows why? I think I am connected to the DHCP since i am ...
{ "language": "en", "url": "https://stackoverflow.com/questions/22556421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Access to elements in a list of list (Rccp) I created a list of list in Rcpp (replicated 3 times) cppFunction('List myfunction(){ List L = rep(List::create(List::create(Named("elmement_1")=1,Named("elmement_2")=4)),3); return L; }') Output [[1]] [[1]]$elmement_1 [1] 1 [[1]]$elmement_2 [1] 4 [[2]] [[2]]$elmement_...
{ "language": "en", "url": "https://stackoverflow.com/questions/64648754", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Retrieve last level directory name from path I have a string that represents a path ... something like this: /A/B/C/D/E/{id}/{file_name}.ext The path structure could be different but in general I would like to retrieve last directory name (in the example {id}) before the file-name. I would like to use Path java cla...
{ "language": "en", "url": "https://stackoverflow.com/questions/67696137", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Drawing Rectangle with only 2 corners rounded in Qt I am working on an application where I need to fill the color for the Pixmap using Painter. Pixmap is of type rectangle with (bottom edge) 2 rounded corners. Top 2 corners are flat/normal. I tried to use the drawRoundedRect() API of Qt, but it makes all the corne...
{ "language": "en", "url": "https://stackoverflow.com/questions/15288708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Select the most recent 5 rows based on date I haven't touched PHP in a while and trying to select the 5 most recent entries in my database and print them to screen. I see mysql command isn't recommended anymore and to use PDO->mysql instead. My query is something like this: SELECT id,title,date,author FROM table ORD...
{ "language": "en", "url": "https://stackoverflow.com/questions/33337040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: ng:areq : Argument 'AppController' is not a function, got undefined JS: (function () { 'use strict'; var app = angular.module('appModule', [ 'ngRoute', 'winjs' ]); app.controller('AppController', function ($scope) { $sc...
{ "language": "en", "url": "https://stackoverflow.com/questions/35555750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Snakemake overwrites rules' log files when using retries - idiomatic way to make it append? I have a Snakemake workflow in which a rule can seemingly randomly fail. I'm using Snakemake 7.7.0 and have set retries for the rule using the retries directive. The command prints to stdout and stderr, and I want to append b...
{ "language": "en", "url": "https://stackoverflow.com/questions/75530584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to install sphinx4? For the vast majority of you this will probably be straightforward, but I need help installing the sphinx4 speech recognition software. In particular, using cygwin to do so. 1) how does one set the environmental path variable to the java sdk (I had to install NetBeans) 2) Does one need to ins...
{ "language": "en", "url": "https://stackoverflow.com/questions/17710236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JDialog inside a wrapper class does not appear I have a login form which is an instance of JDialog class. but it doesn't appear inside the JFrame. I implemented it inside the Application before as a method and it worked. but after wrapping it inside the Login class it does not work also there is not any error. what ...
{ "language": "en", "url": "https://stackoverflow.com/questions/16670530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: why window.open() opens in the same window? I write following code` <a href="b.html" class="popup">Holiday</a> <script> a.popup.click(function(event) { event.preventDefault(); window.open($(this).attr('href')); }); </script> It'll open b.html in a new window, but opens in the same, why? I include JQu...
{ "language": "en", "url": "https://stackoverflow.com/questions/19344591", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: Dax for % of columntotal I've got a tablereport with on the rows product category and on the columns years. In the valuesection, I want to show the number of sales. This works fine. But now I also want to show the % of columntotal for the product categories. I use dax: Measure := count(factSales[salesnr])/calculate(...
{ "language": "en", "url": "https://stackoverflow.com/questions/37732968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Cordova - Error code 1 for command | Command failed for I'm new on cordova, so if my question is not relevant, forgive me. i have a cordova project in my Windows 7 x64 machine. Yesterday i was build my cordova app via cordova build android --release. But i need to add new plugin cordova-plugin-zip to update my cordo...
{ "language": "en", "url": "https://stackoverflow.com/questions/31089647", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Breaking Ruby class for DRY I have some classes like these: class Word def initialize (file_name) load_file(file_name) end def pick_first_word(score) #get first word end private def load_file(file_name) #load the file end end class MyClass < SomeOther def initialize (file_name) @w...
{ "language": "en", "url": "https://stackoverflow.com/questions/16065822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: GameplayKit's nextIntWithUpperBound() failing in playground The below code works great in an iOS project, but fails in an iOS playground. Any idea why, other than "it's probably a bug"? Note: you need to open the playground debug area to see the message: "overloads for 'subscript' exist with these partially matching...
{ "language": "en", "url": "https://stackoverflow.com/questions/34274893", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to create a Role in Loopback/Node.Js I created this method to create an Admin Role. I have to check in user table if the admin field is set to 0 or 1 of the current user to detect if it's a normal user or an admin. Problem is when I console.log('obj',objUser) I get this : obj Promise { _bitField: 0, _fulfil...
{ "language": "en", "url": "https://stackoverflow.com/questions/56873074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How to output group claims in B2C from ADFS as an identity provider I'm using ADFS as an IdP for Azure B2C through OpenID Connect. Login works and B2C sends UPN from ADFS as socialIdpUserId claim in JWT token. But group claims from ADFS do not work. How to receive group claims in JWT? Here is the setup: ADFS claim...
{ "language": "en", "url": "https://stackoverflow.com/questions/52312521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Misplaced sense of an ASP PlaceHolder control I have a simple div on html, something like: <div class="warning"> <h3>Please make sure:</h3> <asp:PlaceHolder id="phWarnings" runat="server"></asp:PlaceHolder> <br /> <a href="javascript:void(0)" onClick="$('#warning').hide()">Okay</a> </div> The PlaceH...
{ "language": "en", "url": "https://stackoverflow.com/questions/5309921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Projection of mongodb subdocument and get subdocument as class in c# Hi. I have a Collection named "Level" with this class structure : public class Level { [BsonId] public string Id {get; set;} public string Name { get; set; } public int Number { get; set; } public int TotalS...
{ "language": "en", "url": "https://stackoverflow.com/questions/47659837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: I want to pin down Elasticsearch during Ubuntu 18.04 to 20.04 upgrade I'm trying to upgrade my ubuntu 18.04 to 20.04 and don't want Elasticsearch version to change. I ran the below playbook - block: - debug: msg: "This server is running Ubuntu 18.04 LTS and will be upgraded to 20.04 LTS." - name: "Excluding Ela...
{ "language": "en", "url": "https://stackoverflow.com/questions/74605149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can you get the name of a resx string accessed through dot notation using some sort of reflection? I have language resource files that I typically access using dot notation like so: MyStrings.This_is_a_test_string However, I now need to get two language versions of the same string in error handling. The reason is th...
{ "language": "en", "url": "https://stackoverflow.com/questions/70195057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you create a new column based on Max value of 1 column and Category of another? I am working with a bunch of data for my job creating status reports on the documents that we are working through that we then assign to an area. We decided to use PowerBI as an interactive way to see where everything is at. Using...
{ "language": "en", "url": "https://stackoverflow.com/questions/67131507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Input field set as 'Value=' instead of 'value=' I have a project written in C# MVC using Razor templates. On one of my pages I have several input fields that contain numeric values. The Razor code that sets the values of these input fields looks like this: @Html.Editor(Model.DesignParams[i].ParamId, new { htmlAt...
{ "language": "en", "url": "https://stackoverflow.com/questions/27559582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Should I use public $var or should I use __construct()? I'm new to PHP OOP, and I think public $var and __construct() are exactly the same. What's the difference? Which one should I use? A: They are completely different things: one declares a class property, and the other is the name of the class constructor. There...
{ "language": "en", "url": "https://stackoverflow.com/questions/8151950", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Casting from double to decimal rounds columns in Scala Spark I have a dataframe that looks like this when I print it using df.show(): |---id---|----val_dbl----| | 1| 1.378332E-7| | 2| 2.234551E-7| | 3| 4.03E-7| |--------|---------------| with the schema df.printSchema() |-- id: intege...
{ "language": "en", "url": "https://stackoverflow.com/questions/71667400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to prevent SQL Injection when using MVC's bundling We have an MVC 5 site and currently we are using bundles for our css and java script which is all working just fine. The issue is that when doing so, it creates something like: /bundles/stylesheet?v=_NMyDE-CcoALPkYZqbmiXkI3LfoWnS1GFeEZNVMaBT81 We also use a th...
{ "language": "en", "url": "https://stackoverflow.com/questions/25123734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL Error: ORA-02000: missing ALWAYS keyword i use Oracle version 11g and i want to ad HR db but when i try to create Table this error appear . CREATE TABLE regions ( region_id NUMBER GENERATED ALWAYS BY DEFAULT AS IDENTITY START WITH 5 PRIMARY KEY, region_name VARCHAR2( 50 ) NOT NULL ); how can i r...
{ "language": "en", "url": "https://stackoverflow.com/questions/63771011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to not switch to the first or last "li element" when they are next in line? I have a pagination bar and it will switch to the next button if you click the "next" or "prev" arrow buttons. I wrote some code to stay on the current "page" number if the next item in the list is ".next" or ".prev", but it is not worki...
{ "language": "en", "url": "https://stackoverflow.com/questions/31488607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Creating jar from command prompt giving error I have tried the example as the same as written as answer from this link'How to create a .jar file using the terminal' to create a jar file from command prompt. But I am getting an error 'no main manifest attribute , in Helloworld.jar'. What will be the problem? Please ...
{ "language": "en", "url": "https://stackoverflow.com/questions/26426738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Dialog outside iframe I have a little problem with a JavaScript dialog. I have a button and a dialog into the iframe with the next code $( "#correcto" ).dialog({ width: 600, closeOnEscape: true, autoOpen: false, draggable: false, modal: true, show: { effect: "blind", duration: 200 }...
{ "language": "en", "url": "https://stackoverflow.com/questions/22999608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to properly specialize std::swap for my types? After I've managed to overload std::swap for my class type now I want to specialize it rather than overload it since the standard allows adding template specializations to namespace std. Here is my example: class Foo{ public: Foo(){ std::cout << "Foo()\n...
{ "language": "en", "url": "https://stackoverflow.com/questions/66953901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to print a float value in vertex shader I try to write a small program in OpenGL ES 2.0. But i found i quit hard to inspect the variable in shader language. For example i want to know the value in ver vertex shader. I will pass the value to fragment shader and put the value as the Red in glFragColor. But i foun...
{ "language": "en", "url": "https://stackoverflow.com/questions/32556551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Report design not valid. Field not found Jasper Reports Im trying to create a basic jasper report with JRBeanCollectionDataSource. In there im having a list of objects inside the javabean. public class Course { private int id; private List<Student> students; } Student object looks like public class Studen...
{ "language": "en", "url": "https://stackoverflow.com/questions/30952574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Matplotlib labeling x-axis with time stamps, deleting extra 0's in microseconds I am plotting over a period of seconds and have time as the labels on the x-axis. Here is the only way I could get the correct time stamps. However, there are a bunch of zeros on the end. Any idea how to get rid of them?? plt.style.use('...
{ "language": "en", "url": "https://stackoverflow.com/questions/53565088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: stripe checkout.session returned data.payment_intent is null When I create a checkout.session with stripe the returned data.payment_intent is null I filled in every required field and the payment works. But without the payment_intent. const url = await stripe.checkout.sessions .create( { line_items: [ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/73393228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: UITableView edit cell without changing underlying core data I have a tableview of dates that are calculated based on stored week periods from core data. The tableview shows the results for each calculation: Example: Today's date - 80 weeks (the 80 comes from core data) So tableview would show date for 80 weeks pri...
{ "language": "en", "url": "https://stackoverflow.com/questions/19772171", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to handle minimize/maximize buttons in tkinter I've researched a lot about this topic, but nothing seems to be helpful. I want to get a callback when I press the minimize/maximize (- button) on my tkinter window. Like when I click on the close button, I can get a callback like this: # Function for callback def o...
{ "language": "en", "url": "https://stackoverflow.com/questions/72678069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Do regex implementations actually need a split() function? Is there any application for a regex split() operation that could not be performed by a single match() (or search(), findall() etc.) operation? For example, instead of doing subject.split('[|]') you could get the same result with a call to subject.findall...
{ "language": "en", "url": "https://stackoverflow.com/questions/9756920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Responsive navigation has scroll bar? I've been messing with a bootstrap theme for Wordpress and when I shrink down the navigation it turns into a scroll bar. This is odd because it should be overlaying. The website is: http://sendtohim3dprinting.co.uk/ and this is how it looks: I can't quite figure it out. These ...
{ "language": "en", "url": "https://stackoverflow.com/questions/32171133", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Out of HeapSpace with Matrix library I'm trying to apply a Kalman Filter to sensor readings using Java, but the matrix manipulation library I'm using is giving me a heapspace error. So, does anyone know of a matrix manipulation library for the JVM with better memory allocation characteristics? It would seem that th...
{ "language": "en", "url": "https://stackoverflow.com/questions/9611689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to backup Ec2 linux instances along with users Is there a way to backup users along with software created in AWS. context:I am currently learning ansible and shutting down those instances created after some time..Everyday i have to recreate again users,,install anisble after relaunching those instances A: The n...
{ "language": "en", "url": "https://stackoverflow.com/questions/70418502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: FB Like to status on my page I want to add a Like button to my page, but Like should belong to the fan page status, not to page I'm on it. My idea is that I want to automatically add a link to a new article from WordPress to Facebook, and then I want the same like I have on Facebook, to have the amount of likes be s...
{ "language": "en", "url": "https://stackoverflow.com/questions/9162104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Error while creating URI with com.sun.jersey.api.client.WebResource adding String value to path Using com.sun.jersey.api.client.Client,ClientResponse and WebResource. Client client = this.client; WebResource webResource = null; ClientResponse response = null; String url = ""; url = "https://test.com...
{ "language": "en", "url": "https://stackoverflow.com/questions/54253540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: fsockopen(): SSL: Connection reset by peer in codeigniter email send Getting error while sending email in my codeigniter project from live ubuntu 16.04 server. (On localhost it works fine.) My smtp configuration is: $config = Array( 'protocol' => 'smtp', 'smtp_host' => 'ssl://smtp.googlemail.com', ...
{ "language": "en", "url": "https://stackoverflow.com/questions/57656383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Generating WSDL files I want to implement a WSDL service. To generate its codes, I use from different tools. When I use SoapUI, the generated file's method is as below: ******************************************************* <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:te...
{ "language": "en", "url": "https://stackoverflow.com/questions/67034808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Use switch-case construction to count how many times a number has been typed Create a C-program that counts how many times each of the numbers 0-4 have been typed. Use a switch-case construction. Use default to count the number of other characters. Print the amount of times a certain number has been typed. Here is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/48379589", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: HTML code is getting send in email instead of rendered view Wordpress I have added an action to send email after every post update, in email logs I can see proper view is getting sent, but I don't understand why gmail is showing html code of template instead of rendered view. Functions.php $email_body = file_get_con...
{ "language": "en", "url": "https://stackoverflow.com/questions/69392460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Keytool create a trusted self signed certificate I am trying to use the (java) keytool to create a self signed certificate but when I attempt to use it I get the following exception (see bottom for entire exception). ...<5 more exceptions above this> Caused by: sun.security.validator.ValidatorException: No trusted...
{ "language": "en", "url": "https://stackoverflow.com/questions/2200176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: gRPC node-js method not called when protocol specifies void parameter type I have just recent started experimenting with gRCP and currently trying to see how it works using node-js to create a simple example . However after creating the protocol to be used between both client and server . One of my rpc method is n...
{ "language": "en", "url": "https://stackoverflow.com/questions/69356765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: After opening multiple pages with Puppeteer I get blank pages I apologize if I duplicated the topic, but everything I've tried so far doesn't help. I am trying to scraping some details data from each links from ads. After opened few links, I get each next time blank page without any data. Also, if I stop script and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/71286322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Hide tableview header that contains a search bar under navbar? I have a search bar in the tableview header. I want to offset the position of the search bar that it looks hidden under the nav bar until the user pulls down on the tableview to reveal a search bar. I have looked everywhere to find this but cannot. Can...
{ "language": "en", "url": "https://stackoverflow.com/questions/37420621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Add textboxes dynamically in a form, using Jade template engine My requirement is a simple one , but no definite answer is available for this one on the net. I have a combobox in my jade page which takes numbers as input.I want the same page to refresh and have as many textboxes as the number specified. I know thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/26443702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to Write an LLVM Pass in C I am trying to write an LLVM Pass in C, but I can only find information on how to do this in C++. If anyone has any references or knowledge on this topic, I would greatly appreciate it! Thank you! A: You should take a look at llvm-c-kaleidoscope where you can learn by example how to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/16794985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Paste image via ajax to laravel controller i'm trying to send a form with an image (file) via ajax to a laravel backend. currently i'm trying to get it work with form data, but all i can get are the params but not the file... I'm just outputting the content in console later on the ajax will be used On the save click...
{ "language": "en", "url": "https://stackoverflow.com/questions/51862798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: validates combination of attributes I have two attributes (hours and days) in my model (auction). I have business logic on the combination of hours and days. For example auction duration = days*24 + hours I also have some basic validation on hours and days: class Auction < ActiveRecord::Base validates :days,:pre...
{ "language": "en", "url": "https://stackoverflow.com/questions/13262579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can i seperate joomla sub menus in different modules I have 3 level menus and i need to display each sub menu in diferrent modules. ie, This is a 3 level menu, i need to display main menu in MODULE_ONE, and second level in MODULE_TWO and third level in MODULE_THREE position correspondingly, with out the tree st...
{ "language": "en", "url": "https://stackoverflow.com/questions/14500691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can't drop table after creating table with wrong engine I'm trying to drop a table containing several hundred thousand column-based records. Normally when creating the database I use a column-based engine (infinidb) but in this case I forgot to include the ENGINE statement. So the database is pretty much unusable fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/37970417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Python: How to find the highest number in a column of data I have csv and txt files and I want to analyze them and find the highest number in a specific column. For example I want to know the highest number (in all the rows) in column 5. This what I have so far but I don't know how to figure out how to search a spe...
{ "language": "en", "url": "https://stackoverflow.com/questions/43920583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Show night / day icon (with php) using sunset / sunrise What is the best method / script to echo an image after sunset and before sunrise with php. if (date("H:i") > date_sunset(time(), SUNFUNCS_RET_STRING, 51.29, 4.49, 90.7, 2)) { $icon = "icon_night"; } else { $icon = "icon_day"; } if (date("H:i") > date_sunrise(...
{ "language": "en", "url": "https://stackoverflow.com/questions/57299535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Correlations with alternating second component in R (I think this one's fairly straightforward but it's not coming to me, as I'm not terribly comfortable using loops in R.) I'd like to run a series of cor() where one element of the function is the same column, but the second alternates to the next column over. For ...
{ "language": "en", "url": "https://stackoverflow.com/questions/60759459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How would I convert a valid Javascript JSON into a dictionary in Swift 2? I am trying to create a dictionary from this JSON in an variable of type [String: AnyObject]. I am using Alamofire to make the request. However, the responseJSON response handler doesn't work since it is not a 'valid' JSON object in Swift. H...
{ "language": "en", "url": "https://stackoverflow.com/questions/36847446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting code coverage in Sonar but no test results (.Net) I'm re-using reports in my sonar config: sonar.gallio.mode=reuseReport sonar.gallio.reports.path=gallio-report.xml sonar.gallio.coverage.reports.path=results.xml I've previously run Gallio and OpenCover and can confirm that both completed successfully and th...
{ "language": "en", "url": "https://stackoverflow.com/questions/18640406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Add a menu to a java swing application I'm working on a Java swing application, and I want to get a menu like that: I created the first menu (on the top) using a JMenuBar and JMenuItems, but I don't know how to create the second one. Thanks in advance A: You could try making a JToolBar and then add buttons to it. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/23705777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: How to open partial view with $window.open()? How can i set url in $window.open() .. something like this $window.open("/account/something") ? I tried this but i get always default page without anything. A: You can simply use $window.open('/controller-Name/action-method-Name');}; Which will find the action method ...
{ "language": "en", "url": "https://stackoverflow.com/questions/31243461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how do I subtract -1 if a specific char is not found within a string I need some hints on how to program this, this method is for a hangman game guessCh is the letter user has guessed while secretCh is the letters in the secret word, they come from a while() loop one at a time. But what I need is instead of just if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/12555239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java charAt() Method Crashes in For Loop The following code should read 5 strings from a .dat file and then print each individual character from each of the strings. File file = new File("tictactoe.dat"); Scanner scan = new Scanner(file); String str = ""; int x; for ( x = 0; x < numGames; x++) { str = scan.nextL...
{ "language": "en", "url": "https://stackoverflow.com/questions/12605978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: reduce image size in memory After an image was downloaded by the browser, am I correct to think that even if the image is resized smaller with css, the memory footprint is still the same as the image remains untouched in the browser's memory ? If so, is there a way to actually decrease the size of the image so that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/14019095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Gradle Kotlin DSL: Extract contents from dependency How do I convert the following snippet (based on the one by Peter Niederwieser) to Kotlin? configurations { assets } dependencies { assets 'somegroup:someArtifact:someVersion' } task extractApi(type: Sync) { dependsOn configurations.assets from { /...
{ "language": "en", "url": "https://stackoverflow.com/questions/54833503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to include apostrophe in character set for REGEXP_SUBSTR() The IBM i implementation of regex uses apostrophes (instead of e.g. slashes) to delimit a regex string, i.e.: ... where REGEXP_SUBSTR(MYFIELD,'myregex_expression') If I try to use an apostrophe inside a [group] within the expression, it always errors - ...
{ "language": "en", "url": "https://stackoverflow.com/questions/57542826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Tracking user/client activity in react and .net web app I am trying to track all CRUD activities on my web app. I am using React and .NET with MySql. Idea is that if someone edits let's say client data (phone number, address, etc...), I want to have something like an activity log where I will see WHO edited that cli...
{ "language": "en", "url": "https://stackoverflow.com/questions/72627994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Create array from dynamically created input field id's What I need to do is retreive all the values of the input fields and store them in the database after pressing a submit button. Here is what I'm doing: I retrieve an unknown number of rows from the query, I created an ID dynamically for every input field that c...
{ "language": "en", "url": "https://stackoverflow.com/questions/23170955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to auto run a dotnet command when opening a solution in visual studio I am interested to run dotnet watch test when opening a solution with my unit tests in visual studio 2017. Is there a way to run that just after the solution is open without doing it manually? A: Visual Studio Task Runner can run any arbitrar...
{ "language": "en", "url": "https://stackoverflow.com/questions/44127882", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Django REST api I'm using Django's rest framework and currently set up I have a url /api/course/ which shows a list of courses that are already in the database. Courses have a Lecture foreign key and I want to make it so that you can access each course's lectures. Currently I've set it up so that /api/lectures takes...
{ "language": "en", "url": "https://stackoverflow.com/questions/33810462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Print monitor modification and redirection to another printer port I'm trying to modify the data being printed to an Epson POS printer before it is printed. I'm currently doing this by using a print monitor instead of the Epson port in the printer port config. In the WritePort() routine for the monitor, I am writi...
{ "language": "en", "url": "https://stackoverflow.com/questions/13352189", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }