I am programming othello in c# and I dont know what algorithum to use to check all the directions and display where the user can place his piece. Can someone help??

Member Avatar
Member Avatar
+0 forum 1

Hello everyone! I'm sorry to bother you all, but I really need your help. I'm an economy and management student at uni, but somewhy I have to deal with programming. We got a task that looks like this: There's a 5x5 sized field where there are 8-8 disks for both side. |x|x|x| | | |x|x|x| | | |x|x| |o|o| | | | o|o|o| | | | o|o|o| You can move to the adjacent fields and jump over the other disks if there's an empty space behind them. The thing is I have 0 interest in programming and I just want …

Member Avatar
Member Avatar
+0 forum 3

hello how can i insert multiple selected data from datagridview into database using checkbox..please help

Member Avatar
Member Avatar
+0 forum 1

Hey guys, I'm in desparate need of assistance with my A-Level project. I'm writing a Banking system in Python and I'm being told by the idle log that a function hasn't been defined - even though that function is right above it! My Full Code is: #'http://effbot.org/tkinterbook/tkinter-index.htm' <<< Tkinter Tutorials #Ignore the link above, it's for future reference import time import random class BankAccount(): #Class Initialisation def __init__(self, firstName, lastName, accountNumber, pinNumber, balance=0): self.fn = firstName self.ln = lastName self.accNum = accountNumber self.pin = pinNumber self.bal = balance self.transactions = [] #Class Functions def deposit(self, amount): self.bal += amount return …

Member Avatar
Member Avatar
+0 forum 2

Anyone can fix this code. thank you, only TURBO C program #include<stdio.h> #include<string.h> #include<stdlib.h> #define true 0 #define false 1 struct product { char id[10]; char name[20]; int quantity; int numSold; float price; int discount; float sales; }; struct product prod[30]; int count = 0; FILE *f; int writefile() { int i; f = fopen("inventory.txt", "w"); if (f == NULL) return -1; fprintf(f, "%d\n", count); for (i = 0; i < count; ++i) { fputs(prod[i].id, f); fprintf(f, "\n"); fputs(prod[i].name, f); fprintf(f, "\n"); fprintf(f, "%d\n", prod[i].quantity); fprintf(f, "%d\n", prod[i].numSold); fprintf(f, "%f\n", prod[i].price); fprintf(f, "%d\n", prod[i].discount); fprintf(f, "%f\n", prod[i].sales); } fclose(f); return …

Member Avatar
Member Avatar
+0 forum 1

I got an assignment in which I need to create a physics calculator to solve the 'Motion' formulas, this is an screenshot of the formulas I need: [Motion formulas](https://imgur.com/a/sU8SfEk) The problem that I'm having is that I'm literally lost in how to implement them. I have found lots of tutorials but all of them want to solve for everything, I mean all of the letter of each equation and that's not what I want. I currently have this but I feel like I'm complicating my life with a lot of fuctions for something that is supposed to be simple. Right …

Member Avatar
+0 forum 0

Task 2: Write a program that simulates an unbiased coin flip. Your program should print true if the coin flip results in a head and false if the coin flip results in a tail. Hint: any value greater than 0.5, represents Head otherwise it represents Tail

Member Avatar
Member Avatar
+0 forum 1

write a C program to sort a csv(student.csv)file using QSORT on LINUX .. please help.. student.csv file containing(student name, percentage)

Member Avatar
Member Avatar
+0 forum 1

I'm doing an assignment for a class and I can't figure out what I'm doing wrong to keep getting the "illegal start of expression" error. Any help would be appreciated. public class Overloading { public static void main(String[] args) { public static int max(int num1, int num2) { if (num1 > num2) return num1; else return num2; } public static double max(double num1, double num2) { if (num1 > num2) return num1; else return num2; } public static int max(double num1, double num2) { if (num1 > num2) return num1; else return num2; { public static double max(int num1, double …

Member Avatar
Member Avatar
+0 forum 5

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
+1 forum 2

I've started my b2b e-commerce website with Magento. Can anyone share with me popular Magento extension that you know or have tried for b2b ? I've collected a list that I might need for my website. [Magento 2 Request For Quote](https://bsscommerce.com/magento-2-request-for-quote-extension.html) - allows wholesale customers to request for quote when placing big orders [Magento 2 Wholesale Fast Order](https://bsscommerce.com/magento-2-wholesale-fast-order-extension.html) - help wholesale customers save time by allowing import CSV file to choose desired items and put them into shopping cart by only one click. There might be many other effective extensions that I don't know, so please help me. Thank you!

Member Avatar
+0 forum 0

I try to search, read and write value from Bluetooth with Xamarin.forms But didn't find the one that can work. Suggestion some code or links for me please.

Member Avatar
Member Avatar
+0 forum 1

In this case I display values into datagridview from Projects table which it has only 2 columns: PROJECT_NAME VARCHAR ID INT // Which is hidden in datagridview, and as AUTOINCREMENT I have already done with editing values in this table and it works fine: `private void dataGridView4_CellEndEdit(object sender, DataGridViewCellEventArgs e) { string name_project = dataGridView4.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); string id = dataGridView4.Rows[e.RowIndex].Cells[0].Value.ToString(); MySqlConnection connection = new MySqlConnection("datasource = localhost; port = 3306; username = root; password = "); MySqlCommand cmd = new MySqlCommand("UPDATE projekt1.projects SET PROJECTS_NAME = @PROJECTS_NAME WHERE ID = @ID", connection); cmd.Parameters.Add("@ID", MySqlDbType.Int64).Value = int.Parse(id); cmd.Parameters.Add("@PROJECTS_NAME", MySqlDbType.VarChar).Value = name_project; try { …

Member Avatar
Member Avatar
+0 forum 1

In mysql database i created "leave" table: CREATE TABLE `leave` ( `ID_LEAVE` int(11) NOT NULL, `ID_WORKER` int(11) NOT NULL, `BEGIN_DATE` datetime DEFAULT NULL, `END_DATE` datetime DEFAULT NULL ); INSERT INTO `leave` (`ID_LEAVE`, `ID_WORKER`, `BEGIN_DATE`, `END_DATE`) VALUES (1, 26, '2019-03-19 07:00:00', '2019-03-19 15:00:00'), (6, 26, '2019-03-22 07:00:00', '2019-03-25 15:00:00'); "Sickness" table: CREATE TABLE `sickness` ( `ID_SICKNESS` int(11) NOT NULL, `ID_WORKER` int(11) NOT NULL, `BEGIN_DATE` datetime DEFAULT NULL, `END_DATE` datetime DEFAULT NULL ) INSERT INTO `sickness` (`ID_SICKNESS`, `ID_WORKER`, `BEGIN_DATE`, `END_DATE`) VALUES (5, 25, '2019-03-19 07:00:00', '2019-03-20 15:00:00'), "Workers" table: CREATE TABLE `workers` ( `ID_WORKER` int(11) NOT NULL, `FNAME` varchar(20) NOT NULL, `LNAME` …

Member Avatar
Member Avatar
+0 forum 1

I have a python script which extracts unique ip addresses from snort log but how to modify or use regex to extract IPs only if they are logged more than 10 times per second? more specific: using "regex", if the second (i.e 41 in this scenario) doesn't change for more than 10 lines of having the same IP address then extract that IP. blacklist = list(open("/home/asad/blackdb/blacklist", 'r').read().split('\n')) logfile = list(open('/home/asad/logdb/snort.alert', 'r').read().split('\n')) newip = [] for entry in logfile: ips = re.findall(r'[0-9]+(?:\.[0-9]+){3}', entry) for ip in ips: newip.append(ip) newblist = blacklist + newip with open("/home/asad/blackdb/blacklist", 'w+') as f: f.write('\n' .join(set(newblist))+'\n\n') f.close() …

Member Avatar
Member Avatar
+0 forum 9

I am optionally display some content in the Unity Editor based on options chosen for a given component, this will be used when displaying a summary of options chosen on this current Component. How I can make a function inline that returns a string, I want this function to be inline because there will be many of these and they will only useful in the line they are used in. I have provided a code snippet that may clarify what I am trying to do. I have used lambda functions like this in c++ and JavaScript, but not in c# …

Member Avatar
+0 forum 0

I need an answer for this question ( write 2 program that takes grade as input and display the range of marks use the select case and if() A. 90 to 100 B+ 80 to 89 B. 70 to 79 C 60 to 69 D 50 to 50 F. F

Member Avatar
+0 forum 0

In desktop application used in technologies like C#, .Net and MySQL I import data from large file (which is about 37 MB) to datagridview. The table from Excel file is in below: ![B8UMq.png](/attachments/large/4/9bbe3c17922dd6159fbe781fae200a4e.png) After loading data from Excel to datagridview I'm inserting that data to MySQL database. Later when I executing this importing code, that problem is began. Despite of switching off ContextSwitchDeadlock exception (of only 1 table to insert) inserting this data takes about... 10 minutes. Despite of not calling any error or exception in program it inserts not all data. In that case I saw I have imported …

Member Avatar
Member Avatar
+0 forum 1

# Major Reasons # ## Unclear or vague project requirements ## Defining project specifications is the first step in executing a successful project. In their eagerness to please potential clients and close a deal, companies often overlook details that could derail a project down the line. ## Poor or limited communication ## Effective communication is crucial to the success of any project. Just because you’ve understood the client’s requirements, doesn’t mean that your developers have. Sometimes, employees are too shy to voice doubts or ask questions. Lofty management on the other hand, is not entirely transparent with the client either. …

Member Avatar
Member Avatar
+0 forum 1

currently working on a project for college. when searching coffee names from the array list , it will show the object but will also show "there is no coffee in the list" for every time the object doesn't match the search, how can I sort this out? public static void search () { boolean arrayName = false; if (numberOfCoffees > 0) { System.out.println ("search coffee"); System.out.println ("what are you searching for?"); String search = sc.nextLine(); for (int i = 0; i < numberOfCoffees; i++) { arrayName = coffee[i][0].equals (search); if (arrayName == true) { System.out.println("coffee found: " + coffee[i][0] + …

Member Avatar
Member Avatar
+0 forum 1

Hi I have XML something like this : <component AttributeA="1"> <Node1 AttributeB="AAAA" Name="John" /> </component> in powershell I can load and read through xml like this : [xml] $xmlDocument = Get-Content (#path to xml file) Write-Host $xmlDocument.componet.AttributeA Write-HOst $xmlDocument.componet.Node1.AttributeB Write-HOst $xmlDocument.componet.Node1.Name that gives me the fallow output : 1 AAAA John My question is there is a way to do the same in C++?, what about Java or C# Thanks

Member Avatar
Member Avatar
+0 forum 1

Have two CSV files containing client records and need to compare the two and then output to a third file those rows where there are differences to the values within the record (row) as well as output those records (rows) on the second file that are not on first file . Example: File 1: KeyField,Name,City, Zip,Location 123,Fred,Chicago,60558,A2 234,Mary,Orlando,12376,4L6 345,George,Pittsburgh,40567, 22 456,Peter,Topeka,00341,234 567,Doc,Birmingham,76543,H86 File 2: KeyField,Name,City,Zip,Location 123,Fred,Chicago,60558,A2 234,Mary,Orlando,12376,4L6 345,George,Boston, 40567,22 456,Peter,Topeka,00341,234 567,Doc,Birmingham,7654,H86 678,Isabel,Guadalajara,87654,M111 The results should create a file containing : 345,George,Boston,40567,22 678,Isabel,Guadalajara,87654,M111 The following code gets me in the neighborhood as a visual check: import os import difflib f=open('original.csv','r') #open …

Member Avatar
Member Avatar
+0 forum 10

I see this Question in a diploma in computer science Exam in Algorithm , and i need help to solve it : Algorithm A1 takes n^2 days to solve a problem of size n . Algorithm A2 takes 2^n seconds on the same problem . Detrmine how large of a problem instance is required before algirithm A1 becomes faster than algorithm A2 . How much time do the two aldorithms take on that instance ?

Member Avatar
Member Avatar
+0 forum 3

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

<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

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

Dear All, We have recently released a survey on understanding the challenges that practitioners face with about software modeling and the particular problems that practitioners wish the researchers in academia to deal with. The survey is accessible via the link: https://docs.google.com/forms/d/e/1FAIpQLScwFMKoOJHDYF6GDETWh5H2w3W57G78Fb2SF0ABM9uTthN_hQ/viewform?usp=sf_link The survey takes 2-7 minutes at most, and your contribution to the survey is extremely valuable and highly needed. Can you please support our research by filling in the survey and forwarding the survey to any of your stakeholders whom you think may wish to participate in the survey ? The survey results will be made available online and …

Member Avatar
+0 forum 0

Hello. I have a question: I have a portable harddisc, with files on it. Now I want to encrypt a certain folder on it. It contains a couple of files which take some megs. What's the best way to do this? Thanks in advance, Leon

Member Avatar
Member Avatar
+0 forum 3

Hi all, I need to create a program on python that: At the start a 4 sided dice is thrown and a 12 sided dice is thrown to calculate two values for strength and skill the following method is used for each player: - Each attribute is originally set to 10. - The score on the 12 sided dice is divided by the score on the 4 sided dice and rounded down. - This value is added to the initial value. This process is repeated twice for two characters Bob and James. I also need the pseudo.

Member Avatar
Member Avatar
+0 forum 2

Has anyone experienced the "Not Found" error usin the shiny package in R? I keep seeing 'Not Found' when trying to load my Shiny application, it seems to be that R cannot find the Shiny server, I have tried reinstalling all packages and still no luck. The strange thing is that it works the first time I open R Studio, then it doesn't hereafter.. I have attatched a working example and a screenshot for insight. --- title: "Benchmarking Algorithms for Credit Card Fraud Detection" output: flexdashboard::flex_dashboard: orientation: columns vertical_layout: fill social: ["menu"] runtime: shiny #options: (shiny.maxRequestSize = 1500*1024^2) --- ```{r …

Member Avatar
Member Avatar
+0 forum 2

The End.