Member Avatar

I have written a code to generate bar codes and saved them to a pdf file . The code executes successfylly but the PDF file does not open saying giving an error whome picture I am uploading. Please see my code and Picture with the error. ![barcodeError.PNG](/attachments/large/4/466b7c7d36a50fd6f88d0a7f157907c8.PNG) public void createPDF(String pdfFileName,String myString) throws FileNotFoundException{ Document doc = new Document() ; PdfWriter docwriter = null; try{ docwriter = PdfWriter.getInstance(doc, new FileOutputStream("C:\\Users\\hp430\\Desktop\\barcodes\\"+pdfFileName)); doc.addAuthor("Saboor Siddique"); doc.addCreationDate(); doc.addProducer(); doc.addCreator("SunSoftTechnologies"); doc.addTitle("Barcode Test"); doc.setPageSize(PageSize.LETTER); doc.open(); PdfContentByte cb= docwriter.getDirectContent(); Barcode128 code128 = new Barcode128(); code128.setCode(myString.trim()); code128.setCodeType(Barcode128.CODE128); code128.setBarHeight(5f); code128.setX(0.1f); Image code128Image = code128.createImageWithBarcode(cb, null, null); code128Image.setAbsolutePosition(10, 700); code128Image.scalePercent(125); …

Member Avatar
+1 forum 3
Member Avatar

Hi! It's been a while since I last posted here. I've just gotten started with Windows Service, and have created a sort of 24/7 service to update a database. But because it's my very first project (besides the tutorial one) I feel that I could use some assistance in checking it over. The intent is to have it run a method from a class at about once every 24 hours. If anyone of you clever people could spare a moment to see if I've made mistakes. (Ignore the database connections. Those work) Imports System Imports System.Timers Imports System.Runtime.InteropServices Public Class …

Member Avatar
+0 forum 3
Member Avatar

Hello everyone, I want to put my *string[]* (array uni dimensional) of values in to excel row and every time the first number of this array was different of "500", the program will add another row with the values on the excel sheet. I only have on the program to system reads a file and next save it to an array, show to user the values, create a workbook and sheet without anything and just this. Workbook machine = new Workbook(); machine.LoadFromFile(@"..excel.xls"); Worksheet sheet = machine.Worksheets[0]; string[] numbers = System.IO.File.ReadAllLines(@"..txt.txt"); for (int i = 0; i < numbers.Length; i++) { …

Member Avatar
+0 forum 1
Member Avatar

Hi everybody, What tools should I consider for a new call centre? Suggest the essentials that are necessarily required for a Call Center to have.

Member Avatar
+0 forum 8
Member Avatar

Hi everyone, I am working on a project (just started) in PYTHON and I want to create a keylogger for 2 languages english and greek. For this I have created the below (it is under "construction") code. from pynput.keyboard import Key, Listener from langdetect import detect from pynput import keyboard def on_press(key): global string if key == keyboard.Key.esc: #if button escape is pressed close the program listener.stop() elif key == keyboard.Key.space: print(string) string="" else: string = ''.join([string,str(key).replace("'","")]) string="" controller = keyboard.Controller() # Collect events until released listener = keyboard.Listener(on_press=on_press) listener.start() I run it and all good until I change the …

Member Avatar
+0 forum 3
Member Avatar

If you made a list of "If I knew then (when I got started) what I knew now," what would you include?

Member Avatar
+0 forum 3
Member Avatar

hi there i have some python coding which i need to convert to java can ne1 help me please email me back if you can help then i will show you the coding much appriciated

Member Avatar
+0 forum 10
Member Avatar

Hi, Good Evening to everyone! I am preparing one application facing some challenges, the scenrio is to send email when a user enter a complaint in the system to the assigned user the assigned user have email address already in the system the email notification should go to assigned user alongwith Complaint ID and complaint detail. then if after 30 minutes no one updates the status the system should send another notification to next level after 1 hour if still status not updated the system should send email notification to final level. could you please help me with code sample …

Member Avatar
+0 forum 3
Member Avatar

I want to build a client applications for desktop with NET Framework and MySQL database. i can create new project with windows form control library or windows forms app. What is the difference between this to options? Which of the two do you recommend using and why? thank you in advance, André

Member Avatar
+0 forum 2
Member Avatar

I worked about 2 weeks with OpenTK and I like to know how to texture triangles. I like to give my program, the flexibility to make shapes like triangles, cubes, spheres and to give them different textures (or shaders). I like to give my window a icon, but it says that I have this error: "Exception Unhandled, System.ArgumentException: 'Argument 'picture' must be a picture that can be used as a icon.'". This exception was originally thrown at this call stack: System.Drawing.Icon.Initialize(int, int) System.Drawing.Icon.Icon(string, int, int) System.Drawing.Icon.Icon(string) obamaExperimentingV1_14.ObamaBattlezCSharp.Main(string[]) in Program.cs I am really thankfull if someone helps me or ask some …

Member Avatar
+0 forum 2
Member Avatar

Hi. im developing a loan processing system using mvc c# asp.net. One of the requirements of the system is to perform a credit history check on the customer applying for a loan. so this is how it works: -the customer applies for a loan. the customers id number gets stored in the id document table in the database. -since we can't automate the credit history heck process, the information is sent to an excl file so the employee then enters the customer's ID number in the system they have to do the necessary check. -so the employee clicks on the …

Member Avatar
+0 forum 6
Member Avatar

So, I am a post grad student in the software development field, and I am not working at the moment, but I have some questions on Business Rules, User Stories, etc. So I was wondering if perhaps we could open up a discussion here on some of the common business problems that programmers typically run into in their fields, and what sorts of user stories could be useful for an entry level programmer to pursue in their development career. I have an example; Recently I rode in a cab. While in this cab we had to wait for a truant …

Member Avatar
+0 forum 3
Member Avatar

New to asking help but I'm desperate. I have most of the code I just need advice and also how to put the value from the file into the array and then pass to the functions without using any strings or string header. Basically trying to make this work and I'm stuck. #include <iostream> #include <iomanip> #include <fstream> //Array Size Set const int ARRAYSIZE = 25; using namespace std; //Declaring Function Prototypes char findComplement(char,char); char findmRNA(char,char); bool isPalindrom(); char displayResults(char,char,char); int main() { //Declaring Arrays with constant size of 25 char dnaArray[ARRAYSIZE]; char comArray[ARRAYSIZE]; char rnaArray[ARRAYSIZE]; int size=0; int i=0; …

+0 forum 0
Member Avatar

Hi. I just installed Code Blocks. I want to just get started with programming. It seems that I have to configure Code Blocks therefore, setting up a compiler. How should this be done? Help Leon

Member Avatar
+0 forum 4
Member Avatar

Python-wxPython Tutorial This tutorial will take you through the basics of wxPython. ##Introduction: Let's face it. I am a dinosaur. I got my computer science degree in the mid 70s. And it won't be long before **I** am in **my** mid 70s. So why am I trying to learn Python? Mostly because learning new things keeps my brain active. And besides, nobody on Daniweb seems to be asking questions about vb.Net anymore. So I thought I'd give it a try. After a few weeks of puttering I managed to learn enough Python to rewrite all of my vbscripts (stop laughing, …

Member Avatar
+8 forum 28
Member Avatar

How can I show a div when menu item is clicked in angular? The Div show fine when I click list item, but dsn't disappear when I navigate to other menu items. <li><a class="nav-link slots" (click)="showme = true" >Slots</a> <div ng-hide="showme"> <div class="ribbon" *ngIf="game.categories[0]"> <span>TOP</span> </div> <div class="ribbon" *ngIf="game.categories[2]"><span>NEW</span></div> </div> TS file: showme : boolean = false;

+1 forum 0
Member Avatar

I'm looking to write a program that should be capable of holding around 1000 records, each record will contain a varying number of fields and values. Usually, I'd create a list of dictionaries for something like this but wanted to know if that's the right way to go about it. This data will be routinely sorted and searched. For something of this volume, is it better (from a performance perspective) to use an SQL database or can I build an equally fast solution in Python. What does industry use? Can I get better performance implementing a different type of data …

Member Avatar
+0 forum 3
Member Avatar

I have been 2 player programming othello. The program checks for possible areas to place piece "O" and flips pieces. I have got the code for "X" ready too but I can't get the program to switch to player2 "X" and execute code associated to it. Can someone help? class Grid { private int p1numberofmoves = 0; private int p2numberofmoves = 0; private const int BOARDSIZE = 9; private const string White_piece = "X"; // computer piece private const string Black_piece = "O"; // player piece private const string Player2 = "X"; private const string Player1 = "O"; private const …

+0 forum 0
Member Avatar

Hi. I want to detect a face and draw line exactly around the face to crop it. I searched a lot and used the EmguCV face detector. but now my code just draw a "rectangle" around the face and if I crop it, I will have a rectangle with a face inside it and it's not useful for me. this is the core of my simple code: CascadeClassifier _cascadeClassifier = new CascadeClassifier(Application.StartupPath + "/haarcascade_frontalface_alt_tree.xml"); using (var firstImage = Image.FromStream(saveImageStream)) { var bgrImage = new Image(new Bitmap(firstImage)); Image grayFrame = bgrImage.Convert(); var faces = _cascadeClassifier.DetectMultiScale(grayFrame, 1.01, 1, Size.Empty); foreach (var face …

Member Avatar
+1 forum 4
Member Avatar
Reusable Code Snippet Playing wav over modem

This code will call a phone number and try to play a wav file. It sounds like a man on a CB that you cant understand. It should be a woman voice. I dont know if its the flo control or something else. Does anyone have any ideas?

Member Avatar
+0 forum 19
Member Avatar

Hi all, here is a small program I have worked on over these last two days, I have submitted it in the hopes of some constructive criticism and suggestions (please be kind, this is one of my earlier C projects lol). This is a small console application that simulates a contact management database. The data that a user inputs is saved to an external dat file (contactdatabase.dat) which is created the first time a user saves and exits. This project also employs the use of Malloc(), which is used to allocate memory on the fly (at runtime) for dynamic data …

Member Avatar
+1 forum 6
Member Avatar

Hi all, I'm having some issues with the Scanner not waiting for input from the keyboard. The first method processChoice takes the userChoice and the idea is that in the switch statement there is a call to a method getUserInputForProcessing that takes the action and there scanner takes an input but it's not passing the control to the keyboard, it goes directly to the Exception because nextLine is empty, not entirely sure why. Is that because it's inside a switch statement? public void processChoice(int userChoice, BookManager bookManager) { switch(userChoice) { case 0: System.out.println("Goodbye."); System.exit(0); break; case 1: System.out.println("You chose READ"); …

Member Avatar
+0 forum 9
Member Avatar
Reusable Code Snippet A countdown timer in c++

here is a wonderful short program to try out! A COUNTDOWN TIMER

Member Avatar
-2 forum 7
Member Avatar

Good Day i'm not new to this community but i haven't been in participation of anything relating to programming for year but now i'm interested in learning Python Programming language and i believe with your help i can achieve it. Please if there is any group chat (Whatsapp) that can make me learn very fast i don't mind joining (+2348071718666). I wish to develop programming skills now and i believe in Dani web. Thanks in anticipation.

+0 forum 0
Member Avatar

What are all num referring to ? class Sample { int num; void method() { num = 1; int num = num = 2; num = 3; } }

Member Avatar
+0 forum 4
Member Avatar

Help i need to have 3 login attempts then the program will lock down but the message box shows up 3 times consecutively, it will close then pops out it will do this for 3 times then it closes ... help pleassseee :( Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click Dim un, pw As String Dim counter As Integer = 0 un = txtUsername.Text pw = txtPassword.Text Do If un = "student" And pw = "21217" Then Me.Hide() CourseStudy.Show() Else counter = counter + 1 MsgBox("Try again", MsgBoxStyle.Critical, "Acess Denied") txtPassword.Text = "" txtUsername.Text = …

Member Avatar
+0 forum 1
Member Avatar

I’m stuck at a problem. I want someone to help me with how to proceed further? I’m working on a problem in C++. Its main idea is as follows. I have a buffer(vector in my case) in which each item holds 4 values. 1. start line 2. end line 3. start index 4. end index I’ll receive a line of data. Each line is capable of holding 4096 float values. my program has 4096 such lines spread over 360 degrees. Step 1: I’ll receive 4096 float values. call it as line 1. it can contain a mix of zero and …

+0 forum 0
Member Avatar

Tyl is a programming language that is intended for curious people who are interested in software development, as well as for intermediate and experienced developers who want to try a different programming language. Some of Tyl features: - Clean code - Symbolized keywords - One-line statements - System modules & functions - Cascaded variables declaration - Automatic type inference Tyl Software includes the following modules: - Tyl Symbolizer - Tyl Parser - Tyl Statement Generator - Tyl Launcher - Tyl Compiler - Web Files Generator & Automation Details can be found at: Tyl Official Website: https://tyl-lang.dev Twitter: https://twitter.com/TylLang (@TylLang) Facebook: …

Member Avatar
+1 forum 8
Member Avatar

I am programming the game Othello in c#. i have managed to generate the grid however the starting pieces are not in the right position. I think it because the indexing from 0 when I want it to start from 1. Can someone try and help me out. private const string White_piece = "X"; // players piece private const string Black_piece = "O"; // computers piece private const string Empty = " "; const int Row = 9; const int Column = 9; private string[,] board = new string[9,9]; public void Draw_Board() // creates the reversi board { // Codes …

Member Avatar
+0 forum 6
Member Avatar

How can I minify my code in here, I am giving each 23 total imageview a eventhandler. code works, but I like to make the code shorter. I tried to use for loops to shorten the code. here is a example what I tried to do: for (int i = 0 ; i < imgArrayList.size() ; i++) { imgArrayList.get(i).setOnMouseClicked(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent event) { selectedTile = i; } }); } but it can't because, the "i" inside the handle method is final. I can't pass the "i" inside the handle method. my goal is, that a specific …

Member Avatar
+1 forum 4

The End.