[Solved] How to set space between TextBox values into array

Try this: var numbers = textBox1.Text.Split(‘ ‘); List<int> lst = numbers.Select(item => int.Parse(item)).ToList(); It will be even better if you use method group like this: List<int> lst = numbers.Select(int.Parse).ToList(); Then you can get it’s values like this: lst[0] –> 1 lst[1] –> 32 and … 0 solved How to set space between TextBox values into … Read more

[Solved] How do I make my java program run in the background? [closed]

Look ma, no windows here, just us teddies… public class TestTrayIcon01 { public static void main(String[] args) { new TestTrayIcon01(); } public TestTrayIcon01() { EventQueue.invokeLater(new Runnable() { @Override public void run() { try { TrayIcon icon = new TrayIcon(ImageIO.read(getClass().getResource(“/SmallTeddy.png”))); SystemTray tray = SystemTray.getSystemTray(); tray.add(icon); } catch (Exception ex) { ex.printStackTrace(); } JDialog dialog = new … Read more

[Solved] How to a copy file with versioning with cmd or PowerShell? [closed]

Simple Google search for “copy replace gui powershell” presented this as second option Found at http://blog.backslasher.net/copying-files-in-powershell-using-windows-explorer-ui.html function Copy-ItemUsingExplorer{ param( [string]$source, [string]$destination, [int]$CopyFlags ) $objShell = New-Object -ComObject ‘Shell.Application’ $objFolder = $objShell.NameSpace((gi $destination).FullName) $objFolder.CopyHere((gi $source).FullName,$CopyFlags.ToString(‘{0:x}’)) } Copy-ItemUsingExplorer -source C:\Users\Default\Desktop\End -destination C:\Users\Default\Desktop\Start 6 solved How to a copy file with versioning with cmd or PowerShell? [closed]

[Solved] Program gives unstable output? [closed]

New code that works: #include <stdio.h> #include <conio.h> #include <string.h> #include <stdlib.h> #include <time.h> int main() { int i,j=0,code,amt, key,lines=0; int id[100],stock[100],k=0; char name[100][20],product[100]; float price[100],sum; float total=0; char ipname[100][20]; int quantity[100], ch; float ipprice[100]; float ipsub[100]; FILE*fp1; fp1=fopen(“Fruit.txt”,”r”); if(fp1==NULL) { printf(“ERROR in opening file\n”); return 1; } else { while((ch=getc(fp1))!=EOF) { if(ch==’\n’) lines++; } … Read more

[Solved] how do you do an upper “-” in programming?

You mean extended ASCII code 238 (¯) In Windows you can enter characters using ASCII-Codes pressing ALT and typing the number on the Num-Block. For example hold ALT type 238 on num-block release ALT See the result: ¯ 1 solved how do you do an upper “-” in programming?

[Solved] Method must declare a body?

The error message tells you exactly what’s wrong: ‘StringedMusInsApp.Guitarra.Main(string[])’ must declare a body because it is not marked abstract, extern, or partial. Look at your method declaration for Main(string[]): public static void Main (string[] args); There’s no method body. But since it’s not an abstract, extern, or partial method, it requires a method body. Define … Read more

[Solved] WINDOWS API: GetCurrentThread(); in C [closed]

Operating systems courses tend to suck because they take the simplest of concepts and try to make them convoluted. Documentation for the GetCurrentThread () function is https://learn.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-getcurrentthread What it does not explain is that the return value for the function is a “handle.” Windoze uses handles somewhat as pointers to objects but where you cannot … Read more

[Solved] C create and run windows service

I think you miss some important requirements for a windows service.According to the MSDN. You need a service main function and a control handler function as you can’t handle the “start” command if there’s no control handler function registered. So you can refer to the code to know how to wrote a ServiceMain Function and … Read more

[Solved] Environment variable set in batch file cannot be accessed in the C code compiled by the file [closed]

Wild-assed guess, because you don’t even show a single line of C code: getenv(TEST_VAR) should be getenv(“TEST_VAR”). PS: To avoid downvotes for your next question (and possibly unhelpful answers like mine), please read http://www.catb.org/esr/faqs/smart-questions.html explaining the art of asking smart questions. 2 solved Environment variable set in batch file cannot be accessed in the C … Read more