text
stringlengths
15
59.8k
meta
dict
Q: How to use a promised function in a react app I'm trying to implement Bullet train API in a React web app. According to their node client documentation, I have setup the following function: export const isFeatureEnabled = async (nameOfTheFeature) => { return new Promise((resolve) => { bulletTrain.init({...
{ "language": "en", "url": "https://stackoverflow.com/questions/60447275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Dynamic arrays and lists So, I'm trying to create a kind of text editor for creating question lists. I'm unsure how to achieve that. What I came up with until now is to create a JPanel which represents an A4 piece of paper. Then, I'd like to create maybe another JPanel which would contain several textboxes in which ...
{ "language": "en", "url": "https://stackoverflow.com/questions/11970602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Comment out a whole hyperlink block with sed in an HTML file I'd like to remove certain hyperlinks which all contain "legacy/" in the URL in many HTML files. However, some of them are in one line <a href=".../legacy/..."> ... </a>\n while others are not. How can I use sed to replace them all at one time? So far ...
{ "language": "en", "url": "https://stackoverflow.com/questions/55572926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: INNER JOIN vs CROSS JOIN vs CROSS APPLY One of the joys of SQL is that there are often multiple ways to do the same thing, so which is "best"? In this case, I am inserting records from an 'Import' table and giving them all a default security level of 'Viewer' (could have different Key IDs in different databases). I...
{ "language": "en", "url": "https://stackoverflow.com/questions/42587081", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Getting an error while trying to print a string in Groovy I try to print the following in Groovy web console def str1=''C:\mkjk\sys'' println str1 I get the following error: Impossible to parse JSON response: SyntaxError: Unexpected token ' A: It should be: def str1 = 'C:\\mkjk\\sys' // single quotes or def str1...
{ "language": "en", "url": "https://stackoverflow.com/questions/26627645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: How can I create a dictionary of frames of an image in Python? I have a .tif image which has 4 dimensions - x, y, z, and no. of channels. There are 15 frames in total. I want to slice each frame and save it as its own image, and be able to perform operations on the slices. I have I have previously saved each slice a...
{ "language": "en", "url": "https://stackoverflow.com/questions/71716129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the gcc alternate of "relro" and "now" flags in "mingw-gcc"? What is the gcc alternate of gcc flag "relro" in "mingw-gcc" ? A: MinGW is actually GCC, so the flags are the same. But some flags depend on platform-specifics. Relocation Read-Only (RELRO) is specifically for ELF binaries, which are not support...
{ "language": "en", "url": "https://stackoverflow.com/questions/73106203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Drools KieContainer does not fire rules with custom classloader I am trying to add a non-existing method to a Java bean, compile it and use the newly added method in Drools rules. Via a custom class loader. I am using CompilerUtils to bind newly modified class to the custom ClassLoader as follows: ClassLoade...
{ "language": "en", "url": "https://stackoverflow.com/questions/72390675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Modifying values of array during Iteration using JSTL c:forEach I am trying iterate over an array in a JSP using c:forEach. What I want is to convert each array element to lowercase, remove all the white spaces and concatenate '-wrapper' at the end of it. I want to use this value as the id of an div. For example, if...
{ "language": "en", "url": "https://stackoverflow.com/questions/45613529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Caroufredsel responsive visible items I am building a caroufredsel for a responsive website (with only 3 states: 960px, 720px and 320px). It's working great when you load the page in one of these states. It shows the correct number of items (3, 2 and 1 respectively). But, when you resize the window, the number of vi...
{ "language": "en", "url": "https://stackoverflow.com/questions/19996394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Missing function header C++ i am getting this error when i want to build my cpp file. Severity Code Description Project File Line Suppression State Error C2447 '{': missing function header (old-style formal list?) Win32Project1 d:\persoonlijk\documenten\2e leerjaar\c++\win32project1\win32project1...
{ "language": "en", "url": "https://stackoverflow.com/questions/42158637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to implement this feature in javascript ? Make uncertain , divorce, the wife say! In the Javascript, could I define a class, the class itself can also when a function call, similar to the index, such as: function A() { } var a=new A(); var v=a(); //Use ordinary/like Javascript function use A: This is a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/2702919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to implement unit tests in NativeScript using TestBed and Jasmine? I'm setting up a NativeScript-Angular project, and would like to implement unit tests using Jasmine-Karma in order to test my components using css selectors. How can I setup a simple unit test (beyond the sample test provided on the official repo...
{ "language": "en", "url": "https://stackoverflow.com/questions/57186925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: PHP newer version fails decoding json "version like" string (ex: "0.7.4"->"0.7") Executing this code in PHP I expect the string "0.7.4" remaining as "0.7.4" https://3v4l.org/gX4vM $value = "0.7.4"; if(!empty($value)) { $jsonValue = json_decode($value); if(!empty($jsonValue)) $value = $jsonValue; } print_r( $va...
{ "language": "en", "url": "https://stackoverflow.com/questions/33371780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Customize WooCommerce single product sharing icons In WooCommerce single product page, there is sharing icons by default (Facebook, Twitter, GooglePlus, and Telegram). I want to change this icons and use other social medias, for example WhatsApp,... I searched every code pages of the theme and WooCommerce plugin but...
{ "language": "en", "url": "https://stackoverflow.com/questions/67225093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Use PhantomJS to extract html and text I try to extract all the text content of a page (because it doesn't work with Simpledomparser) I try to modify this simple example from the manual var page = require('webpage').create(); console.log('The default user agent is ' + page.settings.userAgent); page.settings.userAge...
{ "language": "en", "url": "https://stackoverflow.com/questions/18453993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: RESTful Design: Paging Collections I am designing a REST api that needs paging (per x) enforces from the server side. What would be the right way to page through any collection of resources: Option 1: GET /resource/page/<pagenr> GET /resource/tags/<tag1>,<tag2>/page/<pagenr> GET /resource/search/<query>/page/<pagenr...
{ "language": "en", "url": "https://stackoverflow.com/questions/501013", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Clearing the screen in C++ using other compilers Hello I'm interested in learning a way to clear the screen. I'm using C++ but it seem that some possible code to use are only known to work with Windows compilers. I'm using Ubuntu with a "g++ compiler". code i have research in order to use and have tried... ---This...
{ "language": "en", "url": "https://stackoverflow.com/questions/18326415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unable to navigate to next variable defined in eclipse template I have written eclipse template to inject a Dependency : ${:import(org.springframework.beans.factory.annotation.Autowired)} private final ${class_to_inject} ${var_name}; @Autowired public ${primary_type_name}(${class_to_inject} ${var_name}){ th...
{ "language": "en", "url": "https://stackoverflow.com/questions/72600439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Concatenate distinct values from multiple columns I have this in a table party1 | party2 A | E B | D C | H D | B E | A F | H G | I Result I am trying to get is distinct concatenation of party1 and party2, i.e. AE (will same as EA so only one instance is required) BD (will sam...
{ "language": "en", "url": "https://stackoverflow.com/questions/61596740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Google API to check if new version of app has been deployed I have an app on the Google Playstore and I want a way to alert my users whenever I deploy a new version of the app. I want to know how to make this possible. Does Google Playstore provide any APIs or SDKs to make this possible? I use React-native for devel...
{ "language": "en", "url": "https://stackoverflow.com/questions/74263396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Stopping sqlldr I have a process that load data using sqlldr. But sometimes due to other factors in the system it does not stop in a reasonable amount of time. Is there a way to kill sqlldr safely. Using kill -9. A: A few issues you can run into if you just kill the sqlldr process: * *If the number of commit ro...
{ "language": "en", "url": "https://stackoverflow.com/questions/8724321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can someone explain JS Event Loop? So I kind of understand the JS event loop, but still have a few questions. Here is my scenario and a few questions. So let's say I have these functions: * *function1 - reads an absolute huge file. *function2 - console.log("Hey"); *function3 - console.log("What's up"); The way ...
{ "language": "en", "url": "https://stackoverflow.com/questions/72496077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why i can't retrieve username and password from Firebase realtime database I want to login using username and password that is stored in Firebase realtime database. But my code does not work. I include my database picture and code. Please help me. This is database image: This is my main activity code MainActivity.j...
{ "language": "en", "url": "https://stackoverflow.com/questions/55334387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to wrap pjsua-lib with Swig? I'm trying to find a way to wrap the whole pjsua library into java classes with SWIG to use it on android. Does anyone have an experience in how to proceed? Regards A: Take a look at http://code.google.com/p/csipsimple, they have already created Java wrapper with SWIG.
{ "language": "en", "url": "https://stackoverflow.com/questions/16526382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: GPU usage with Cuda and Pytorch When I started to use GPU for ML applications, i went to the task manager to see how much GPU it used and found six different graphs, in which just 2 were showing activity. Compute_0 and Copy. The Compute_0 had an interval between 85-95 % and Copy 5-15 %, but it just represented a 8-1...
{ "language": "en", "url": "https://stackoverflow.com/questions/59508030", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: fwrite result PHP Im currently trying to write a few words on a file, and then open it. currently, i do have the following outcome: When my desired outcome would be something like: How come it is like that? TextAr is just some numbers from a textarea. ( one id each line) code: $text = preg_replace('/\n+/', "\n", ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42066328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: code has expired (within the last hour) dropbox Hi everyone i am new in dropbox api (php version). i am getting authCode using authorizeUrl, its working good for only one time if i reload page error message shows on 'HTTP status 400 {"error_description": "code has expired (within the last hour)", "error": "invalid_...
{ "language": "en", "url": "https://stackoverflow.com/questions/44800891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Check if the Intervals of a list are overlaped with the Intervals of another list I have two lists with Intervals ie [2021-06-29T00:00:00.000+03:00/2021-06-30T23:59:00.000+03:00, 2021-07-01T00:00:00.000+03:00/2021-07-06T23:59:00.000+03:00] [2021-06-25T00:00:00.000+03:00/2021-06-30T23:59:59.000+03:00, 2021-07-01T00:0...
{ "language": "en", "url": "https://stackoverflow.com/questions/68132858", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Occurence of a element in unsorted array by O(n) This is driving me nuts:( Problem statement: An unsorted array is inputed.Next the user gives a collection of numbers and the program should print the occurrence of the given number in that array. This should run at O(n) time complexicity. Example: Input array:[1, 1, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/45196515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to ask for admin permission in a batch? Since a few weeks, my scripts for modifying my IP address don't work anymore. I suspect an update of Windows 10. Up to now, I was using the script given in this thread : @echo on :: BatchGotAdmin :------------------------------------- REM --> Check for permissions IF...
{ "language": "en", "url": "https://stackoverflow.com/questions/67226353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# / VBS Automate Team Project Creation in TFS 2015 Update 3 I'm looking for a way to automate team project creation in TFS 2015 Update 3. I did a quick crawl over the web and found various posts on how to do it but nothing specific to 2015 version update 3. Some links I found: #1 #2 I'd like to do it as simple and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43624368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Arranging Images in a grid layout I have a set of thumbnail images to be shown in a div. Width of the div can vary based on the screen size.The images are all of fixed size of 150px * 150px with a padding of 5px. I want these thumbnail images to be arranged in a grid layout and also I want these images to be center ...
{ "language": "en", "url": "https://stackoverflow.com/questions/12122578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Updating Cordova Plugin results in failed plugin I'm running Cordova 3.4.1 and decided to update the one and only plugin I have, Console. I did based on the update to plugins dated April 23, 2014 ( http://cordova.apache.org/news/2014/04/23/plugins.release.html ). Updating is done by first removing and then adding ba...
{ "language": "en", "url": "https://stackoverflow.com/questions/23460990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: bootstrap css file and jquery js file are not linked in thymeleaf header file I am a newbie of spring boot. The below image shows the folder location of my bootstrap css file and jquery js file on spring boot thymeleaf template. And these are my home html scripts <html xmlns:th="http://www.thymeleaf.org" xmln...
{ "language": "en", "url": "https://stackoverflow.com/questions/53314186", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: adding values put in by users i am trying to write some sort of code, which adds two numbers the user puts in, this is my code: l.add.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { int i= Integer.parseInt(l.input1.getText().toS...
{ "language": "en", "url": "https://stackoverflow.com/questions/32671337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: AttributeError: 'NoneType' object has no attribute 'cursor' Error in Robot framework for Stored Procedure call I am working on updating database records using Stored procedure in Robot framework. I am referring https://franz-see.github.io/Robotframework-Database-Library/api/1.0.1/DatabaseLibrary.html#Call%20Stored%...
{ "language": "en", "url": "https://stackoverflow.com/questions/52753022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I get the file owner on Windows with Go? I'm trying to get file owner on Windows with Go and it's such a pain to find any help on it after hours on go src I found this: // TODO(brainman): fix all needed for os func Fchdir(fd Handle) (err error) { return EWINDOWS } func Link(oldpath, newpath strin...
{ "language": "en", "url": "https://stackoverflow.com/questions/51321950", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Idiomatic way to get from nested structures in Clojure Which of these is more idiomatic Clojure? (def book {:title "Joy of Clojure" :authors ["Michael Fogus" "Chris Houser"]}) (get-in book [:authors 0]) ;; => "Michael Fogus" (-> book :authors first) ;; => "Michael Fogus" When I have much more complica...
{ "language": "en", "url": "https://stackoverflow.com/questions/28347223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to solve VBA Insert into linked table error 3134? I am working on a MS ACCESS front end connected to a Oracle SQL database via linked tables. The issue: I try to insert some records with the statement below and always receive the 3134 error syntax error in insert statement INSERT INTO DD_HR (USER_NAME, IS_DELET...
{ "language": "en", "url": "https://stackoverflow.com/questions/56077797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Type mismatch when trying to replace I have a variable age_n . it is numeric (float). for exampel if i type count if age_n>65 If gives me 77. So then if I type replace age_n = "0" if (age_n < "65") it says type mismatch. I have tried putting 65 without quotes and it still doesn't work. A: Another form to...
{ "language": "en", "url": "https://stackoverflow.com/questions/36222307", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: asynchronous commenting using ajax I'm trying to create a comment system on my website where the user can comment & see it appear on the page without reloading the page, kind of like how you post a comment on facebook and see it appear right away. I'm having trouble with this however as my implementation shows the c...
{ "language": "en", "url": "https://stackoverflow.com/questions/36243448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Postgres function returning a string from a select statement I am trying to get this function to return a string that comes from the SELECT statement. CREATE OR REPLACE FUNCTION dbo.fnRepID (pram_ID BIGINT) RETURNS varchar AS $$ DECLARE pram varchar := ''; BEGIN SELECT pram = pram || (Case COALESCE(a.Name,...
{ "language": "en", "url": "https://stackoverflow.com/questions/73128371", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Pass state as prop to child component As the title says, how can I pass state data to a new component. I have a parent class that loads some data from an IndexedDb. I will pass the information of "image" as prop to my child component. class Parent extends Component<Props> { constructor(props: Props) { super(pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/51638428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to put translations from Developer Console in an android app's resource file? I paid for translation services from the Google Play Developer Console and all of the languages were translated successfully. I successfully translated my app's store listing description into 9 languages. But how does one go about tra...
{ "language": "en", "url": "https://stackoverflow.com/questions/41572645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Typescript errors on creating instance via @nestjs/sequelize I am using Nest.js, ts and sequelize (@nestjs/sequelize, sequelize, sequelize-typescript) in my project. I have such User model: Column, Model, Table, PrimaryKey, DataType, HasOne, AllowNull, Unique, AutoIncrement, } from 'sequelize-types...
{ "language": "en", "url": "https://stackoverflow.com/questions/66495940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Make a character move upwards on click I am making a game similar to Flappy Bird. The character is supposed to move upwards when the browser window is clicked, but my code for this does not work. Here are the relevant lines of code: var dudeYSpeed = 0; var dudeXSpeed = 0; var dudeJumping = false; var jumpSpeed = -3;...
{ "language": "en", "url": "https://stackoverflow.com/questions/35827644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Swift 4.0 Right Padding a String I padded a Swift String up to X amount of characters. Which is the most efficient way to achieve this in Swift 4.0? Option 1 extension String { mutating func right_padding(padding: Int, padding_char: Character) { let idx = self.endIndex for _ in (1...padding) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/47750201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I call python directly inside Ansible playbook, in a for loop? I have developed a playbooks that sends a mail indicating a list of 3-zero-padded numbers. I want to make the padding in the for loop which prints the information in the mail body. The playbook takes the number to pad from variable hostvars[host]...
{ "language": "en", "url": "https://stackoverflow.com/questions/75212803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Count duplicate values and display each different value from mysql table using PHP I have a table (url_log) with a column (referer) of urls. Some urls are unique and some are duplicates. Using PHP I want to display each different url (without repeating) and the number of times the url appears in the column. This is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/21671947", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: My panel-collapse not minimizing When I click the View Map link the collapse show but when I click it again it the div does not hide. I don't know what to do. I searched but its not working. <a href="#collapse2" data-toggle="collapse">View Map</a> <div id="collapse2" class="panel-collapse collapse"> <?php ...
{ "language": "en", "url": "https://stackoverflow.com/questions/34702955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Selenium webdriver test run speed varies I was curious about why does Selenium webdriver run with varying speed. I have noticed it that whenever I run the tests after a gap of 2-3 days the speed is noticeably slow as compared to tests run back to back day after day. The send keys execution is slow, like earlier it w...
{ "language": "en", "url": "https://stackoverflow.com/questions/23478953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: NetBeans save edited .jar I am currently using a library for "Notify My Android". The library is using an outdated URL so i tried to change it. I attached the source file and now I can edit the code. Before attaching the source file it just said "compiled code". But when i save it it does not seem to save the change...
{ "language": "en", "url": "https://stackoverflow.com/questions/40008933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: IIS 404/405 errors I am running IIS7 on Windows 7 Pro. I have a VS2010 solution from which some projects are web services using IIS. Until recently all services worked correctly. However, whenever I add/configure/update a service reference or hit it directly via a web browser, I receive the following error: Ther...
{ "language": "en", "url": "https://stackoverflow.com/questions/6830888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: STL unordered map with custom key type I have some graph-related C++ code that works using an std::map structure. I do not need the elements to be strictly ordered, and therefore I would like to switch to an std::unordered_map structure. The relevant part of the code is as follows: typedef unsigned size_type; struc...
{ "language": "en", "url": "https://stackoverflow.com/questions/25827993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: AWS Amplify error on sign in: We have our backend made in AWS and using AWS Amplify in our iOS App for login/signup, API calls, storage access. We have enabled MFA(Multi-factor Authentication) for the signing in/up the users. The signup process is as follows: * *We let the user enter his phone number, email, and...
{ "language": "en", "url": "https://stackoverflow.com/questions/64869513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Difference between this Java and C code? I tried to convert some C code to Java, but it is working slightly different. It is XOR encryption and for some data it returns the same results, so I know it is pretty close, but for some data it doesn't work exactly the same (different results). C code (runs on x86 Windows...
{ "language": "en", "url": "https://stackoverflow.com/questions/8125210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Mapbox Map doesn´t load after react build my mapbox doesn´t work after I built my react-app. On localhost everything works fine, so I guess, it can´t be anything wrong with my access-token. Do you have any idea or had a similar issue before? import mapboxgl from "mapbox-gl"; import "mapbox-gl/dist/mapbox-gl.css"; c...
{ "language": "en", "url": "https://stackoverflow.com/questions/65682452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Name for HTTP Request+Response There's one thing I haven't found in RFC 2616 ("Hypertext Transfer Protocol -- HTTP/1.1") and that's a "canonical" name for a request/response pair. Is there such thing? 4.1 Message Types: 4.1 Message Types HTTP messages consist of requests from client to server and responses f...
{ "language": "en", "url": "https://stackoverflow.com/questions/325346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: Entity Framework DBContext.Entry() is very slow I am trying to get some data out of the database. Using the .Entry is very slow, over 65% of time spent is right there. Does anyone have any ideas how to optimize my query? I only want to get the data as read only. Sorry about adding the code as an image, but it would...
{ "language": "en", "url": "https://stackoverflow.com/questions/30764320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ssh client side audit Now I am trying to design some ssh audit framework. I want to log all the user inputs. I have found on the server site, logs(e.g, bash history) are kept and we can even use auditd to capture the user actions after he/she opened a file with vi. My question is that is it possible to audit it on t...
{ "language": "en", "url": "https://stackoverflow.com/questions/38317956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: EmrCreateJobFlowOperator returns "ERROR - The conn_id `emr_default` isn't defined" I am using Airflow in EKS for a project. I am using the EmrCreateJobFlowOperator to create a new EMR cluster. When the Dag runs the step fails and I get an error: {taskinstance.py:1150} ERROR - The conn_id emr_default isn't defined He...
{ "language": "en", "url": "https://stackoverflow.com/questions/70222696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Dart: Synchronous post request I would like to send a synchronous POST request from the client-side. According to the documentation we can use the 'async' named parameter: https://www.dartlang.org/articles/json-web-service/#saving-objects-on-the-server var url = "http://127.0.0.1:8080/programming-languages"; request...
{ "language": "en", "url": "https://stackoverflow.com/questions/37489623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Call a stored procedure, passing a valid school ID and a leader score of 50, but procedure doesn't work I have written a SQL IF statement to update the stored procedure: CREATE OR REPLACE PROCEDURE UPDATE_LEADERS_SCORE ( IN in_School_ID INTEGER, IN in_Leader_Score INTEGER) LANGUAGE SQL MODIFIES SQL DATA B...
{ "language": "en", "url": "https://stackoverflow.com/questions/69929578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I build latest AOSP? After configuring the AOSP fully. I tried to build it using make -j4. But I got the below error: ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=4.0.4 TARGET_PRODUCT=full TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARG...
{ "language": "en", "url": "https://stackoverflow.com/questions/24847719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I prevent a 301 Redirection when a user requests a folder? I've been attempting to make a front controller that would ignore existing directories. In some cases, I've been getting 301 redirects where I wish would not occur. I'm using the following .htaccess file: DirectoryIndex index.php Options -Indexes Rew...
{ "language": "en", "url": "https://stackoverflow.com/questions/29498077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Set up authoritative DNS server I am trying to set up a hosting company. The hosting company is going to have a client with the domain widgets.de The name of my company is hostingcompany.de. The name servers I am setting up are called ns1.hostingcompany.de and ns2.hostingcompany.de In the zone file for widgets.de, I...
{ "language": "en", "url": "https://stackoverflow.com/questions/42079958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python Requests response decode I send a request using python requests and then print the response, what confuse me is that the Chinese characters in response is something like \u6570\u636e\u8fd4\u56de\u6210\u529f Here is the code: # -*- coding:utf-8 -*- import requests url = "http://www.biyou888.com/api/getdataapi...
{ "language": "en", "url": "https://stackoverflow.com/questions/45818881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: mmap big endian vs. little endian If I use mmap to write uint32_t's, will I run into issues with big endian/little endian conventions? In particular, if I write some data mmap'ed on a big-endian machine, will I run into issues when I try to read that data on a little-endian machine? A: If you're using mmap, your p...
{ "language": "en", "url": "https://stackoverflow.com/questions/1025783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Entity Framework "The current transaction cannot be committed and cannot support operations that write to the log file." A piece of software I'm working on is used to upload data from CSV files into a database. Interaction with the database is using EF6. To submit data, there is a Stored Procedure named "InsertRow" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24240699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it safe to use a uintptr as a weak reference I want to implement a weak reference in Go such that I can use a finalizer to detect when a data structure is no longer required and be able to store/clean up data. One way I have found to do it is to use a uintptr as a map key such that when a finalizer is called, I c...
{ "language": "en", "url": "https://stackoverflow.com/questions/63025066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Passing php variable to javascript in a different file I'm having problems with passing php variables to javascript. It does pass through the variable that is declared at the top, but I don't know how to call the function to get the new version of variable after the IF statement is done. $info = "A message"; if (t...
{ "language": "en", "url": "https://stackoverflow.com/questions/41092673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Multiple commit in single pull request I am working on a project in Github using fork repo. I am new to Github and I have to make a GitHub action YAML file so for debug I simply do commit on the GitHub and now when everything is working fine, I have to make a pull request to the main repo but now I have 130 commits ...
{ "language": "en", "url": "https://stackoverflow.com/questions/70818317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Disable a href after click once and add new element at the same time? Is it posible to add new element with javascript by using href and disable href at the same time? So href only clicked once, and after that the new element will appear. I wrote this code, but still no luck JS $(document).ready(function() { $("#...
{ "language": "en", "url": "https://stackoverflow.com/questions/37903154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: 'Location'(geolocation) support in OS versions Is 'Location'(geolocation) native api supported in all iphnoe os versions from iphone 2.o to ios 4+ ? Is there any documentation to get the list of all API's and the supporting versions ? A: Sure, its called core Location Framework: http://developer.apple.com/library/...
{ "language": "en", "url": "https://stackoverflow.com/questions/6857960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why is RenderingContext.drawElements clearing the screen before it draws? Is RenderingContext.drawElements correct when it clears the screen before it draws? Consider these screenshots that show a step across a call to drawElements with the object already drawn being erased. A: WebGL effectively clears the screen...
{ "language": "en", "url": "https://stackoverflow.com/questions/27812153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I authenticate user with Email and password using React and Firebase I am invoking a method through on Click where this code is placed handleEmail =()=>{ firebase.auth().createUserWithEmailAndPassword('abc@abc.com', '123').catch(function(error) { // Handle Errors here. var errorCode = error.code; va...
{ "language": "en", "url": "https://stackoverflow.com/questions/45090645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: method call problem with Python So I'm learning python, and I seem to be having a consistent problem with calling setText() methods on Text objects. The process works fine when I'm in the interactive IDLE GUI, but when I save modules and then try to run them, I get: nonetype object has no attribute setText Do I ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/5171234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: update post meta on function.php does not work Im trying to update post meta when the post saved. I like to have published date into custom field named '2a' only once when it is saved. No update of '2a' by modifying post. This is code I added on function.php. It does not afect anything on custom field. Is there a...
{ "language": "en", "url": "https://stackoverflow.com/questions/60636067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Simulate key press? I am looking for a method that allows me to press freely on the Android screen. Simply put, it would emulate what a person can do to move on the Android device I want him to press the buttons of this game. I want to make a bot. A: To get the control of the keystrokes from a background app you n...
{ "language": "en", "url": "https://stackoverflow.com/questions/59445984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Are pyc files independent of the interpreter architecture? From the tests I've done, with the same version of python (same magic number), a 64 bit interpreter can load pyc files made with a 32 bit version of python. And reciprocally I assume. But is it totally safe? Can this lead to unexpected behavior? A: pyc file...
{ "language": "en", "url": "https://stackoverflow.com/questions/3821728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: In Hybrid Authentication Azure Ad Claims are overridden by Identity user Hi I have Local Db and Azure Ad Connect with OpenId connect login. when user login by using Azure Ad we got claims and object id in claims. What is happening after that claims are overridden by identity because that user has entry in AspNetUser...
{ "language": "en", "url": "https://stackoverflow.com/questions/75483443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: windows alert - DriverToaster.exe parameter incorrect I got this windows 10 alert suddenly. drivertoaster.exe found 0 on google. anyone familiar with this?
{ "language": "en", "url": "https://stackoverflow.com/questions/45298924", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How To: Specific complex grouping query I am not sure if this query I repeated, if so please do guide me according to the "Answered" query. And I am not sure what could be appropriate title for this query. I have the following data in my SQL Server 2008 R2 |Date |Status | |------------------|------...
{ "language": "en", "url": "https://stackoverflow.com/questions/36275398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Unable to find location of Hibernate configurations for changing dialect As a newbie in web applications I'm finding myself stranded from time to time. Currently I am trying to fix a web application (written/set up in Jboss) that has been built by someone else who I can no longer ask for help. The application deploy...
{ "language": "en", "url": "https://stackoverflow.com/questions/26252545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Drag and Drop - button event dont work in listviewitems I have build an own drag and drop with two listviews. My items in in my listview hast textblocks and a button. When i select a item and when i click on my Buttons in my listviewitem it dont work, because he jumped in my move function for the drag and drop, but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/31693298", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to understand the flow of this JavaScript function I'm a beginner who is learning JavaScript, after HTML/CSS. I'm at the very beginning of the book of Head First, struggling to understand this function. How does this function work in every step? What happens starting from thingamajig(5)? function clunk(times) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/62487970", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ramdom 78 x 78 Pixels I am trying to learn how to code and not to sure where to start, I would like to produce a box that is 78 pixels by 78 pixels and then have them all a difrent random colour. how would I do this on a html or php web page please ? not realy sure where to start. thanks for your help and time. A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/19149262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Model Validation not showing error messages I am developing an ASP.NET Core MVC web app, however, I am having a problem with the data annotations. For int and decimal, I cannot override the default error message for the data annotations. For string, the data annotation works. This should be showing the required erro...
{ "language": "en", "url": "https://stackoverflow.com/questions/66334806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Null object pattern with entity framework code first We've implemented the null object pattern in our domain model. We're using code first with fluent api to persist our domain model. One of our entities has a navigation property - this navigation property is a FK and is where we use the null object pattern. Our nul...
{ "language": "en", "url": "https://stackoverflow.com/questions/32213932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: React event is undefined when checkbox selected I have multiple checkboxes, when i clicked on them i want to display items which includes selected tags. my code is below. it works fine when i console.log(response.items). but when i add this.setState({ itemsByTag: response.items }) i got an event is undefined er...
{ "language": "en", "url": "https://stackoverflow.com/questions/55704052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Deploy to Amazon EC2 from Cloudbees Is it possible to set up Cloudbees to deploy to an Amazon EC2 instance after a successful build? Thanks, W A: Yes, but you don't provide many details of what you mean by "deploy". I suppose you mean using scp? If so, you must copy your Jenkins public key to an authorized keys f...
{ "language": "en", "url": "https://stackoverflow.com/questions/14594318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to invoke text change method without lossing focus i am developing application in which i have a text box for writing supplier and shows the list of supplier match with the input text by calling text change method and shows the result in grid view but the problem is, that the method is invoked when i click outs...
{ "language": "en", "url": "https://stackoverflow.com/questions/18611655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I design a REST interface that allows for updating the sort order of a list of related items? Assuming I want to develop a client application that manages playlists of songs and has the following objects stored on the server: * *Playlist { title:unique } *PlaylistSong { PlaylistId, SongId, sortOrder } *S...
{ "language": "en", "url": "https://stackoverflow.com/questions/22362611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why do My C Code go Wrong The below is my code. Compiler generates the errors as #include<stdio.h> struct Shelf{ int clothes; int *books; }; struct Shelf b; b.clothes=5; *(b.books)=6; Compiler generates the errors as below for both statements b.clothes=5; and b->books=6; in above code. error: expected ‘=’,...
{ "language": "en", "url": "https://stackoverflow.com/questions/43873415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using @classmethod for creating objects in django for testing purposes Both on the higher level perspective work, however which is preferred method for creating objects for testing and why ? Clarification: For testing purposes, that is , for testing the model created in the test_models.py file First Way: Using @clas...
{ "language": "en", "url": "https://stackoverflow.com/questions/55646726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: The data structure of multiple fields in Lucene If I have one document with two fields title and content, the data as: title is: Java Book, content is: Java book is selling. What will the inverted index structure looks like, I mean it would be one inverted index which store the fields in doc object in posting table,...
{ "language": "en", "url": "https://stackoverflow.com/questions/33573583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Pandas: search multiple columns and return column with found value I'm try to do some auditing for our purchase orders, and I created this dataframe (here's a csv sample of it): ProductName,Qty,LineCost,BuyQty1,BuyQty1Cost,BuyQty2,BuyQty2Cost,BuyQty3,BuyQty3Cost SIGN2WH,48,40.63,5,43.64,48,40.63,72,39.11 SIGN2BK,14...
{ "language": "en", "url": "https://stackoverflow.com/questions/31122427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Storing serialize array in database? We are building a crm based application and we are using PDO to access the database. We have various modules like contacts,leads,accounts etc. In the modules we are allowing user to add their multiple information like user can add multiple phone numbers,emails and addresses along...
{ "language": "en", "url": "https://stackoverflow.com/questions/37341673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Password Reset Email Notification does not work in real server Laravel 8 I implemented password reset using email and it works fine in localhost, but it throws an error in real server. Here is the error: Swift_TransportException Connection could not be established with host mailhog :stream_socket_client(): ...
{ "language": "en", "url": "https://stackoverflow.com/questions/68244193", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }