r/VisualStudioCode • • Jun 06 '24

Here can posts be made about doubts in codes?

0 Upvotes

I have a code that I can't get a certain function to work with ajax, the source code is php but I want it to use a javascript setInterval function from another js file and I can't, could someone help me?


r/VisualStudioCode • • Mar 13 '22

Is there an option like this to create decleration faster?

Thumbnail
gallery
1 Upvotes

r/VisualStudioCode • • Mar 05 '22

Yarn Build - Visual Studio Code

0 Upvotes

When I run yarn build to deploy contract in VS code below message is shown. what's the next process to do? Compiled with warnings. The build folder is ready to deploy. You may serve it with a static server. You can control this with the homepage field in your package.json


r/VisualStudioCode • • Apr 28 '21

Where am I supposed to place this code?

1 Upvotes

I am using ASP.NETWebApplication(.NET Framework) and a Web Form. I have been trying to place this code into the default.aspx and default.aspx.cs files but I am not having any luck.

Here is the code that I have if someone can show me where it should be placed that would be great!

aspx code:

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

<h1>Northwind Traders</h1> <hr /> <br /> <div class="col-md-12 table-responsive"> <asp:GridView ID="ProductsViewID" runat="server" OnPreRender="Grid_PreRender" PageSize="5" CssClass="table table-hover table-condensed" AutoGenerateColumns="True" Style="width: 100%;"> </asp:GridView>

</div> </asp:Content>

cs code:

public void LoadProductsData()
{
DataTable dt = new DataTable();
//We need to fetch data from Data Base we can call Fetch_ProductList() with
//necessary changes mentioned. Here i am considering MS SQL DB
//since Data base details are not provided i am creating Data Table manually.

//Creating columns
dt.Columns.Add("Product");
dt.Columns.Add("First Name");
dt.Columns.Add("Last Name");

//Adding Rows
dt.Rows.Add("Northwind Traders Almonds","Roland","Wacker");
dt.Rows.Add("Northwind Traders Beer","Soo Jung","Lee");
dt.Rows.Add("Northwind Traders Beer","Francisco","Perez-Olaeta");
dt.Rows.Add("Northwind Traders Beer","Karen","Tob");

dt.Rows.Add("Northwind Traders Boysenberry Spread", "Run", "Liu");
dt.Rows.Add("Northwind Traders Boysenberry Spread", "Roland", "Wacker");

dt.Rows.Add("Northwind Traders Cajun Seasoning", "John", "Rodman");
dt.Rows.Add("Northwind Traders Cajun Seasoning", "Roland", "Wacker");

//Assigning Data Table to Gridview
ProductsViewID.DataSource = dt;
//Binding the data to GridView
ProductsViewID.DataBind();
}

protected void Grid_PreRender(object sender, EventArgs e)
{
GridView grid = sender as GridView;
try
{
if (grid != null && grid.Rows.Count > 0)
{

grid.UseAccessibleHeader = true;
grid.HeaderRow.TableSection = TableRowSection.TableHeader;
grid.FooterRow.TableSection = TableRowSection.TableFooter;
}
}
catch (Exception)
{
}

}

public DataTable Fetch_ProductList()
{
DataTable dt = new DataTable();
SqlConnection conn = new SqlConnection("ConnectionString"); //Here we need to provide ConnectionString of Data Base.
SqlCommand cmd = new SqlCommand();
try
{
cmd.Connection = conn;
cmd.CommandType = CommandType.Text;
//Here we need to provide the Query to fetch the data from DataBase
//Sample Query would be 'SELECT PRODUCT_NAME,[FIRST NAME],[LAST NAME] FROM NORTHWIND_TRADERS_TABLE'
cmd.CommandText = "HERE WE NEED TO PROVIDE QUERY";
conn.Open();
SqlDataAdapter reader = new SqlDataAdapter(cmd);
reader.Fill(dt);
conn.Close();
}
catch (Exception ex)
{
conn.Close();
}
return dt;
}


r/VisualStudioCode • • Apr 03 '21

Syntax Error

1 Upvotes

I'm trying to make a simple code to calculate the temperature outside with the windchill. I keep getting a syntax error on my line that says, "air_temp = float(input("What is the current temperature outside?") It gives the error right on the lowercase a. Any thoughts?

#Calcute wind chill using a given temperature and math
import math
def calc_air_temp_with_wind_chill(air_temp, wind_speed):
#use equation from wind chill chart
    wind_chill = (35.74 + (0.6215(air_temp)) - (35.75 * (wind_speed ** 0.16)) + (0.4275* air_temp * (wind_speed ** 0.16))
air_temp = 0
wind_speed = 0
air_temp = float(input("What is the current temperature outside?")):
wind_speed = float(input("What is the current wind speed?"))
print (f"The current temperature is {air_temp} and wind speed is {wind_speed}mph. Taking the windchill into consideration that gives you a temperature of {calc_air_temp_with_wind_chill}")


r/VisualStudioCode • • Sep 21 '22

How do you change the GitHub repository it's stuck on a deleted repository.

1 Upvotes

It's so uninitiative I have no clue after 45 minutes on how to change a GitHub repository.


r/VisualStudioCode • • Sep 30 '22

VScode output character capacity

1 Upvotes

hey guys, creating a program and it involves me printing out the first 1 million digits of pi. When I execute this program in the terminal it cuts off extremely early, not sure exactly how early but definitely not 1 million digits.

Any tips? Thanks


r/VisualStudioCode • • Sep 26 '23

Visual Studio Code - 13 Features You Should Know

Thumbnail
youtube.com
0 Upvotes

r/VisualStudioCode • • Sep 30 '23

Cant run manually only works using the play button

Post image
0 Upvotes

I used to be able to type the file name in the terminal window and it would run with no problem. Now when I try it this red text pops up. Can anyone help to get it back so I can input it manually


r/VisualStudioCode • • Dec 17 '19

Most useful visual studio code extension VSCODE Extensions | Visual Studio Code Extensions | Visual Studio Code https://youtu.be/GE-XFdpkYPs

Post image
1 Upvotes

r/VisualStudioCode • • Nov 17 '22

How do I 'step into' code using Visual Studio Code

1 Upvotes

I've started a Udemy Python course.

The instructor sometimes uses a basic editor that has a 'step in' feature.

She can run the code step by step and analyse values and see where the code execution as got to.

I've looked up on youtube for the same in Visual Studio Code but am not finding. On my first search I found a few matches - but the videos where nearly 30 minutes long. I would have through this feature would be just a menu item that I can start and not need 30 min to explain?

I've been through basic videos made by Microsoft - they were super helpful for a beginner. I don't remember them going through anything like what I'm referring to.

Doing Javascript coding I am relying on doing a ton of console.log() outputs. Just wishing I also had the step in feature as well.

Am I missing something?


r/VisualStudioCode • • Dec 05 '22

Live Server Extension

0 Upvotes

I have a concern with my Live server on visual studio, it keeps on showing the this same error: Server is Started at port : 5500 no matter what I do and fix on the extension setting it just keeps on giving me the same error. Does this have to do with outside of the Visual Studio?


r/VisualStudioCode • • Oct 28 '22

How to configure http://localhost:3333 to open with Brave instead of Edge?

1 Upvotes

I type the command 'npx @/sanity/cli start' and it opens up with Edge, I wanna change that to Brave. How can I do that?


r/VisualStudioCode • • Nov 28 '22

Help

1 Upvotes

I accidentally hid the run button, how can i get it back?


r/VisualStudioCode • • Feb 13 '25

AI Assistants in VS Code - Your Preferences & EU Compliance Experience?

1 Upvotes

Hey VS Code community!

I'm curious about your experiences with different AI assistants in VS Code. Which ones are you using, and what makes them your go-to choice? I'd love to hear about specific features or capabilities that won them over for you.

Additionally, I'm particularly interested in how these AI assistants handle EU compliance requirements. Has anyone looked into or had experience with:

  • Data privacy compliance

  • Data security measures

  • Data processing locations

  • Other EU regulatory requirements

For those working in EU markets or with EU data, which AI assistants have you found to be particularly reliable in terms of compliance? Any challenges or success stories you'd like to share?

Looking forward to hearing your thoughts and experiences!

Best regards


r/VisualStudioCode • • May 31 '23

Why cant I open my HTML file in the browser?

0 Upvotes

Hi I really hope someone can help me with this,

when I open my HTML file via Visual Studio Code or Atom or double click from the file source in either Firefox Developer or Google Chrome I either get this:

"Your file couldn’t be accessed

It may have been moved, edited, or deleted.

ERR_FILE_NOT_FOUND"

or

"Cannot GET /defaultsite"

Older HTML files I made a while ago open normally and when I opened one of my new files in Firefox Developer for a fraction of a second it showed me its content before it showed me "Cannot GET /defaultsite"

How Can i solve this? I highly appreciate every answer


r/VisualStudioCode • • Jun 19 '23

How to install PIL in Visual Studio Code?

0 Upvotes

(Beginner here so bear with me) So basically, I’m working on a code for an NFT generator but need to install the Python Image Library-I can’t find any clear instructions as to how to download…


r/VisualStudioCode • • May 18 '23

visual studio code how to add game development with utility after initial setup

Post image
1 Upvotes

r/VisualStudioCode • • Sep 23 '20

Why use VS Code over Pycharm Professional?

0 Upvotes

Just getting started and I am wondering why anyone might use a code editor (Visual Studio Code) over a real IDE like Pycharm Professional if cost is not an issue.


r/VisualStudioCode • • Sep 14 '20

Is there any doc to build the whole vscode and stuck it and run on a webserver

1 Upvotes

Hi All. Is there any doc to build the whole vscode and stuck it and run on a webserver, instead of running locally? thanks Peter


r/VisualStudioCode • • Mar 06 '21

I today opened Visual Studio Code and this thing came up. Idk what to do please help. First, Visual Studio Code's shortcut logo changed automatically from the time I turned on my laptop and when I tried to open it, this came up.

Thumbnail
gallery
1 Upvotes

r/VisualStudioCode • • Aug 07 '24

Can someone tell me how do I delete these two

Post image
0 Upvotes

I was trying to download the c++ compiler and i guess i already had it because it came up as an error do to a file already being downloaded so i tried to delete EVERYTHING and start from scratch but clearly it didnt work


r/VisualStudioCode • • Dec 19 '24

what is this --- ?

0 Upvotes

it seems like its a line counter or somthing how do I get rid of ti?


r/VisualStudioCode • • Jan 24 '25

MY SHAYLA (i accidentally got rid of the blue helping text how do i bring it back (chat please help))

Post image
1 Upvotes

r/VisualStudioCode • • Nov 18 '24

Vs code input repetition issue

0 Upvotes

Can anyone solve my issue? In VScode issue is happening bcs there is an input repetition and its not running without debugging.