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

using c# socket programming. For the program on computer A, i would probably need to create a windows form, to allow me to trigger computer B software to run by clicking. How do i implement the async socket into window form? How can i start the connection of both computer, what do i need to do, t get computer A able to command computer B software to run, and all the data collected from the software to be stored in computer A windows form application. Thanks.

Member Avatar
Member Avatar
+0 forum 19

I have an assignment doing a constructor that accelerates and brakes the speed of the car (among other non-troublesome things) but when I run the program, the speed stays constant and spits out whatever the original number is rather than raising and lowering by 5 like I want it to. I will be eternally grateful to whomever can help me see the error of my ways

Member Avatar
Member Avatar
+0 forum 3

hello. I need some help in java 1.The program browse the filename of the text file to be counted 2.The contents of the file will be stored to a temporary storage. 3.Identifies if the c source code in a form of text file is physical lines of code, blank lines of code, comment lines of code and logical lines of code. 4. Counts the number of ploc, bloc, cloc and lloc. 5. Display the content in a text field. 6. The displayed output will be the identified lines of code and the number of counts in each ploc, bloc, cloc …

Member Avatar
Member Avatar
+0 forum 1

Hi, I run an online shop selling T Shirts and we often need to produce tons of T Shirt mockup images in Photoshop. We basically enable the layer for different T Shirt colours, Save Mockup As a JPG file and then repeat the same process for all the other colours. Since it was super boring, super repetitive and time consuming to do this, I put together this neat Photoshop script to do the whole job with a single click. //Cobbled together from: //http://feedback.photoshop.com/photoshop_family/topics/quick_save_as //http://www.polycount.com/forum/showthread.php?t=85425 #target photoshop; if (app.documents.length > 0) { var thedoc = app.activeDocument; var docName = thedoc.name; if …

Member Avatar
+0 forum 0

Hi, I'm working as a Software Engineer. You can imagine, how will be my work? I used to work when I'm in my home too, especially, during the month ends. The problem is, I'm not able to access my internet during the day time .there will be a connectivity problem. Planning to replace the internet box at home . It's disgusting to use it. But instead of being attached to a phone cable, my friend suggested the replacement of cable and placing portable internet solutions. I enquired about the connection and heard that a portable WiFi device enables us to …

Member Avatar
Member Avatar
+0 forum 1

I have questions: 1) Program to get input from user till 'z' or 'Z' is inputted the program will check for the chars, and print (new line) small chars (new line) big chars (new line) numbers [without 'z' or 'Z'] can't use variables. only Stack. example : input: ASdf154sdgdf123vcvbz Small chars: dfsdgdfvcvb Big chars: AS Numbers: 154123 This is code for question 1: STA SEGMENT STACK DB 100H DUP (0) STA ENDS CODE SEGMENT ASSUME CS:CODE,SS:STA MAIN: MOV BP, SP MOV BX, BP SUB BP, 2 MOV CX, 0 INPUT: MOV AH, 01H INT 21H INC CX CMP AL, 'z' …

Member Avatar
Member Avatar
+0 forum 1

The End.