w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Integrating Spring MVC with existing application
As Spring MVC works on URL Pattern and every request for Image and Resources came from client is separate request, So Spring is finding the matching pattern for "/bootstrap.css" to identify is there anything to serve against this Pattern. And there is no resource mapped against this that is why you are getting this error. You can say Spring that these are my resources and don't go for any mapping finding, if request comes with mentioned URL. put below line in spring-servlet.xml file. <mvc:resources mapping="/PORTAL/css/" location="/PORTAL/css/" cache-period="0" /> this will help you to get rid of css loading errors. but problem for js and image still be there, So try to keep all resources in one resource folder and give mapping like one below, <mvc:resources mapping="/reso

Categories : Spring

Integrating CUDA into a C++ application to use existing C++ class
You currently don't have any CUDA code, so I may can't give enough details. For your Qs: Linking object files including CUDA code requires nvcc compiler driver. You could first compile your code files with individual compilers, i.e. gcc for .c, g++ for .cpp, g77 for .f and nvcc for .cu. Then you can use nvcc to link all the object files .o; host and device code are explicitly declared in .cu file with __host__ and __device__. It's your responsibility not to invoke device code from other host code; Why are your passing a class to CUDA? If you want to replace your fortran code with CUDA, you only need to invoke CUDA functions in your C++ wrapper class, and invoking CUDA API functions uses the the same grammar as invoking c++ functions. Here is an example from my project. The executable

Categories : C++

can we have multiple form in a single form in windows form application?
Create a windows form. This will be your main form. Assuming your using Visual Studio this is realatively easy. Once you have your main form up, drag and drop a user controller onto your form. Have your main form contain the 5 buttons,and your data grid on the other form.

Categories : Windows

Integrating dropzone.js into existing html form with other fields
Enyo's tutorial is excellent. I found that the sample script in the tutorial worked well for a button embedded in the dropzone (i.e., the form element). If you wish to have the button outside the form element, I was able to accomplish it using a click event: First, the HTML: <form id="my-awesome-dropzone" action="/upload" class="dropzone"> <div class="dropzone-previews"></div> <div class="fallback"> <!-- this is the fallback if JS isn't working --> <input name="file" type="file" multiple /> </div> </form> <button type="submit" id="submit-all" class="btn btn-primary btn-xs">Upload the file</button> Then, the script tag.... Dropzone.options.myAwesomeDropzone = { // The camelized version of the ID of the

Categories : Javascript

C# Windows Form Application : how to do something in background after the form has been loaded?
Look at BackgroundWorker component it was specifically designed to allow you to do work in the background and report progress/change to the UI. Note that you're also pausing the UI thread by calling Thread.Sleep(1000) which probably won't end well. You can find documentation on background workers here - http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx

Categories : C#

Windows Form Application with UDP
The static method SetTextForLabel doesn't have access to the controls of the instance of the class Form1. You have to provide a specific instance by passing a parameter or declaring a static member in the Form1 class. As mentioned in the comments, this won't work either since Application.Run() starts an application in the current thread so the code needs some refactoring as well. public partial class Form1 : Form { public Form1() { InitializeComponent(); ConnectUDP(); } private void ConnectUDP() { UdpClient subscriber = new UdpClient(8899); IPAddress addr = IPAddress.Parse("230.0.0.1"); subscriber.JoinMulticastGroup(addr); IPEndPoint ep = null; for (int i = 0; i < 10; i++) { byte[] pdata

Categories : C#

Using another third party application in existing application in android
Android applications are "sandboxed". So, yo cannot integrate any third party application into your application. At the maximum you can launch that any third party application from your application if that application allows it. Also you can launch some of its specific features, if the application has set intent filter for them and you know them.

Categories : Android

Arduino_Visual_Studio-Windows Form Application
It's probably not feasible or practical to attempt a Windows Form application on a Raspberry Pi and definitely an impossibility on an Arduino. The RaspberryPi.org site explicitly states that RaspberryPi will not run Windows applications: enter link description here The Arduino really does not have a GUI or a Window subsystem that would support that type of application. Really, the Arduino is just such a tiny little 8 bit cpu, 2k ram computer, it is just completely off the radar for a Windows application. You may want to investigate the possibility of writing a Python application in windows and porting that to a Raspberry Pi.

Categories : C#

including one form in the other in a windows application
To use classes from another projects (forms are classes): Classes must be public. You must add target project by right-clicking on your current solution and then Add, Existing project... and selecting your project Use classes by specifying their full name with namespace or use using directive. The second task is to use one form as a container for others. This article can help: How to: Create MDI Child Forms

Categories : Dotnet

ADD url in textbox to listbox in Windows Form Application c#
private void btnAdd_Click(object sender, EventArgs e) { string _webstring = @"http://"; string _website = _webstring + textBox1.Text; listBox1.Items.Add(_website); using (StreamWriter w = File.AppendText("websites.txt")) { WriteLog(_website, w); } using (StreamReader r = File.OpenText("websites.txt")) { DisposeLog(r); } } private void btnLaunch_Click(object sender, EventArgs e) { System.Diagnostics.Process.Start("iexplore.exe", listBox1.SelectedItem.ToString()); } private void btnSave_Click(object sender, EventArgs e) { using (StreamWriter w = File.AppendText("websites.txt")) { foreach (string items in listBox1.Items)

Categories : C#

password for Login Application in c# windows form
Just set up a property of textbox: textbox.UseSystemPasswordChar == true; and you can also set the char for password what ever you want: textBox1.PasswordChar = '*';

Categories : C#

C# WPF Application Open Regular Windows Form First
Just instantiate the Windows form in your WPF Form's/Viewmodels constructor and call ShowDialog: namespace WpfApplication11 { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); var form1 = new Form1(); form1.ShowDialog(); Close(); } } }

Categories : C#

How do I use UdpClient.BeginReceive with a Windows Form application (VB.NET)
Your UDPRecv() method will run on an I/O completion thread. Any attempt to update the UI from that thread is going to bomb your program. You'll have to use the form's BeginInvoke() method to pass the string to a method that runs on the UI thread. You will also have to deal with the socket getting closed when your program terminates, that requires catching the ObjectDisposedException that the EndReceive() call will throw. So make it look like this: Public Sub UDPRecv(ar As IAsyncResult) Try '' Next statement will throw when the socket was closed Dim recvBytes As Byte() = dgClient.EndReceive(ar, SiteEndPoint) Dim recvMsg As String = Encoding.UTF8.GetString(recvBytes) '' Pass the string to a method that runs on the UI thread Me.BeginInvoke(New

Categories : Vb.Net

How to launch a C# windows form application from Outlook?
try passing the parameters like so: C:whatever.exe -<your parameter> . Then read the parameter as an argument For example: if you have the exe as C:whatever.exe -<your parameter> in the void Main(string[] args) you would do the following: void Main (string[] args) { foreach (var item in args) { var parameter=item; // do whatever you wish with parameter } }

Categories : C#

Unchecking event ListView Windows Form Application
Handle the ItemCheck event and read the NewValue property to determine if it's about to be checked or unchecked. private void myListView_ItemCheck(object sender, ItemCheckEventArgs e) { if (e.NewValue == CheckState.Unchecked) { //unchecked } else if(e.NewValue == CheckState.Checked) { //checked } }

Categories : C#

Windows Form Getting the Filepath when the application is installed in the system
I am using a public property which gives address of the root folder of the application : public string StartPath { get{ return System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase).Substring(6); } }

Categories : Asp Net

C# UI multiple KeyDown Events ?? windows form application
Simply private void o(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.O) { openFileDialog1.ShowDialog(); } else if (e.KeyCode == Keys.P) { player.Play(); } } you may want to define only one event-handler, but you can check for several keys pressed.

Categories : C#

Converting Decimal to char* in C++ windows form application
What do you mean by Decimal? Perhaps int? See itoa() in the C runtime, or template<typename T> std::string to_string(T num) { std::ostringstream stream; stream << num; return stream.str(); } and call TiXmlText(to_string(666).c_str());

Categories : Visual C++

Sharing data between console application and a windows form
There are many ways - you can use sockets, pipes, message queues, you can store information in a database, you can host a WCF service in the console application etc. But I won't get into a discussion of which of those is best here. Really, if you are having this problem, then very probably you should make your whole solution a Windows Forms/WPF application. It's a lot easier to pass information between forms of the same application, specially if they can reference each other amongst themselves. They just have to call each other's methods, or access each other's properties, or go for the same static class. All in the same environment, no application boundaries crossed. If you want to keep the console there, you could have the main form be hidden and open up a separate console app. Then yo

Categories : C++

How to send data windows form application to website
You can simple send a Get/Post-Request to your PHP-Page: Generate HTTP Requests using c# and then Read the data via: $Get or $Post. You can do the same with ASP.Net, via QueryString: string cParam = Request.QueryString["param"];

Categories : C#

How can I keep open the command prompt in my windows form application in c++?
Have you tried the following? system("cmd /k dir c:\"); /k keeps the cmd prompt window open after the executing process has terminated. But, to be honest, it may be better to use the Windows Terminal Services API for finer control, if you so desire. But, depending on what you want to do - that might be overkill. And, regarding your second question: don't forget to escape your backslashes in: const char program[] = "C:\Windows\System32\cmd.exe"; WinExec((LPCSTR)program, SW_SHOWMINIMIZED); References: http://superuser.com/questions/306167/how-to-prevent-the-command-prompt-from-closing-after-execution

Categories : C++

Select doesn't work from windows form application
Better approach would be this: var command = new SqlCeCommand("select top 1 * from Files where nameFile = @file",con); command.Parameters.AddWithValue("@file", name); var returned = command.ExecuteScalar(); if (returned != null) { returned = true; } and this should work fine. Also top 1 is for performance if you only want to check if file exists in database.

Categories : C#

Running Multiple Instance of Windows Form Application
Yes, you can easily create multiple instance of the same form. For example: new ChatWindowForm.Show(); Also see the Control.Show() method documentation.

Categories : C#

How to select which control overlays other in Windows form application
You can use BringToFront() to bring the Line (or any Control) forward in the z order. l.BringToFront();

Categories : C#

Startup Code in a Windows Presentation Form Application
From the fine manual: Application.Startup Event Occurs when the Run method of the Application object is called. Example XAML: <Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="SDKSample.App" Startup="App_Startup" /> Example C#: using System.Windows; // Application, StartupEventArgs, WindowState namespace SDKSample { public partial class App : Application { void App_Startup(object sender, StartupEventArgs e) { // Application is running // Process command line args bool startMinimized = false; for (int i = 0; i != e.Args.Length; ++i) { if (e.Args[i] == "/StartMinimized")

Categories : Wpf

Windows-Ding when I press Return on C# form application
This happens when one of your text boxes has the focus. It ding-a-lings you to remind you that it doesn't know what to do with the Enter key. It only has a meaning if the box' MultiLine property is set to true. Of course it is not set. The Enter key is special, along with the Escape key, it is intended to operate the default button of the window. You have one, you like your Calculate button to be your default button. So select your form in the designer and change the AcceptButton property, pick your Calculate button from the combobox. Don't forget to add the code that checks that the text boxes have valid strings in them that can be converted to a number with, say, double.TryParse().

Categories : C#

How to get opened application in windows(taskmanager ->application tab content) using java code
This is another aproach to parse the the process list from the command "ps -e": try { String line; Process p = Runtime.getRuntime().exec("ps -e"); BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream())); while ((line = input.readLine()) != null) { System.out.println(line); //<-- Parse data here. } input.close(); } catch (Exception err) { err.printStackTrace(); } If you are using Windows, then you should change the line: "Process p = Runtime.getRun..." etc... (3rd line), for one that looks like this: Process p = Runtime.getRuntime().exec (System.getenv("windir") +"\system32\"+"tasklist.exe"); Its not possible to get the application, because this a

Categories : Java

How will “windows based” authentication work in MVC web application, if users access the application from outside the company intranet
Assuming your website in IIS is visible to the outside through the firewall, then yes it will be accessible from home depending on the browser, you should get a pop up asking for username and password, and the username should be typed MYDOMAINJOEBLOGGS This setup may well work fine but it depends on your needs - is your network admin happy to open this server up to the outside world There can be a quirk if using Internet explorer externally, where IE does not display a pop up box, and instead tries to authenticate with the local windows username, which may not match AD username if it is a personal PC (to get around this on the client, go to Internet Options > Security > Custom Level then scroll down to User Authentication and select 'Prompt for username and password'

Categories : Asp Net Mvc

Identify application when sharing something from charm in windows 8 store application c#
I believe that you can't, the idea is to have sandboxed applications that don't know about each other. You register them as share sources or targets and then a broker handles the interaction between them so there is never any direct contact. Looking at the available members on the objects used for the implementation I can't see anything that would provide information about where the share was made from. Provide some information about what you want to achieve.

Categories : C#

windows 8, could not update application data due to xml cache in Javascript Application
I found the solution for the issue from http://msdn.microsoft.com/en-us/library/windows/apps/hh868281.aspx Adding the header param to the URL did the trick.

Categories : Javascript

Web caching in windows application causing a delay for application loading
Okay, assuming HttpRuntime.Cache is the only thing you're using from ASP.Net: HttpRuntime's class description from MSDN: Provides a set of ASP.NET run-time services for the current application. So, there's a little part of a web server living in System.web.dll and this is one main API for accessing it. The first time you make a call into System.web.dll things will have to be initialized, which takes some time (although minutes is surprising 10 - 20 seconds seems more likely). One thing you could try is initializing in a sub-thread: volatile bool isCacheReady = false; Cache cache = null; System.Threading.Thread t1 = new System.Threading.Thread(delegate() { cache = HttpRuntime.Cache; isCacheReady = true; }); t1.Start(); // periodically check if cache is available yet (

Categories : C#

How to publish config files along with application in windows forms application
There are meny ways to do whay you want to do. the main question is why do you want to do it? if you have a normal program for personal use you can simply link it to the needed file, meaning using the file without actual knowledge that it's there. if it's for a task then you can zip them together, that way you'll know they are together, without adding them as resource. for other kind of use, or if you have to add them as resources, just add them like shown here for more reading on what do you need and how to do it i have here linked vs. Embeded resources good luck

Categories : C#

I need a Windows 8 WinRT application to communicate with a standalone application written in C
Well, the posts stating that such communication is not possible, are mostly right. There are 2 reasons, why this is prevented: Being able to communicate to an application outside the sandbox effectively breaks the sandbox. The Windows Store app is now suddenly able to do everything the desktop application can do: access file system, registry... Windows Store apps live in a sandbox for reason - to be safe for the user. The Windows Store app won't work after it is installed from the the store or from a package. It needs to have a desktop application installed and set up correctly as well. I would suggest you try to move your server part to a different machine and make it a proper server. If for some reason you really can't do that, you still have the following options available: You ca

Categories : C++

How are you integrating help into your WPF application. Any recommendations?
My current preference is to use a third party help authorizing system to generate HTML based help. We then use a WebBrowser to display this help as needed. The authoring system we use makes it fairly easy to extract out a single page from the main help (each "topic" is a single HTML file, and can be included with full contents or not as desired). Granted, this definitely felt like a bit of a nasty hack at first - but once we wrote the basic plumbing (some attached properties for xaml to specify attributes for context location and add behavior to trigger help, etc), it's fairly clean. One very nice advantage to this approach, however, is a single help system build works perfectly in all contexts - we can include the documentation online, expose it locally for use in a browser, and use i

Categories : Wpf

Accessing office project classes from windows form application in C#
Its all documented, here is a great example: How to automate Microsoft Word to create a new document by using Visual C# So to pass the strings in the datagridview to word to print you do it like this: //Start Word and create a new document. Word._Application oWord; Word._Document oDoc; oWord = new Word.Application(); oWord.Visible = true; oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,ref oMissing, ref oMissing); //Insert a datagridview info into the document. DataTable dt = (DataTable)datagridview1.DataSource; foreach(DataRow dr in dt.Rows) { Word.Paragraph oPara1; oPara1 = oDoc.Content.Paragraphs.Add(ref oMissing); oPara1.Range.Text = dr[0].ToString(); oPara1.Range.Font.Bold = 1; oPara1.Format.SpaceAfter = 24; //24 pt spacing after paragraph. oPara1.Range.InsertParagraphAft

Categories : C#

How to authenticate user with form authentication in Windows Desktop Application
A Windows desktop application is nothing like an ASP.NET web application. You cannot call the different forms separately. (well you can hack the application, but if you do that, you can just as well remove any password protection) Hence forms authentication does not make any sense. You can create a login window as startup window, and check username and password against the database. And that's about it. It's a Windows application, you don't need membership provider, forms cookie ticket, etc. because unlike HTTP, Windows desktop applications are not stateless. PS: If you do a WinForms application, make the login via ActiveDirectory authentication.

Categories : C#

How to Insert Data in Database through DataGridView in Windows Form Application
You have multiple questions. I will answer the "how to add empty row" one. For that After you populate your dataset and before you bind it to the Grid you should add an empty row to the top of this dataset. ' insert a blank row at the top Dim dr As DataRow = MyGrid.Tables(0).NewRow() dr("MyFiled") = "0" MyGrid.Tables(0).Rows.InsertAt(dr, 0) There are many articles on internet showing how to save data. If you have problem with those please write your specific code here.

Categories : C#

Best way to send and receive messages between a Windows service and form application
since you're in .NET I guess you should look into WCF - Windows Communication Foundation, you define the contracts (Service contract, data contracts), publish the service and use the service without worrying about the protocol since you can choose it by configuring the server and the client app. You can take a look at these links for some in information: http://www.codeproject.com/Articles/29243/A-Windows-Communication-Foundation-WCF-Overview http://msdn.microsoft.com/en-us/library/ee958158.aspx Hope it helps, Cheers

Categories : Dotnet

How do I pass a c# variable to a python script from windows form application
You need to use a start info as seen here. http://www.dotnetperls.com/process-start ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "C:\Python27\Scripts\path\file.py"; startInfo.Arguments = "myvariable"; try { using (Process exeProcess = Process.Start(startInfo)) { //dostuff exeProcess.WaitForExit(); } } catch { //log throw; } The process returned by process.start is unmanaged and should be referenced inside a using.

Categories : C#

How do I build a Windows GUI Application in Eclipse using C++ (a non console application)
Unlike Visual Studio, Eclipse CDT does not have a built-in wizard or options for automatically configuring compiler settings and libraries for building Windows GUI applications. You will need to know what you are doing. Do you intend to build the GUI using Win32/MinGW, or perhaps using some other GUI library, like Qt or wxWidgets? There are many options. If you are new to C++ and/or GUI development on windows, then there are easier options to get started with.

Categories : C++



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.