WiFi on WPA2: Can't Access Internet, Can Access LAN
The WiFi in my laptop seems to be having a problem with WPA2. I can
connect to my network without issue and everything works fine for up to 5
minutes, but then I can't access the Internet. The network configuration
still thinks all is well, but I can't reach any hosts. I can, however,
reach anything inside my LAN.
Switching to my open guest network allows me full access to the internet
with no interruptions indefinitely.
lspci reports the following about my wireless adapter:
Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron]
Network Connection (rev 61)
Any suggestions?
Monday, 30 September 2013
Why was this very low quality flag declined=?iso-8859-1?Q?=3F_=96_meta.stackoverflow.com?=
Why was this very low quality flag declined? – meta.stackoverflow.com
Question: Cyrus beck line algorithm program in c or c++. I know about the
specific meaning of VLQ flags, and I can't fathom why anyone would think
that question wouldn't be a candidate for removal. …
Question: Cyrus beck line algorithm program in c or c++. I know about the
specific meaning of VLQ flags, and I can't fathom why anyone would think
that question wouldn't be a candidate for removal. …
Ball Dropping Simulation Program, simulating a random direction bounce in C? [on hold]
Ball Dropping Simulation Program, simulating a random direction bounce in
C? [on hold]
This is in C only, not C++
The entire program is supposed to ask the user how many balls to drop,
make sure that number is at least one. And then simulate dropping the
balls, and allowing them to "bounce" ten times each, and then keep track
in an array how many balls landed in each array. Each bounce allows the
ball to either go left once or right once. This is all I have so far, any
tips?
When I go to print out the final product it should look something like
this. With each 'o' representing one ball dropped in that place
-10:
-8:
-6: o
-4: ooooooooo
-2: oooooooooooooooooooooo
0: ooooooooooooooooooooooooo
2: oooooooooooooooooooooo
4: ooooooooooooo
6: ooooooo
8:
10: o
Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int drop_balls(int); /* Prototype for drop_Balls, int parameter is number
of balls being dropped */
int get_num_balls(int); /* Gets the number of balls that need to be
dropped by the user */
int main()
{
get_num_balls();
drop_balls(num_balls);
}
int get_num_balls()
{
printf("How many balls should be dropped? ");
scanf("%d", num_balls);
while(num_balls <= 0)
{
printf("You have to drop at least one ball! \n ")
printf("How many balls should be dropped? ");
scanf("%d", num_balls);
}
return num_balls; /* Return the number of balls that will be dropped */
}
int drop_balls(num_balls)
{
int ball_count[21]; /* Keeps track of how many balls landed where */
int ball_num = 0; /* What number ball are we on */
srand(time(NULL)); /* Seed the generator */
for(ball_num; ball_num < num_balls; ball_num++ ) /* Do the correct #
of balls */
{
int starting_point = 10; /* Start at 10 since its the middle of 21 */
for(starting_point; starting_point >=0; starting_point--) /*
Bounce each ball 10 times */
{
int number;
number = rand() % 100;
if(number > 50)
{
starting_point++;
}
else
{
starting_point--;
}
}
ball_count[starting_point] += "o"
}
int j;
for(j = 0; j < 21; j++)
{
if(ball_count[j] != 'null')
{
printf("'%d :'", ball_count[j]);
}
}
}
}
C? [on hold]
This is in C only, not C++
The entire program is supposed to ask the user how many balls to drop,
make sure that number is at least one. And then simulate dropping the
balls, and allowing them to "bounce" ten times each, and then keep track
in an array how many balls landed in each array. Each bounce allows the
ball to either go left once or right once. This is all I have so far, any
tips?
When I go to print out the final product it should look something like
this. With each 'o' representing one ball dropped in that place
-10:
-8:
-6: o
-4: ooooooooo
-2: oooooooooooooooooooooo
0: ooooooooooooooooooooooooo
2: oooooooooooooooooooooo
4: ooooooooooooo
6: ooooooo
8:
10: o
Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int drop_balls(int); /* Prototype for drop_Balls, int parameter is number
of balls being dropped */
int get_num_balls(int); /* Gets the number of balls that need to be
dropped by the user */
int main()
{
get_num_balls();
drop_balls(num_balls);
}
int get_num_balls()
{
printf("How many balls should be dropped? ");
scanf("%d", num_balls);
while(num_balls <= 0)
{
printf("You have to drop at least one ball! \n ")
printf("How many balls should be dropped? ");
scanf("%d", num_balls);
}
return num_balls; /* Return the number of balls that will be dropped */
}
int drop_balls(num_balls)
{
int ball_count[21]; /* Keeps track of how many balls landed where */
int ball_num = 0; /* What number ball are we on */
srand(time(NULL)); /* Seed the generator */
for(ball_num; ball_num < num_balls; ball_num++ ) /* Do the correct #
of balls */
{
int starting_point = 10; /* Start at 10 since its the middle of 21 */
for(starting_point; starting_point >=0; starting_point--) /*
Bounce each ball 10 times */
{
int number;
number = rand() % 100;
if(number > 50)
{
starting_point++;
}
else
{
starting_point--;
}
}
ball_count[starting_point] += "o"
}
int j;
for(j = 0; j < 21; j++)
{
if(ball_count[j] != 'null')
{
printf("'%d :'", ball_count[j]);
}
}
}
}
getString() method for a class which extends from LinearLayout
getString() method for a class which extends from LinearLayout
I have a class which extends from LinearLayout. I want to use a string
from string.xml . Normally I use the following code:
this.getString(R.string.xxxx);
But since my class extends from LinearLayout I can't call getString()
method. How can i access those strings which are in my string.xml from my
class?
I have a class which extends from LinearLayout. I want to use a string
from string.xml . Normally I use the following code:
this.getString(R.string.xxxx);
But since my class extends from LinearLayout I can't call getString()
method. How can i access those strings which are in my string.xml from my
class?
Sunday, 29 September 2013
How to copy a certain data from multiple excel file with diffrent name into one master excel file
How to copy a certain data from multiple excel file with diffrent name
into one master excel file
I need help to compile a certain data from multiple excel file with a
different name onto one sheets (excel file located at certain location
folder). The data from each file that i want to grap :
1) B69 until E69 & I69
2) B75 until E75 & I75
And compile it into below format (summary) file: each row differentiate by
diffetrent excels file name :
Title Title Title Title Title Title Title Title Title Title B69 C69 D69
E69 I69 B75 C75 D75 E75 I75 B69 C69 D69 E69 I69 B75 C75 D75 E75 I75 B69
C69 D69 E69 I69 B75 C75 D75 E75 I75 B69 C69 D69 E69 I69 B75 C75 D75 E75
I75 B69 C69 D69 E69 I69 B75 C75 D75 E75 I75
I do this by daily basis & the data that i need to compile 100+ excel file
a day. Really hoping if some one could provide me a script to run macro on
this precedure
into one master excel file
I need help to compile a certain data from multiple excel file with a
different name onto one sheets (excel file located at certain location
folder). The data from each file that i want to grap :
1) B69 until E69 & I69
2) B75 until E75 & I75
And compile it into below format (summary) file: each row differentiate by
diffetrent excels file name :
Title Title Title Title Title Title Title Title Title Title B69 C69 D69
E69 I69 B75 C75 D75 E75 I75 B69 C69 D69 E69 I69 B75 C75 D75 E75 I75 B69
C69 D69 E69 I69 B75 C75 D75 E75 I75 B69 C69 D69 E69 I69 B75 C75 D75 E75
I75 B69 C69 D69 E69 I69 B75 C75 D75 E75 I75
I do this by daily basis & the data that i need to compile 100+ excel file
a day. Really hoping if some one could provide me a script to run macro on
this precedure
If total is between two numbers echo statement, else if between different set of numbers echo a different statement, etc
If total is between two numbers echo statement, else if between different
set of numbers echo a different statement, etc
I am terrible with figuring out if/else statements. I have looked at
multiple tutorials and just can't get what I'm trying to do work. I need
this: If total amount of points is less than # state that no title is
achieved If total amount is between # and # state what title that would be
If total amount is between higher # and # state what title that would be
etc.
The adding of total points works just fine but I can't figure out how to
get the correct title for the total points to show. I have included the
code for getting totalpoints as well in case it can be combined with what
I am trying to do. Any help greatly appreciated
This works just fine:
<?php
$query = "SELECT points, SUM(points) AS totalpoints FROM competition WHERE
id = $id";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo "<b>";
echo $row['totalpoints'];
echo "pts</b>";
}?>
This does not work:
<?php
$query = "SELECT points, SUM(points) AS totalpoints FROM competition WHERE
id = $id";
$result = mysql_query($query) or die(mysql_error());
while($titled = mysql_fetch_array($result)) {
if ($titled <= 999)
{echo ", not titled";}
elseif (($titled == 1000) && ($titled <= 1999))
{$titlename = ", Champion";}
elseif (($titled >= 2000) && ($titled <= 2999))
{$titlename = ", Grand Champion";}
elseif (($titled >= 3000) && ($titled <= 3999))
{$titlename = ", Honor Champion";}
elseif (($titled >= 4000) && ($titled <= 5999))
{$titlename = ", Regional Champion";}
elseif (($titled >= 6000) && ($titled <= 7999))
{$titlename = ", State Champion";}
elseif (($titled >= 8000) && ($titled <= 9999))
{$titlename = ", National Champion";}
elseif (($titled >= 10000) && ($titled <= 19999))
{$titlename = ", World Champion";}
elseif ($titled >= 20000)
{$titlename = ", Hall of Fame";}
}?>
set of numbers echo a different statement, etc
I am terrible with figuring out if/else statements. I have looked at
multiple tutorials and just can't get what I'm trying to do work. I need
this: If total amount of points is less than # state that no title is
achieved If total amount is between # and # state what title that would be
If total amount is between higher # and # state what title that would be
etc.
The adding of total points works just fine but I can't figure out how to
get the correct title for the total points to show. I have included the
code for getting totalpoints as well in case it can be combined with what
I am trying to do. Any help greatly appreciated
This works just fine:
<?php
$query = "SELECT points, SUM(points) AS totalpoints FROM competition WHERE
id = $id";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo "<b>";
echo $row['totalpoints'];
echo "pts</b>";
}?>
This does not work:
<?php
$query = "SELECT points, SUM(points) AS totalpoints FROM competition WHERE
id = $id";
$result = mysql_query($query) or die(mysql_error());
while($titled = mysql_fetch_array($result)) {
if ($titled <= 999)
{echo ", not titled";}
elseif (($titled == 1000) && ($titled <= 1999))
{$titlename = ", Champion";}
elseif (($titled >= 2000) && ($titled <= 2999))
{$titlename = ", Grand Champion";}
elseif (($titled >= 3000) && ($titled <= 3999))
{$titlename = ", Honor Champion";}
elseif (($titled >= 4000) && ($titled <= 5999))
{$titlename = ", Regional Champion";}
elseif (($titled >= 6000) && ($titled <= 7999))
{$titlename = ", State Champion";}
elseif (($titled >= 8000) && ($titled <= 9999))
{$titlename = ", National Champion";}
elseif (($titled >= 10000) && ($titled <= 19999))
{$titlename = ", World Champion";}
elseif ($titled >= 20000)
{$titlename = ", Hall of Fame";}
}?>
Is it good programming pracitce to assign Singleton to variables across multiple classes
Is it good programming pracitce to assign Singleton to variables across
multiple classes
In my app I'm using singleton class (as sharedInstance). Of course I need
to use data that is stored in that singleton in multiple classes (view
controllers). Because writing
[[[SingletonClass sharedInstance] arrayWithData] count] or
[[[SingletonClass sharedIntanse] arrayWithData] objectAtIndex:index] or
some other methods that you use on array is not comfortable I thought to,
in the begining of lifecycle of non-singleton class, assign property
(strong, nonatomic) of that non-singleton class to have the same address
as SingletonClass.
self.arrayPropertyOfOtherClassOne = [[SingletonClass sharedInstance]
arrayWithData] and in some other class
self.arrayPropertyOfOtherClassTwo = [[SingletonClass sharedInstance]
arrayWithData]
Is it good programming practice?
In my opinion there is nothing bad with it. Properties will point to the
same address as property in Singleton and after non-singleton class will
be destroyed also properties that where pointing to singleton so Reference
Count = Refrence count - 1.
Am I correct?
multiple classes
In my app I'm using singleton class (as sharedInstance). Of course I need
to use data that is stored in that singleton in multiple classes (view
controllers). Because writing
[[[SingletonClass sharedInstance] arrayWithData] count] or
[[[SingletonClass sharedIntanse] arrayWithData] objectAtIndex:index] or
some other methods that you use on array is not comfortable I thought to,
in the begining of lifecycle of non-singleton class, assign property
(strong, nonatomic) of that non-singleton class to have the same address
as SingletonClass.
self.arrayPropertyOfOtherClassOne = [[SingletonClass sharedInstance]
arrayWithData] and in some other class
self.arrayPropertyOfOtherClassTwo = [[SingletonClass sharedInstance]
arrayWithData]
Is it good programming practice?
In my opinion there is nothing bad with it. Properties will point to the
same address as property in Singleton and after non-singleton class will
be destroyed also properties that where pointing to singleton so Reference
Count = Refrence count - 1.
Am I correct?
Subscribe to:
Posts (Atom)