Hi I've got most of the code finished but I can't for the life of me figure out how to correctly count neighbors for the edges and corners of the array. These are the rules. If the cell is currently empty: If the cell has exactly three living neighbors, it will come to life in the next generation. If the cell has any other number of living neighbors, it will remain empty. If the cell is currently living: If the cell has one or zero living neighbors, it will die of loneliness in the next generation. If the cell has …

Member Avatar
Member Avatar
+0 forum 10

Hi, I have a requirement where I need to generate the combinations of string based on some rules. For Eg: I have a string like: [x | y] z [A] Possible combinations are, z,ZA,xz,xyz,xzA,yzA The rules are, 1.[],| are symbols. 2.Any text inside [] is optional eg: [x] 3.| means “or” eg:;[x | y] – this means either “x” or “y”. Both cannot come together. 4.Any text outside [] is mandatory eg: z 5. <> Means range and can be ignored eg: <1-512> The text suffix to this operator must be treated as any other combination. Can we store these …

Member Avatar
Member Avatar
+0 forum 1

Okay, so I have a ListView populated by an Array, which is populated by a text file. I also have 3 TextBoxes which are changed to different values in multiple Arrays using the Selected Index. My problem occurs when reloading the ListView after saving the text file. The values from the TextBoxes are used in the text file. What happens is, the index is being changed since the ListView is being cleared, which fires the changed method. Since the ListView is empty now, the Selected Index is -1 which is why I get an Array Index Out Of Bounds Exception …

Member Avatar
Member Avatar
+0 forum 1

So here is the thing its been days since im trying to solve this, i'm debuggin a project from the company i work, its a web system, and here is the thing i have a javascript file which im going to call 'docart.js' and a core file which i will call 'operationscart.cs' so that i need to do is call the following function from the docart.js file for example docart.js file located like so: web/domain/models/docart.js app.viewModel.doCart = { this.AddCharge = function(id,pad){ //code is in here } } So what i want to perform is from the class operationcart.cs i want …

Member Avatar
Member Avatar
+0 forum 1

#include<stdio.h> #include<math.h> int main() { int n,nstart,nstop,nstep,i,j,zNumber; ` printf("Please enter a value of a positive integer nstart: "); scanf("%d",&nstart); printf("Please enter a value of a positive integer nstop: "); scanf("%d",&nstop); printf("Please enter a value of a positive integer nstep: "); scanf("%d",&nstep); printf("Number\t\tzNumber\n"); printf("------\t\t-------\n"); n=nstart; zNumber= double pow(double_n,double_i); while(i<=nstop){ zNumber = 1; i=1; while(i<=n){ zNumber +=i; i++; } printf("%d\t\t%d\n",n,zNumber); n += nstep; } return 0; }

Member Avatar
Member Avatar
+0 forum 9

could you please help me on where i'll get the definition of all the built in function of c#. and the buit in functions that used to create windows application form. Please this is really urgent.....

Member Avatar
Member Avatar
+0 forum 3

What are the factors that decide the cost of SEO ?

Member Avatar
Member Avatar
+0 forum 11

Write the Towers of Hanoi program as a shell script. There are two basic strategies: run the shell script recursively as $0, or write a recursive shell function.

Member Avatar
Member Avatar
+0 forum 1

Hi, i recently begun learning java and encryption. I found some code from a website that is supposed to decrypt lastlogin files found in minecraft. When i try to compile it gives me these errors: C:\Users\CROCCY\Documents\NetBeansProjects\Lastlogin decryptor\src\lastlogin\decryptor\LastloginDecryptor.java:54: error: invalid method declaration; return type required public MineCraftLoginReader() { C:\Users\CROCCY\Documents\NetBeansProjects\Lastlogin decryptor\src\lastlogin\decryptor\LastloginDecryptor.java:87: error: illegal start of type return "name: "+dis.readUTF()+NEWLINE+"password: "+dis.readUTF(); C:\Users\CROCCY\Documents\NetBeansProjects\Lastlogin decryptor\src\lastlogin\decryptor\LastloginDecryptor.java:87: error: ';' expected return "name: "+dis.readUTF()+NEWLINE+"password: "+dis.readUTF(); C:\Users\CROCCY\Documents\NetBeansProjects\Lastlogin decryptor\src\lastlogin\decryptor\LastloginDecryptor.java:87: error: illegal start of type return "name: "+dis.readUTF()+NEWLINE+"password: "+dis.readUTF(); C:\Users\CROCCY\Documents\NetBeansProjects\Lastlogin decryptor\src\lastlogin\decryptor\LastloginDecryptor.java:87: error: ';' expected return "name: "+dis.readUTF()+NEWLINE+"password: "+dis.readUTF(); C:\Users\CROCCY\Documents\NetBeansProjects\Lastlogin decryptor\src\lastlogin\decryptor\LastloginDecryptor.java:87: error: invalid method declaration; return type required return "name: "+dis.readUTF()+NEWLINE+"password: "+dis.readUTF(); …

Member Avatar
Member Avatar
+0 forum 1

Hi I have data to upload to a Mysql database and I need to get the time taken for each row to be inserted so that I can pass that number through to a progress bar. I have alreay tried accomplishing this by determining the number of rows affetced by the insertion then find the percentage of that number which is not the correct manner to do this. here is the code $result3=mysql_query("INSERT INTO dest_table.create_info SELECT * from Profusion.source_cdr") or die(mysql_error()); $progress=mysql_affected_rows(); // Total processes $total = $progress; // Loop through process for($i=1; $i<=$total; $i++){ // Calculate the percentage $percent …

Member Avatar
Member Avatar
+0 forum 3

Im having a problem with this. I want to echo out the number of post from every city in N.C Example: Wilmington (24) <--*24 is the number of post. Charlotte (35) Raleigh (15) include "connect.php"; $wil ='Wilmington'; $cnt = mysql_num_rows(mysql_query("SELECT add_city FROM dbAdd WHERE $add_city='$wil' ")); echo $cnt; This is the database. CREATE TABLE `dbAdd` ( `id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY , `add_user` TEXT NOT NULL , `add_city` VARCHAR( 100 ) NOT NULL ) ENGINE = MYISAM ;

Member Avatar
Member Avatar
+0 forum 4

I just thought of an idea as I started this message, honest to God. I have a poetry website that I just thought of doing something very personal with it. I am going to dedicate it to the memory of Elvis Presley. I am nuts over his singing. I could have done this years ago and it never dawned on me. That will make my site very personal to me, which as a motivation factor, keeps my connection with Elvis alive. Now I'm wondering if my going on this forum had anything to do with the idea. Now that would …

Member Avatar
Member Avatar
-1 forum 7

I saw this segment and I wasn't sure if I was excited or scared... but my feelings were urging more towards fear. I just do not know if it's a good idea to start microchipping people for better intelligence. Especially our children. Are we slowly turning ourselves in robots? As computer geeks with a pulse on modern technology, I wanted to hear your opinion on the way future is heading. Thoughts? Here is video:[Click Here](http://bit.ly/17lz3LO)

Member Avatar
Member Avatar
+0 forum 11

protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { UpdateTime(); } } protected void Timer1_Tick(object sender, EventArgs e) { UpdateTime(); } public void UpdateTime() { try { int hour = 00, min = 00, sec = Int32.Parse(Session["tleft"].ToString()); // min = Int32.Parse(Session["tleft"].ToString()) / TimeSpan span = new TimeSpan(TimeSpan.TicksPerSecond * sec); string str = span.Hours.ToString("00") + ":" + span.Minutes.ToString("00") + ":" + span.Seconds.ToString("00"); int tleft = Int32.Parse(Session["tleft"].ToString()) - 1; if (tleft <= 0) { Response.Redirect("result.aspx"); } // timeleft.Text = tleft.ToString(); timeleft.Text = str.ToString(); Session["tleft"] = tleft.ToString(); } catch (Exception ex) { Response.Write(ex.Message.ToString()); } } ----------------------------------------------------------------------- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="TickTock.aspx.cs" Inherits="TickTock" …

Member Avatar
Member Avatar
+0 forum 3

How can I create an array of pointer using **P and point it to NULL? Let's say I have coded as below . struct s { float a ; char x ; } ; s **p ; p = new ( s * [10] ) ; Now I want to make some of them as NULL p[0] = NULL ; p[5] = NULL ; If I simply coded as above then it gives me a warning and also the above method is wrong in how it makes the variable NULL. So how to do I do this?

Member Avatar
Member Avatar
+0 forum 1

Why are some algorithm to solve TSP using dynamic programming can solve up to 10 cities while some can go beyond that...i.e. 10, 100 or more..!! What is the factor that determines the capability of the algortihm to solve more than 10 or less..??

Member Avatar
Member Avatar
+0 forum 4

I need to prevent direct access of all the php files but allow only files pass.php how can i do that <Files ~ "\.php$"> Order allow,deny Deny from all Allow from 127.0.0.1 </Files> the code only allow access to localhost. now what if i want to allow access only to https://www.eexample.com/record/pass.php is it like this <Files ~ "\.php$"> Order allow,deny Deny from all Allow from https://www.example.com/record/pass.php </Files>

Member Avatar
Member Avatar
+0 forum 5

My file: http://www.2shared.com/file/Y4I4l2kI/MysticWorld.html Convert to .class file please The errors: C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:221: error: illegal start of expression static class _cls5 ^ C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:277: error: malformed floating point literal switch(_cls5..SwitchMap.org.mysticworlds.WorldObject[type.ordinal()]) ^ C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:277: error: case, default, or '}' expected switch(_cls5..SwitchMap.org.mysticworlds.WorldObject[type.ordinal()]) ^ C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:277: error: case, default, or '}' expected switch(_cls5..SwitchMap.org.mysticworlds.WorldObject[type.ordinal()]) ^ C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:277: error: case, default, or '}' expected switch(_cls5..SwitchMap.org.mysticworlds.WorldObject[type.ordinal()]) ^ C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:277: error: case, default, or '}' expected switch(_cls5..SwitchMap.org.mysticworlds.WorldObject[type.ordinal()]) ^ C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:277: error: case, default, or '}' expected switch(_cls5..SwitchMap.org.mysticworlds.WorldObject[type.ordinal()]) ^ C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:277: error: case, default, or '}' expected switch(_cls5..SwitchMap.org.mysticworlds.WorldObject[type.ordinal()]) ^ C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:277: error: case, default, or '}' expected switch(_cls5..SwitchMap.org.mysticworlds.WorldObject[type.ordinal()]) ^ C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:277: error: case, default, or '}' expected switch(_cls5..SwitchMap.org.mysticworlds.WorldObject[type.ordinal()]) ^ …

Member Avatar
Member Avatar
+0 forum 5

can any1 explain me how the values r being stored and how union and intersection is takin place please explain me in detail what is happening in program d program is on union and interscetion of graphs pls help me out i m unable 2 understand d program #include<stdio.h> #include<conio.h> void Union(int set1[10],int set2[10],int m,int n); void Intersection(int set1[10],int set2[10],int m,int n); void main() { int a[10],b[10],m,n,i,j; int ch; clrscr(); printf("nEnter the number of elements in first set:n"); scanf("%d",&m); printf("nEnter the elements:n"); for(i=0;i<m;i++) { scanf("%d",&a[i]); } printf("nElement of First set:nn"); for(i=0;i<m;i++) { printf("%dt",a[i]); } printf("nEnter the number of elements in …

Member Avatar
Member Avatar
-2 forum 1

i have download php 5.3.27 windows installer from php.net then i download apache 2.4.4 windows installer from apache site. now i have successfuly installed apache 2.4.4. to check this i have write` http://localhost/` on the address bar and the out put is "its work". now the step to install php 5.3.27 now i restart my pc.

Member Avatar
Member Avatar
+0 forum 4

Hi All, I have a question. Is adding/filling range numbers to an ArrayList possible in java?? Like this: {<12345, 13455>, <12745, 13755>, <2345, 2755>, <5345, 9455>, <2700, 5240>, <345, 13455>, <11345, 13000>} You can think of these like time segments. Here is the class to give you brief idea import java.util.ArrayList; import java.util.List; class Sector { int start; int end; public Sector(int start, int end) { this.start = start; this.end = end; } List<Sector> sectors = new ArrayList<Sector>(); for (int i = 0; i <7; i++) { } } }

Member Avatar
Member Avatar
+0 forum 2

**I am trying to read the records from and to a CSV file in C. Of course i want to stop when I have read all the records. If I use a for loop it works perfect except I have to know how many records there are. if I change to a while loop it only reads one record. I read many of your great examples and tried different things. I have tried !=EOF and == all number from 1 to 10. It still only reads one line. Can you give me a suggestion please. (please don't tell me to …

Member Avatar
Member Avatar
+0 forum 2

Using Visual Basic 10, and I am trying to identify min/max statistics and display the results. My calculations are working, but the display is not (line 68 & 80). With the way the code is written now, I don't get the error but my results are displayed as "The minimum monthly rainfall was *correct result* ("*g*"). "g" should be the month that corresponds to the minimum monthly rainfall. The same issue occurs on the maximum display. The line was initially written as *lblMinMonthly.Text = ("The minimum monthly rainfall was " & intMinRainfall.ToString() & "(" & strMonths(Me.intCount) & ")")* but received …

Member Avatar
Member Avatar
+0 forum 4

OK here is the 1 million dollar question for super gurus only.A few months ago I had the stupid idea of installing Performersoft LLC,because my pc performance was not too good, so I thought that maybe I needed some update like drivers etc.When I realized I didn't need it, I uninstalled the software. After that every time I start the pc, I have to wait quite a long time until this blinking icon appears on my taskbar asking me if I want to install the software.I realized that something must have gone wrong during the removal so I figured to …

Member Avatar
Member Avatar
+0 forum 2

public class review{ //method code public void start() { int a, b; a = 5; b = methodA(a); System.out.println(a + " " + b); } private int methodA(int a) { int b = 10; a = a + 5; return a + b; } //method end } ------------------------------------------------ i compile and run this code in dr.java compiler jdk 6.0_41 it can compile, but when i run it will display like thi *"Static Error: This class does not have a static void main method accepting String[]"* when i try to add public static void main (String[]args){ //method code } when i …

Member Avatar
Member Avatar
+0 forum 4

Hi! It's me again and [this](http://en.wikipedia.org/wiki/Decoder) is a decoder! **The goal:** And I'm trying to make a program that solves logical problems related to the decoder device. For that I need a loop that write true/false into a boolean[][] based on the rules. Say we have a decoder with 3 inputs. That means that it has 8 outputs (2^(numberOfInputs) = 8). I need a method to write this (example of 3 inputs): |0|0|0| |0|0|1| |0|1|0| |0|1|1| |1|0|0| |1|0|1| |1|1|0| |1|1|1| Notice the third column (actually called column 0, the middle one would be 1, the most left one 2). 2^0 …

Member Avatar
Member Avatar
+0 forum 4

Since it started in 2005, i have been hearing that mashable is doing extremely well in the online market. How well it is doing? what is it worth right now?

Member Avatar
Member Avatar
+0 forum 1

I wrote the following code: package com.chain; public interface Chain { void setNext(Chain chain); void process(int number); } package com.chain; public class ProcessNegative implements Chain{ private Chain chain; public void setNext(Chain chain){ this.chain = chain; } public void process(int number){ if(number < 0){ System.out.println("Negative"); }else{ chain.process(number); } } } package com.chain; public class ProcessPositive implements Chain{ private Chain chain; public void setNext(Chain chain){ this.chain = chain; } public void process(int number){ if(number>0){ System.out.println("Positive"); }else{ chain.process(number); } } } package com.chain; public class ProcessZero implements Chain{ private Chain chain; public void setNext(Chain chain){ this.chain = chain; } public void process(int number){ …

Member Avatar
Member Avatar
+0 forum 3

Hi, a month ago I installed Performersoft to check my drivers since I had audio problems. My microphone was not working right and I needed it to use with Skype.Since it didn't fix the problem ( I found out that there is something loose in my audio input)I uninstalled it. The problem is that every time I start my pc I have to wait for this popup from Performersoft to appear and decline and cannot access the Internet until I do that.I even tried to reinstall the software and then uninstall it again but didn't do it.Can anybody tell me …

Member Avatar
Member Avatar
+0 forum 7

Hello, Good evening! I am trying to validate my atachments in my system. In my program, there is an upload button, what I am trying to do is to validate it by not copying and saving the upload file once it already exists in the database..... HERE IS MY CODE: If System.I.O.Exists(FileToCopy)=True Then System.I.O.File.Copy(FileTo Copy, NewCopy) Else MsgBox("File already exist") but it is not working, any file uploaded eventhough it is not yet existing in the database is not saving... .....Hope you could help me in this dilemma...

Member Avatar
Member Avatar
+0 forum 3

The End.