64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for m_wylie85

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 …

Member Avatar for iconoclazt
0
162
Member Avatar for moni94

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 …

Member Avatar for moni94
0
204
Member Avatar for m_wylie85

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 …

Member Avatar for iconoclazt
0
122
Member Avatar for Mona..

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..

Member Avatar for Narue
0
204
Member Avatar for jamesl22

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 …

Member Avatar for quuba
0
161
Member Avatar for Drakarus

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 …

Member Avatar for iconoclazt
0
148
Member Avatar for vedro-compota

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 ))

Member Avatar for iconoclazt
0
104
Member Avatar for vedro-compota

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 …

Member Avatar for iconoclazt
0
119
Member Avatar for newbie14

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 …

Member Avatar for newbie14
1
4K
Member Avatar for jjma

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 …

Member Avatar for jjma
0
813
Member Avatar for LanierWexford

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 …

Member Avatar for richieking
0
172
Member Avatar for RenanLazarotto

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 …

Member Avatar for RenanLazarotto
0
84
Member Avatar for Peram

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 …

Member Avatar for Peram
0
237
Member Avatar for Daita

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..

Member Avatar for Daita
0
148
Member Avatar for jlego

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 …

Member Avatar for jlego
0
404
Member Avatar for azegurb

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. …

Member Avatar for azegurb
0
121
Member Avatar for LianaN

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 …

Member Avatar for LianaN
0
137
Member Avatar for FAITH2011

[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 …

Member Avatar for FAITH2011
0
167
Member Avatar for FAITH2011

[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]

Member Avatar for FAITH2011
0
96
Member Avatar for hao90

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 && …

Member Avatar for hao90
0
103
Member Avatar for ddggttff3

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 …

Member Avatar for ddggttff3
0
251
Member Avatar for prettyrein

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 …

Member Avatar for prettyrein
0
131
Member Avatar for Mi-Dia

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"

Member Avatar for blocblue
0
335
Member Avatar for LianaN

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?

Member Avatar for LianaN
0
93
Member Avatar for LianaN

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, …

Member Avatar for LianaN
0
427
Member Avatar for Akill10

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. …

Member Avatar for ~s.o.s~
0
100
Member Avatar for prettyrein

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); …

Member Avatar for diafol
0
222
Member Avatar for terrymold

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 …

Member Avatar for terrymold
0
83
Member Avatar for prezblog

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 …

Member Avatar for Kraai
0
186
Member Avatar for sciprog1

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 …

Member Avatar for sciprog1
0
183
Member Avatar for murtazamzk

#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; …

Member Avatar for Shankye
0
192
Member Avatar for dylank

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 …

Member Avatar for dylank
0
87
Member Avatar for AndersSilva

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 …

Member Avatar for richieking
0
155
Member Avatar for youlichika

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 …

Member Avatar for youlichika
0
210
Member Avatar for by_stander

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 …

Member Avatar for jonsca
0
237
Member Avatar for showman13

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) …

Member Avatar for showman13
0
312
Member Avatar for christos312

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++) …

Member Avatar for christos312
0
154
Member Avatar for phpDave

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 …

Member Avatar for phpDave
0
80
Member Avatar for Akill10

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 …

Member Avatar for JamesCherrill
0
346
Member Avatar for ajst

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 …

Member Avatar for ajst
0
1K
Member Avatar for gaurav_13191

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++; } …

Member Avatar for vinitmittal2008
0
149
Member Avatar for helpfullProgram

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 …

Member Avatar for Narue
0
199
Member Avatar for shinsengumi

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 …

Member Avatar for shinsengumi
0
481
Member Avatar for styleest

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

Member Avatar for Borzoi
0
264
Member Avatar for flasp

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, …

Member Avatar for flasp
0
145
Member Avatar for IDC_Sharp

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? …

Member Avatar for Diamonddrake
0
1K
Member Avatar for gaurav_13191

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]; …

Member Avatar for gaurav_13191
0
183
Member Avatar for frank33

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 …

Member Avatar for kvprajapati
0
242
Member Avatar for networkZombie

...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 …

Member Avatar for Dingbats
0
273
Member Avatar for Steve Mac

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 …

Member Avatar for Steve Mac
0
81

The End.