132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for fadi 751

hello! i am trying to launch a java program that calculates the time of launch. let's say i want to arrive at a certain place at 10:06:55 and it takes me 1:24:40 hours to get there, so to be able to write such program i should take in consideration several …

Software Development java
Member Avatar for JamesCherrill
0
164
Member Avatar for Falcon143

/* Hi, In my process of C code optimization*/ Clip(int Val) { return (curr < 0 ? : ((curr > 255) ? 255 : curr)); } /* I want the int value to be clipped between 0 to 255. Is there any other way to optimize above code snippet? */

Software Development c
Member Avatar for Banfa
0
2K
Member Avatar for uday.2812

Hi, I have developed a windows form application. In this, I created a search history option to search history of records. The database having these followings fields : 1.Customer Name 2.Project No 3.Date 4.Model Name 5.Type and some others fields are there. I created one textBox and two comboBox to …

Software Development
Member Avatar for ChrisHunter
0
133
Member Avatar for cleve23

Hi Can someone explain to me why when i compare the array values for my code below,if i use "==",it will only compare 1 time. However,if i use ".equals", it will work correctly. import java.util.Scanner; import java.util.Arrays; class normalsorting { public static void main(String args[]) { String input; System.out.print("Enter Jumbled …

Software Development java
Member Avatar for ashishyete
0
159
Member Avatar for Newbie_ITstuden

hi to all im new here, i have some difficulty in displaying records from database to my combobox here is my code in the form_load [code] Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim con As New SqlConnection con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\lito\Documents\QMP_DB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" …

Software Development dataset open-source vb.net
Member Avatar for manlypullock
0
8K
Member Avatar for rahulcs99

i am trying to access my video devices for live streaming using the code public class WebCam { private static Player player=null; //private static Processor processor=null; public static void main(String[] args){ try { MediaLocator mediaLocator=new MediaLocator("vfw://0"); player=Manager.createRealizedPlayer(mediaLocator); player.start(); Component video=player.getVisualComponent(); if(video!=null){ JFrame mediaTest = new JFrame("My WebCam"); mediaTest.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); mediaTest.add(video); mediaTest.setSize(300, …

Software Development java perl webcam
Member Avatar for stultuske
0
171
Member Avatar for SaRa Ahmad

this is my code , it should save a pdf file from sql server to a folder but nothing happened can anyone help please ?? Set rs = New ADODB.Recordset rs.Open "select * from PDFStore where filename='" & co_name.Text & "'", db, adOpenKeyset, adLockBatchOptimistic If Not rs.EOF Then Set pdffile …

Software Development file-stream pdf sql visual-basic
Member Avatar for SaRa Ahmad
0
269
Member Avatar for DM Galaxy

I am creating an app. where I need somewhat help. I use font dialog box for textbox... and this working but How can I save the font on the settings??? I mean: I am creating the notepad app.exe in such a way that whenever the user change the font, then …

Software Development vb.net
Member Avatar for DM Galaxy
0
186
Member Avatar for mohan.jce

i have been looking around and its hard to find what i want. I am able to add context menu item to a FOLDER by doing this: [HKEY_CLASSES_ROOT\Directory\shell\Command] @="TestRightClick:" [HKEY_CLASSES_ROOT\Directory\shell\Command\Command] @="myExe.exe %1" I need to have "context menu for all the files in folders of a particular directory". context menu …

Software Development microsoft python
Member Avatar for mohan.jce
0
239
Member Avatar for eikal

Hello, i'm working on a simple program where i can enter a name and number and it will save it to notepad .txt file. I have everything figured out up until actually saving the text i enter. what code do i use to do this, in the program i have …

Software Development vb.net
Member Avatar for Siva_6
0
1K
Member Avatar for andrew.mendonca.967

Write a program to read the coefficients of a series of quadratic equations from a text file and print the associated roots, or appropriate errors if there are no real roots, to another text file. If a == 0, no solution, and if (b2-4ac) < 0 it has only complex …

Software Development c++ file-stream
0
155
Member Avatar for FriXionX

I was reading through some C++ code, and I noticed if(;;). I've tried to Google it and even search on here, but it seems to ignore the brackets in searches. Obviously I know what an if statement is, but what do the ;; mean inside the brackets? EDIT: nevermind, as …

Software Development c++
Member Avatar for NardCake
0
209
Member Avatar for NardCake

Hello everyone! Recently I have been incredibly interested in language design/implementation. I have written multiple functioning language front ends (Lexer, Parser, some execution) and have decided a few things. My systems are getting ugly, there needs to be more abstraction I can't execute code in the parser -- it's just …

Software Development assembly c++ web-design
Member Avatar for NardCake
0
324
Member Avatar for Lp_baez

Hi Everyone, Sorry to be such a noob, but I am hopping you guys can help me out a bit. I keep on getting this error "expected an expression error" in the first open curly brace of the 'void playerCMD();' function and also in case 1. I am using the …

Software Development c c# c++ ide
Member Avatar for cambalinho
0
198
Member Avatar for Trle94

'm having some problems, can't findout what is problem with my Update system. I'm using XML file for it. What I'm trying is to get application to read xml file for updates(like some news system) and to get updating application if there is new version. I added already on top …

Software Development vb.net xml
Member Avatar for Trle94
0
159
Member Avatar for triumphost

Should I be using std::wstring or std::string and wchar_t or char? All this unicode stuff is confusing me. I want my application to work on both windows and linux without too many problems and changes but I'm considering unicode vs. ansi. Any ideas? I ask because I see many applications …

Software Development c++
Member Avatar for vijayan121
0
1K
Member Avatar for boher

In my new project I get this error when I debug the solution (hit f5). I never caught this one and it only happenes when I select my "LoginPage" as my Main Form in the Application Tab. Other form load just fine but when it comes to debugging with this …

Software Development gui vb.net
Member Avatar for G_Waddell
0
508
Member Avatar for pardeepkhatri

I have text box and now i want to set the value of text box equal to the property value

Software Development
Member Avatar for pardeepkhatri
0
154
Member Avatar for vishalonne

What I know is Linear Search and Sequential Search are same, if my knowledge is correct then kindly guide me wether the below algorithm work for linear search or not as it is a Sequential Search algorithm. > Step 1. Initialize searcharray, searchno, length. > Step 2. Initialize pos=0. > …

Software Development algorithm c++
Member Avatar for deceptikon
0
215
Member Avatar for JohnKelly

Dear All I am using Vb.net to update a database running on SQL Server. I am using the following to increase the value of the NextPlan in the SystemControl table in a SQL database. Command.CommandText = "UPDATE SystemControl SET NextPlan = NextPlan + 1" Command.ExecuteNonQuery() Once the Command is executed …

Software Development sql vb.net
Member Avatar for JohnKelly
0
776
Member Avatar for TechSupportGeek

I need a textBox that accepts only numerical values ranging from 1 to 10 for my application. Can you assist me please? Take a look at my code (it only does half the job since text inserted from the clipboard using the standard right-click menu strip of the textBox will …

Software Development
Member Avatar for TechSupportGeek
0
179
Member Avatar for Fcasualty

I am trying to add a custom widget dynamically, multiple times. However, the widgets just stack up in the same place. I have tried several combinations of Layout() and Fit() and setSizerAndFit() after adding custom widget to the sizer Thank you for any help #!/usr/bin/env python # -*- coding: US-ASCII …

Software Development python
Member Avatar for Fcasualty
0
303
Member Avatar for zswinford

num_trades = int(input("Number of trades for today?")) for i in range(1, num_trades + 1): action = input("Trade number", i ,"(buy/sell)?") num_shares = int(input("Number of shares to buy?")) price_per_share = float(input("Price per share?")) I'm getting a TypeError on the line "action = input("Trade number", i ,"(buy/sell)?")" Help Thanks

Software Development python
Member Avatar for sepp2k
0
14K
Member Avatar for pardeepkhatri
Member Avatar for ChrisHunter
0
140
Member Avatar for srikanth2321

Hi, I see a change in the font with string created by graphic2D from other labels. Is it possible to obtain a uniform font? package com.HIPS.biosynML; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Insets; import java.awt.RenderingHints; import java.awt.Shape; import java.awt.font.FontRenderContext; import java.awt.font.LineBreakMeasurer; …

Software Development java java-swing
Member Avatar for srikanth2321
0
195
Member Avatar for pdwivedi

Hi all, I want to create all possible combinations of a full binary tree which must have exactly 4 leaf nodes and 3 internal nodes. I want to create it using recursion and tree must be simple binary tree not a binary search tree or BST. Kindly suggest algorithm to …

Software Development algorithm c++ data-structure
Member Avatar for pdwivedi
0
495
Member Avatar for KellzDD

I am trying to create Line objects and add them to an array list. The problem I am having is excluding any lines that are similar to each other. I have already created an equals method that compares two lines to determine if they are equal. I am having trouble …

Software Development file-system java
Member Avatar for stultuske
0
606
Member Avatar for Jahliah

Basically im using switch case to set strOutput. But i get duplicate values instead.. strInput="00\~01\02~" This is what i get: A AB ABC My desired outcome is: A B C MatchCollection matches = Regex.Matches(strInput, @"\d{2}\\"); string range = matches[0].Value; switch (range) { case "00\\": strOutput += "A"; break; case "01\\": …

Software Development regex
Member Avatar for Jahliah
0
212
Member Avatar for Taruna_1

I have an integer dataframe and in my code I am doing some length calculation( which can be only perfomred on string), therefore I need to convert my dataframe to String. I have tried using str(), its not helping me, it would be helpful if you could suggest something.

Software Development python
Member Avatar for Taruna_1
0
3K
Member Avatar for jackmaverick1

I've been working on a small API/Library and I realized that I was returning memory that wasn't going to be consistently put on the heap or stack. So my question is this: when I return an object from a function in a Library, should that object be on the heap? …

Software Development api c++ motherboards-cpu-ram
Member Avatar for mike_2000_17
0
246
Member Avatar for kay19

Hello, well I'm doing a rational class and i'm having trouble with the subtraction part. I have done add, multiply, and division correctly. Therefore, I would like a little help on subtraction, and i'm set. public class Rational { // TODO Auto-generated method stub //Data members private int numerator; private …

Software Development java
Member Avatar for kay19
0
227
Member Avatar for pankaj.leon

> WE'll be taking inorder traversal of the tree and during the traversal will modify the right pointers only(using method "make_right") such that a linked list is formed having only valid right pointers. Then another method "make_left" is called to make the left pointers of the nodes point to valid …

Software Development c++ linked-list
Member Avatar for pankaj.leon
0
206
Member Avatar for yussuf_1

first hi,i'm 19 yeesold,not a native english speaker :(),right now i'm so exited for learning programming i already know some html5 and css3 and willing to take it deep with java script my first question is what is the difference between java and JavaScript and where each one is used. …

Software Development
Member Avatar for yussuf_1
0
364
Member Avatar for nikki05

Hi, I would like to to to store the Name and Items of ComboBox into dictionary. With the below code,I am able to store them. However, Name of ComboBox is as counting ComboBox10 to ComboBox1n. I would like to store Name of ComboBox as ComboBox1,ComboBox2 rather than ComboBox10 to ComboBox1n …

Software Development vb.net
Member Avatar for nikki05
0
570
Member Avatar for vishalonne

Hello Everybody I am successful in displaying Diagonal Array elements, but failed to display Non Diagonal array elements I tried a lot but unsuccessful. Here is the code what I am try with - #include<conio.h> #include<iostream.h> void accept(int a[4][4],int size) { cout<<"Diagonal One:"; for (int i=0;i<size;i++) for(int j=0;j<size;j++) if (i!=j) …

Software Development c++
Member Avatar for vishalonne
0
215
Member Avatar for kralco626

current code: Response.Redirect("DeviceInformation.aspx?arg=" + e.CommandArgument); which redirects to a page with a data grid. The argument is passed into a stored proc on a database and the infor is returned in a grid. What i want, is the same thing, but, open it in a new page. So something like: …

Software Development c#
Member Avatar for hoba.magdy.332
0
3K
Member Avatar for Jacklittle01

I saw this code on stack overflow def writeProfile(profileName, profileData): """ pickle user profile data """ os.chdir(PROFILE_DIR) fileName = profileName + ".dat" f = open(fileName, "wb") pickle.dump(profileData, f) f.close() os.chdir("..") It is for saving progress under the pickle module. I don't see a way to save variables. How would I …

Software Development python
Member Avatar for Gribouillis
0
248
Member Avatar for TechSupportGeek

This is a really simple way to maintain an options file for your application in case you don't wanna mess with registry entries, along with added support for comments inside the file. The file will be created at the same location with the executable. In addition, if an error is …

Software Development file-system
Member Avatar for TechSupportGeek
0
143
Member Avatar for aalshamr

Hello to all am new programmer facing a problem in saving three checkboxs into database for example a b c all of the has a value in the database any one can heple from scratch I'll be greatfull regards,

Software Development asp asp.net sql vb.net
Member Avatar for Begginnerdev
0
1K
Member Avatar for eshajoshi

Hi, I have two databases. In my code, I open the first database and list all of its databases. With my code, I open the second database. Essentially I want to override the tables in database2 with the tables in database1 so I am trying to delete the tables in …

Software Development visual-basic
Member Avatar for eshajoshi
0
361
Member Avatar for somjit{}

Have been studying [Reservoir sampling](http://en.wikipedia.org/wiki/Reservoir_sampling) for a couple of days , What I'v tried here is to draw a uniformly random sample of size 3 from a bigger data (the English alphabet) via reservoir sampling. Below is what i'v come up with. if anyone could review my code and offer …

Software Development java
Member Avatar for somjit{}
0
158
Member Avatar for stevanity

Hi, I am working on a problem. I have a set of advertisements that I need to print on a paper. The ads may be half page, quarter or full page. The advertiser may specify the location (geographical area - out of finite set of areas), intensity (number of flyers …

Software Development
Member Avatar for rubberman
0
124
Member Avatar for Elixir42

Hi I'm trying to create an array of function pointers contained within a class, the C++11 way. Can I have some help with this as I'm getting a bit mixed up. Here's what I have done so far. They are made up classes to define the problem. #include <iostream> #include …

Software Development c++ visual-studio
Member Avatar for Elixir42
0
279
Member Avatar for Dili1234

I taking data from 3 tables to crystal report.Tables are 1.Moblization -primary key is Fen_Inovoice_No 2.invovoice details -Primary keys are Fen_Inovoice_No and description 3.Client details-primary key is Contract name I 'm using this query to retrive data Dim cryRpt As New ReportDocument CrystalReportViewer1.SelectionFormula = "{Mobilization.Fen_Inovoice_No}= '" & Varibles.invoice1 & "'" …

Software Development vb.net
Member Avatar for Dili1234
0
176
Member Avatar for ProDev7

Hello again. I am stuck with this example: #define Listof(Type) class Type##List \ { \ public: \ Type##List(){} \ private: \ int itsLength; \ }; could anyone explain to me what is the intention and the point in this example? beacause I found this example in a book but not …

Software Development c++
Member Avatar for ProDev7
0
144
Member Avatar for murali2489

Hi All, I am having a JTable which runs so strange. Jtable is very basic having three rows and three columns. If I use SetValue method to place data in any cell and run the program JTable is not visible. If i delete the SetValue Method from the program and …

Software Development apple java
Member Avatar for murali2489
0
357
Member Avatar for Bandarigoda123

> Below is the code of Server using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Net.Sockets; using System.Threading; using timerss = System.Timers.Timer; namespace Magic_Client { class Program { static TcpListener server = new TcpListener(4296); static TcpClient client = new TcpClient(); private static Thread thread; private static timerss timersss; private …

Software Development client-server file-stream file-system
Member Avatar for Ketsuekiame
0
555
Member Avatar for Falcon143

/*Hi, I was trying to optimize my application in C. In that process to reduce the complexity at condition checks which of the below is efficient,*/ if(bFlag1 && !(Var == 1) && bFlag2) //or if(bFlag1 & !(Var == 1) & bFlag2)

Software Development c
Member Avatar for Falcon143
0
184
Member Avatar for Madhumathi_89

Hi, I need to retrieve records from access database in c# which falls between date1 and date2. anyone could help me out this...

Software Development
Member Avatar for ChrisHunter
0
89
Member Avatar for g1161018

I'm aware that to display the Control properties, you just need to use a code like this System.Reflection.PropertyInfo[] propertyInfo = button1.GetType().GetProperties(); for (int i = 0; i < propertyInfo.Length; i++) { textBlock.Text = i + " " + propertyInfo[i].Name + "\n" + textBlock.Text; }; You can also get the names …

Software Development assembly
Member Avatar for g1161018
0
309

The End.