64,152 Solved Topics
Remove Filter ![]() | |
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? | |
![]() | #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 … |
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> … | |
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. … | |
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 … | |
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 … | |
class Nines { public static void main(String[] arguments) { for (int dex = 1; dex <= 200; dex++) { int multiple = 9 * dex; System.out.print(multiple + " "); } } } | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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) … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
<?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 … | |
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 … | |
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 … | |
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 … | |
![]() | 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?&u=http%3A%2F%2Fwww.yoursite.com+++++"></script> <!--Daily Traffic Rank Trend--> <img src="http://traffic.alexa.com/graph?&w=400&h=220&o=f&c=1&y=t&b=ffffff&r=1m&u=yoursite.com&"> <!--Daily Reach in Percent--> <img src="http://traffic.alexa.com/graph?&w=400&h=220&o=f&c=1&y=r&b=ffffff&r=1m&u=yoursite.com&"> <!--Daily Page Views--> <img src="http://traffic.alexa.com/graph?&w=400&h=220&o=f&c=1&y=p&b=ffffff&r=1m&u=yoursite.com&"> i want to insert them in html form with few button for every chart and want … |
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? ![]() | |
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 … | |
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 … | |
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 … | |
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); … | |
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.. | |
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 … | |
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 | |
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 | |
How can i give an icon to the exe file produced after executing my code?? is it possible?? | |
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 … | |
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"> … | |
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 | |
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 … | |
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 … | |
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. … | |
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 … | |
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? | |
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 … | |
Can anyone give a simple example for GCM server and how to use it. Thanks in advance | |
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 … | |
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, … |
The End.