64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for rahul.ch

A question that I came across: Q: Can you pass a double to a method when it's argument is a float? A: No. Regardless of the double value, a double-sized variable is too big to fit in a float, so it can't be implicitly cast. Doubt: Shouldn't narrowing happen implicitly?

Member Avatar for JamesCherrill
0
208
Member Avatar for 111100/11000

#include <iostream> #include <string> #include <cmath> using namespace std; //global varibals: char entered_characters[9999]; int direction_of_rotor1; int direction_of_rotor2; char alphabet_of_rotor1[26]; char alphabet_of_rotor2[26]; char rotor1_backward(char Letter); char rotor1_forward(char Letter); char rotor2_backward(char Letter2); char rotor2_forward(char Letter2); char print(char print_char); int main() { cout << "This is enigma machine:" << endl; cout << "*NOTE:This …

Member Avatar for WaltP
0
217
Member Avatar for <M/>

I wrote the code for a jquery slider... it doesn't seem to work... can someone tell me why it doesn't work??? Could it be because jquery is installed wrong or it can't find it? Here is my code (I did this all in 1 file) <title>Slider</title> </head> <script src="jquery-1.7.2.js" type="text/javascript"></script> …

Member Avatar for JorgeM
0
164
Member Avatar for mtho

Hi guys. I want to insert an advert after the first article on my blog. It's not a wordpress or other generic blog. I have an idea on how i should do it but it just doesn't work when i try. I use a do-while loop to call the articles. …

Member Avatar for mtho
0
101
Member Avatar for alaa sam

Hi everyone well currently I am working on a simple malloc and free implementation but I am facing some problems . I get a segmentation fault this is my output inserting node 0 0xc87000 inserting node 1 0xc87014 inserting node 2 0xc87028 inserting node 3 0xc8703c inserting node 4 0xc87050 …

Member Avatar for alaa sam
0
213
Member Avatar for Gé48

Hello I am new here as well as with vb2008xpress and I have a question. I have a datagridview with 12 columns and 30 rows I want to use as a scoreboard for a game (no need to input or save data). Columns are for the players and rows for …

Member Avatar for arcjamesneo
0
268
Member Avatar for chotep

class Nines { public static void main(String[] arguments) { for (int dex = 1; dex <= 200; dex++) { int multiple = 9 * dex; System.out.print(multiple + " "); } } }

Member Avatar for chotep
0
171
Member Avatar for triumphost

I currently use this to serialize data, write it to shared memory so that another program can reconstruct it and use it: template<typename T> void Serialize(unsigned char* &Destination, const T &Source) { CopyMemory(Destination, &Source, sizeof(T)); //Destination += sizeof(T); //Not sure if to add this or not. } template<typename T> void …

Member Avatar for triumphost
0
106
Member Avatar for yeeitsneo

soooo. i saw a working code for a hindu arabic - roman numeral converter. the thing is. i need to fully understand the code. so i need someone who could explain the code clearly to me. line by line as for me to fully understand the program. newbie here. you …

Member Avatar for yeeitsneo
0
500
Member Avatar for hughesadam_87

Hi, I have an object subclass that I am using with a cusom __repr__() method. class NewClass(object): def __repr__(self): return ', '.join('%s=%s'%(k, v) for (k,v) in self.__dict__.items()) This works fine (leaving out some more details about my program): test=NewClass(a=1,b=2) print test a=1, b=2 But what I really want for reasons …

Member Avatar for hughesadam_87
0
184
Member Avatar for rotten69

Hi everyone, I was in a group meeting for a project and my group members were talking about minimizing the number of tables and having two big tables and one or two small tables connected to the main big ones. The question is : What is better to have less …

Member Avatar for rotten69
0
133
Member Avatar for adishardis

I'm trying to get a flot graph to show my jsonencoded array seen below: [["aa",71],["ab",69],["ac",66],["ad",61],["ae",79],["af",78]] In the array the first is what i want on the xaxis and the second is the corresponding value. Right now my flot graph outputs an empty chart and I'm thinking that the array need …

Member Avatar for adishardis
0
1K
Member Avatar for glao

I am trying to implement periodic boundary conditions for 2d lattice. I did: int boundary2d(int xpos,int ypos,int stepx,int stepy){ int x=4,y=4; //grid size int **matrix; //the grid matrix int i=stepx+xpos; int j=stepy+ypos; if (i<0) { do { i+=Nx; }while (i>Nx-1); } if (i>Nx-1) { do{ i-=Nx; }while(i>Nx-1); } if (j<0) …

Member Avatar for glao
0
1K
Member Avatar for logicaweb

I'm trying to make multiplication in web shop that will show real price: **discount * tax * product price * 1 piece= real price** But I just don't know how to do it, I try 1 million things, spend about 48h just to make it, but, without success, no matter …

Member Avatar for logicaweb
0
327
Member Avatar for powerdink

Hello, Please help. Below is my assignment and the code I've got so far. I'm still getting errors on overloading the member function on the printDay and prevDay. Design and implement a class dayType that implements the day of the week in a program. The class dayType should store the …

Member Avatar for Brandon5122
0
6K
Member Avatar for devianleong

function returnnotify(){ $result = mysql_query("SELECT * FROM rentcustomer WHERE Expiredtime = CURDATE()"); $count = mysql_num_rows($result); if ($count >= 1){ echo $count; }else{ echo "0"; } } now when I run the code above ,it will prompt out this error: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in …

Member Avatar for pritaeas
0
253
Member Avatar for Szabi Zsoldos

Guys, I'm having a problem with the Magento Platform. Trying to build an auto-populated option with Ajax, it works flawless in a simple folder outside Magento. But with Magento, it's not populating from data.php <script type="text/javascript"> jQuery(document).ready(function(){ jQuery("select[name='marca']").change(function(){ var optionValue = jQuery("select[name='marca']").val(); jQuery.ajax({ type: "POST", url: "data.php", data: ({marca: optionValue, …

Member Avatar for sonamhudson
0
235
Member Avatar for angelic_devil

i want to create a folder on server using php and make it writable so tht i can upload files to it using form... can someone help me with script on making folder and making it writeable on server. thanx

Member Avatar for vikramrawale
0
1K
Member Avatar for piero.costa

Hi guys, I'm learning C and I still don't have some concepts very clear in my mind. I have to create a program that get the values from ARGV[] and puts into a vector: the program would work like that: ./program file1 file2 file3 My idea was to do something …

Member Avatar for Ancient Dragon
0
4K
Member Avatar for PhilEaton

I need to order these dates in descending order (last should be first) and in fact how they now appear. However they do not necessarily appear like those so I need a SQL Order By clause to order these descending: 2012-01-23 09:53:24.097105 2012-01-20 17:31:57.565458 2012-01-20 17:01:09.154587 2012-01-20 16:28:40.685735 2012-01-16 12:03:54.99954 …

Member Avatar for JorgeM
0
493
Member Avatar for dirkleonschut

Hello People. I would like to ask you're assistance with a little problem I am having. When I execute this code: string sql2 = "INSERT INTO worlds (worlds_ID,worlds_active,worlds_name,worlds_x,worlds_y) VALUES ('', '1', 'Test', '250', '250');"; MySqlCommand cmd = new MySqlCommand(sql2, OpenCon()); addtolog("server", "World Created"); it does not make the new row …

Member Avatar for dirkleonschut
0
195
Member Avatar for tensity

Hello, I am trying to read text from a simple text file. The text file contains a list of emails and zipcodes, formated as follows: email@site.com;zipcode where zipcode is 5 integers. I am having an issue with the getline function, my error is "no instance of overloaded function". Could someone …

Member Avatar for tensity
0
217
Member Avatar for arunpawar

I am trying to get into php object oriented programming. <?php class myClass{ public $myVar="this is demo"; public function myTextdemo(){ echo $myVar; } } $obj= new myClass; echo $obj->$myVar; ?> It says > Fatal error: Cannot access empty property on line 11 What's wrong with my code?

Member Avatar for arunpawar
0
178
Member Avatar for Riu 2009

<?php $title=$_POST["title"]; $theme=$_POST["theme"]; $con=mysql_connect($dbserver,$dbusername,$dbpassword); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname, $con); $query=mysql_query("SELECT * FROM setup WHERE id=".$_SESSION['id']); $result = mysql_query($query); $num_rows = mysql_num_rows($result); if ($num_rows > 0) { while($row = mysql_fetch_array($result)) { $_SESSION['id'] = $row['id']; $_SESSION['title']=$title['title']; $_SESSION['theme']=$theme['theme']; } { mysql_query("UPDATE setup SET title='".$title."' , theme='".$theme."'WHERE …

Member Avatar for Riu 2009
0
1K
Member Avatar for satnav_8

I'm trying to write a script that will search a page for mp3 files, and download the first one. All is fine, but when I'm finding the links the first two are not mp3 files. At the moment I'm doing: for link in page.findAll('a')[:3]: f.write(link.get('href')) This finds the first 3 …

Member Avatar for satnav_8
0
136
Member Avatar for Twist43

Hi I have always been a windows user but a few months ago switch to Ubuntu Linux. I have started learning Python and want to find out from experienced developers what the best way is to setup a development environment on a Ubuntu machine. I am running Ubuntu 12.04 which …

Member Avatar for Twist43
0
186
Member Avatar for Alochai

IDC_FUNCTIONALITY MENU BEGIN POPUP "&File" BEGIN MENUITEM "E&xit", IDM_EXIT END POPUP "&Help" BEGIN MENUITEM "&About ...", IDM_ABOUT END END This is an example of a part of the default Foo.rc file distributed with VisualC++ 2010(Express), this is how this section of code was shipped. I'm interested in knowing why Exit …

Member Avatar for Alochai
0
138
Member Avatar for nova37

hello i got alexa charts links from internet today <!--Daily Traffic Rank Trend--> <script language="JavaScript" type="text/javascript" src="http://xsltcache.alexa.com/traffic_graph/js/g/b/6m?&amp;u=http%3A%2F%2Fwww.yoursite.com+++++"></script> <!--Daily Traffic Rank Trend--> <img src="http://traffic.alexa.com/graph?&amp;w=400&amp;h=220&amp;o=f&amp;c=1&amp;y=t&amp;b=ffffff&amp;r=1m&amp;u=yoursite.com&amp;"> <!--Daily Reach in Percent--> <img src="http://traffic.alexa.com/graph?&amp;w=400&amp;h=220&amp;o=f&amp;c=1&amp;y=r&amp;b=ffffff&amp;r=1m&amp;u=yoursite.com&amp;"> <!--Daily Page Views--> <img src="http://traffic.alexa.com/graph?&amp;w=400&amp;h=220&amp;o=f&amp;c=1&amp;y=p&amp;b=ffffff&amp;r=1m&amp;u=yoursite.com&amp;"> i want to insert them in html form with few button for every chart and want …

Member Avatar for Taywin
0
212
Member Avatar for shanki himanshu

struct node { int info; node *left,*right; }; int main() { struct node *root; root = (struct node*)malloc(sizeof(struct node)); root->info=NULL; root->left=NULL; root->right=NULL; if(root==NULL) printf("%d",root->info); return 0; } why it doesnt print root->info?

Member Avatar for I_m_rude
-1
158
Member Avatar for triumphost

Hey guys, I have two structs and I have two functions in two DLL's. DLL-A is attached to a process and collects data. When the data is requested by DLLB which is attached to a second process, DLLA maps the data for B to read. The problem is, I cannot …

Member Avatar for triumphost
0
957
Member Avatar for PhilEaton

0 down vote favorite I am trying to write a script that will return the latest values for a unique documentid-physician-patient triplet. I need the script to act similar to a group by statement, except group by only works with one column at a time. I need to date and …

Member Avatar for PhilEaton
0
217
Member Avatar for Squidge

Hi all, I am working on a generic form validation class. However I have hit a stubling block. Form fields will never be the same from user to user. Is there a work around for this? Would it be easier to use numerical values for field names and use multiple …

Member Avatar for Squidge
0
205
Member Avatar for Mike Askew

I am currently running a live 'in-memory' XSLT transformation using the following code XmlDocument XmlDoc = new XmlDocument(); XmlDoc.LoadXml(DS.GetXml()); XslCompiledTransform XsltTranformation = new XslCompiledTransform(); XsltTranformation.Load(@"C:\Users\maskew\Desktop\XSLTMapping.xsl"); Stream XmlStream = new MemoryStream(); XmlDoc.Save(XmlStream); //Stream is still blank after this line XmlReader XmlRdr = XmlReader.Create(XmlStream); MemoryStream stm = new MemoryStream(); XsltTranformation.Transform(XmlRdr, null, stm); …

Member Avatar for Mike Askew
0
585
Member Avatar for coroll

Hi, I want to get the object of the currently open JFrame? I found this Frame[] frames = Frame.getFrames(); Does this provide the open frames? If so how to get the frame that i need. Plz Help..

Member Avatar for stultuske
0
121
Member Avatar for xbat

I on my drop down boxes it keeps on selecting more than one option I just want it to select out of one row... for some reason this won't work nothing shows - $query["cost1"] = "SELECT ourprice as text, ourprice as value FROM `fruitinventory` WHERE seeddescription='%s' AND fruitdescription='%s'"; Something shows …

Member Avatar for xbat
0
198
Member Avatar for M.Waqas Aslam

hello ! i want to disable my usb port using c# or vb.net ,is it possible to do so using .net ? if yes then any idea how i can do this ? Regards

Member Avatar for M.Waqas Aslam
0
96
Member Avatar for titusnainggolan

I have the code below #include <stdio.h> int main(){ float n; scanf("%f",&n); printf("%f",n); return 0; } Then, I run the code input: 45321.56 is not same with output:45321.558594 I want to get output which same as the input. How to solve this problem? Thank you

Member Avatar for WaltP
0
376
Member Avatar for Vish0203

How can i give an icon to the exe file produced after executing my code?? is it possible??

Member Avatar for Vish0203
0
113
Member Avatar for Sneaky Pete

Hello, I've got a question about some mathematics in VB.net. I really hope someone can help me out! On a form i've got two textboxes. Users can give input (numbers) and the numbers are like this: 0.000 or 250.000 or 36547.256, etc. The numbers are converted to a string for …

Member Avatar for Sneaky Pete
0
238
Member Avatar for <M/>

I was creating a jQuery slider and I can't get the slider to even work... Can someone help me out with this question? Much appreciated if anyone can help!... Here is my code: HTML: <div id="slider img"> <div id="slideshow"> <div> <img src="img1.png"> </div> <div> <img src="img2.png"> </div> <div> <img src="img3.png"> …

Member Avatar for <M/>
0
172
Member Avatar for adishardis

Hi everybody, I really should know this but I can't get it to work... :-O I'm just trying to call a page based on the username of the person who is logged in! <?php include ({$session->username}/file.php\); ?> Preparing to feeling stupid... Peace Adam

Member Avatar for adishardis
0
124
Member Avatar for DaveyMoyes

Hi all, I have a facebook page tab application that is hosted on my server. If I navigate to the FQD location the page will load as you would expect. What I would like to do is detect if the page is being loaded inside an iframe, ie. being displayed …

Member Avatar for DaveyMoyes
0
4K
Member Avatar for newuser17

Hi Experts, I am searching for a way to edit web.config connection strings using .msi file. Since it needs to be installed by other people. I dont want others to explicitly go into file and edit the server address and db username and password. I want to have a nice …

Member Avatar for newuser17
0
544
Member Avatar for K.os

Hello! first of all i'm a **newbie **and don't know much about visual basics. I'm using **Visual Basics 2008** and i'm having a problem. It is that i don't know how to generate a search through my 'cmdsearch' i browse on internet but got nothing that approach to my expectations. …

Member Avatar for jemz
0
111
Member Avatar for apanimesh061

There is a list urls like "http://books.rediff.com/categories/travel/general/2288" I wish to find out whether they start from "http:/" or are relative urls starting from "/", if true store them in an array ! ... if (strpos($html->href, 'http://') <= 0) { array_push($urlarray, $link->href); } ... This does not work .... How should …

Member Avatar for apanimesh061
0
159
Member Avatar for Zagal

Hi, I have some jQuery code which checks whether capslock is on, but it works only with .keypress(). I want to alert when document is ready, not when im filling input. Is it possible to check status of capslock and alert the user without filling the input?

Member Avatar for ssantoshreddy
0
107
Member Avatar for glao

Hello , i am trying to understand how periodic boundary condition works.Of course, i understand what it is and how it works,just i am trying to implement it in c++ and i have some problems.( for now i want to make it work in 1d but i want it for …

Member Avatar for glao
0
3K
Member Avatar for *sharath*

Can anyone give a simple example for GCM server and how to use it. Thanks in advance

Member Avatar for peter_budo
0
81
Member Avatar for MasterHacker110

By C++ game engines i mean the language that the game is programed in is C++. I know irrlicht but it aint good for very big games becuase you have to code where everything is. At the moment i am using Unity but the language looks like C#. So what …

Member Avatar for mihbd1207
0
487
Member Avatar for sandorlev

Hey guys! I've started writing a 2d platformer game some days ago, and I'm really enthusiastic about it, but I already failed to live up to my own expectations: I just cannot possibly think of a way I could make my character jump. I used the MVC desing is why, …

Member Avatar for 3e0jUn
1
342

The End.