text
stringlengths
15
59.8k
meta
dict
Q: mysql query using the wrong indexes I have some optimization problems with some of my queries in a mysql database. After I build my application I am trying to optimize using mysqltuner and explain, to find non indexed queries. This is a query that is running often and reports that is not using the index : SELECT co...
{ "language": "en", "url": "https://stackoverflow.com/questions/38522104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Django: Form submission in ajax style without csrf token I am new to django. Suppose I have a form and I would like to submit a file to the server in ajax. I notice that the server has HTTP 403 error when I don't specify the csrf token in the post statement (correct behaviour), but somehow the file can still be able...
{ "language": "en", "url": "https://stackoverflow.com/questions/18244567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Making Mac shortcuts (e.g. Cmd-C) work on linux Is there a way to map Cmd+C to Copy in linux? (instead of Ctrl+C) Would be nice if I could also have the emacs style ones, like Ctrl+B to move left by one character. A: Is there a way, on Linux/X, to map certain key combos to other key combos? In the tradition of al...
{ "language": "en", "url": "https://stackoverflow.com/questions/434083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: TBB error when compiling I have the following piece of code that i am trying to execute #include <iostream> #include <cstring> #include "tbb/tbb.h" using namespace std; using namespace tbb; class Accumulate{ float& arr; float* src; public: Accumulate(float& _arr, float* _src) :arr(_arr), src(_...
{ "language": "en", "url": "https://stackoverflow.com/questions/40138885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: UIViewControllers not receiving orientation notifications I've spent the last hour or so trying to work out why not all my UIViewControllers are receiving orientation change notifications. I've got a subclassed UIViewController attached to the window, that internally creates a few other UIViewControllers to manage s...
{ "language": "en", "url": "https://stackoverflow.com/questions/3171083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: applying a class to a div I have a css which has some attribute as follows: .ts{ background-image: url("images/xyz/pb.gif"); background-repeat: no-repeat; padding:0,0,0,20px; display:none; } .ts.visible{ display: inline; } Now i want to apply the this style to a div in my html page.How cna i do...
{ "language": "en", "url": "https://stackoverflow.com/questions/4386399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Storing similar objects in a database I am developing an a house renting/selling application, it will allow users to post rental and houses on sale. My concern is the two objects have some similar and different attributes,for example here is a house on rent can have the following attributes ` public class Rental...
{ "language": "en", "url": "https://stackoverflow.com/questions/47167677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What partition key to choose in cosmos db with little data and one customer per database? We’re developing a personnel management system based on blazor and Cosmos DB serverless. There will be one customer per database and around 30 “docTypes”. The biggest categories by number and data volume are "users" and "employ...
{ "language": "en", "url": "https://stackoverflow.com/questions/70532412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MethodNotAllowedHttpException laravel 4.2 error here is my ContactController.php: public function destroy($id){ $contact = Contact::find($id); $contact->delete(); return Redirect::to('http://localhost:8000/contactsview'); } Here is my rountes.php Route::delete('/contactsview/destroy/{id}', array('uses'=...
{ "language": "en", "url": "https://stackoverflow.com/questions/32584786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: java Opencv unsatisfiedLinkError, native Library is loaded I am trying to run some program on opencv, but I am getting this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.objdetect.CascadeClassifier.CascadeClassifier_0(Ljava/lang/String;)J I have already loaded the library, libopencv...
{ "language": "en", "url": "https://stackoverflow.com/questions/36321161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: xmlns required for bean component of spring-servlet.xml for spring security application How to determine what xmlns are required for beans component of my spring-servlet.xml(spring configuration file) for spring security application? Is this is the correct code? <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="h...
{ "language": "en", "url": "https://stackoverflow.com/questions/9349640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Embed a Mobile Emulator on a Website? I'm basically wondering if it was possible to create a functionality similar to this site: http://www.howtogomo.com/en/#gomo-meter I want to add some kind of feature on my website that will allow visitors to check to see how their websites looked on a mobile device like an iPhon...
{ "language": "en", "url": "https://stackoverflow.com/questions/8232389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Creating artificial data out of data that only contains sentences I am trying to create artificial data. However my current data only contains sentences. Two example rows that I have are the following: Your order is on its way with tracking {imaginary tracking code}. Visit {imaginary random link} for more informati...
{ "language": "en", "url": "https://stackoverflow.com/questions/71938676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Java Firestore query snapshot returning string rather than boolean I am trying to map my query results from firestore back to a class in my java application. I have saved this as a Boolean on the web console, see the image: And then on the app I use the following function to map this to my class: query.get().addOnC...
{ "language": "en", "url": "https://stackoverflow.com/questions/53883555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Program or script to see hex triplets in their actual color I've got a theme file that looks like following: PRIMARY1_COLOR=#7CACDF PRIMARY2_COLOR=#A5C6E9 PRIMARY3_COLOR=#E2EDF8 SECONDARY1_COLOR=#7CACDF SECONDARY2_COLOR=#A5C6E9 SECONDARY3_COLOR=#B9D3EE Is there any tool which allows editing such file while displayi...
{ "language": "en", "url": "https://stackoverflow.com/questions/4430410", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Duplicate code but make the copied slower I build the shooting game by C# and Unity. I use GameController and GameStatus to show the score and time. At first scene, I have no problem. It can run smoothly. But the second scene, I copy scene from first and make new GameController for second scene. It's work but runnin...
{ "language": "en", "url": "https://stackoverflow.com/questions/19998071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: EF5 Code First Many to Many with Migrations I have done this before, but for some reason cannot get it to work in EF5. Usually it just automatically picks up when I have many to many relationships like this one... public class Beer { public int Id { get; set; } public virtual ICollection<Restaurant> Restaura...
{ "language": "en", "url": "https://stackoverflow.com/questions/11043023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Select multiple checkboxes using angularjs but unable to get selected one I am trying to get the list of selected checkboxes using angularjs. But unable to get selected. HTML code Here <div class="item" ng-repeat="x in result"> <div class="item-image"> <input type="checkbox" id="product_{{x.id}}" class=...
{ "language": "en", "url": "https://stackoverflow.com/questions/47905903", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Flash light not detected I am trying to write an app which turns on flash light when a button is pressed. The problem is the app is not detecting flash light on my phone. I have searched alot on internet. Sure others have faced the problem, I have also applied those solutions but they don't seem to work. I don't kno...
{ "language": "en", "url": "https://stackoverflow.com/questions/17514555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Kafka 0.10.1.0 Test Server: Request METADATA failed I'm getting basic errors after setting up a super simple single-instance Kafka VM. This is for tiny volume development testing. This is using the latest Confluent Platform 3.1.1 which includes the almost latest Kafka 0.10.1.0. FYI, a slightly newer bug patch Kafka ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41513132", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Google maps api and geolocation, Javascript and Html Hey I'm new to the google maps api, and I have an embedded map, i'm using geolocation to get the users lat and long, and i'm then filling in the gaps in the maps api. The map, however doesn't work when I use the generated lat and long, but does work if i just type...
{ "language": "en", "url": "https://stackoverflow.com/questions/12815168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Try/Catch with while loop can't work Problem * *Method asks user for an integer value. *Pass the value into a loop to ensure it is a positive number. *Add a in.nextline to ensure the value don't overrun into next line of code. - *Return integer value. private static int getIntFromUser(String aa) { int aaa =...
{ "language": "en", "url": "https://stackoverflow.com/questions/34180416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: ActiveRecord STI delete doesn't work correctly I want to store two models using active record, but delete doesn't work as expected. * *Evaluation has id, name and description *and SqlEvaluation has additional two columns of query_string and database. I want to use those two tables, and eval_typ_id is used to d...
{ "language": "en", "url": "https://stackoverflow.com/questions/3919707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET RSS feed error in link tag in item node? Issue with Razor in Umbraco RSS Feed Having an issue with creating an rss feed against a blog in umbraco using razor. The code below works but as soon as I try and add any value into the link tag under the item node I get an xml error, below is the code. <rss versi...
{ "language": "en", "url": "https://stackoverflow.com/questions/12761288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Multiple framebuffers and textures not working on intel drivers I'm writing an application using PyOpengl and PySide. My main machine is installed with ubuntu and an nvidia card (proprietary drivers), the premise is just to tell that the application is working properly in this setting. I'm testing this application o...
{ "language": "en", "url": "https://stackoverflow.com/questions/16493878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ruby TCPSocket Server - Can I tell to what host a client was connecting? I have a ruby server based on TCPSocket (non-HTTP). I have 2 different domains, both pointing with an A-Record to my servers IP Address (the same one). So, there are clients connecting to one of those domains. Is it possible to tell which domai...
{ "language": "en", "url": "https://stackoverflow.com/questions/21251145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: NumPy linear equations I was wondering to check for an algorithm that would solve set of three linear equations in two variables which change in every equation adjacently for example * *a + b = 0 *a + c = 0 *b + c = 1 I am open to all suggestions A: Use the np.linalg.solve library: https://numpy.org/doc/stable...
{ "language": "en", "url": "https://stackoverflow.com/questions/64364381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Extract elements of lists in an RDD What I want to achieve I'm working with Spark and Scala. I have two Pair RDDs. rdd1 : RDD[(String, List[String])] rdd2 : RDD[(String, List[String])] Both RDDs are joined on their first value. val joinedRdd = rdd1.join(rdd2) So the resulting RDD is of type RDD[(String, (List[Stri...
{ "language": "en", "url": "https://stackoverflow.com/questions/40133201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Delete all text in a file between two strings without importing any modules Due to restrictions I can't use any import modules like re, sys or os etc. Anything that I have to import at the beginning is out. This has made my life hell. Here is what I've got so far: #I CANT USE ANY IMPORT MODULES DUE TO RESTRICTIONS ...
{ "language": "en", "url": "https://stackoverflow.com/questions/28440722", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Image fill is not working properly This is my html code <div class="feature-image"> <a class="featured_image_link" href="#"> <img src="1.jpg"> </a> </div> My image 1.jpg size is 150px x 150px and i have mentioned in the css as .feature-image{ width:150px; height:150px; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/18396068", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: mongodb query different array have different condition I have the following datas. [{ "_id" : ObjectId("abc123"), "device_id": "A001", "A_status": "VALID", "B_status": "VALID" }, { "_id" : ObjectId("abc223"), "device_id": "A003", "A_status": "EXPIRED", "B_status": "VALID" }, { "_i...
{ "language": "en", "url": "https://stackoverflow.com/questions/71964668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why DOM changes are not visible in the function that changes DOM? I have the JS/jQuery code: function swapElements(parent, i) { var a = parent.eq(i); var b = parent.eq(i + 1); var atemp = a.clone(); var btemp = b.clone(); a.replaceWith(btemp); b.replaceWith(atemp); debugOutput()...
{ "language": "en", "url": "https://stackoverflow.com/questions/37917129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Recursive function that return result from 'if' statement instead of 'else' statement I'm pretty new in Python and I'm trying to write a simple recursive function: def bugged_recursion(inp_value,list_index=0): '''Define a recursive function that tag lists according to one parameter. ''' #check if a crite...
{ "language": "en", "url": "https://stackoverflow.com/questions/31787169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Align x-axis tick locations of additional subplot with x-axis tick locations of FacetGrid object I want to add a second x-axis to my FacetGrid object. I managed to create a second x-axis by adding a second subplot to my figure that is below the first axis following the suggestions of this post. The ticks of my secon...
{ "language": "en", "url": "https://stackoverflow.com/questions/60789432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to setup and use Android Emulator (shipped in Android Studio) in a corporate environment (no internet access or admin rights)? I'm trying to use Emulator on a PC which has no internet connection and I'm not local admin. I've downloaded Android Studio (no install zip) on another PC and extracted contents, but it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/47814166", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why calling a function from shorthand function pointers array initialization doesn't compile? I have the following code in my project: printf("Please select one of the tests: "); int n; scanf("%d", &n); (void (* [])()) {test1, test2, test3, test4}[n - 1](); For me, this code compiles and works as indented. But my p...
{ "language": "en", "url": "https://stackoverflow.com/questions/72166043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Has there different JDKs or JVMs on each Java platforms? I am confused about java platforms.From the page Differences between Java EE and Java SE , java has four platforms. Has there any special things between them ? Are they use different JDKs or JREs ? For clear my question , when I download JDK , I think I can c...
{ "language": "en", "url": "https://stackoverflow.com/questions/37687321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to adjust the y-axis of bar plot in R using only the barplot function Using this example: x<-mtcars; barplot(x$mpg); you get a graph that is a lot of barplots from (0 - 30). My question is how can you adjust it so that the y axis is (10-30) with a split at the bottom indicating that there was data below the c...
{ "language": "en", "url": "https://stackoverflow.com/questions/30222178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: enter line to an object Hello in R how could I write a function which takes as an input a number at which aline should be entered into an existing object matrix(rnorm(9),ncol=3,nrow=5) x<-c(1,7,8) Each vector should now be entered into the matrix into the matrix at row 3 (so it should be the new co row 3 . The oth...
{ "language": "en", "url": "https://stackoverflow.com/questions/31563040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Checkbox form validator Angularjs2 I need to validate something like this. In the following form, SignUp button should be enabled only if user checked the checkbox. If user uncheck the checkbox the button should get disabled. Following way enabled the button when user check the checkbox for the first time. But then...
{ "language": "en", "url": "https://stackoverflow.com/questions/40608901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SELECT query with ResultSet arguments in JAVA The server code of my Oracle database contains two files (classes) namely: Main.javaand DBManager.java. DBManager.java contains SQLPRocessing and SQLProcess methods (functions) that perform executeUpdate and executeQuery operations with the query statement, respectively....
{ "language": "en", "url": "https://stackoverflow.com/questions/46428162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: I have a JTextArea that needs bottom margin I have a JTextArea with margins that work for the top, left, and right but not for the bottom. When the caret gets to the bottom, it just keeps going. Here is my code: frame = new JFrame(""); Container contentPane = frame.getContentPane(); contentPane.add(textA...
{ "language": "en", "url": "https://stackoverflow.com/questions/51294487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to edit Sublime Text build settings? I want to enable -std=gnu++11 in Sublime Text 3's C++ Single File build on Ubuntu 12.04. I have already upgraded the tool chain to the latest g++ and do not want to see the following error on every build: error: #error This file requires compiler and library support for the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/23789410", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Regex match of a string with numbers and uppercase letters failing I am trying to match lasko17A565 in the list below but the regex fails?specifically I am trying to look for the string present in variable train in the front followed by any combination of numbers and uppercase letters, can anyone provide guidance wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/57471809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: NodeGit how to get last commit id of another branch? I have two branches checked out of my system Master and Dev. My Working directory is Master from Master I want to push/merge file to dev after knowing the difference. For say in Master I am working abc.txt file and I want to check the difference between the file p...
{ "language": "en", "url": "https://stackoverflow.com/questions/45712721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Understanding the usecase of multiple recursive calls I was trying to solve a problem to get all the possible valid combinations of parenthesis given an integer. Eg. input: n = 2, output: (()), ()() Clearly as n increases, the current output builds on the output of the previous n. So it was easy to come up with a r...
{ "language": "en", "url": "https://stackoverflow.com/questions/49601132", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Complex Syntax Error php html I have a problem with syntax error. trying to upload image from directory into my list in html but it keeps saying things like: Parse error: syntax error, unexpected '"', expecting ',' or ';' in D:\xampp\htdocs\Waldi\index.php on line 243 <?php $dir="img/"; if($opendir=opendir($dir))...
{ "language": "en", "url": "https://stackoverflow.com/questions/39149675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Spring AOP pointcut is not triggered as expected I have two methods with diferent pointcuts, one is executed, the other no, and I can`t see why. I have many methds and classes defined on the packages that you can see below. I am using spring-boot in my project. Here is the code: @Aspect @Component public class Logg...
{ "language": "en", "url": "https://stackoverflow.com/questions/34231882", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How do you create SDL2 Visual Studio 2015 or 2017 Solution For Windows and Android? Visual Studio 2015 has integrated Android Emulator support. They even have a pre-made template to set up Windows Phone, Android, and iOS targets. It seems like there should be some way of setting up SDL 2.0 in the same solution to ea...
{ "language": "en", "url": "https://stackoverflow.com/questions/42149447", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Get content-type in feathers hook Simple question which I havn't figured out yet. Is there a way to get the content type of a request in a feathers hook / context? I read about potentially using express middleware, but I want to still make use of the service, I dont want to replace it with middleware as from what I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/51441208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Django server reporting "Forbidden (CSRF token missing or incorrect.)" despite sending token correctly? I am trying to send a JSON POST request to my Django server. It reports this error: Forbidden (CSRF token missing or incorrect.): In my Django template, options.html, I say this: <script>const incomingToken = "{{...
{ "language": "en", "url": "https://stackoverflow.com/questions/63927791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: open child form in new page I have a sponsor which can have many warranty management urls. I have implemented the sponsor form but having trouble to create urls child form. Problem is I need to create child in new page and show the list back to the main form. How do I do it? My form: <%= form_for @sponsor, url: p...
{ "language": "en", "url": "https://stackoverflow.com/questions/59896216", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: RSACryptoServiceProvider keysize 1024 is not generating a 128 byte key I have the following code: byte[] rsaKey; using (var rsa = new RSACryptoServiceProvider(1024)) { rsaKey = rsa.ExportCspBlob(false); } The result is that the length of rsaKey is 148 bytes and not 128. Why is that? I have to pass the public ...
{ "language": "en", "url": "https://stackoverflow.com/questions/58331996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Checking elements in a value in C How do I read element by elements in C? In Java I just do: for(int i = 0; i < str.length; i++){ if (str.charAt(i) == "X") return 1; } But I do I do something similar in C? ******Edit: I'm checking an int value for the first occurrence of 1, so the str operation doesn't work....
{ "language": "en", "url": "https://stackoverflow.com/questions/25923719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Python Tkinter: Why use Tkinter.W not str "w" I'm learning to use Tkinter and in the tutorials it tells me to import W from Tkinter, but W is just a str ("w"). My question is why use Tkinter.W not "w". Is it because Tkinter will sometimes have the var equal something else dependent upon system? A: I always use the...
{ "language": "en", "url": "https://stackoverflow.com/questions/34699869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: I deleted the Anaconda, but it remains in the Start menu I deleted the anaconda, but it remains in the Windows Start menu. How do I delete anaconda from the Start menu? There is no anaconda in "C: \ ProgramData \ Microsoft \ Windows \ Start Menu \ Programs" However, it still appears in the Start menu. A: While run...
{ "language": "en", "url": "https://stackoverflow.com/questions/57347019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting the name of a JButton on click @Override public void actionPerformed(ActionEvent e) { if (e.getSource() == thirdBtn) { //System.out.println("Third Button Click"); System.out.println(e.getSource()+" Click"); } } In the code above, I was wondering if instead of doing this...
{ "language": "en", "url": "https://stackoverflow.com/questions/14310331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can Apache APISIX support Layer 4 and Layer 7 proxies by default and which Layer 7 and Layer 4 protocols are supported respectively? I am recently learning Apache APISIX and I would like to ask about the proxy layer 7, and layer 4 protocol. Can Apache APISIX proxy TCP and UDP directly, and what are the seven-layer p...
{ "language": "en", "url": "https://stackoverflow.com/questions/72469718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Add vue js language support to monaco-editor I've been trying to add vuejs language support to monaco editor, but all my attempts have failed so far. I've tried monaco-vue plugin for editor for but it doesnt seem to work either. The end result that I would want to achieve is to provide completions just as codesandb...
{ "language": "en", "url": "https://stackoverflow.com/questions/54281131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Pytorch random tensor generation with one fix value and rest of random value In my testing dataset, I have to always include one specific image(image at position 0) in each batch but others values can be randomly selected. So I am making a tensor which will have 1st value 0 (for 1st image) and the rest of others can...
{ "language": "en", "url": "https://stackoverflow.com/questions/66756131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Populating HTML from MySQL & PDO (PHP); foreach loop failing to write MySQL data As title states, my objective is to produce an HTML table using data from a MySQL database. The general method I am using is sound, as I have written manually a series of cells, but I am trying to scale it to include large numbers of fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/12993696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Vertically center elements in WordPress header I am trying to vertically center my header elements, but the following code that I've tried isnt working. What am I doing wrong? Please let me know where I can add padding or something else. Here is the website: https://eagleroofingcontractor.com/ What I have so far: <d...
{ "language": "en", "url": "https://stackoverflow.com/questions/54840624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to write an RSS feed with Java? I'm using Java, and need to generate a simple, standards-compliant RSS feed. How can I go about this? A: I recommend using Rome: // Feed header SyndFeed feed = new SyndFeedImpl(); feed.setFeedType("rss_2.0"); feed.setTitle("Sample Feed"); feed.setLink("http://example.com/"); // ...
{ "language": "en", "url": "https://stackoverflow.com/questions/113063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Variable variables in Progress 4GL Is there a way to dynamically reference a variable? Apparently value() does not work on a variable reference. def var export-columns as char extent. def var i as int. def var my-columns as char extent ["column1, column2"]. export-columns = value("my-columns"). do i = 1 to extent...
{ "language": "en", "url": "https://stackoverflow.com/questions/8140220", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Make Rails table column attribute read only What is the best way to make my table column read only? disable the setter method? The column is set by postgres trigger, so I don't want to set it in the application level A: It seems like you look for ActiveRecord::Base attr_readonly: class Foo < ActiveRecord::Base at...
{ "language": "en", "url": "https://stackoverflow.com/questions/37097708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: how to update form structure using ajax Recently i have been working over a contact module.There are 3 columns ie. name, email, phone and a +1 button which includes anew row to add one more contact filed using ajax. And here the problem arise. When i update my structure, the data in old contact field vanishes. Eg: I...
{ "language": "en", "url": "https://stackoverflow.com/questions/18499986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to save entity with relationship in spring boot I have a spring boot application where I want to send an json object with a relationship. I have one entity called meetingSetting and one called meetingTime. MeetingSetting can have as many meetingTimes as possible and one meetingTime object belongs to one meetingS...
{ "language": "en", "url": "https://stackoverflow.com/questions/67777691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Variadic templates with exactly n parameters I want to make a variadic template with exactly N arguments, where N is also a template parameter. For example, template <int N, typename T[N]> void function(T t[N]) { // do stuff with t[0] through t[N-1] } (I realize the above is not valid syntax) I know that one wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/23458498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Knockout foreach binding creating extra columns can someone tell me why there's extra td columns in the following foreach binding? <table border="1" style="margin-top: 5px"> <thead> <tr> <th>rid</th> <th>ciname</th> <th>dId</th> <th>ReqName</th> <th>ReqType</th> <t...
{ "language": "en", "url": "https://stackoverflow.com/questions/30069841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why do we need to require and include a module for a class? Why do I need to require "stacklike" in stack.rb when I am already using the include method for the stacklike.rb? If I remove the require, it yields the error "Uninitialized constant Stack::Stacklike (NameError)". stacklike.rb module Stacklike def stack ...
{ "language": "en", "url": "https://stackoverflow.com/questions/19636628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to support multi screen size in android apps I write an application in android. now i want to change my code to be suitable for multi screens. i search but i didn't completely understand what should i do for that? for example: 1- i should set text size dynamically 2- have different layout for different screens ...
{ "language": "en", "url": "https://stackoverflow.com/questions/14210170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Result exceeded maximum length error The below OREPLACE query is throwing the error. Select cast( OREPLACE (SimpledefinitionQuery , 'gpi','gpiREPLC') as varchar(40000)) as repl from SimpleDef0; The return string in the OREPLACE function is set to max of 64000. When I checked the length of column SimpledefinitionQu...
{ "language": "en", "url": "https://stackoverflow.com/questions/44205785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is linuxrc purpose and is it needed in the rootfs? Question My question is, What does linuxrc do? Do i need it in my rootfs? Does it have anything to do with using systemd vs initd? Background I am currently attempting to build a rootfs for an ARM 7 processor using Yocto. The only modification I have made to th...
{ "language": "en", "url": "https://stackoverflow.com/questions/45268712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Wait to code inside function $.get done to continue I have doing a website with javascript but I can't do that I want. I have this <script type="text/javascript"> res = new Array(); var fun1 = function () { var control = $.Deferred(); for (i=0;i<5;i++) { $.get("URL", function(data){ res[i]=data; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/28050058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Which Spring Batch Partition is best suited I have one DB having around 400k records and using spring batch I need to migrate that to another DB. Using single threaded step may not give me performance edge , so thought of using scalability options provided by spring batch. After reading from multiple posts and docum...
{ "language": "en", "url": "https://stackoverflow.com/questions/61522994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to associate file extensions without a special permission from Microsoft? If no, are there any alternative solutions to mimic the given behavior ? I've developed a "parser" of sorts for a custom file format and would like to be able to open such a file on my WP Mango. A: No, this "feature" isn't avai...
{ "language": "en", "url": "https://stackoverflow.com/questions/9503883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Compare array of objects: Ramda way There are 2 arrays of objects, the first one is const blocks = [ { id: 1 }, { id: 2 }, { id: 3 }, ] and the second one is const containers = [ { block: { id: 1 } }, { block: { id: 2 } }, { block: { id: 3 } }, ] I want to take blocks array, take each object from that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/56163773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Symfony2, JMS Serializer, Doctrine Persistent Collection and FOSRestBundle I'm trying to figure out how to return the DBRef objects in my views when using FOSRestBundle and JMSSerializer. So in my document I have class Advert { //... /** * @var Image[] * @MongoDB\ReferenceMany(targetDocument="Ap...
{ "language": "en", "url": "https://stackoverflow.com/questions/37930769", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there is some change in google maps v2 api key access My google maps api v2 don't show the map. I checked even on v3 also can't see the map. I am getting this : http://maps.gstatic.com/maps-api-v3/api/js/20/0/intl/iw_ALL/main. I checked the api key and try to define a new key. the same problem occure. A: I've ...
{ "language": "en", "url": "https://stackoverflow.com/questions/28603219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a way to find out which bundles are using my Bundle? I'm a building an OSGI framework and I was wondering if there is a way to get all the bundles who bound themselves to mine? It's because I offer a service to those bundles, and make new resources to optimize my preformence while offering this service. I a...
{ "language": "en", "url": "https://stackoverflow.com/questions/17854034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: sqlite on mono: calling SELECT causes ResetIndexes and index rebuilding I'm developing a .net app that is using sqlite to maintain a database. On windows I use System.Data.Sqlite library and everything works fine. On Linux I use Mono.Data.Sqlite. When I start my app and call "SELECT * FROM TagInfo" a strange thing h...
{ "language": "en", "url": "https://stackoverflow.com/questions/10251252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Excel VBA - Insert Username ONLY when cell is changed Here's my problem: I have working code to insert a username and timestamp when a user makes a change anywhere in a row. Great! So my code works and I answered my own question, right? Nope! There's a tiny issue which, while it doesn't break the code, does lead to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/38334444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Solving the Monkey and Banana Using Basic STRIPS Algorithm We have been asked (for homework) to create solutions to a couple of AI problems using Python and making modifications to a basic STRIPS algorithm. At the moment I am trying to tackle the Monkey and Banana problem using it and have had some success but a lot...
{ "language": "en", "url": "https://stackoverflow.com/questions/33048330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Hadoop processing time in datanode I have two questions here: * *I have 1x master and 1 node setup and process a file of 5MB. I found the total processing time is almost same as below with or without the datanode. I am referring to CPU time spent which almost 6 seconds. Anyone can reply here that the datanode is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/52818868", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MediaCodec encoding - dequeueInputBuffer returns INFO_TRY_AGAIN_LATER? I'm working on a project where I'm using the AudioRecord class to record audio and MediaMuxer to write the encoded data to an output file. Everything seems to be working fine once I start recording but after a few calls to the writeRecordingAudio...
{ "language": "en", "url": "https://stackoverflow.com/questions/51363500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Load single column of CSV into MySQL I have a csv file that is formated as follows: Rank, URL 1, www.google.com 2, www.facebook.com etc... I have a table with structure url, source, date_added Where each csv file has a different source ID. I am using the following query to load my data load data local infile 'thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/17791565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Angular 2 how to put object array in to another object array So I have 2 Arrays (Always equal index) : A: [ {name: Jhon1} {name: Jhon2} {name: Jhon3} ] B: [ {lastName: Pom1} {lastName: Pom2} {lastName: Pom3} ] Expected Result after merge : A: [ {name: Jhon1, lastName: Pom1} {name: Jhon2, lastName: Pom2} ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53632682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Cannot initialize non-const reference from convertible type I cannot initialize a non-const reference to type T1 from a convertible type T2. However, I can with a const reference. long l; const long long &const_ref = l; // fine long long &ref = l; // error: invalid initialization of reference of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/2516631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Python Module Import Error "ImportError: No module named mrjob.job" System: Mac OSX 10.6.5, Python 2.6 I try to run the python script below: from mrjob.job import MRJob class MRWordCounter(MRJob): def mapper(self, key, line): for word in line.split(): yield word, 1 def reducer(self, word, occ...
{ "language": "en", "url": "https://stackoverflow.com/questions/4199984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Android - DatabaseUtils.sqlEscapeString() does not work I want to insert "women's cloth" in the database, so I use String name = DatabaseUtils.sqlEscapeString("women's cloth"); but it gives out put like "'Women''s Clothing'" and while inserting app crashes and gives E/SQLiteLog: (1) near ",": syntax error -------...
{ "language": "en", "url": "https://stackoverflow.com/questions/38322543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Folder changes monitor made in Visual Basic 2010 does not write changes correctly I've made a program in Visual Basic 2010, that monitors and write down changes in a folder eg. when a file deletes, when a file renames, when a file creates and which files, but it's a problem. I've writed the code to make a new line w...
{ "language": "en", "url": "https://stackoverflow.com/questions/19408602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: TypeError: coercing to Unicode: need string or buffer, file found in python(writing data from existing files into single file) I am supposed to write the data from three existing files to a single file in python. I faced the error "TypeError: coercing to Unicode: need string or buffer", file found. My three existing...
{ "language": "en", "url": "https://stackoverflow.com/questions/45317802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: p Values for FUN="coef" in bootstrapLavaan Suppose I have a lavaan model: fit=' #Structural model var1=~item1+item2+item3 var2=~item1+item2+item3 var3=~item1+item2+item3 #Path model var3~var2 var2~var1 ' I then use sem to calculate: example=lavaan::sem(fit, data) Now I want to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37271763", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unable to upload attachments to testresult using TFS API I am trying to upload attachments using TFS API Following is the code snippet : result.State = TestResultState.Completed; result.RunBy = identity; var attachment = result.CreateAttachment(logFilePath); run.Attachments.Add(attachment); The cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/31973569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: I can't find Generate local resource from tools menu in visual studio 2013 When I'm in design view(markup) of a web page, I can't find the Generate Local Resource from my tools menu. Can anyone tell me how to enable this tool?
{ "language": "en", "url": "https://stackoverflow.com/questions/23268284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Level Order Traversal: Deleting a Subtree #include <iostream> using namespace std; struct node { int item; node* l; node* r; node (int x) { item = x; l = 0; r = 0; } node(int x, node* l, node* r) { item = x; this->l = l; this->r = r; } }; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/29484721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Dotnetnuke 6 Ribbonbar Admin and dropdown gone Above is the ribbonbar after I have logged in as a super user. The Admin option next to Host is completely gone The site is running DNN6, the skin is only in the site portal folder, and it seems that all admin modules and options have gone away. Even the header, which ...
{ "language": "en", "url": "https://stackoverflow.com/questions/8084007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to deploy a background Function "myBgFunctionInProjectB" in "project-b" and triggered by my topic "my-topic-project-a" from "project-a" It's possible to create a topic "my-topic-project-a" in project "project-a" so that it can be publicly visible (this is done by setting the role "pub/sub subscriber" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/51963857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: where can i find metadata of all the amazon cloud services? I searching for what are the metadata that AWS uses for each and every service. For AWS instance it uses ami-id, ami_launch-index, hostname, instance-action and many more as the metadata like wise where i can find metadata for all the services like EBS, VPN...
{ "language": "en", "url": "https://stackoverflow.com/questions/34651460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Dot/point in datagridview when updating data So, I have a datagridview (datagridview1) and it's connected to SQL Server. datagridview in column 3 (adhb) can be update by pressing a button and just edit in the specific column. The problem is when I try to update a decimal number (e.g 100.25) it's just change to 10025...
{ "language": "en", "url": "https://stackoverflow.com/questions/67914859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }