64,152 Solved Topics
Remove Filter ![]() | |
Hi all. Question about directories i have to send this file to my teacher via email then he will install the app. My problem is if i give him this code ( which work fine on my computer) i have no way of know what drive he will install this … | |
Hi. I have this very weird problem. The function getOps in the code below always returns 0, although it should be returning the ops value which gets calculated correctly. [CODE] int ops; int getOps(int n, int m) { if(m == n) return ops; else if(m - 2 <= n) return … | |
Hi all i have writen a bit of code here to read a line of text from a text file and display it depending on what the user searches for which is taken from a text box. but it will only read one line it will not display all the … | |
Hi.. I want to write a C++ program which reads a text from the user and change any uppercase letter to an lowercase letter and assign them to an stack?? please help.. | |
Im getting this problem with an ld script: [CODE]../Link.ld:8: syntax error[/CODE] Here is the script: [CODE]/* Link.ld */ OUTPUT_FORMAT("binary") ENTRY(start) SECTIONS { .text 0x100000 : { code = .; _code = ,; __code = .; *(.text) . = ALIGN(4096) } .data : { data = .; _data = .; __data … | |
Hey all. At the moment i'm struggling to read a file which contains 4 integers on each line separated by commas. I want to read each line then put them in a list like Text File will look like 1, 3, 7, 9 2, 5, 6, 8 I want it … | |
Hello )) Guys tell me please - in which folder should I put the file ( a few folders in one project), so that the program will be able to "read" it. if the path = "something.txt". Thanks in advance )) | |
good evening)) (At us now evening)) Please answer the question - there's a code fragment - [CODE] public string MAP(string FilePath) { FileStream fs; // объявляем байтовый поток try { fs = new FileStream(FilePath, FileMode.Open); } catch (FileNotFoundException exp) { [B][U]return[/U][/B] exp.Message; } catch { [U][B]return[/B][/U] "not possible to open … | |
Dear All, I have java listener which keep reading for incoming data to the particular port. Most of the times it works fine only at times it gets too many open files error. Below is my codes what could be wrong? Thank you. [CODE]public static void main(String[] args) { try … | |
Hi. I'm trying to make a function that takes nested tuples and returns a list of each nested tuple. I managed to make a function that returns the values of the tuples (which are strings), but cannot figure out how to retrieve the 'subtuples' in a list. Here's what I … | |
I have Python 2.7 installed, and I need to use matplotlib, but it is only available for Python 2.6. Is there any way to have 2.6 and 2.7 installed at the same time or is this asking for trouble? The reason I need matplotlib is I am trying to run … | |
Hey guys! I'm going to start a new project, that will make a simple backup of some hard-to-find files. It'll compress it to a single file (output format will be selectable), but I want it to use a user-defined output dir. Can someone explain me a bit of how to … | |
I already know how to use fstream. I know to save the value variables to a file, and I also know how to make the program display the information in the file, but my problem is that it saves the content of the variable, not the variable itself. Here's what … | |
Could we find the largest among three numbers using 'for' and if? I have the following program, please check it #include<stdio.h> main() { int a,b,c,sum=o,i'; printf("enter the numbers"); scanf("%d%d%d",&a,&b,&c); sum=a+b+c; for(i=sum;i<=sum,i--) { if(i==a||i==b||i==c) printf("%d the greatest"); exit(); }}........please clarify the logic if it is correct to the intention.. | |
i have never imported anything from a .csv file before i have an app that downloads a .csv file from a website and saves it locally (could probably even skip this step and just read it from the website) it then needs to read the .csv file and insert the … | |
Hi all I have one problem. I have created one little admin panel. and when i submitted a post and i refresh it again it automatically posts the post again. it posts as many as i click refresh. who can help me to eliminate this problem. here is my problem. … | |
Hi! I created JToolBar, but it is always attached to JPanel. If I run my api, then I can drag and drop JToolBar in order to separate it from JPanel. I want to programmatically make JToolBar to look as a separate window (e.g. as a toolbar in Photoshop). Does anybody … | |
[B][COLOR="Red"][B]Hi folk, I fairly new to Python 2.7 and Python 3 and like to find out how I would get a print to appear in the middle of the output screen without putting in a load of spaces into a print statement. Please keep it simple for me. Thanks for … | |
[B][COLOR="Red"]Hi all, Clould someone please tell how to use the sorted function or equivalent to this function in Python 3 so that I can sort a dictionary. I cannot find any help on this. Thanks for your time [/COLOR][/B] | |
Can anyone teach me how to assign a empty array to zero? Which means that some of the c[x][y] have not assigned to a value. [CODE]int x = 4; int y = 4; a[x] = {30,40,50,60}; b[y] = {100,20,60,40}; c[x][y]; int i = 0; int j = 0; while(i<x && … | |
Well im currently coding up a paypal payment system to go with a user system for a site, and when someone goes through paypal, paypal pushes info to this script. Problem is, the script does not log anything to MySQL, and I can't figure out why. Anyone here want to … | |
Now, I have another problem about duplication validation of my data in db.. the message "...already exist" if function validate was through. now if I add a new data, same message pop up...and i can't add new data. I try to reverse my return value and I can add but … | |
Thanks to a little guidance here I have written a function for getting part of a string returned. [CODE]function getcontent($tag,$string) { $pos1 = stripos($string, '<'.$tag.'>'); $pos2 = stripos($string, '<'.$tag.'>'); $content = substr($string, $pos1, $pos2); return $content; }[/CODE] [CODE]print $content('row','Hello world <row> bladh </row>');[/CODE] output would be "bladh" | |
Hi! There is JPanel with multiple JLabel components. I would like to change the border color of JLabel component that is clicked on. I tried [ICODE]this.getComponentAt(e.getX(), e.getY()).setBorder(solidBorder)[/ICODE], but it did not work... How could I solve this task? | |
Hi! I'm trying to add dragging and dropping behaviour to JLabel. It works only when I press the mouse for the first time. If I continue pressing the mouse, the error message shown below is generated. Please, help me to find an error. [CODE] JLabel bkg = new JLabel(icon); jLayeredPane.add(bkg, … | |
Hey, I've never really used packages before so I was wondering if what I am doing is possible. i have a package called spacewars with all my classes. I then created another package from that called spacewars.resources. I am not sure what the best way to access those resources is. … | |
Hi, I have this error Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\Program Files\xampp\htdocs\nsubackend\lib\model\classLabType.php on line 9 & same in line 52. here's my code: [CODE]function __construct($id=0){ $con = new connection(); $query = "SELECT * FROM tbllabtype WHERE labtypeID='".$id."'"; $res = mysql_query($query); if(mysql_num_rows($res)>0){ $row = mysql_fetch_array($res); … ![]() | |
Hi again I have an HTML form with three groups of inputs. These inputs are all text. Group 1 has 1 input, group 2 has one input, and group 3 has 3 inputs. What I would like to do is this... If a user inputs any data into a particular … | |
Hi all! I'm putting together a WordPress blog, and I'm trying to make it work with a standard template called "Tribune." It uses custom tags on posts to apply thumbnails and featured images. I can't quite figure out where to place the code in the index file to get it … | |
Hello Members, I have a Class_A which extends a JPanel. This JPanel is inside of a JFrame. In Class_A, I have a series of images (stored in an ImageIcon array) and another image, let's call it Image_A, which is also a ImageIcon type. How do I make Image_A a background … | |
#include "Stdio.h" [CODE]main() { int a,b,c; int count = 1; for (b=c=10;a="- FIGURE?, UMKC,XYZHello Folks,\ TFy!QJu ROo TNn(ROo)SLq SLq ULo+\ UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\ NBELPeHBFHT}TnALVlBLOFAkHFOuFETp\ HCStHAUFAgcEAelclcn^r^r\\tZvYxXy\ T|S~Pn SPm SOn TNn ULo0ULo#ULo-W\ Hq!WFs XDt!" [b+++21]; ) for(; a-- > 64 ; ) putchar ( ++c=='Z' ? c = c/ 9:33^b&1); return 0; … | |
Hey guys; I've been working on a little concept webpage, and it works great in any browser !IE. But, any IE browser will not render the middleAlign DIV's as centered in the web page (like all the other browsers do). Apart from that, and a few other little quirks, it … | |
Hi guys, I'm new to this forum and I have been studying Python for about 2 weeks. I know most of the beginners can solve all their doubts just by looking at the documentation, but even reading about these modules: time, datetime and threading, I wasn't able to solve one … | |
I tried to make a easy google news search api. I know google news api search can show max 8 items per page, and 8 pages(total 64 items). 1.How to add `image{}`(I want to show the news image), I read the document in google official website, but not understand. 2.Can … | |
Hey everyone, I have a Matlab code that parses data from a csv file, performs some calculations on the data, and spits it back out into a new csv file. the new csv file contains all the data from the original file, with the new calculations appended on at the … | |
Hi All, Hopefully someone will have a quick answer for this question, because I'm in the middle of a time critical project and this is a stumbling block. Here is what it is... I have a temp_transaction table (mysql) that has various fields, one of which is a trans_date (datetime) … | |
Ok this is very strange and i cannot see where is the problem and i guess is really easy but i cannot see it so i will need your help :-O My Declarations [CODE]int myGraph[4][4]; int vertices[4]; char path[4];[/CODE] My initialize code [CODE]for(int i=0; i<=4;i++) { for(int z=0; z<=4; z++) … | |
Still stuck on images with php. I want users who are logged in to see the images they uploaded. I got scripts working but the get image file is not bringing image according to specific user. The problem seem to be in the query. I always get the first image … | |
Hi, I'm a bit stumped. I'm trying to find out a way to make a bullet fly from a spaceship. So far, I managed to make it work but it attaches onto the coord's of my ship image(I used the position of this to map the starting position of my … | |
Hi guys, I'm trying to create a 2D array of JLabels my first problem is actually creating them. my code atm is = [CODE] package test; import java.io.File; import javax.swing.JLabel; import javax.swing.JPanel; public class testing extends javax.swing.JFrame { /** Creates new form testing */ public testing() { initComponents(); for(int i … | |
I have the following code for Quick Sort procedure: [CODE] #include<stdio.h> void Quick_sort(int *arr,int left,int right); int Partition(int *arr,int left,int right,int pivotindex); int main() { int a[20],n,ctr=0,j=0; printf("\nEnter number of elements:"); scanf("%d",&n); printf("Enter array elements:"); while(ctr<n) { scanf("%d ",&a[ctr]); ctr++; } Quick_sort(a,0,n-1); printf("\nSorted Array:"); while(j<n) { printf("%d ",a[j]); j++; } … | |
Hello everyone! I am programming a vector which stores a name and a number. [code] typedef pair<int,string> Users_Pair; vector<Users_Pair> Users_Name; [/code] And the vector expands and contracts through out the life of the program. But when I use erase all elements above the one being erased loose their string? I … | |
Hello all. Can anyone here help me create a separate function for the socket() API in socket programming? I successfully created one in Linux before but so far I can't do the same in Windows. The Windows version can't successfully connect using the separate socket() function. My primary suspect is … | |
Please i need someone to help me on how to set my SMTP so that i can send mails. I work in an office that uses intranet and i was given the SMTP server and port no. but i dont know how to configure it. Pls someone help me | |
Hello everyone, im starting on computer science the coming summer. I checked our classes schedule and we start of by Functional Programming in SML. I download the book we gonna use but I cant make sense of it. I guess my question is what do you use 1.Functinal programming for, … | |
so, i want to save my listView Items as i save Location or Size of window in the Project settings. for example: [CODE] private void Form1_Load(object sender, EventArgs e) { this.Location = Properties.Settings.Default.MyLoc; } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Properties.Settings.Default.MyLoc = this.Location; }[/CODE] how can i do that? … | |
Consider the error in following program- [CODE] #include<stdio.h> #include<conio.h> #define MAX 100 struct stacktype { int stack[MAX]; int top; } ; void push(struct stacktype * s,int item) { if(s->top==MAX-1) { printf("Overflow"); return; } s->top++; s->stack[s->top]=item; } int pop(struct stacktype *s) { int item; if(s->top==-1) { printf("UnderFlow"); return -1; } item=s->stack[s->top]; … | |
I am formally studying VB.NET and the teacher has temporarily left us with a textbook to study. In a chapter on Arrays an example of actual code is given, as shown at the bottom here. We use Microsoft Visual Basic 2008 Express edition for our code. However a simple Copy&Paste … | |
...so I'm trying to make a program that takes in the three sides of a triangle and then decides whether the triangle is equilateral, isosceles or equilateral. I have to have 2 different functions and I can't use global variables ( That's what my teacher wants ). My main function … | |
Can somebody help me here? i have managed to import excel data into a datagridview but am having problems saving and updating it. It is saving alright but when it comes to updating that's when i have problems. here is my code: [code] If mysqldr.HasRows Then mysqldr.Close() newcommand = New … |
The End.