Member Avatar

Hello, I am working on a simple timer toolbar app in swift for macOS and I am experiencing a visual bug. Basically, I should be able to add any number of timers to the main screen and they should stack on top of each other. Once the space is filled up in the window, a scroll bar appears allowing you to scroll through all the timers. My issue is that when I add the timers, they do not show all the time. I have a hunch it is either some refresh issue or some spacing issue. The blank screen looks …

+1 forum 0
Member Avatar

I just bought a Samsung Slim External DVD Writer SE-S084F. The computer recognizes the drive, but when I put in a cd the drive constantly connects and disconnects while trying to read it. I have went on the website and I followed the installation instructions, but still nothing. Thanks for any help. (I am running Vista 64 bit, and the DVD drive is plugged into a USB hub)

Member Avatar
+0 forum 10
Member Avatar

Hello everyone, I am trying to write an object loader in c++. Currently, I have a file that is made up of many sub objects and I am having a little difficulty figuring out how to process the data. First of all, here is an example of part of the file o shape_brow_Plane.030 v 3.719171 7.430269 -0.000989 v 3.719171 7.366541 -0.000989 v 3.655808 7.366541 -0.000989 v 3.655808 7.430269 -0.000989 v 3.687490 7.361845 -0.000989 v 3.729859 7.398441 -0.000989 v 3.687490 7.435111 -0.000989 v 3.645120 7.398441 -0.000989 l 28 31 l 29 31 l 27 32 l 28 32 l 27 33 …

+0 forum 0
Member Avatar

Hello All, I am having trouble looping through a 2D array in C++ (should be very easy, but I am just starting C++). At the current moment I have this class file #include "Cube.h" #include <freeglut.h> #include <stdio.h> Cube::Cube(int cx, int cy, int cz , int cubeWidth) { int p[][3] = { { cx, cy, cz }, { cx, cy-cubeWidth, cz }, { cx + cubeWidth, cy - cubeWidth, cz },{cx + cubeWidth, cy, cz}, { cx, cy, cz - cubeWidth }, { cx, cy-cubeWidth, cz - cubeWidth }, { cx+cubeWidth, cy-cubeWidth, cz - cubeWidth }, { cx+cubeWidth, cy, cz …

Member Avatar
+0 forum 1
Member Avatar

Hello everyone! I am writing a GA, and I am trying to implement elitism. My problem is an interesting one. I cannot release too much code because it is an ongoing assignment. I have asked the TA, and he is unable to find the solution as of this moment. The assignment deals with solving the TSP. The elite is always the best value in the population. This elite gets placed from the old generation into the new generation in order to keep track of the best result, and hopefully improve it. There are the steps that I do after I …

Member Avatar
+0 forum 2
Member Avatar

Hello Everyone! I am wondering about the thory behind the box blur. I have an assignment, and I wrote a program implementing the box blur the way it was described in my assignment which is "When centered on a pixel, its values are multiplied with each corresponding surrounding pixel values, and then divided by the sum of the matrix values" and then it gave a 3 by 3 matrix of all ones. The code I have works with the r, g and b values separately for an image for both the sum and the product portion of the formula, which …

Member Avatar
+0 forum 4
Member Avatar

Hello All. I am having 2 problems here with my code. I will start off with the video code first. The video code should capture 20 seconds of the screen at 50fps, however, when I generate it, it generates a 1 minute 7 second video, and I am not sure why. The math adds up. I have tried lowering the FPS, but the time is still longer than 20 seconds. The is as follows: import java.awt.*; import java.awt.image.BufferedImage; import java.util.concurrent.TimeUnit; import com.xuggle.mediatool.IMediaWriter; import com.xuggle.mediatool.ToolFactory; import com.xuggle.xuggler.ICodec; public class TestScreenRecord { private static final double FRAME_RATE = 50; private static final …

Member Avatar
+0 forum 6
Member Avatar

Hello Everyone, I am experiencing errors when trying to compile a project in Java 8. The errors are caused by swing components. The code I am using is the following: import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; public class Main2 { public Main2(){ JFrame f = new JFrame (); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setSize(100, 100); JPanel p = new JPanel(); JLabel l = new JLabel("Test"); p.add(l); f.add(p); f.setVisible(true); } public static void main(String[] args) { new Main2(); } } The problems are caused by the p.add(l) and the f.add(p). They throw a `The method add(JLabel) is undefined for the type JPanel` and a `The …

Member Avatar
+0 forum 3
Member Avatar

Hello Everyone. I am wondering if anyone has any experience working with Korean characters. I attempted to find out how to split them up, but I have had no success thus far. What I was thinking is having a character like "안" and having it split up into "ㅇ", "ㅏ"and "ㄴ". I am not sure if this exists in Java. If not, then I will have to make a table myself. If anyone has any idea how to accomplish this, then some simple guidance would be appreciated. Thanks for the help. PS: This is just a side project in case …

Member Avatar
+0 forum 3
Member Avatar

I have a computer that came preloaded with windows 8, and I have noticed that when I leave it on without using it for a while (maybe 15 mins, haven't actually timed it) it will say that I am connected to the internet with internet access, but when I try to use it it displays that I have no internet connection in the browser. If I run the windows diagnosis from the network & sharing center it says that there is no problem with the internet. Then I click search for online solutions and it says I need to connect …

Member Avatar
+0 forum 6
Member Avatar

Good Day. I am currently running into a problem. I have 2 activities. My first activity launches the second one. Once the second one has done some work it calls the finish() method in order to destroy itself. Then my previous activity pops up which is what I would like, however when the first activity pops back up it does not seems to activate any of the methods (onCreate(), onResume, onRestart, onStart). I have all the methods included and logged if they have been executed, which they have not been. What could be the problem? Thank you for your time.

Member Avatar
+0 forum 1
Member Avatar

Good Day. I am relatively new to android programming and I am having problems displaying action Items on my action bar. I can manipulate my actionbar through Java code (show and hide text, Icon and action bar), however when I try to add my own images to the action bar they don't show up. I know it recognizes at least one of the png images as it shows up in android studop, however when I run the code it doesn't display. Is there any java code that I need to insert in order for this to happen? Here is my …

Member Avatar
+0 forum 1
Member Avatar

I am having a problem deleting nodes from my Binary search tree. What I have so far does part of what it is supposed to do. I read in an input (paragraph of text) to create the tree (organized via ASCII character values). I make it, then print out all the elements. Then I need to delete the ones that begin with a vowel. MY algorithm deletes most of the ones that start with a vowel, but I believe that as it replaces values with other ones some of the words slip through. Here is my class. it is quite …

Member Avatar
+0 forum 9
Member Avatar

Hello. I am designing a calculator app as part of a project. I have all the buttons inserted in the correct order. My problem is that the last column of buttons horizontally fills up the rest on the unused screen. As the device size scales, the more and more the buttons strech. I would like it so that all the buttons take on the excess space evenly. What would be the easiest way to accomplish this? What commands should I be looking at. If you need the code I can post it later, however I would prefer not to post …

+0 forum 0
Member Avatar

Hello. I have just purchased a Lexar JumpDrive S50 32 gigs and I am having trouble accessing the USB. The USB shows up in the my computer window with a grayed out icon and when I double click it it states "Please insert a drive". The same statement is displayed when I try to format it. I am using a Windows 8 as my main computer, but I have tried it on a windows vista and windows 7. So far I have tried updating the drivers (through device manager and through Lexar's website). I have also reinstalled the usb drivers. …

Member Avatar
+0 forum 6
Member Avatar

I am wondering how to start drawing a network diagram. The way it was described to me I need to go into the configuration settings of the switches and check what type on connection there is and document where the connection is from, to where the connection is going. Then write it down. Once I have gone through all the switches I need to organize the data, and then produce the diagram from that. Is that the correct way to go about doing it, or is there another procedure to accomplish this task? Thanks for the help.

Member Avatar
+0 forum 4
Member Avatar

I am attempting to make a Dictionary like software. The way this software will work is that You will be able to enter a word into a search bar, and the dictionary will search for the word. It will display the word, the pronunciation and the meaning of the word in the frame. I decided to use an Object Output Stream to read in the words (which will be saved whenever a new word is added). My problem occurs with the encoding used by the ObjectOutputStream when exporting the class. I am using Korean characters in my program, and these …

Member Avatar
+0 forum 6
Member Avatar

I am currently in University studying Computer Science, and I am debating whether or not to buy a server. I have co-op and I am currently working at a company that works with newtorking, programming, etc. and I decided that I would want to learn more about this field even if it isn't my final career path. This server would be used for web hosting (al least my website) with a chance at hosting more websites (for friends), and possibly a dedicated server on the side if the server can handle it. [This](http://www.tigerdirect.ca/applications/SearchTools/item-details.asp?EdpNo=7220574&csid=_61) is the server that I am currently …

Member Avatar
+0 forum 3
Member Avatar

Hello. I submitted [this](http://www.daniweb.com/software-development/java/threads/455615/java-decryption-problem) post a little while ago where I had problems with decrypting what I encrypted. Now my problem is that when I encrypt something and then decrypt it, the decryption works with txt files, but when I try to decrypt microsoft documents, then they will not open. I did a couple of tests, and it seems like any more advanced file will get corrupted (pdf, docx, ppt, etc.) Here is my new code for the encryption package sec; import javax.crypto.*; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import java.math.BigInteger; import java.security.*; public class Cryption { private Cipher c; private SecretKey …

Member Avatar
+0 forum 6
Member Avatar

I am just starting out with c++, but I have a goal in mid. I have already programmed the logical portion of what I wish to acomplish in Java, but it doesn't work, because I can't set a usb to read only for the whole system in Java (if I can;t do this in c++ then tell me now). I have this code and it can read the file fine, but when I write to it and then open the file it doesn't actually write to the file. #include <iostream> #include <fstream> #include <string> using namespace std; int main() { …

Member Avatar
+0 forum 9
Member Avatar

I am attempting to encrypt and string and then decrypt it. I have the encryption part working, but when I try to decrypt it gives me an InvalidKeyException and says that it is missing parameters. Here is the code import javax.crypto.*; import java.security.*; public class Cryption { private Cipher c; private Key k; public Cryption(){ try { c = Cipher.getInstance("DES/CBC/PKCS5Padding"); KeyGenerator kg = KeyGenerator.getInstance("DES"); k = kg.generateKey(); } catch (NoSuchAlgorithmException | NoSuchPaddingException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public String encrypt(String dec){ try { c.init(Cipher.ENCRYPT_MODE, k); String enc = new String(c.doFinal(dec.getBytes())); return enc; } catch (InvalidKeyException …

Member Avatar
+0 forum 4
Member Avatar

I am trying to use java to detect when a USB is inserted and to read from it. I am currently using javax.usb to try to accomplish this however I get this error (line 11) when running my program javax.usb.UsbException: The property javax.usb.services is not defined as the implementation class of UsbServices I have inserted the javax.usb.properties file in the top directory of the jar (which seemed to solve my previous error) Here is my code import java.util.Iterator; import java.util.List; import javax.usb.*; public class Main { public static void main(String[] args) { try { UsbServices serv = UsbHostManager.getUsbServices(); UsbHub root …

Member Avatar
+0 forum 4
Member Avatar

I am wondering how to copy files in cmd, but it isn't that simple. I know how to copy normally, but I would like to combine multiple items(Which I also know how to do). My problem comes in when I try to organize the files into folders My file structure looks like this MainFolder -Output -Images -Files and I would like to combine an image and a a file and put it into the output. If I try copy /b Images/img.png+Files/file.zip Output/out.png It does not work, and gives me a "The syntax of the command is incorrect" If I try …

Member Avatar
+0 forum 1
Member Avatar

Hello Everyone. I am making a sudoku solver for an assignment, and I ran into a problem of my 2D Integer array not updating. The input consists of a 9x9 puzzle with 0s for the missing values. I read this input and then place it into the 2D array. during this process I also count the number of 0s. After I create a 1D Integer array with the length being the number of 0s. I then proceed to link the 0s in the 2D array to one of the elements in the 1D array, which I initialize to 1. I …

Member Avatar
+0 forum 8
Member Avatar

I have a background image placed onto my website using css body { background-image: url(../Images/bg2.png); background-repeat:no-repeat; background-position: center bottom; background-size: 100% 100px; } and I was wondering how I could make it so that if the website is smaller than the browser window then the image sticks to the bottom of the browser, however it it is larger, then it moves to the bottom of the website. Currently I have the code that makes it so with the bottom of the website, however if the site is small (not much information on the page), then the background has white underneath …

Member Avatar
+0 forum 3
Member Avatar

I am attempting to write a very simple chat program to test out ServerSockets and Sockets, the code should work, but when the client make a connection to the server it does not move past the accept method. I know they connected because as soon as I close the client window it says it connected and then gives me errors that it cannot communicate with the client. Server package network; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; import java.io.*; import java.net.*; public class Server { private ServerSocket ss; private Socket clientSock; private BufferedReader read; private PrintWriter write; …

Member Avatar
+0 forum 8
Member Avatar

Hello. I am wondering if it is possible to use a windows 7 upgrade disk on a windows 8 machine. I know you can do a clean install with an upgrade disk, but I am just wondering if upgrading a windows 8 machine to a windows 7 is possible. Thanks

Member Avatar
+0 forum 4
Member Avatar

I am making a game, and I am wondering how to make an image from a graphics object. I have tiles stored in an xml file. I then read from this file to make the level, however I would like to have a thumbnail for each level. This is why I would like to convert. The Graphics portion takes up the whole screen, but the thumbnail would only take up a large amount. I can easily resize the image for this purpose. Hould would I be able to create this thumbnail from the graphics that I read from the file? …

Member Avatar
+0 forum 3
Member Avatar

In my computer engineering class a friend and I have built a wireless robot which can turn and move forward. It is really basic. To make it a little more complex we have decided to put a webcam on the front of it, so that we can control it via the computer or the remote, and either way we can see an image in the computer if it is hooked up. Since it is a computer engineering class we would like to use one of the wired webcams that the teacher has, and make it wireless. Currently we have been …

Member Avatar
+0 forum 2
Member Avatar

I have rescently had one of my usbs stolen, and I am wonering how I could make a file that autoruns no matter if the user wants it or not. this program that I would make would find ips of the computer, and the name of the computer and user, and other non harmful information and email it to my email. then I could find that person and ask for my property back. is there any way that I can do this? Thanks

Member Avatar
+0 forum 8

The End.