Hey everyone, I'm looking to add a block / function within a C++ application that will search for open windows. For instance, wordpad and notepad. If either are open perform an action. I'm doing this within win32 API but my question is this. If I create something as such, this has to be on a thread. (I come from a VB background) and we had timers. What would be the best way to implement a timer in C++? I was thinking a do loop on a thread that checks for certain things, but would this be too memory / cpu …

Member Avatar
Member Avatar
+0 forum 1

I'm using a fairly standard MSI mobo with Intel Core i5-6400 processor and 64 GB RAM. So: Which programming language (besides assembly) is the most effective to use in this configuration when I want to do calculations/modelling trying to find the least number of combinations to fullfill some predefined conditions. More specific I have i.e. 5 sets of combinations each containing three different states: A, B and C. This gives me a total number of 243 combinations. Theoretically it is possible to reduce this number of combinations to 23 so that no matter what combination of the original 243 you …

Member Avatar
Member Avatar
+0 forum 8

Program 2 Shop application You must write a small application in JAVA that stores items and their prices. Your program must: 1. Create an array of item names. Use the following item names: Bread, Milk, Butter, Chips, Honey, Soap, Towel, Carrots, Beans, Samp, Dress, Pants, Shoes, Socks. 2. Create an array of item prices. Use the following item prices: 15.50, 12.00, 56.00, 20.00, 45.00, 7.00, 75.00, 8.00, 5.00, 12.00, 200.00, 150.00, 400.00, 25.00. 3. Print every item name and its corresponding price. See the sample output given. 4. Print the average price of all the items. 5. Find the price …

Member Avatar
Member Avatar
+0 forum 1

I'm trying to map two entities to the same table with the same columns. The differences are HasQueryFilter condition for every entity and a column that takes part in the reference. The entities describe ralationship between dictionary and entity. When I launch it, I receive the following message: "... both mapped to column '' in '' but are configured with different nullability." public class KeyValuesEntity : BaseEntity { [Column("keyalphanr")] [StringLength(255)] public string keyalphanumber { get; set; } [Column("keydesc")] [StringLength(255)] public string keydescription { get; set; } [Column("keyvalint")] public int? keyvalueint { get; set; } } [Table("keyval")] public class KeyValuesBaseEntity : …

Member Avatar
Member Avatar
+0 forum 1

Hello guys, I need some help with a python program that i have to do for school. I don't know how to erase a button after using it. And how can i go to the next question after answering the first one. Please help me ASAP!

Member Avatar
Member Avatar
+0 forum 2

Are there any differencies between these two code ? if (!a.equals("")) { editDate.setText(a) } and if (a!="") { editDate.setText(a) }

Member Avatar
Member Avatar
+0 forum 3

For anyone who hasn't read Clean Code but wants to, maybe a detailed summary would be an easy way to pick up the main ideas. Here's a detailed summary of Intro and Chapter 1: https://technotes.app/clean-code-introduction-chapter-1/ I was inspired to start writing it when I thought: If had to choose between - 2 books per month OR - 1 book and 5 detailed summaries per month then I’d probably choose the latter. What do you think?

Member Avatar
+0 forum 0

I'm interested in meeting people to discuss Amazon Alexa in NY ( especially Long Island) area. I'd like to find people with background in creating / programming Alexa Skills, also people with expertise in large Alexa installations with multiple accounts. - Jeff

Member Avatar
Member Avatar
+0 forum 2

<Grid> < Button Content="Add" HorizontalAlignment="Left" Margin="58,142,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/> <TextBox HorizontalAlignment="Left" Height="23" Margin="190,50,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Name="t1" Text=" "/> <TextBox HorizontalAlignment="Left" Height="23" Margin="190,94,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Name="t2"/> <TextBox HorizontalAlignment="Left" Height="23" Margin="190,180,0,0" TextWrapping="Wrap" Text=" " VerticalAlignment="Top" Width="120" Name="t3"/> <Button Content="Sub" HorizontalAlignment="Left" Margin="164,142,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_1"/> <Button Content="Mul" HorizontalAlignment="Left" Margin="273,142,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_2"/> <Button Content="Div" HorizontalAlignment="Left" Margin="384,142,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_3"/> </Grid>

Member Avatar
-1 forum 0

Hi guys, im a newbie in programming, please i need help in populating ms datagrid from ms sql table, can anyone suggest me something thnx

Member Avatar
Member Avatar
+0 forum 1

hello, I am trying to write a vb.net programme that reads data from a file and do a count for each column as shown in the format below and also write to an output file. i am able to do the count but i am unable to write the output base on the resturants & days. From what i have, i can only write the total sum from the array index. Here is the format of the file for better understanding and what i have done so far. Note; treat me as a newbie **File Format** is 001,1,5,6,21 001,1,5,6,21 001,1,5,6,21 …

Member Avatar
Member Avatar
+0 forum 1

Hi Im having an error with my app, Im still learning to code. It gives me error at line rs = cmdOLEDB.ExecuteReader Here's my full code Imports System.Data Imports System.Data.OleDb Imports System.IO Public Class Form11 Dim cnnOLEDB As New OleDbConnection Dim cmdOLEDB As New OleDbCommand Dim cmdInsert As New OleDbCommand Dim cmdUpdate As New OleDbCommand Dim cmdDelete As New OleDbCommand Dim strConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & _ System.Environment.CurrentDirectory & "\Akademik.accdb" Public ADP As OleDbDataAdapter Public DS As New DataSet Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click End Sub Private Sub Form11_Load(ByVal sender As System.Object, ByVal …

Member Avatar
Member Avatar
+0 forum 1

Here is my javascript code. function multyTypeUploadAttachments(file,classId,splAttrId){ var campaignID = $('#wk_custCampID').val(); if(campaignID == ""){ var campaignID = $('#wk_edit_camp_ID').val(); } var fileName = $('#'+file.id).val().replace(/C:\\fakepath\\/i, '');//form_skuAttachment var lastChar = file.id[file.id.length -1]; var upload_data = new FormData($('#wk_multy_form_AttrOptionAttachment'+classId+"-"+splAttrId+"-"+lastChar)[0]); $.ajax({ url: BASEPATH + 'c_workOrder/uploadSKUAttachments/'+file.id+'/'+campaignID, type: 'POST', data: upload_data, mimeType: "multipart/form-data", contentType: false, cache: false, processData: false, success: function (res) { $('#'+file.id+'-hidden').val(res); $('#'+file.id+'-OrgNamehidden').val(fileName); toastr.success('Upload success'); return; }, error: function (res) { toastr.error(res); } }); } and here is php code function uploadSKUAttachments($file,$campaignID){ $ext = substr(strrchr(basename($_FILES[$file]["name"]), '.'), 0); $fileName = basename($_FILES["$file"]["name"]); $name = basename($fileName,$ext); $createdTime = time(); $target_dir = "./uploads/attachments/"; $target_file = $target_dir .$campaignID."_".$name."_".$createdTime.$ext; $errorFlag = 1; …

Member Avatar
Member Avatar
+0 forum 1

I'm trying to connect a database with a login form to verify user as an existing one or a new one to sign up Private Sub Command1_Click() Adodc1.RecordSource = "select *from newcustomer where firstname='" + Text1.Text + "' and surname='" + Text2.Text + "' and customerid='" + Text3.Text + "' and phone='" + Text4.Text + "' and yearofbirth='" + Text5.Text + "' and emailaddress='" + Text6.Text + "' and username='" + Text7.Text + "' and password='" + Text8.Text + "' " Adodc1.Refresh If Adodc1.Recordset.EOF Then MsgBox "INVALID USERNAME/PASSWORD" Else Form4.Show End If End Sub Private Sub Command2_Click() Adodc1.Recordset.Update End Sub …

Member Avatar
Member Avatar
+0 forum 3

Magento : Using app/design/frontend/default/theme/template/catalog/product/view.phtml how to display my text message on my selected products, workout : <?php $productId = '42150'; $product = Mage::getModel('catalog/product')->load($productId); if( $productId == '42150' ) { echo "Test"; } ?> if i wrong pls correct me.

Member Avatar
+0 forum 0

First: Design a class named Employee with private fields for that person’s: (1) name, (2) ID number, and (3) hire date. The ID number should be in the format ###–C, where # is a digit, 0–9, and C is a character, an uppercase letter, A–M. Write no-arg, 1-arg (name), 2-arg (name & ID), and 3-arg constructors; and a public mutator and accessor method for each of the 3 fields. Test & demonstrate Employee works. Next: Design a class named ProductionWorker which extends the Employee class. ProductionWorker class should have 2 additional private fields: (1) Shift (an integer, 1, 2 or …

Member Avatar
Member Avatar
+0 forum 1

Getting errors and having a hard time seeing where. If I get it to build it is ignoring the inputmenu. package personalprogram; import java.util.Scanner; /** * * @author mitch */ public class PersonalProgram { /** */ public final class InputMenu { public void display_menu() { System.out.println("1) Calculate Cubic feet per hour of room:\n2) Calculate needed CFM of \n3) Option 3"); System.out.print("Selection: "); } public void question() { System.out.println("Would you like to proceed or quit?"); System.out.println("To proceed enter 3."); System.out.println("If you wish to quit enter 0."); Scanner q = new Scanner(System.in); switch (q.nextInt()) { case 0: System.out.println ("Thank you and godbye."); …

Member Avatar
Member Avatar
+0 forum 2

Hi. I'm trying to create a Traffic simulator and I'm stuck on how to get a Car object to turn into a road. I've managed to have a car go straight (which is really easy anyway lol) but I can't really find a way to get it to turn into a road, specifically a left turn. The code I have currently is this: [CODE]import java.applet.*; import java.awt.*; import java.awt.geom.AffineTransform; public class Traffic3 extends Applet implements Runnable { //thread variables Thread t; int i; //double buffer variables Image offscreenImage; Graphics offscr; int width; int height; //car //coordinates for lanes //south road, …

Member Avatar
Member Avatar
+0 forum 10

I have a problem with my datagridview. And the following happens I have several buttons to load the datagridview. All these buttons are working correct So datagridview is loading as expected. Only when i press the right or the left arrow butoon and when then datagridview wil be selected with the arrow buttons then the datagridview will be cleared so all datarows in datagridview are gone. How can i disable the arrow buttons when datagridview not is focused ?

Member Avatar
Member Avatar
+0 forum 1

The library optimezedr should determine if a collection of books is in ascending or desending order.Your solution must read books from a text file and produce 2 additional text files one in ascending order and one in Descending order. then your solution will indicate if your original text file in in ascending or descending order or not sorted .You can only use the following c++ libraries:iostrem,fstream and string. Could someone please help me with this thank you.

Member Avatar
Member Avatar
+0 forum 2

public int evaluate() { if (root == null) { return -100000; } return evaluateHelper(root); (error) } private int evaluateHelper(MyBinaryTreeNode rt) { if (rt.left == null) { return Integer.parseInt(rt.data.toString()); (error) } switch (rt.data.toString()) { case "+": return evaluateHelper(rt.left) + evaluateHelper(rt.right); case "-": return evaluateHelper(rt.left) - evaluateHelper(rt.right); case "/": return evaluateHelper(rt.left) / evaluateHelper(rt.right); case "*": return evaluateHelper(rt.left) * evaluateHelper(rt.right); case "%": return evaluateHelper(rt.left) % evaluateHelper(rt.right); default: return -100000; } }

Member Avatar
Member Avatar
+0 forum 2

so far i have this code.. [CODE]#include "stdafx.h" #include <iostream> #include <windows.h> #include <string> using namespace std; int main () { const int r1 = 175; const int g1 = 163; const int b1 = 134; HWND hwnd = FindWindow(NULL,"Test - Microsoft Visual Studio"); SetForegroundWindow(hwnd); HDC hdc = GetDC(hwnd); POINT lame; lame.x = 0; lame.y = 0; int x = lame.x; int y = lame.y; for (int i = 0; i < 1280; i++) { x = i; y = 0; COLORREF col = GetPixel(hdc,lame.x,lame.y); int red1 = GetRValue(col); int green1 = GetGValue(col); int blue1 = GetBValue(col); if (x == …

Member Avatar
Member Avatar
+0 forum 14

Hello, I am very new to programming as I am only a few weeks into my C# class. I have a project and after reading and reading my book, sadly I am stuck. Here is what the project calls for: I need to create a program that converts inches as an input to feet, yards and miles as an out put. I need to set all of the values to two points after the decimal and use constants, variables and separate methods to accomplish this task. I have an idea as how to start the program and how to use …

Member Avatar
Member Avatar
+1 forum 5

Hi to all! I have SQL Server Express, SQL Server Management Studio 2012. My PC Name is : "SaboorPC" and SQL Server instance name is also "SaboorPC". I am trying to connect my Netbeans to My SQL Server but it is not connecting and giving the following error: "com.microsoft.sqlserver.jdbc.SQLServerException: The connection to the host SABOORPC, named instance saboorpc failed. Error: "java.net.SocketTimeoutException: Receive timed out". Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434. For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host." …

Member Avatar
Member Avatar
+0 forum 1

How do I process the xamarin forms that connect to SQL Server and export data to the listView ? I'm looking for this simple example. What do I find on google ?

Member Avatar
Member Avatar
+0 forum 1

I have to write a python program that get a keyboad number and verfiy using the def function. Help n = int(input("Write a number") def countdown(n): if n >= 0: print('Blast off! Zero down') else: print(n) countup(n+1) countdown(3)

Member Avatar
+0 forum 0

I'm creating a program that maintains student scores. I've created a class called students that stores the data and displays it in a list box. Once the user clicks btnAdd a new form (frmAddStudent) loads that allows them to add the user by name and their scores and display it in the listbox in the main form. It also allows the update/delete functions. I can succesfully add students to the list and edit them, but when I press the ok button in the update students form I get the error, "System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and …

Member Avatar
+0 forum 0

***java*** i have a assignment of oop by using java can any body help me pz : Design and implement these four classes Employee, MonthlySalEmployee, HourlySalEmployee, Company and implement the following functions: ⦁ Create an application class with N HourlySalaryEmployee objects and N MonthlySalEmployee objects. ⦁ Create constructors, accessor and mutator as per your need in the program ⦁ Should ask the user to input the data for the MonthlySalEmployee and parent class attribute, same for the HourlySalEmployee class ⦁ should calculate average salary of all Hourly Employee and Monthly Employee respectively ⦁ Displayinfo() should display all the information of …

Member Avatar
Member Avatar
+0 forum 2

i have two listview where data display, the SALES INVOICE and CHARGE invoice now when i print it when sales is greater than charge invoice cannot be display in crystal report or charge is greater than sales cannot also display. my crystal report looks like: SALES INVOICE CHARGE INVOICE OR NUMBER AMOUNT OR NUMBER CUSTOMER NAME AMOUNT Private Sub ParaPrint() Dim ds As New DataSet1 Dim dst As New DataTable Dim lvii As Integer Dim lvii2 As Integer lvii = ListView_salesInvoice.Items.Count - 1 lvii2 = listview2_chargeinvoice.Items.Count - 1 dst = ds.Tables.Add("Items") dst.Columns.Add("namecus", Type.GetType("System.String")) dst.Columns.Add("cashforward", Type.GetType("System.String")) dst.Columns.Add("Dateprint", Type.GetType("System.String")) dst.Columns.Add("saleinvo", Type.GetType("System.String")) dst.Columns.Add("chargeinvo", …

Member Avatar
+0 forum 0

Enter_Again: xor ah, ah ; I should put 60 seconds here int 16h ; The user should press S before 60 seconds mov bl,al cmp al,"S"

Member Avatar
+0 forum 0

The End.