66 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for olong tea

This questions contains probability and I dont know how to work with it in Java import numpy import random def cup_game(): cashprice = [0.5, 1.0 , 2.0 , 5.0] n_turn = numpy.random.randint(5,11) n_mult = numpy.random.randint(3,6) cups = list(range(0,15)) x = numpy.random.choice(cashprice, 15, p=[0.3, 0.4, 0.2, 0.1]) x = list(x) turn …

Member Avatar for JamesCherrill
0
90
Member Avatar for xxunknown321

I have a program that i need to convert from java to c++... i just need help doing it... heres the java: [code] /* Name: Joseph Coleman Class:CSCI 1302 Assignment: Employee + ProductionWorker Academic Honesty: The integrity of students and their written and oral work is a critical component of …

Member Avatar for jimmichaels29
0
1K
Member Avatar for JohnMcPherson

Hello, this is John McPherson, writing code for the U.S. Department of Labor. I am working on developing a new Benefit Finanacila Model for the state of Oregon, and I am having a problem with the printing of large numbers that are converted to strings. It works most of the …

Member Avatar for AssertNull
0
488
Member Avatar for jeffersonalomia

Does php copy() function can convert a certain file format, let say for example file.pptx convert to file.odp, is it possible?

Member Avatar for cereal
0
706
Member Avatar for Prince_9

How can I convert this Ruby Gem to PHP? token = "your_nypl_api_token" client = NyplRepo::Client.new(token) ``` ``` token = "your_nypl_api_token" options = {:debug => true, :server_url => "http://api.repo.nypl.org/api/v1"} client = client = NyplRepo::Client.new(token, options) Also url = "http://api.repo.nypl.org/api/v1/items/8568ccd0-c614-012f-1d74-58d385a7bc34.xml" uri = URI.parse(url) http = Net::HTTP.new(uri.host, uri.port) headers = { "Authorization" => …

Member Avatar for cereal
0
752
Member Avatar for jean_5
Member Avatar for Papa_Don

Group, I'm counting the number of files in a folder using the following code: Dim counter = My.Computer.FileSystem.GetFiles(folderName) This produces a value that doesn't appear to be either a string or an integer. Would you know how to convert this value into an integer that can be used? Don

Member Avatar for Papa_Don
0
728
Member Avatar for krunal1986

Hi, I want to convert my word file to pdf file in vb6. source code will be appreciated. so far, i have tried with below code also. Private Sub Convert_WordDoc_to_PDF(DocPath As String, sDestsPDFFile As String) 'Dim worddoc As New Word.Application Dim worddoc As Object Set worddoc = CreateObject("Word.Application") Dim x …

Member Avatar for Vidya Sagar
0
5K
Member Avatar for software girl

#include<iostream.h> #include <stdlib.h> //FOR exit(1) struct Flight { char flightNo[5]; char date[12]; char time[6]; char gate[3]; }; Flight flight={"AB11","10-12-2008","20:30","RT"}; struct Seat { char name[40]; char booking_ID[3]; int seats; }; Seat choice[4][5]; void displaymenu(); void booking(); void seat(); void ticket(); void records(); void menu(); void exit(); //Variables int selection,i,j,password; int seats_num[20]={0}; …

Member Avatar for Ancient Dragon
-1
282
Member Avatar for belladiluna

Help me please! Need c# code... import numpy from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter import matplotlib.pyplot as plt def zadachaOPrepyatstvii(h, f, fi, xi, sigma, epsilon=0.0000001): m = int(1/h) h2 = h * h u = numpy.zeros(shape=(m+1, m+1)) gamma = numpy.zeros(shape=(m+1, m+1)) prevnormr = …

Member Avatar for vegaseat
0
5K
Member Avatar for robert.knighton.79

I'm trying to take input keypress event and move the text it would have typed into a textbox to a different textbox instead. textBox1 has a length limit of 1 so I dont actually have to prevent text going into the box because the textbox is already full I just …

Member Avatar for robert.knighton.79
0
3K
Member Avatar for edogg23
Member Avatar for edogg23
0
152
Member Avatar for BlackJax96

Hi, I want to convert a float value to 32bit hex and the code I have right now returns 64bit hex. The float is stored in a string called value. [CODE] result = Convert.ToDouble(value); long lVal = BitConverter.DoubleToInt64Bits(result); string hex = lVal.ToString("X"); OutputBox.Text += ("\nConverted the " + value.GetType().Name + …

Member Avatar for Ketsuekiame
0
3K
Member Avatar for Pobunjenik

Hi, thanks for looking at this thread. :) **The goal:** I have this 2D boolean array (from my [decoder](http://www.daniweb.com/software-development/java/threads/452559/decoder-simulatorcalculator-complement-of-2-problem) thread). I managed to write a method that goes through the rows and appends a '1' or a '0' to a string based on what's in the array (1 for true, …

Member Avatar for Pobunjenik
0
363
Member Avatar for mical700

How to convert C++ code to C. Write a program in C that asks a user for the name of a file. The program should display the first 10 lines of the file on the screen (the "head" of the file). If the file has fewer than 10 lines, the …

Member Avatar for deceptikon
0
1K
Member Avatar for Taras20

Hi everyone, I need to use integer that is typed into textbox to do some math functions. here is what i have: Private Sub btnDivide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click dim x as integer dim y as integer dim tbox as integer tbox = (Textbox1.Text) x …

Member Avatar for TnTinMN
0
550
Member Avatar for AARTI SHRIVAS

i have started learning joomla and now my team leader say me to covert html temlapte to joomla temlate any one have idea about that how can i achive this thanx in advance

Member Avatar for IIM
0
198
Member Avatar for josverhoeff

Hi, I am (still) converting an old asp web app / vb6 dll to aspx / vb.net I am now biting on a fairly simple function in vbscript: the execute() function What the vbscript does is the following: It reads in a variable name and its (string) value from a …

Member Avatar for josverhoeff
0
527
Member Avatar for tony75

Hi Im using windows form applicaton and try using a method that returns a value and have a parmeterlist input. I try to creat a program that converts a number of kilobytes (KB) to byte. The program's user to specify the number of KiB and the program will print the …

Member Avatar for tony75
0
205
Member Avatar for ramy.merc

Hi programmers, I am a c# programmer but I have a very big project in C++ (Which I am not familiar with) and I am facing a big problem. As part of the project, I need to convert the image (any image of any type bmp,jpeg,png...etc) to grayscale using openMP. …

Member Avatar for Moschops
0
2K
Member Avatar for Beginerman

I need a little help with the below code. I am basically reading text from a .txt file and need to be able to convert the text into an array(fam6) that i can then search for a value that is typed into a text box. If said text box search …

Member Avatar for Beginerman
0
316
Member Avatar for sania khan

Can we convert the record displayed on the web page to pdf doc ? if possible then how we can achieve this?

Member Avatar for SautinSoft
0
971
Member Avatar for mr3army

Hey guys I manged to get some code what works fine but it uses console application I have tried to convert it by hand and change things around to get it to work but with no avail! Im certain it should be simple but I may be wrong :( Code …

Member Avatar for mr3army
-1
965
Member Avatar for nickg21

Hey everyone, I know that there are hundreds of articles online about this same error, but I have been going at this for almost 2 days and it's time I just started a thread of my own. In my application, I have a textbox that has a CalendarExtender hooked up …

Member Avatar for mikev2
0
334
Member Avatar for MichaelCJ10

I need my overall data to all be output as double, but my counter is an int, and i imagine you cant use a double as a counter, so when it goes to compute my data, theres a mismatch between my counter and the rest . i need a way …

Member Avatar for stultuske
0
296
Member Avatar for archelle

Anyone here who knows how to convert system month,Day,Hour,Minutes,Seconds each into number format like month=12 (If December) Day=30 Hour=12 (In 24 hour format) Minutes=55 Seconds=45 Thanks for help in advance...

Member Avatar for archelle
0
130
Member Avatar for dev90

i want to go back to main menu while hitting escape key in my programme. for that i have make a function. [CODE]void exit (char[]) { if(char==27} { exit(0); } } [/CODE] but i have many user inputs which are of type int,float,char..... so i have tried, [CODE]while(kbhit!=27) { //coding …

Member Avatar for adityatandon
0
2K
Member Avatar for sarya_w

Could someone help me to convert this Scheme Code to Objective-C? (define-type RCFAE [num (n number?)] [add (lhs RCFAE?) (rhs RCFAE?)] [id (name symbol?)] [fun (param symbol?) (body RCFAE?)] [app (fun-expr RCFAE?) (arg-expr RCFAE?)] [with (id symbol?) (named-expr RCFAE?) (body RCFAE?)] [if0 (cond RCFAE?) (then RCFAE?) (else RCFAE?)] [rec (id …

Member Avatar for sarya_w
0
359
Member Avatar for Stickie

What am I doing wrong? I've stored the date in american format (yyyy-mm-dd) and want to output it in european format (dd-mm-yyy). This is my code. [code=php] //ZENDING $result = mysql_query("select ID, Bestemming, Afkorting, Datum FROM Zendingen WHERE ID ='" . $znding . "' ORDER BY ID, Bestemming ASC") OR …

Member Avatar for Stickie
0
147
Member Avatar for Griff0527

I am working on a project of converting VB code to C# code and I am lost as to how to read data from a prompt in C#. Here is the snippet I am concerned with fixing, but below I will post the entire code. [CODE] private void Button1_Click(System.Object sender, …

Member Avatar for Griff0527
0
2K

The End.