199,114 Archived Topics
Remove Filter ![]() | |
This is what I have: When I try to do this, it shows me an error: IndexError: list index out of range Could someone help? with open(os.path.join(path, file.replace(".root", ".txt")), 'r') as f: lines = f.readlines() htemp = TH1D(name, name, nBins, eMin, eMax) for i in range(len(lines)): htemp.SetBinContent(i + 1, float(lines[i])) … | |
hello brothers, I have this VBScript program: Set WSHShell = Wscript.CreateObject("WScript.Shell") Set FSO = Wscript.CreateObject("Scripting.FileSystemObject") Set EnvVar = wshShell.Environment("Process") tBestand= EnvVar("USERPROFILE") & "\Desktop\Items Numbers.txt" Set Bestand = fso.createtextfile(tBestand,2) For x = 1048639472 To 1048640474 Bestand.WriteLine("Item Number is=" & (x)) Next Bestand.close WScript.quit The Output is: (about 1002 lines). Item Number … | |
js file : function countdown(endT,callback) { var days,hours,minutes,sec,timer; end = new Date(endT); end = end.getTime(); //Get initial Date in Milliseconds, if (isNaN(end)) { alert('@ countdown.js @ "Invalid Date", valid format- mm/dd/yyyy hh:mm:ss TT '); return; } timer = setInterval(calculate,1000);//Timer to calculate remaining time function calculate(){ var current = new Date(); … | |
[OH noo, please not that again!](https://www.youtube.com/watch?v=DvShTJKuy2w) Yeah, primes sigh. But they play a minor role here as a perfect victim to explain some other things. Would not advise to use the algorithm here to calculate them in real life. There are languages like Python, F#, Haskell etc. who have list … | |
Hello, I've joined Daniweb months ago, but haven't really had the time to post here. I apologize if I posted in the wrong section, as I tried to look for the most specific one. So far I've seen `Linux/Unix > server` as the closest. I'm currently stuck with my situation … | |
Programmer Folks! I first started learning php in September 2015. In 2 wks I read the whole tizag tutorial after understanding it. http://www.tizag.com/phpT/syntax.php (Browse the chapters list on the leftside of the page). I was still "raw" in experience when I suddenly read that php 7 was out and when … | |
Hello i have a problem. It seems that the value of this this input `<input type="hidden" id="uploadUid" value="<?php echo $sessionUid;?>" name="update_uid">` in here `formData.append('uploadUid', uploadUid.value);` When i put an alert `alert(uploadUid.value);` on Firefox it returns just fine but on Chrome returns undefined Any guess why? | |
Hey there. i want to set a variable to represent the last line of a text file how do i do that? or even better, how do i create a list of the lines of a text file? any suggestions? | |
Ladies & Gentlemen, My Fellow Buddy programmers and would be buddy programmers! Watching the following youtube tutorial I built a basic php proxy but for some reason it is not working. Can you guess why ? The clip uses the deprecated ereg_replace and so I replaced it with preg but … | |
how to make a program for online shopping.help for source code Programming java | |
Dear sir i want to english word definition list(database) .i am search every wear in internet. but i cant find it.anybody know download link please send me. thank you wansa | |
Ladies & Gentleman, Or should I say 'Gentle Ladies' and 'Hard Men' (tough guys)! :winky: Here is my very latest (New Code) reg.php. I have modified it by: * Removing outdated strip tags, mysqli_escape_string. * Bound input parameters on the user reg form. * Added htmlspecialcharacters code on output to … | |
Actually the form below is a registration form, and i only have ' username, email, password and confirm password field' so i want to add another field name job, but keeps getting error. see the code below; if (!preg_match("/^[a-zA-Z ]+$/",$name)) { $error = true; $name_error = "Name must contain only … ![]() | |
import sqlite3 datafile = 'XZ704.DB' datadir = '/full_path_to/SQLITE_FILES/' db = datadir+datafile conn = sqlite3.connect(db) cur = conn.cursor() cur.execute("SELECT * FROM Airports LIMIT 1") --- OperationalError: no such table: Airports --- That works fine in a terminal but for some reason python 2.7 no like. I have tried full path, relative … | |
New Friends! :) The following is my member registration code as of latest. ISSUE 1: I get this error: Parse error: syntax error, unexpected '_' (T_STRING), expecting ',' or ')' in C:\xampp\htdocs\e_id\register_edited.php on line 10 What is wrong ? I copied the "'images/'_$FILES['avatar']['name']);" from a youtube tutorial on how to … | |
Hello, How to create circle with css? Any idea how to create circle with css? I create html file with numbers 1 - 5. And I would like to draw green circle around each number with css. How to do so? Thanks in advance. | |
Hello, This is the error message on laravel public_html: Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\framework_freshway\public_html\index.php on line 50 I wonder why it appears? This is only on public_html the framework is on seperate files: <?php … ![]() | |
Ok I need to make a 3 part program thats made with c++. The first part is to write 10 number, and then program ask to ether repeat the number or to reapeat them reverse. Second part I need to make a program that ask for a word and later … | |
I am trying to figure out how to read/write to a file without knowing it's exact path. I was using resources and was only reading in the files, but now I need to write to them and there doesn't seem to be an easy way about this. I was looking … | |
OK so I have a form with Navigation Buttons that open various webpages in browsers in a tab control. In order to clean up my code I would like to write a class for both the Buttons and the browsers. I have ZERO Idea as to where to start. Here … | |
1. Measuring the effect of Parallelization Using one of the suggested methods in class ( p-threads, OpenMP, C-Sharp or Java Threads) implement an application that adds two integer vectors (A,B) and store the result on vector C. The size of these vectors is to be set at 67108864. Measure the … Programming java | |
For clairifying you can add a string to a variable then add other variables as such; var one = "test", super,apple,pear,cardboard The string "test" will be assigned to the variable one as well; super, apple, pear, cardboard will also be created variables ? | |
I passed two parameters in the URL. Now I need to retrieve the parameters log_id and dogID onto the next page to process a form. But I can retrieve the first parameter but i cannot retrieve the second parameter. Im using $log_id= $_SESSION["userid"]; $dogID = $_SESSION["dogID"]; Is there another way … | |
Hi, i'm using vb.net and i have connected a database to it. As per my interface i should add, delete,go back,go next and save my records. All the buttons work apart from delete. The problem is i do not know the codes for deleting a particular record during the run … | |
I am trying to add custom button in CKEditor. I am using this CKEditor [ng2-ckeditor](https://github.com/chymz/ng2-ckeditor). It is working fine. but I want to add a button. on cliking this button will add a rails template tag Example: I can add the button like example below, but I dont know how … | |
I need to make a spin coater machine. It spins in 3 stages and each stage have different speed(servo value) and time ( how long for it to spin). A lot of people recommended that I use FSM. I have decided to do the programming in FSM. I manage to … | |
Hi, i am beginer to codeignitor,i know how to write basic active queries in CI. i want to know how to write a query(having multiple conditions,double parentheses) in which supports CI. query is: $query="SELECT * FROM `apply_special_leave` WHERE ((`from_date` <= '$dt1' AND '$dt1' <= `to_date`) OR (`from_date` between '$dt1' AND … ![]() | |
Im going through a tutorial online that would allow users to post status to their wall and to their friends but im getting the error : Warning: mysqli_query(): Couldn't fetch mysqli in /storage/h7/475/1137475/public_html/template_status.php on line 15 It is storing to the db but its not displaying on the user profile. … ![]() | |
I would to know how I could do a barcode detecting using a phone IMEI to know its phone type and specifications in php Many Thanks ![]() | |
I am going to find out all messengers such as: WhatsApp, viber, Line, Telegram, instagram, Kik, facebook, And others that are Registered with a specific Phone Number. is there any way to do that in python? remember that I have the phone number but want to figure out the messengers … Programming python | |
The end goal is to create a program that runs when my hard drive is plugged into a computer. This program will attempt to verify that the user is me through username and password. Upon correct input, the program will allow access to the files on the hard drive. Incorrect … Programming hard-drive python | |
Hello guys, am making a desktop application using javafx and after making the exe installer with inno and wix. the problem is after installing the program everithing is working properly but when you go to source file all my classes are there intact so it can be changed easyly. HOW … | |
Hello everybody I'm looking for someone to help me about my problem, im trying to display user details after login with allow user to edit some fields . the user can edit these fields password repassword description address telephone email and these two fields not allow to edit only display … | |
Hello, how are you? My name's Regie, I work for a technology company and recently one of our Developers wrote an article about the new Visual Studio Mobile Center. It would be great if you can take a look at it and maybe send us your feedback! https://blog.uruit.com/2017/04/05/mobile-visual-studio-mobile-center/ Also, we … | |
Employee.php <div class="col-xs-12"> <h2>Listing Employee</h2> <hr> <div class="employeeGrid"> <table> <tr> <th><a href="" ng-click="orderByField='name'; reverseSort = !reverseSort">Name</a></th> <th><a href="" ng-click="orderByField='age'; reverseSort = !reverseSort">Age</a></th> <th><a href="" ng-click="orderByField='gender'; reverseSort = !reverseSort">Gender</a></th> <th><a href="" ng-click="orderByField='company'; reverseSort = !reverseSort">Company</a></th> <th>Action</th> </tr> <tr ng-repeat="person in employee | orderBy:orderByField:reverseSort""> <td>{{person.name}}</td> <td>{{person.age}}</td> <td>{{person.gender}}</td> <td>{{person.company}}</td> <td> <button class="btn" ng-click="viewEmployee(person.id)"><span … | |
Guys & My Ladies, This LOGIN.php was working lastnight and so I don't know why not now. The ELSE at 53 gets triggered even though I have typed the right password! What do you think of line 16 ? ... if($numrows >1) I tried the following but no luck: if($numrows) if($numrows … ![]() | |
I wanted to pass two values to a click function and use the values to load a file in to a specific DIV. The file to load is called ‘displayTwo.txt' from the 'partialContent' directory and the DIV that the contents of the file will be place in has the ID … | |
Sir I have these codes <html> <head> <style type="text/css"> table { font-size: 12px; font-weight: bold; font-family: Verdana, Geneva, sans-serif; } #mytable td { border: 1px solid #CCC; font-size: 14px; } #mytable thead { border: 1px solid #6C3; background-color: #CCC; color: black; line-height: 30px; height: 30px; font-size: 14px; } #mytable input[type="text"] … | |
As a students of embedded what is the scope of advanced embedded system? Is it a better career option? | |
A. Write a triangle solver that takes 3 inputs consisting of angles in degrees and length of sides in arbitrary units and, if possible (your program has to determine this), supplies all other angles and side lengths. There will be either 0 triangles, 1 triangle, 2 triangles or an infinite … | |
<customers> <customer> <ID>C1</ID> <FirstName>Jack</FirstName> <SurName>Wong</SurName> <Email>jack@hotmail.com</Email> <Password>081292</Password> </customer> <customer> <ID>C2</ID> <FirstName>Ashley</FirstName> <SurName>Rachael</SurName> <Email>ashley@hotmail.com</Email> <Password>081292</Password> </customer> <customer> <ID>C3</ID> <FirstName>Vongola</FirstName> <SurName>Steve</SurName> <Email>vongola@hotmail.com</Email> <Password>081292</Password> </customer> </customers> I have a existing xml showing like that. I did some research through net, but they all were talking about one element. For example `<Email>xxx@hotmail.com</Email>` But what … | |
I'm trying to build a script that adds multi entries into same single cell or mysql row. The script tries monitoring what you are browsing via the: <pre><input type="text" name="browse_url" size="120"></pre> and then record your viewed urls into the same row (position: 0), column: browsings like so: 1.com,2.com and so … | |
This is a rock, paper, scissor, lizard, spock game. The computer's decision making is set up in the class and all input/output must take place in main. I am struggling with a few things: Setting up a score keeper - unsure how to keep score by comparing the output of … Programming c++ | |
im intending to do a function that'll calculate the cosine of x like this: 1-x^2/2! + x^4/4! - x^6/6! ... and compiler says that it doesn't support "%lf" format and "undefined" to pow and cos ? why #include <stdio.h> #include <math.h> double my_cos(double c){ int i,k; double result=1.0; for(i=1; i<10; … | |
Hey, I would some assitance, I wrote this code to find the average between the max and the min and assign that value to the nan, nut i have to chnage up my code, to assign the NaN to the previous non-zero value. Example 112 113 114 116 NaN would … | |
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click provider = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" datafile = "E:\Software Development\Student Profiler\Student Profiler\School.accdb" connString = provider & datafile myConnection.ConnectionString = connString myConnection.Open() Dim str As String str = "Insert Into Basic_Information([ID],[Admitted In The Class],[Subject],[First Name Of The Student],[Middle Name Of The … | |
Instructions are in the image above. This is what I have now. Everything is done except the last part where if you click Yes the program is supposed to continue with other calculations. This is where am stuck. import javax.swing.JOptionPane; public class OPTIMA2 { public static void main(String[] a) { … | |
Buds! How to code so php forces mysql to show only the final row of the column ? The followings are how I coded (2 copied youtube tuts) to show all rows to allow user to delete multiple rows: SAMPLE 1 [php] <?php session_start(); require "conn.php"; require "site_details.php"; ?> <!DOCTYPE … ![]() | |
Programmer Experts, I'm embarking on an interesting project to gain work experience in php. Just stuck on one thing and wondering if you can help. You probably used Team Viewer. This is where I create a Team Viewer session and get a unique number and if I give you it … ![]() | |
hi! ;) I just want to asked on how I can set the image as background. I put an image on the working station but once I run it, it doesn't appear on the browser. thanks. I'm using Visual Studio 2008 ;) ![]() |
The End.