Hello All, I am working on a python project that helps pull random names from a list in excel and saves them to a new excel file. The input file shows all of the names of the people who can work on that task. I am able to run the code below and get a random list for each task but I end up with duplicates down my lists. I am trying to create restraints to not allow duplication down the rows also but cant seem to get it to work. import random import xlrd import openpyxl as pyxl inputFilename …

Member Avatar
+0 forum 0

I want to create a php function that i can use to get a particular user details and display the info gotten in my ProfileActivity when a user profile is been clicked in my app. so i wrote this php code to get user details from my database but when i run the code nothing is returned in my browser. please what could be causing this? <?php require("config.php"); function getdetails($id) { $array = array(); $q = mysql_query("SELECT * FROM 'users' WHERE 'id'=".$id); while($r = mysql_fetch_assoc($q)) { $array['id'] = $r['id']; $array['name'] = $r['name']; } return $array; } function getId($name) { $q …

Member Avatar
Member Avatar
+0 forum 2

//How to change cin and cout to printf and scanf??? #include <iostream> using namespace std; char square[10] = {'o','1','2','3','4','5','6','7','8','9'}; int checkwin(); void board(); int main() { int player = 1,i,choice; char mark; do { board(); player=(player%2)?1:2; cout << "Player " << player << ", enter a number: "; cin >> choice; mark=(player == 1) ? 'X' : 'O'; if (choice == 1 && square[1] == '1') square[1] = mark; else if (choice == 2 && square[2] == '2') square[2] = mark; else if (choice == 3 && square[3] == '3') square[3] = mark; else if (choice == 4 && square[4] …

Member Avatar
Member Avatar
+0 forum 1

I read several forums questions related to SQL database corruption. As we all know, backup is the best way to repair SQL database. What a user will do when backup copy is also corrupted or updated bacjup is not available? Is DBCC CHECKDB Repair option (Repair_Allow_Data_Loss) safe?

Member Avatar
Member Avatar
+0 forum 1

Im not sure what code to use as I am not that experienced with VBA. No matter what i try i cannot get this macros to stop once it reaches a blank cell in E column. Here is the code: Option Explicit Sub PDFTemplate() Dim PDFFldr As FileDialog Set PDFFldr = Application.FileDialog(msoFileDialogFilePicker) With PDFFldr .Title = "Select PDF file to attach" .Filters.Add "PDF Type Files", "*.pdf", 1 If .Show <> -1 Then GoTo NoSelection Sheet1.Range("G53").Value = .SelectedItems(1) End With NoSelection: End Sub Sub SavePDFFolder() Dim PDFFldr As FileDialog Set PDFFldr = Application.FileDialog(msoFileDialogFolderPicker) With PDFFldr .Title = "Select a Folder" If …

Member Avatar
Member Avatar
+0 forum 1

HI everyone, I recently inherited a project that has been in production for a number of years. They want a new field added. Easy peasy - or so you would think..... The solution is checked into Team Foundation (back in 2012), so I was able to get the code there (and did). Another programmer here had to add a report to the program back in 2015, she did. HOWEVER she didn't check the code into Team Foundation (still showing as checked out). We got the code she had off the network location she had it out to. Here is where …

Member Avatar
Member Avatar
+0 forum 2

Hi guys! I have a problem with login into the system. Everything seem to be fine but it passes an error when i click the login button. Pls help Thank you in advance ////////login.php////// <? /* *********************************************************** **********# Name : Shambhu Prasad Patnaik #***** **********# Company : Aynsoft #********** **********# Copyright (c) www.aynsoft.com 2004 #********** *********************************************************** */ include_once("include_files.php"); include_once("general_functions/password_funcs.php"); include_once(PATH_TO_MAIN_PHYSICAL_LANGUAGE.$language.'/'.FILENAME_JOBSEEKER_LOGIN); include_once(FILENAME_BODY); $jscript_file=PATH_TO_LANGUAGE.$language."/jscript/".'jobseeker_login.js'; $template->set_filenames(array('jobseeker_login' => 'jobseeker_login.htm')); //// Jobseeker auto login starts //////[[Click Here](http://talentwiz.net/jobseeker_login.php)](null) $checked1=false; $encoded_login1=$_COOKIE["autologin1"]; //echo $encoded_login1; if(tep_not_null($encoded_login1)) { $checked1=true; $explode_array=explode("|",decode_string($encoded_login1)); $TREF_email_address1=$explode_array[0]; $TR_password1=$explode_array[1]; } else { $TREF_email_address1=""; $TR_password1=''; } //// Jobseeker auto login ends ////// $action = (isset($_POST['action']) ? $_POST['action'] : …

Member Avatar
+1 forum 0

Hi, below is my code for binary search algorithm. My question is, what if I enter more than 1 same numbers in the array? How should i modify my code to print out all the locations where that same number is found? For example, if I entered the number 2 at three different locations, let's say, array[3], array[6] and array[17], how should I ask my compiler to return all the three locations instead of one? P.S. the below code returns only 1 position even if the number is entered multiple times. Thanks in Advance :) // Binary Search Algorithm ... …

Member Avatar
Member Avatar
+0 forum 4

Hi, I am trying to move from a Xrm.Page code to pulling from a library. I want a notifiction whenever the field value is tagged as needing to be notified. right now the code that works is.... var message = "This person needs to be notified"; function SetANotification() { if (Xrm.Page.getAttribute("abc_6").getValue()) { Xrm.Page.ui.setFormNotification(message, "INFO", "NOTE"); } else { Xrm.Page.ui.clearFormNotification("NOTE"); } } However, like I said instead of using the form commands I want to pull from another library (executionContext). I recieve an error stating "TypeError: Unable to get property 'getValue' of undefined or null reference at....". So the code I …

Member Avatar
Member Avatar
+0 forum 1

Hey , am currently doing my school project of coming up with school reports of learners but when I tried to connect my database with the ms vb it gave me an insert into error whil I was trying to register learners .Please help.

Member Avatar
Member Avatar
+0 forum 3

Hello,I need an SMS gateway like Twilio. I am testing it right now, but before investing in a commercial product I would like to map the better alternatives.Plivio was recommended for me, but Plivio PHP based configuration more difficult to integrate. Do you know any good International alternative to Twilio?In addition to the basic functionalities, it would be appreciated if the SMS gateway offers affordable price range and 24/7 system support would be also useful for me.Thank you for sharing your ideas in advance!

Member Avatar
Member Avatar
+0 forum 1

Hi there! I am creating a toggle in pure css without jquery or javascript and its look like it hasn’t work yet. The problem is Css div alignment. Its not perfectly aligned. I am trying to achieve are in the attachment kindly look: HERE IS DEMO: https://jsfiddle.net/navjot789/2fcLvmrj/ and its seems like its not working as I want. If anyone who have a deep knowledge is css helps thats would be a great. any input is apprecheated.

Member Avatar
Member Avatar
+0 forum 3

There are A red socks, B green socks and C Yellow socks in a dark room. Ashwin wants to find N pairs of matching colored socks from the dark room. Given all A, B and C are even and N ≤ (A+B+C)/2, write a program that outputs how many socks Ashwin would have to draw from the dark room in the worst case, to have exactly N pairs. 1. Input Format First line contains three space separated integers: A, B and C. Second line contains the number of pairs Ashwin wants: N 2. Output Format Single line containing a single …

Member Avatar
Member Avatar
+0 forum 1

I have an animation on my webpage where stat numbers count up to reach to a target number. I want this animation to start only when this section scrolls into view, otherwise the animation will already be donw by the time the user gets to that section! How can I do that? Here is a link: [ https://www.boneiolam.org/index2#services](https://www.boneiolam.org/index2#services) The numbers in the circles count up

Member Avatar
Member Avatar
+0 forum 9

Hi folks, i am making a simple program using vb.net 2017 i want to make a hot key like pressing keys.decimal + keys.enter at the same time to shutdown my pc. i am using a bluetooth usb numpad so crtl key is not an option. thanks for your help. Cheers!

Member Avatar
Member Avatar
+0 forum 2

In this query i want to display the unbooked rooms, but the booked rooms are displayed instead of the unbooked rooms... create table guest ( guest_id int auto_increment primary key unique not null, guest_lname varchar(50) not null, guest_fname varchar(50) not null, guest_email varchar(100) not null, guest_password varchar(50) not null, guest_address varchar(20) not null, guest_op_adres varchar(200), guest_gender int(1) not null, guest_mobile_no varchar(15) not null ); create table room_rate_default ( defroom_rateID int auto_increment not null primary key, room_typeID int not null, defseason_type varchar(50) not null, defmonRate double not null, deftuesRate double not null, defwedRate double not null, defthuRate double not null, deffriRate …

Member Avatar
Member Avatar
+0 forum 13

I want to shift my plot to the right by fixed value , I have npy file contain 7 columns, I plot the histogram for the column number 7 as below: plt.figure() plt.hist(x[7],bins=800,color='y',histtype='step',linewidth=2,stacked=True) plt.show() I am trying to shift my plot to the right with fix value but I could not find a correct way to do so. Any help I really appreciate it.

Member Avatar
Member Avatar
+0 forum 2

hello, i dont know much about programming, but i want to find a certain piece of text in a document that was opened using microsoft visual basic 2010 express. below is my code to open the word doc and to find and replace the text but is faulty 'to open the doc Dim objWord As Word.Application objWord = New Word.Application objWord.Visible = True objWord.Documents.Open("C:Address for doc", , , True) 'must change the address of the document if on other device 'to find and replace text within doc objWord.Content.Find.execute(FindText:="Address", _ ReplaceWith:=Label1.Text, _ Replace:=Word.WdReplace.wdReplaceAll)

Member Avatar
+0 forum 0

Hello guys, I am writing a C++ program that converts arabic to roman numerals or vice versa up to 100 (C). The program should: Handle all values for 1 (Roman I) to 100 (Roman C) Permit entry in either format Arabic (1, 2, 3, ..., 100) or Roman (I, II, III, ..., C) Reject any entries that are not correct with an appropriate error message Be well commented Use meaningful variables My problem is that when I enter an arabic number I cannot convert it into a roman numeral. Thanks in advance! This is the code I have so far: …

Member Avatar
Member Avatar
+0 forum 3

I have gotten stuck on a computer science assignment regarding Pseudocode and need a little help if possible. The task requires me to scan the ID of multiple people trying to enter a club and then compare there features (eye colour, hair colour etc) to the picture on the ID. If there is a match then they are allowed to enter but if more than two features do not match then they are denied. Any help would be amazing. Thanks p.s they are all entering 1 by 1 scanning each member to their respective ID

Member Avatar
Member Avatar
+0 forum 12

Hello, I Am Building a web application.How can i implement sms service in my website?? Please show me some references..and guidence please..

Member Avatar
Member Avatar
+0 forum 2

This is a function in class *DepartmentBean* which check if element already exist in container: bool f; public void addIfAbsent(UserBean userBean) { if (users.stream().anyMatch(x -> x.getUsername().equals(userBean.getUsername()))) { f = false; } else { f = true; users.add(userBean); } } } In my servlet I am trying to send Message of succeseful registration(if f=false, their's no username with the same name): protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { doAll(request, response); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } public static void doAll(HttpServletRequest request, HttpServletResponse response) throws Exception { DepartmentBean dp = …

Member Avatar
Member Avatar
+0 forum 1

i want to make simple cafe management system in Tkinter the buttons are automatically generating from a database so how i can get the names of the buttons and their price from a database and also want so insert this into a receipt(textbox) thanks def showbreakfast(): data1 = readbreakfast() for index, dat in enumerate(data1): ttk.Button(master, text=dat[0],command=lambda :update_count(3)).grid(row=index+1, column=0,padx=0, pady=0) def update_count(value): global bttn,bttn_clicks,my_text,my_text1,my_text2 my_text=StringVar() my_text1=StringVar() my_text = my_button.cget('text') my_text1 = my_butto.cget('text') #my_text2 = namee.cget('text') bttn_clicks += 1 bttn = IntVar() global variable variable = value #var=variable print(update_count) def Receipt(): txtReceipt.delete("1.0", END) x = random.randint(10908, 500876) randomRef = str(x) Receipt_Ref.set("BILL" + …

Member Avatar
+0 forum 0

Hi I am a python bigginer, I have a scenario where I need to search and select a particular value from linux command "df -h". dumpe2fs 1.42.13.x5 (23-Mar-2017) Inode count: 786432000 [root@copper02 ~]# In this above output I need to store the inode count number in to a variable to use it for further calculation. Can anyone explain how to use python regular expressions to do the above task?

Member Avatar
Member Avatar
+0 forum 1

Hello, Daniweb -- I have a C++ library, for which I am trying to make a Python interface. I have come across a linking issue which I haven't been able to solve. The library has a series of header and source files, and I am looking for a way to add the Python interface without modifying any of the source files, by separately compiling linking in the new Boost Python sources, rather than adding the additional Boost code directly in the .cpp files. I have worked out a simple test case for what I am trying to do. There is …

Member Avatar
Member Avatar
+0 forum 3

This is my code, which changes by frame, I need to do a scoring system, but when I used the following code to add a score it works fine for the first 2 frames then doubles and by the end it's like 229. Thank you for any help. Score; var score = 0; function scoreIt(); { score += 1; } Frame by frame; this.stop(); this.ans1.addEventListener("click", fl_MouseClickHandler.bind(this)); function fl_MouseClickHandler() { this.rocket2.play(); this.rocket1.stop(); this.rocket3.stop(); this.next.mouseEnabled = true; this.ans2.mouseEnabled = false; this.ans3.mouseEnabled = false; this.ans2.answer2.color = ("#00ff00"); this.ans1.answer1.color = ("#cd0000"); this.ans3.answer3.color = ("#cd0000"); } this.ans2.addEventListener("click", f2_MouseClickHandler.bind(this)); function f2_MouseClickHandler() { this.rocket1.play(); this.rocket2.stop(); this.rocket3.stop(); this.next.mouseEnabled …

Member Avatar
+0 forum 0

Hello everyone How to fetch data from PostgreSQL to WXpyhon GUI to automaticaly open the next processe ? Thanks

Member Avatar
Member Avatar
+0 forum 1

Where is the section to post code snippets?

Member Avatar
Member Avatar
+0 forum 3

I often use the Parallel port (D-Sub DB-25 female) of PC to communicate with MCU or a processor card with my unique and self developed software and interface circuit . Now it looks like I've found a functional bug in the USI hardware of AVR ATtiny45/85 MCU. I wanted to read the received bytes from the USIBR register instead of USIDR to take advantage of what was being written in data sheet of Atmel (today Microchip's). Here is a quote from 2586Q–AVR–08/2013 data sheet of ATtiny25/45/85([http://www.kynix.com/uploadfiles/pdf8827/ATTINY25-15MT.pdf](http://www.kynix.com/uploadfiles/pdf8827/ATTINY25-15MT.pdf)): > " Instead of reading data from the USI Data Register the USI Buffer …

Member Avatar
Member Avatar
+0 forum 1

I want to fetch invoice data from two tables table a is in single row and table b data should be multiple rows single data is fetching correctly but facing problem with table 2 multiple data fetch. php file <?php $connection= mysqli_connect("localhost","root","","invoice"); $invID = $_POST['ID']; $Invo = "SELECT a.in_no, a.client, a.add, a.Date, a.subTotal a.gTotal, b.id, b.item, b.quantity, b.price from invoice a, invoiceItems b where a.in_no = b.in_id AND in_no = '$invID' "; $runQuery = $connection->query( $Invo); if($runQuery->num_rows > 0) { $result = $runQuery->fetch_array(); } // if num_rows $connection->close(); echo json_encode($result); ?> js file function Invoice (ID = null) { if(ID) …

Member Avatar
Member Avatar
+0 forum 1

The End.