SQL: Does adding an index to a table lock the entire table? Can it affect other tables? Ask Programming |
- SQL: Does adding an index to a table lock the entire table? Can it affect other tables?
- rand(fortran95)
- npm not installing dependency of dev dependency when it's also listed as app dependency
- Client wants me to evaluate their new API. What do I do?
- I am stuck on my homework. (how to make a String covernt into a int)
- [Macro Recorder] Need help creating a simple macro
- What is a good way to run a periodic task in android studio that is turned on and off with a button?
- Suggestions for user filled form where further questions show/hide on context
- LF somewhere to practice C++
- [xpost /learnprogramming] Developing a simple proxy: changing the whitelist at runtime and make the whitelist persistent
- [Java] Given a picture of a pokemon, find its name.
- Button triggers while loop just once
- Why do programs get distributed as source code, and not as an exe?
- learn to hack
- (c++) Data not adding in input file
- How do finder/explorer programs store file and folder ordering (when arbitrarily set by users)?
SQL: Does adding an index to a table lock the entire table? Can it affect other tables? Posted: 12 Oct 2018 10:37 PM PDT This week, my team ran into an issue where we experienced a database outage as indexes were added to a very large (several hundred million rows) table. This is on a SQL Server database. I have a few questions about this: (1) Is it accurate to say that creating an index on a large table can cause it to be unusable for a long period of time? In this case, it was several minutes. (2) Researching this issue, it looks like the recommendation for SQL Server is to set an `online` flag to the `CREATE INDEX` query. Does the same exist for other DB engines, like MySQL and PostgreSQL? (3) Can adding an index to one table cause a performance degradation on another table? We observed this, but I'm not sure if the application was reporting erroneous metrics due to the one table's latency. I've understood that creating indexes on live/populated tables can be risky because, from my understanding, the entire table is locked during the index creation. But I never fully understood why this is necessary, and my searching the Internet isn't yielding great or informative results. Also trying to figure out if this is an issue with all RDMSes, since the workaround for SQL Server seems very SQL Server-specific. But adding an index to a column doesn't seem that unusual. [link] [comments] | ||
Posted: 12 Oct 2018 10:15 PM PDT How do I generate a random number in Fortran like we do in C++? Thats is, whats the equivalent of 'rand()' in Fortran? [link] [comments] | ||
npm not installing dependency of dev dependency when it's also listed as app dependency Posted: 12 Oct 2018 10:12 PM PDT This one has me stumped. Very easily reproducible. package.json: Put that in a folder and run npm install --only=dev. I'm using node v8.9.4 and npm v6.4.1. Everything will install fine. Open the node_modules directory and verify that the less module/directory is there, because it's a dependency of gulp-less. You can use this gulpfile.js to test: Okay, now add "less": "3.8.1" to "dependencies" so your package.json looks like this: Delete the node_modules folder and package lock file and re-run npm install --only=dev You will see that you cannot run the gulp file now, and if you open and look for the less package in node_modules it will not have been installed. This is repeatable behavior for me. Any time I add less to the app dependencies, it is never installed when I do install --only=dev. Am I missing something about how this is supposed to work or did I find a bug? [link] [comments] | ||
Client wants me to evaluate their new API. What do I do? Posted: 12 Oct 2018 10:47 AM PDT
| ||
I am stuck on my homework. (how to make a String covernt into a int) Posted: 12 Oct 2018 08:16 AM PDT I am not looking for you to do it for me I have done most of it but if you see a mistake I made that would be great. also when I go to compute that last line it is not adding the two because it is a String + int. Is there anyway to fix this? this is what my teacher asked us to do we are using java a. Write a standard mode application for the Summerdale Condo Sales Office; the program determines the price of a condominium. Ask the user to choose 1 for park view, 2 for golf course view, 3 for lake view. The output is the name of the chosen view as well as the price of the condo. Park view condos are $150,000, condos with golf course views are $170,000, and condos with lake views are $210,000. If the user enters an invalid code, set the price to 0. Save the file as CondoSales.java. b. Add a prompt to the CondoSales application to ask the user to specify a (1) garage or a (2) parking space, but only if the view selection is valid. Add $5,000 to the price of any condo with a garage. If the parking value is invalid, display an appropriate message and assume that the price is for a condo with no garage. Save the file as CondoSales2.java. This is the code I have so far I feel like I am really close (could be wrong I am a noob) import java.util.Scanner; public class CondoSales2 { public static void main(String[] args) { String price; int condo; final int PARK_VIEW=1; final int GOLF_COURSE_VIEW=2; final int LAKE_VIEW=3; String message; String message2; Scanner input = new Scanner(System.in); System.out.println(" What Condo do you wish too buy? "); System.out.println(" Enter " + PARK_VIEW + " for Parkview, " + GOLF_COURSE_VIEW + " for golf course view or " + LAKE_VIEW + " for lake view"); condo = input.nextInt(); switch (condo) +{ case (PARK_VIEW): message = " park view "; price = " $150,000 "; break; case(GOLF_COURSE_VIEW): message =" Golf course view "; price = " $170,000"; break; case (LAKE_VIEW): message = " Lake view "; price = " $210,000 "; break; default: message= " invaild "; price = " invalid "; } int parking; int parkingprice= 5000; int condoprice= price; String totalprice; final int GARAGE=1; System.out.println( " you entered " + condo); System.out.println(" Thank you for your purchase what parking space would you like to use "); System.out.println(" Enter " + GARAGE + " for the garage or enter " + PARKING_SPACE + " for a parking space. This will add $5000 to your price. " ); parking = input.nextInt(); switch (parking) { case (GARAGE): totalprice = parkingprice + price; message2 = " Garage "; break; case (PARKING_SPACE): totalprice = parkingprice + price; message2 = " Parking space "; break; default: totalprice = " invaild "; message2 = " invaild "; } System.out.println(" You have chosen " + parking + " as your parking your new price is " + totalprice); } } Thank you so much if you help with this. You may friend are helping someone not so good at coding learn a little bit lol. [link] [comments] | ||
[Macro Recorder] Need help creating a simple macro Posted: 12 Oct 2018 06:41 AM PDT Sorry if this barely falls under programming but no idea where else to ask, I'm not a programmer obviously. Basically I'm trying to use Macro Recorder to execute a very simple macro, I want the macro to wait for an image/color to appear and then just click the mouse when it appears, that's it. So far I can make it find any image and click wherever I want but I can't get the macro to actually WAIT for the image to appear, which is the whole concept. EDIT: To provide a bit more info and context, this is what I have so far so not sure what else I'm missing here https://imgur.com/a/Zm5s39z. Don't wanna bore people with the details but I'm hoping to create a very simple macro to make my work a lot easier, and if this simple macro helps me out then I could maybe later expand it further. What you see in the screenshot does work in the sense that it instantly searches the screen for the image, finds it and clicks the mouse. But I need the macro to patiently wait for the image to appear on my screen before it executes that click, that's the whole idea. I can't get it to work like that so far and there's not much helpful info in the manual either. So in short, how do I make the macro wait for my image to appear? [link] [comments] | ||
What is a good way to run a periodic task in android studio that is turned on and off with a button? Posted: 12 Oct 2018 03:43 PM PDT I'm new to java programming and used to programming microcontrollers. The solution to this with microcontrollers is using an interrupt to change the logic on the condition that runs the loop. For java and android studios.. I don't know what to do. Basically I connected my app to a raspberry pi which is connected to a camera. I have it set up so clicking a button loads an image to an imageview. I would like to change this so clicking a button sends a picture every x seconds, and clicking the button again stops it on the last picture. Should I be using an a Handler? Should this be a background task? Any advice would be great! [link] [comments] | ||
Suggestions for user filled form where further questions show/hide on context Posted: 12 Oct 2018 01:23 PM PDT Web based, most likely. A user answers questions and their answers lead to further options, some will be quite simple yes/no, others will involve selecting from lists. Some free typed text. Millions of possibilities but most fitting into several hundred likely ones where everything is the same but for some values. The key to this is that the customer will throw in dramatic changes and additions frequently. "Oh can you make it that when I do this, it does this ... Can you stop that happening ... Can I copy all this and do a version with.." It's going to be a nightmare to develop so I'm looking for the nicest tool set to make things easier knowing that. No matter how it looks to the user and no matter the complexity behind the scenes. I need to output consistent and clean data, even if a CSV of the answers. Given the guarantee of changes, I'll need to be keeping the output in a set order while bending to the needs of the customer. Shit as this may sound. It's a job. [link] [comments] | ||
Posted: 12 Oct 2018 11:50 AM PDT I'm looking for websites like codingbat but with C++ to practice some basic skills. [link] [comments] | ||
Posted: 12 Oct 2018 11:24 AM PDT Hello, first post here, I hope it matches the sub. I am trying to develop a simple proxy application (I am using Node.js) but I am stuck. The proxy should simply forwards the communication to the target server and when receives the response it will forward back it to the original client without any motifications. This part is done, but I also want to add some functionality: I want the proxy to deny all client requests by default, unless the target host is specified in a whitelist. Also, I want to be able to change the whitelist at runtime. Also, I want the whitelist to be persistent, so that I don't lose it when the proxy restarts. I am stuck on what would be a good approach to do this. It would be easy to do this without the runtime constraint, or without the persistency, but I am having problems doing this considering both runtime and persistency. This is my approach so far: I have created an Express.js application that has 2 HTTP servers listening on 2 ports, say 8000 and 8001. One port is the proxy itself, and the other is an administration API that should allow to add and remove elements from the whitelist through a REST API (basically, POST to add, DELETE to remove). The problem now is how do I, through the API, change the whitelist and make it persistent? What could be a good approach I could look for? I hope I made myself clear, if not, please let me know so I can update and improve the question. [link] [comments] | ||
[Java] Given a picture of a pokemon, find its name. Posted: 12 Oct 2018 09:47 AM PDT If given the url to a picture of a pokemon, whats the easiest way to get the name? All images will be fromBulbapedia, but the urls are not predictable. I tried reverse google image searching, and it worked (top result, basically) but I can't get the google search api to work as intended. Any insight is appreciated. [link] [comments] | ||
Button triggers while loop just once Posted: 12 Oct 2018 09:43 AM PDT I have a homework assignment in which we were provided the code for a simple game of Craps and we need to create the GUI using javafx and scenebuilder. The while loop will continue to execute until the player wins or loses -- the die will roll once to however many times until conditions are met for win or loss. How do I get the while loop to only execute one time on button press so that it will display each roll and total? Then additional presses will do more rolls until win/loss conditions are met to break the loop as intended. I am just looking for a way to pause the while loop until the button in the GUI is pressed again but I cannot seem to find the right way to do it. [link] [comments] | ||
Why do programs get distributed as source code, and not as an exe? Posted: 12 Oct 2018 10:57 AM PDT Like, once I downloaded a program, and it wanted me to literally compile it to use it - like I really dont want to have to go to all that trouble just for a program that I'll use once [link] [comments] | ||
Posted: 12 Oct 2018 11:22 AM PDT is there somewhere you can learn to hack into stuff? sorry that this is vague. it's meant as a general question - any answer/resource appreciated [link] [comments] | ||
(c++) Data not adding in input file Posted: 11 Oct 2018 10:14 PM PDT Hi guys, super-noob here. I'm having a problem with a simple assignment. We must display a bookstore's income and totals on a chart. No matter what constants or variables I try to use , I cant get the data from my input file to add together. It just displays the data next to each other, which is fine at first but the same thing happens when I try to add them together for a total column. I know my variables are messy as hell and they probably are the problem, but Id be really grateful if someone could shed some light on what the problem is, somehow I'm sure its the way I've assigned the variables, but this is all I really know so far and I'm not sure how else to go about it. I've Linked my code below and what my program looks like. Thank You in advance for any and all help. [link] [comments] | ||
How do finder/explorer programs store file and folder ordering (when arbitrarily set by users)? Posted: 11 Oct 2018 09:59 PM PDT Filesystems are trees, but how are custom orders of files/directories usually stored? E.g. user rearranges shortcuts on desktop, or photos in a directory [link] [comments] |
You are subscribed to email updates from AskProgramming. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment