H.B. Woodrose
I have never been an enthusiastic user of entheogens and psychedelics, but I have indeed used them a number of times over the past several years. However, the first time, which was mushrooms, I was unaware of what part of my conscious would be stricken. After that initial trip, I gained a respect for entheogens and psychedelics. I have cultivated a small dislike for people who use such drugs for no real reason then they want to get ‘fucked up’. I doubt that there are many, but I have met a few over the past several years.
I, personally use entheogens when I feel that I need to use a tool to guide me in my mystic and shamanistic path.
Okay, now I shall dismount from my soapbox, and tell you of my experience. I had in my possession an amount of 50 HBWR seeds. I decided that sense I was experienced with various other psychedelics that I would indeed take a rather strong does, but over time. I decided off the bat that 10 would be suitable, and that I would ingest 4 to start, wait two hours and take an additional two if needed. I set a rule that after 10, if I didn’t have a noticeable move from baseline, that I would just put it off until another day.
After ingesting all ten seeds over a time period of about 3 hours, I felt little more then a slight uplift in mood, and a cannabis like thought pattern, without the slow confining inarticulate experience that cannabis often gives me. So with that thought, I waited an additional hour, and concluded that it perhaps just wasn’t the night.
I however was in short, very wrong. And often I find that putting myself in that mindset of “oh well, nothing tonight perhaps next time” can be dangerous, but that night, it was not.
I at first watched my Bill Hicks video, which I often keep around while on a journey, because it relaxes me and keeps me sane while setting in, or coming down.
About half way though the movie, which was about 4 and a half hours after the first initial ingestion, I decided to retreat to my room, as my stomach was reaching a discomfort, and I was beginning to shift into a state of mind that required comfort, stillness, and solitude. I often play Tool when in a trance or entheogen experience, so I did just that for a little comfort. While listening, I turned off my lights and just lay down under my covers eyes mostly closed. Lots of color patterns with closed eye and open eye.
Then after a song came on called Merkaba, I heard the music no more as a distortion before me, an oval shaped white light, with fading pulsating dots of white and black on the outer edge. Its will beckoned that I allow myself to release my firm grip on this reality, and free my self from all ideas and presuppositions that I held. I felt no fear in this, no malignant feelings, just that of something that I desired to understand. So I let go. I released my conciseness and felt pulled though the light. As soon as I did so, a saw my body from a corner of my room curl up into a fetal position, and with that I was instantaneously launched into a red and yellow warmness, which I concluded was my mothers womb. I then was reborn and took a huge deep breath and mildly cried for a while. I was then subject to almost all of my life being watched, not really lived, but just seeing every second that let up too the moment which was the now.
I sort of awoke from my trance one I landed back in the now. The music was heard again, but now it was offensive, as is the mild noises make me twitch and cringe with each lyric and each riff. (The approximant time now was +4 hours after I retreated into my room, but I wasn’t aware of time that much.) I made a wise decision to turn off the music, and see where I could go. I laid back down, and watched the closed eye visuals, and kind of writhed around in happiness of my new found life, and appreciation for The Now.
At that point, I felt two blue, translucent beings lift me out of my body, and inform me, (no words, just feelings, empathy) that I was not yet informed of what I was to need to know yet. They, (eyes closed) lifted my being out of my body, and I felt as though I was floating over my body, and I felt as though they wanted me to look.
I was then pulled far away, and what felt like long ago. I personally believe that these beings took me to the initial instant that the universe was born, with intense colors and heat, and a gravity shifting feeling of being pushed back by the blast, which expanded and evolved larger and more 3 demensional as I rushed through it. Then it all pulled together into one fine needle point, and repeated itself.
They somehow explained to me, that this had happened an infinite number of times, and that I was to understand that the life of my own being, all beings, were someone connected to this same pattern, and that there was no more need for me to keep looking back into the past, for meaning. (Which I often did, I often tried to get ‘back’ to a time when man was void, and all was unclear, I time where our own conclusions could be drawn about all, and a place where there was no preexisting ideas or conceptions.) That was a common theme in my meditation, psychedelic trips, and mystic ideals. However, I was informed that perhaps we are capable of being in that void nature without looking to the past, but rather looking in ourselves and the collective human mind.
After I flew back into my body, at speeds still unbeknownst to me, I kind of jerked, and was almost back to baseline, so I thought. But, I was back in my room, and aware of the fact that I was a sentient, logical human being. So, I went outside to indulge in one of my favorite, yet horrible habits, and smoked a cigarette. It was just beginning to get light out side, so it was about 7 hours after I went to my room. Then, as it got a little lighter, I noticed that I having very intense distortions of the trees, grass, cars and my body. I however wasn’t really in that mystical state of mind, I was just hallucinating visually. I decided that despite the fact that it was entertaining, that I’d better go take the Bendryl that I had kept, incase of sleeplessness. (which is almost always a constant while using such substances). It took about two hours for me to go to sleep.
I woke up around seven hours later, still seeing minor distortions, and feeling a distinct afterglow, but rather groggy.
Also, I failed to mention, there was a lot of stomach discomfort whenever I returned to my room, out of the ‘trips’ for lack of a better word. I felt as though I could vomit, if I was so inclined, but I resisted to no ill effect. But it is a diarrheic, for sure, I purged around 7 hours after the retreat into my room, then again about an hour later. And there were minor cramps throughout the next day.
I am sorry that I did not keep better track of the timeline, it was rather hard to stay focused on anything from daily life for a while there. I hope this helps. I may well do these again, however, the after effects lasted a long time, so I would need about two days free from any obligations. It was strong, and indeed not a toy. I would put its intensity at this level somewhere between P. Cubensis and LSD.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Buscador de Series
00
:
00
days
:
hours
Search result:
You haven't searched anything yet.
Watched TV shows:


"Symmetry, Scala & Software": Eric Bowman Presents at the Next Refresh Dublin
Gilt VP Architecture Eric Bowman is the next featured speaker at Refresh Dublin: an event series, inspired by the Refreshing Cities movement, that explores the relationships between design, UX and technology. On Tue 10/15, Eric will present “Symmetry, Scala & Software”–an updated iteration of his Scala Days talk–at the Science Gallery in Dublin. More details:
The concept of symmetry is pervasive across many fields: art, architecture, mathematics, even fashion. In the past decade or so, technologists have begun to talk about symmetry in the context of programming languages and the software programs created with them.
In this talk, we’ll explore the meaning and significance of symmetry beyond its superficial, primarily visual characteristics, and connect it to the practice of writing software. In particular, we’ll take a look at the Scala programming language, which manifests a profound degree of internal design symmetry. We’ll also look at how that symmetry facilitates writing programs that are compact, elegant, and minimal. Finally, examine the importance of breaking symmetry, and introduce some new ideas around refactoring and conservation principles.
The event begins at 6:30 PM; to RSVP (and you should!), just go here.


Change Class Contents Dialog
The Change Class Contents Dialog lets you change the default class for a class of objects, which determines the type of object will be added when adding a new child object.
For instance, if you set the class contents for the Book class to the Chapter class, the next time you add an object to any Book object it will default to adding a new Chapter object. However, if you have specified the contents of any individual object, that will take precedence over the setting of the object's class. For instance, you could have one specific Book object that you have set the contents to be Paper objects, which would take precedence over the setting for the entire Book class.
See also: Changing the Contents of an Object


Groups
Program
Messages
Members
Faith in God For Girls
Here is a list of your members. Select one to edit.
Apply Requirement
First Name
Last Name
Actions
Mark
Otto
@mdo
Jacob
Thornton
@fat
Larry
the Bird
@twitter
Add Member
Complete Requirement
×
Add Requirement to All
Category
Action
Requirement
Action
Date Completion
Description


".UCWords($cat)." Category:
";
echo "All our jokes listing within the ".$cat." category are listed below. Click on any of the items to view the full joke.
";
?>
|
0) {
echo "";
$tracker = $start+1;
while($row = mysql_fetch_array($temp)) {
echo "| ".$tracker.". | Category: ".$row[category]." |
";
echo " | ".trim(substr(stripslashes($row[joke]), 0, 120))."... more
|
";
$tracker++;
}
echo "
";
}
?>
$perpage) {
$start2 = $start - ($perpage * 2);
if($start2 < 0) $start2 = 0;
echo "
< Previous Page ";
}
if($start < $total) echo "
Next Page >";
?>
Choose Category:
";
echo "Choose from the category listing below to being browsing our jokes by category.
";
?>
|
";
$tracker = 0;
while($row = mysql_fetch_array($cats)) {
// get total
$total = mysql_query("SELECT COUNT(id) AS total FROM jokes WHERE category = '".$row[category]."'");
$jokes_total = mysql_result($total, 0, total);
if($tracker == 0) echo "";
echo "| - ".$row[category]." (".$jokes_total.") | ";
if($tracker == 1) {
echo "
";
$tracker = 0;
}
else $tracker++;
}
echo "
";
?>


Announcements¶
Our announcements are published to an RSS feed here.
2020¶
- 2020-12-16
Moving to CentOS 7 and CentOS 6 End-of-Life
conda-forge
’s compiler stack uses repackaged libraries from CentOS 6 to supply certain libraries, notablyglibc
when building recipes. We currently default to using CentOS 6 with theglibc
2.12 ABI. However, CentOS 6 reached end-of-life in November 2020 and increasingly software packages require at least CentOS 7 with theglibc
2.17 ABI. We also realize that due to recent events, some communities that may have been planning to skip CentOS 7 and move straight to CentOS 8 might be reconsidering those plans. Further, they may not be ready for a full-scale switch to CentOS 7. Thus theconda-forge
core team has decided to delay moving to CentOS 7 until sometime early next year, likely the end of January 2021 at the earliest. We are actively looking for feedback from our users on this issue. Please do get in touch if you have comments or concerns!- 2020-12-02
Artifact Validation
In an effort to better secure
conda-forge
, we are developing a process to validate artifacts before they are uploaded toanaconda.org
. This validation will look for various security related items, such as artifacts which overwrite key pieces of certain packages. While this process is in development, we will not be rejecting uploads. However, we will start scanning our current artifacts and working with the maintainers of those artifacts to mark broken any which we deem a security risk. We will also be running validation on new artifacts being upload and will report any issues back to feedstocks. At a future date, artifacts which do not pass validation will not be uploaded.- 2020-10-08
Compiler Upgrade to
GCC
9.3.0
We will be upgrading all
GCC
-based compilers to version9.3.0
on all platforms. This upgrade will not affectC
orC++
code, but will require a rebuild of all feedstocks that useFORTRAN
due to a change in theSONAME
. During this rebuild, we will keep the old compiler versions in production, temporarily doubling the build matrix. Once the migration is deemed complete, these old compiler versions will be removed.- 2020-08-07
Completed New Staging Process for
anaconda.org
UploadsWe have now completed rolling out the new staging process for uploads to anaconda.org. Direct uploads to the
conda-forge
channel will no longer work. If you are having trouble with package uploads, please rerender your feedstock with the latest version ofconda-smithy
. As always, if you need help, bump us on gitter or GitHub!- 2020-08-06
Fixed Maintenance Process for Feedstock Teams
We have fixed a bug where the maintainers of feedstocks listed in the
meta.yaml
did not match those listed in the GitHub team. Due to this change, you may notice emails from GitHub informing you that you have been removed from a GitHub team if you have recently removed yourself from a feedstock via changing themeta.yaml
. A similar fix has been applied for maintenance teams as well, though you will not see emails from this fix.- 2020-07-23
CentOS 7
sysroot
Now Available forlinux-64
BuildsWe are very excited to announce that new compilers based on repackaged
sysroot
’s from CentOS 7 are now available for alllinux-*
platforms. These compilers will be the default going forward for anygcc
,gxx
, andgfortran
versions past8.4.0
onppc64le
and7.5.0
onx86_64
/aarch64
.On the
linux-64
platform, we have also built the CentOS 6sysroot
and set it as the default, consistent with our current compilers. To use the CentOS 7sysroot
onlinux-64
, add a requirement ofsysroot_linux-64 2.17
to the build section of your recipe. You also need to set the proper Docker image in yourconda_build_config.yaml
. See Using CentOS 7 for details.- 2020-07-23
Strict channel priority in builds for OSX and Linux
We have changed the OSX and Linux platforms to enforce strict channel priority in package builds. This change means that if a package is available in the
conda-forge
channels, theconda
solver will not consider any versions of the package from other channels. Users can disable this by settingchannel_priority: flexible
in theirconda-forge.yml
.- 2020-07-23
NumPy 1.16 as the minimal NumPy version on all platforms.
In accordance with NEP-29, we have switched to have
numpy 1.16
as the minimal supported version on all platforms.- 2020-07-17
Conda-forge is building openblas with both pthreads and openmp on Linux
The main change is that
openblas
will use pthreads for threading by default on Linux instead of the previousopenmp
default. Theopenmp
builds can be recovered by installinglibopenblas=*=*openmp*
.- 2020-07-16
Core Dependency Tree Package Changes
conda-forge
is moving to a new system for generating Core Dependency Tree (CDT) packages. These changes includeCDT packages will no longer be built using feedstocks and this practice is officially deprecated.
Any current CDT packages in feedstocks will be moved to the new conda-forge/cdt-builds repo and the feedstock will be archived. Members of core will be doing this slowly on an as-needed basis, so it may not happen right away.
Requests for new CDTs should be submitted as PRs to the conda-forge/cdt-builds repo.
These changes are being made so that
conda-forge
can provide access to CentOS 7 / glibc 2.17 forlinux-64
builds. They will also move more of the packages needed forconda-forge
builds into theconda-forge
channels making builds more reliable.- 2020-07-16
Moving from clang 9 to clang 10
conda-forge is moving to clang 10 on macOS! Check the release notes for what is new, breaking, or deprecated.
- 2020-07-15
CFEP-18:
Removing static libraries from the main buildWith CFEP-18 we now have a policy on how to deal with static packages. The most important change here is that we will be removing static libraries from the main packages and moving them to
-static
suffixed packages.-static
packages will not be built by default but only on request.- 2020-07-03
cf-mark-broken
renamed toadmin-requests
The
cf-mark-broken
repo has been renamed toadmin-requests
. It still serves the same purpose. However, we have expanded the capabilities of the repo to be able to mark packages as not broken.- 2020-05-28
New Process for Marking Packages as Broken
We are changing the way we mark packages as
broken
to better match thedefaults
channel and to better enable reproducible environments that depended on broken packages. We will now be adding thebroken
label to packages but leaving them on themain
channel. In order to make sure they do not appear in therepodata.json
for themain
channel, we will be patching the repo data to remove them using theremovals
feature.Users will notice the following changes
The packages on
anaconda.org
will now have both themain
and thebroken
labels.All requests to mark packages as broken must be sent to the
cf-mark-broken
repo.Members of
core
can no longer mark things as broken by hand since the repo data patching must be done as well.The package metadata for broken packages may differ slightly from when they were on the
main
channel.The only correct source of package metadata is now the
repodata.json
etc onanaconda.org
. Any other sources may be missing critical changes.
- 2020-05-09
New Staging Process for
anaconda.org
UploadsStarting this week, we are changing the way we upload packages to
anaconda.org
. We will move from direct uploads to theconda-forge
main
channel to using a staging organization/channel combined with a copy request from the staging channel to the production channel. This new process will allow us to perform some validation on the outputs of feedstocks before they are released.What will you see as a feedstock maintainer?
Starting this week, the
admin-migrations
service will be making commits to all feedstocks to provision them with the necessary configuration, API keys, and tokens.Each feedstock will now be provisioned with a secret token. This token should not be shared or taken out of the CI services. It is used to identify the feedstock during the upload process.
The
admin-migrations
service will be setting a new top-level key in theconda-forge.yml
,conda_forge_output_validation: true
. This key indicates toconda-smithy
that it should include the output validation calls in the feedstock CI scripts.Currently open PRs will need to have this key added by hand and then rerendered.
When PRs are running the CI scripts, they will do some initial validation of the feedstock outputs. If this validation fails, the CI job will fail. Please see the CI logs for the error message which is printed after
conda-build
runs.Once a PR is merged to master, the copy from the staging channel to the production channel will happen automatically.
Should a copy request fail, you will get a notification via a comment on the commit to master.
As part of this process, uploads from
appveyor
will no longer be allowed unless there is a significant barrier to usingazure
. We have recently upgraded the compiler infrastructure onazure
to support this change in policy.
Despite our extensive testing, we do not expect this change to be completely smooth, so please bear with us. As always, if you have any questions, concerns, or trouble, you can find us on gitter or bump us directly on github!
- 2020-03-24
vs2015
tovs2017
TransitionWe are formally deprecating
vs2015
in two weeks on 2020-04-07 and will move tovs2017
. This change will enable us to support the usage ofmsbuild
on Azure for thewin
platform and will provide additional support forC++
. Most packages built withvs2015
can be linked withvs2017
toolchain (but not vice-versa). An exception is static libraries compiled with whole program optimization (/GL flag) which may be incompatible with thevs2017
toolchain. These static libraries will need to be rebuilt usingvs2017
.- 2020-03-23
Appveyor Deprecation
We are now starting to formally deprecate Appveyor in favor of Azure for builds on the
win
platform. Note that we have not been adding appveyor to new feedstocks for a while, so this is not a completely new change in policy. We will now, however, begin to actively disable Appveyor builds on feedstocks not using it by turning off builds for GitHubpush
events. Additionally, we have been issuing PRs to any remaining feedstocks to move them to Azure. We are aware that some packages built withmsbuild
cannot yet be moved to Azure and so are leaving Appveyor on for those feedstocks for now.- 2020-03-21
Python 2.7 Admin Command Available
A webservices admin command is now available to add Python 2.7 back to feedstocks. Put
@conda-forge-admin add python 2.7
in the title on an issue in your feedstock. The admin webservices bot will then issue a PR adding back Python 2.7. Note that this PR will remove other Python builds and anywin
,aarch64
, orppc64le
builds. If you want to keep those, merge the PR into a separate branch on your feedstock.- 2020-03-18
Python 2.7 and
vs2008
DeprecationPython 2.7 is no longer supported by the upstream developers as of 2020-01-01. Conda-forge is thus deprecating its Python 2.7 support. Conda-forge will provide no ongoing support for Python 2.7 builds and any existing builds are provided on an “as-is” basis.
A
cf202003
label has been applied to theconda-forge
channel for those who need a reference to the package index with Python 2.7.We are removing support for
vs2008
on Windows conjunction with the deprecation of Python 2.7, as it was only supported to build this version of Python.We will provide an admin command that will add back Python 2.7 to any feedstock. Note that as stated above, we cannot provide support for any Python 2.7 builds generated with this admin command. Further, this admin command will only work on
osx-64
andlinux-64
platforms.
2019¶
- 2019-09-30
Clang 9.0.0 and gfortran 7.3.0 as default compilers in OSX.
If you maintain a feedstock which require a C/C++ compiler, no changes necessary. A rerender should be done next time the feedstock is updated to use the new compiler.
If you maintain a feedstock with a Fortran compiler, a PR to upgrade to gfortran 7.3.0 was already issued. If that PR was merged, there’s nothing to do. If not, contact core if you need help migrating.
- 2019-03-28
We overhauled the blas support in conda-forge.
Our packages now build against NETLIB’s reference implementation.
You as a user can now choose the implementation available at runtime.
For more information please refer to the documentation.
- 2019-01-22
It has happened! Conda-forge has migrated to the latest compilers 🎉.
- If you:
maintain a compiled feedstock, it will likely need to be rerender
need to roll back to the old compilers, you can use the “cf201901” label
2018¶
- 2018-10-12
The rebuild is moving along nicely with almost a third of packages completed.
Recently completed are numpy and openblas which should open up much of the python numeric stack. We’re only about 5 feedstocks away from opening up all of R as well.
- 2018-09-24
A minimal python 3.7 build is now available across all platforms and both compilers!
- 2018-09-24
Deprecation notice for Python 3.5
As we start building out more of the python 3.7 stack, we will no longer be building python 3.5 packages.
No new python 3.5 packages will be built after 2018-10-01.
- 2018-09-20
The compiler migration is in full swing. The bot will be making the rounds and modernizing more than 4000 packages. This is going to take a few months to get done so bear with us.
- 2018-09-10
Conda forge now has a magical status bar for tracking the progress of migrations.
You can find this at conda-forge.org/status.


Our latest menue. Burgers Feb 2012 Join us as we visit the different burgers. Fries March 2013 Explore the secrets behind the different types of fries. Baby Back Ribs Nov 2016 Little bones, big meat. See a different side of ribs.


SOFTWARE DEVELOPER
This Battleship game was my final project in my CSIS 222 Object Oriented Programming with Java. You start the game by choosing your board size (1, 2 or 3). Whichever difficulty you choose,
the gameboard will be dynamically created to match the board size.
Then the game starts. You first choose which row you want to attack, then the column. These attack choices are then loaded into a two dimensional array that is already populated with either
empty water, or ships. Each difficulty will have five ships randomly placed inside that two dimensional array with values depending on the type of ship (Destroyer, Aircraft Carrier, etc.). If your
attack choices land on a value inside the array that is populated by a ship, it registers a hit and the board changes from water (~) to a hit (X) and informs you what ship you have hit.
You win if you sink all the ships before your missles run out and you lose if you do not sink all of the ships or run out of missles.
package battleship;
public class battleship {
public static void main(String[] args) {
// creating a new object of actiongame.java
actiongame action = new actiongame();
action.startGame(); // call actiongame.java and start the game
action.playGame(); // call actiongame.java and play the game
}
}
package battleship;
import java.util.Scanner;
public class actiongame {
gameboard gameboard = new gameboard();
Scanner kb = new Scanner(System.in);
private int hits = 0;
private int turns = 0;
// Get the logo, set difficulty, place the ships, then print the board
protected void startGame() {
gameboard.getLogo();
gameboard.setDiff();
gameboard.placeShips();
gameboard.printBoard();
}
protected void playGame() {
boolean gameOver;
// the following code will execute over and over until gameOver is set to true (when the game ends)
do {
turns++;
gameOver = false;
System.out.print("\n\nWhat row do you want to attack? (example: A or b): ");
String input = kb.next().toUpperCase();
// The while loop will validate that the player entered a valid character
while (!validate(input, gameboard.getDifficulty())) {
System.out.println("\nMake sure you are entering a valid single letter!");
System.out.print("\nWhat row do you want to attack? (example: A or b): ");
input = kb.next();
}
char charInput = input.charAt(0);
// passes the character input to getNumber() to convert the letter to a number for the board[][] array
int row = getNumber(charInput);
// determine the column the player wants to attack
System.out.print("What column do you want to attack? (example: 1 or 5): ");
String column = kb.next().toUpperCase();
while (!validNumber(column, gameboard.getDifficulty())) {
System.out.println("\nMake sure you are entering a valid NUMBER!\n");
System.out.print("What column do you want to attack? (example: 1 or 5): ");
column = kb.next();
}
int col = Integer.parseInt(column) - 1;
fire(row, col);
// pass the converted row and column to fire method to attack the board
gameboard.useMissiles();
System.out.printf("%nYour hit accuracy is %.2f%%", getAccuracy(hits, turns));
gameboard.printBoard();
// once the int sunk value hits 0, all ships have been sunk, the player wins, call gameOverWin() from gameboard.java
if (gameboard.shipsAlive == 0) {
gameboard.gameOverWin();
gameOver = true;
}
// or if they have used all their missiles, the player loses, call gameOverLoss() from gameboard.java
else if (gameboard.getMissiles() == 0) {
gameboard.gameOverLoss();
gameOver = true;
}
} while(!gameOver);
}
// The following code will determine what the player hit with their choice of attack
private void fire(int row, int col) {
// if the players attack landed on a -3 value, they hit the AIRCRAFT_CARRIER
if (gameboard.board[row][col] == -3){
// Create an int for ship sinking. Each time the players attack lands on a -3 value, subtract 1 from the ships size
// once the size hits 1, the ship is sunk
int sunk = gameboard.ships[0].size--;
hits++;
System.out.printf("%nYou have hit the %s", gameboard.ships[0].name);
// change the value where the player attacked to a 1, meaning a HIT
gameboard.board[row][col] = 1;
if (sunk == 1) {
System.out.printf("%n****** You have sunk the %s Aircraft Carrier.", gameboard.ships[0].name);
gameboard.shipsAlive--;
}
}
// if the players attack landed on a -4 value, they hit the BATTLESHIP
else if (gameboard.board[row][col] == -4) {
int sunk = gameboard.ships[1].size--;
hits++;
System.out.printf("%nYou have hit the %s", gameboard.ships[1].name);
gameboard.board[row][col] = 1;
if (sunk == 1) {
System.out.printf("%n****** You have sunk the %s Battleship.", gameboard.ships[1].name);
gameboard.shipsAlive--;
}
}
// if the players attack landed on a -5 value, they hit the DESTROYER
else if (gameboard.board[row][col] == -5) {
int sunk = gameboard.ships[2].size--;
hits++;
System.out.printf("%nYou have hit the %s", gameboard.ships[2].name);
gameboard.board[row][col] = 1;
if (sunk == 1) {
System.out.printf("%n****** You have sunk the %s Destroyer.", gameboard.ships[2].name);
gameboard.shipsAlive--;
}
}
// if the players attack landed on a -6 value, they hit the SUBMARINE
else if (gameboard.board[row][col] == -6) {
int sunk = gameboard.ships[3].size--;
hits++;
System.out.printf("%nYou have hit the %s", gameboard.ships[3].name);
gameboard.board[row][col] = 1;
if (sunk == 1) {
System.out.printf("%n****** You have sunk the %s Submarine.", gameboard.ships[3].name);
gameboard.shipsAlive--;
}
}
// if the players attack landed on a -7 value, they hit the PATROL_BOAT
else if (gameboard.board[row][col] == -7) {
int sunk = gameboard.ships[4].size--;
hits++;
System.out.printf("%nYou have hit the %s", gameboard.ships[4].name);
gameboard.board[row][col] = 1;
if (sunk == 1) {
System.out.printf("%n****** You have sunk the %s Patrol Boat.", gameboard.ships[4].name);
gameboard.shipsAlive--;
}
}
else if (gameboard.board[row][col] == 0 || gameboard.board[row][col] == 1) {
System.out.print("\nYou already attacked there genius. Great job wasting a missile!\n");
}
// if the players attack hit anything other than the values indicated above, then they missed hitting a ship
else {
System.out.print("You hit NOTHING! TRY AGAIN\n");
// assign the value of the board where the player attacked to 0, meaning a miss
gameboard.board[row][col] = 0;
}
}
// divide how many hits by how many turns have happened, multiplied by 100 to get proper accuracy. (ie >1)
private double getAccuracy(double hits, double turns) {
double accuracy = (hits / turns) * 100;
return accuracy;
}
// validate user entered a valid input for column
private static boolean validNumber(String column, int diff) {
boolean isValid = false;
// if player entered a letter A-Z, return invalid
if (column.matches("^[a-zA-Z]*$"))
isValid = false;
// if they entered a number, does it fall within bounds of the board
else {
int col = Integer.parseInt(column);
if (diff == 1) {
if (col >= 1 && col <= 6)
isValid = true;
}
else if (diff == 2) {
if (col >= 1 && col <= 9)
isValid = true;
}
else if (diff == 3) {
if (col >= 1 && col <= 12)
isValid = true;
}
}
return isValid;
}
// validate player input a single character within bounds
private static boolean validate(String s, int diff) {
if (s.length() > 1 || s.length() == 0)
return false;
if (diff == 1) {
if (!s.matches("^[a-fA-F]"))
return false;
}
else if (diff == 2) {
if (!s.matches("^[a-iA-I]"))
return false;
}
else if (diff == 3) {
if (!s.matches("^[a-lA-L]"))
return false;
}
return true;
}
// change the character input for first user attack prompt to a number for the board[][] array
private int getNumber(char input) {
int row = 0;
switch(input){
case 'A':
row = 0;
break;
case 'B':
row = 1;
break;
case 'C':
row = 2;
break;
case 'D':
row = 3;
break;
case 'E':
row = 4;
break;
case 'F':
row = 5;
break;
case 'G':
row = 6;
break;
case 'H':
row = 7;
break;
case 'I':
row = 8;
break;
case 'J':
row = 9;
break;
case 'K':
row = 10;
break;
case 'L':
row = 11;
break;
}
return row;
}
}
package battleship;
import java.util.Random;
import java.util.Scanner;
public class gameboard {
Scanner kb = new Scanner(System.in);
Random r = new Random();
int board[][]; // creating a 2d int array for printing of the game board
shipInfo[] ships = new shipInfo[5]; // creating an array of 5 for the 5 ships
protected int BOARD_SIZE;
protected int missiles;
protected int shipsAlive = 5;
protected int difficulty;
// getting difficulty settings from the player
protected void setDiff() {
System.out.println("You have three difficulties to choose from");
System.out.println(" LEVEL BOARD SIZE MISSLES");
System.out.println("1. Beginner 6x6 30 ");
System.out.println("2. Standard 9x9 50 ");
System.out.println("3. Advanced 12x12 75 ");
System.out.print("Select your board size by entering the number 1, 2, or 3: ");
// this will determine if the user entered anything other than an integer number
while (!kb.hasNextInt()) {
System.out.println("\nMake sure you are entering a NUMBER!\n");
System.out.print("Select your board size by entering the number 1, 2, or 3: ");
kb.next();
}
difficulty = kb.nextInt();
// if they entered a value other than 1, 2, or 3 for the game difficulty, execute the while loop
while(difficulty != 1 && difficulty != 2 && difficulty != 3) {
System.out.println("\nYou have entered an invalid difficulty entry\n");
System.out.print("Select your board size by entering the number 1, 2, or 3: ");
difficulty = kb.nextInt();
}
// If they chose 1 = BEGINNER difficulty
if (difficulty == 1) {
System.out.print("\nYou have chosen beginner. What a scrub!");
BOARD_SIZE = 6; // board size will be 6x6
missiles = 30; // they get 30 missiles
}
// If they chose 2 = STANDARD difficulty
else if (difficulty == 2) {
System.out.print("\nYou have chosen standard. Just a mediocre life.");
BOARD_SIZE = 9; // board size will be 9x9
missiles = 50; // they get 50 missiles
}
// If they chose 3 = ADVANCED DIFFICULTY
else if (difficulty == 3) {
System.out.print("\nYou have chosen advanced. You must be confident!");
BOARD_SIZE = 12; // board size will be 12x12
missiles = 75; // they get 75 missiles
}
setBoardSize(); // call setBoardSize() method below to create the 2d int array based on the difficulty the player chose
fillBoard(); // call fillBoard() method below to initialize the 2d array
System.out.printf("%nGameboard is set to %dx%d%n", getBoardSize(), getBoardSize());
}
protected int getBoardSize() {
return BOARD_SIZE;
}
protected int getMissiles() {
return missiles;
}
protected int useMissiles() {
return missiles--;
}
protected int getDifficulty() {
return difficulty;
}
// setting the board size to what the player wanted, 6, 9 or 12
private void setBoardSize() {
board = new int[BOARD_SIZE][BOARD_SIZE];
}
// initializing the whole board to -1
private void fillBoard() {
// initializing the board array to -1
// -1 will equal empty space, aka water on the battleship board
for(int i = 0; i < getBoardSize(); i++) {
for (int j = 0; j < getBoardSize(); j++) {
board[i][j] = -1;
}
}
}
// printing of the board
protected void printBoard() {
final char water = '~';
final char miss = '*';
final char hit = 'X';
System.out.println("\n----------------------------------------");
System.out.printf("You have %d missiles left%n", getMissiles());
System.out.printf("There are %d ship(s) still alive%n", shipsAlive);
// print out empty space at top left of board
System.out.print("\n ");
// print first column going right
for (int i = 0; i < getBoardSize(); i++) {
System.out.printf("%4d", i+1);
}
// start of main loop for printing board
for (int i = 0; i < getBoardSize(); i++) {
System.out.print("\n");
// printing of the letters for board legend
System.out.printf("%3c", getLetter(i+1));
for (int j = 0; j < getBoardSize(); j++) {
if (board[i][j] == -1 || board[i][j] == -3 || board[i][j] == -4 || board[i][j] == -5 || board[i][j] == -6 || board[i][j] == -7)
System.out.printf("%3c", water);
if (board[i][j] == 0)
System.out.printf("%3c", miss);
if (board[i][j] == 1)
System.out.printf("%3c", hit);
// FOR TEST PRINTING ONLY, UNCOMMENT THIS SECTION TO SEE SHIP PLACEMENT (OR CHEATING)
//
/*if (board[i][j] == -3)
System.out.printf("%3s", ships[0].icon);
if (board[i][j] == -4)
System.out.printf("%3s", ships[1].icon);
if (board[i][j] == -5)
System.out.printf("%3s", ships[2].icon);
if (board[i][j] == -6)
System.out.printf("%3s", ships[3].icon);
if (board[i][j] == -7)
System.out.printf("%3s", ships[4].icon); */
System.out.print("|");
}
}
}
protected class shipInfo {
public String name = "";
public String icon = "";
public int size = 0;
}
// Used inspiration from Nickwell in class for createShips()
protected void createShips() {
ships[0] = new shipInfo();
ships[1] = new shipInfo();
ships[2] = new shipInfo();
ships[3] = new shipInfo();
ships[4] = new shipInfo();
ships[0].name = "USS Enterprise";
ships[1].name = "USS Iowa";
ships[2].name = "USS Arlington";
ships[3].name = "USS Alexandria";
ships[4].name = "USS Flagstaff";
ships[0].size = 5; // Aircraft Carrier is 5 spaces long
ships[1].size = 4; // Battleship is 4 spaces long
ships[2].size = 4; // Destroyer is 4 spaces long
ships[3].size = 3; // Submarine is 3 spaces long
ships[4].size = 2; // Patrol Boat is 2 spaces long
// THE FOLLOWING WILL BE COMMENTED OUT FOR FINAL GAME
// Uncomment the ships[].icon if you want to see the icons print with the board game (for cheating)
/*ships[0].icon = "A"; // A for Aircraft Carrier
ships[1].icon = "B"; // B for Battleship
ships[2].icon = "D"; // D for Destroyer
ships[3].icon = "S"; // S for Submarine
ships[4].icon = "P"; // P for Patrol Boat */
}
protected void placeShips() {
createShips(); // when placeShip() is called in actiongame.java, createShips() will execute and create the ships for the board
int size = getBoardSize(); // assigning the board size to an int value for easier output
int shipIcon = -3; // initializing a value to -3 for placement of ships. A counter for -- is at the end of the placeShips() method which will subtract a number
// The for loop will execute 5 times, the ships[] array is 5 elements long
for (int i = 0; i < ships.length; i++) {
// initialize a boolean value to false for determing if the ship is placed on the board
boolean shipPlaced = false;
// since the boolean value is set to false, the following code will execute UNTIL the ship is placed on the board, then it will move to the next iteration of the for loop
while (!shipPlaced) {
// create a boolean value for determining directional placement of the ship and randomize between true and false
// TRUE WILL BE HORIZONTAL
// FALSE WILL BE VERTICAL
boolean placeHorizontal = r.nextBoolean();
// create and randomize two int values based on the size of the gameboard (6, 9 or 12), these two values will be passed to the board[][] array
// to determine the starting point of the ship placement
int row = r.nextInt(size);
int col = r.nextInt(size);
// if the randomized values land on anything BUT -1 (empty space, water), restart the while (!shipPlaced) loop
if (board[row][col] != -1)
continue;
// if the boolean value randomized to true, execute the next code
if (placeHorizontal) { // HORIZONTAL PLACEMENT
// if the randomized value for row PLUS the ships size is greater than the length of the board
// continue to the back of the while loop and start again
if (row + ships[i].size > size) {
continue;
}
// if there is enough space to place the ship on the board and not go OFF, the next code will execute
else {
// initialize spaceFree boolean to true, spaceFree will determine if there is another ship in the way of placement
// if there is another ship in the way, the code will restart at the top of the while loop and try again
boolean spaceFree = true;
// for loop will run for the length of the ship (example 5 times for the aircraft carrier)
for (int j = 0; j < ships[i].size; j++) {
// testing if each randomized row + 1 and col are equal to -1 (empty space, water)
if (board[row+j][col] != -1) {
spaceFree = false;
}
}
if (!spaceFree)
continue; // if the previous for loop determined there is a ship in the way, restart the while loop and try again
// The code will only get to this point if the ship will not go off the board AND there is not another ship in the way of current ship
// The following code places the ship on the board
for (int j = 0; j < ships[i].size; j++) {
// shipIcon was initialized to -3 (aircraft carrier), and a -- counter will subtract to -4 then -5 and so on to change the value of that
// position to match that of the ship
board[row + j][col] = shipIcon;
}
// since the ship passed all tests and was finally placed, change shipPlaced to true so the code moves to the next iteration of the for loop to place the next ship
shipPlaced = true;
}
}
// if the boolean value for placeHorizontal is anything but true (false) then the following block of code will execute
else { // VERTICALLY
// code executes the exact same as the placeHorizontal, except it tests for vertical values instead of horizontal ones
if (col + ships[i].size > size) {
continue;
}
else {
boolean spaceFree = true;
for (int j = 0; j < ships[i].size; j++) {
if (board[row][col+j] != -1)
spaceFree = false;
}
if (!spaceFree)
continue;
for (int j = 0; j < ships[i].size; j++) {
board[row][col + j] = shipIcon;
}
shipPlaced = true;
}
}
}
// shipIcon starts at -3, assigns the number to that specific board[row][column] per ship, then subtracts to -4 for the next
// iteration of the for loop
// -3 = AIRCRAFT_CARRIER
// -4 = BATTLESHIP
// -5 = DESTROYER
// -6 = SUBMARINE
// -7 = PATROL BOAT
shipIcon--;
}
}
protected void gameOverWin() {
System.out.println("\n\n");
System.out.println("Congratulations! You have sunk all the enemy ships.");
 One for the first roll in the frame, one for the second roll in the frame, and one for calculating the final score at the end. The scores from each frame are loaded into the respective array depending on if the bowler rolls a strike, spare, gutter, or total pins knocked down do not equal 10. This code will continue until frame 10 since frame 10 is a special case and may contain 3 bowls. Once the bowler completes the game, the scores are added up from each element in both arrays and printed into a score card for easy readability.
import java.util.Scanner;
public class AdamBoehm_HW02 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String[] roll1 = new String[10]; // 10 element array for loading first bowl
String[] roll2 = new String[10]; // 10 element array for loading second bowl
int[] framescore = new int[10]; // 10 element array for calculating 1 - 10 frames score
// CONSTAT VARIABLES
int MAXPINS = 10;
// DECLARED VARIABLES
String bonusball1 = ""; // string for potential 10th frame bonus ball
int pinsleft = 0;
int runtotal = 0;
System.out.println("*****************************************");
System.out.println("*\tWelcome to Bowling with Java!\t*");
System.out.println("*\t Enter X for Strike\t\t*");
System.out.println("*\t Enter / for Spare\t\t*");
System.out.println("*****************************************");
// VALUES FOR TESTING PROGRAM
// X 7 / 7 2 9 / x x x 2 3 6 / 7 / 3
// X 9 / 5 / 7 2 x x x 9 0 8 / 9 / x
// X X X X X X X X X X X X
// 10 10 10 10 10 10 10 10 10 10 10 10
//Start of loop for printing frame 1-10
//Loop will prompt bowler for input of their scores for each frame
for (int i = 0; i < framescore.length; i++)
{
if (i < 9) // if frame is 1 - 9
{
System.out.printf("%n---Frame %d---", i+1); // will print frame 1 - 10
System.out.print("\nEnter score for first bowl: ");
roll1[i] = input.next().toUpperCase(); // takes string input for first bowl
if (roll1[i].equals("X") || Integer.parseInt(roll1[i]) == 10) // if first bowl is strike
System.out.println("\tNice Strike!"); // print
else
{
pinsleft = MAXPINS - Integer.parseInt(roll1[i]); // calculating pins still standing after first bowl
System.out.println(" " + pinsleft + " pins still standing");
System.out.print("Enter score for second bowl: ");
roll2[i] = input.next().toUpperCase();
if (roll2[i].equals("/") || Integer.parseInt(roll1[i]) + Integer.parseInt(roll2[i]) == 10) // if bowler types / or bowl 1 + bowl 2 = 10
System.out.println("\tNice Spare!"); // print
}
}
if (i != 9) // if it's frame 1 - 9, do not execute the rest of the for loop, reset to top
continue;
// Next is prompting for input for the 10th frame
// 10th frame is special because there can be up to 3 rolls
else
{
System.out.printf("%n---Frame %d---", i+1); // will print frame 10
System.out.print("\nEnter score for first bowl: ");
roll1[i] = input.next().toUpperCase();
if (roll1[i].equals("X") || Integer.parseInt(roll1[i]) == 10) // if first bowl in frame 10 is a strike
{
System.out.println("\tNice Strike!"); // print
System.out.print("Enter score for second bowl: ");
roll2[i] = input.next().toUpperCase();
if (roll2[i].equals("X") || Integer.parseInt(roll2[i]) == 10) // if second bowl in frame 10 is a strike
{
System.out.println("\tNice Strike!"); // print
System.out.print("Enter score for third bowl: ");
bonusball1 = input.next().toUpperCase();
} // end statement if second bowl in frame 10 is a strike
else
{ // if second bowl in frame 10 is NOT a strike
System.out.print("Enter score for third bowl: ");
bonusball1 = input.next().toUpperCase();
} // end else statement
} // end if statement if first bowl in frame 10 is a strike
else // if first bowl in frame 10 is NOT a strike
{
pinsleft = MAXPINS - Integer.parseInt(roll1[i]);
System.out.println(" " + pinsleft + " pins still standing");
System.out.print("Enter score for second bowl: ");
roll2[i] = input.next().toUpperCase();
if (roll2[i].equals("/") || Integer.parseInt(roll1[i]) + Integer.parseInt(roll2[i]) == 10) // if second bowl in frame 10 is a spare
{
System.out.println("\tNice Spare!"); // print
System.out.print("Enter score for third bowl: ");
bonusball1 = input.next().toUpperCase();
} // end if statement if second bowl in frame 10 is a spare
else // if second bowl in frame 10 is NOT a spare
break; // break out of loop completely because third roll is not needed
}// end else statement for if frame 10 is NOT a strike
} // end else statement for if (i != 9)
} // end for loop for prompting bowler for input
input.close(); // closing scanner input
//
// Calculations for final output is next
//
//
for (int i = 0; i < framescore.length; i++){
int score = 0; // initializing score to 0 for each frame
if (i < 8)// calculating frame 1 - 8
{
if (roll1[i].equals("X") || Integer.parseInt(roll1[i]) == 10) // if first roll is a strike, assign 10 points
{
score += 10;
if (roll1[i+1].equals("X") || Integer.parseInt(roll1[i+1]) == 10) // if first roll in next frame is a strike, assign 10 more points to current frame
{
score += 10;
if (roll1[i+2].equals("X") || Integer.parseInt(roll1[i+2]) == 10) // if first roll in third frame is a strike, assign 10 more points to current frame
score += 10;
else
score += Integer.parseInt(roll1[i+2]);
} // end if statement for third strike roll
else // if after first strike, next bowl is not a strike
if (roll2[i+1].equals("/") || Integer.parseInt(roll2[i+1]) == 10) // if second bowl after strike is a spare, assign 10 points to current frame
score += 10;
else // else add integer value of roll 1 and roll 2 to current frame
score += (Integer.parseInt(roll1[i+1]) + Integer.parseInt(roll2[i+1]));
}
else // else if first roll is NOT a strike
if (roll2[i].equals("/") || Integer.parseInt(roll2[i]) == 10)// if second roll is a spare, add 10 points
{
score += 10;
if (roll1[i+1].equals("X") || Integer.parseInt(roll1[i+1]) == 10) // if first roll in next frame is a strike, add 10 points
score += 10;
else if (!roll1[i+1].equals("X") || Integer.parseInt(roll1[i+1]) != 10)
score += Integer.parseInt(roll1[i+1]);
else
continue;
}
else
score += Integer.parseInt(roll1[i]) + Integer.parseInt(roll2[i]);
} // end if statement for if i < 8
//
// Next is calculating the 9th and 10th frame with potential bonus ball
//
//
else
if (i == 8) // calculating 9th frame
{
if (roll1[i].equals("X") || Integer.parseInt(roll1[i]) == 10) // if first bowl in 9th frame is a strike, add 10 points
{
score += 10;
if (roll1[i+1].equals("X") || Integer.parseInt(roll1[i+1]) == 10) // if first bowl in 10th frame is a strike, add 10 points
score += 10;
if (roll2[i+1].equals("X") || Integer.parseInt(roll2[i+1]) == 10) // if second bowl in 10th frame is a strike, add 10 more points
score += 10;
else // if first bowl in 10th frame is NOT a strike
{
if (roll2[i+1].equals("/") || Integer.parseInt(roll1[i+1]) + Integer.parseInt(roll2[i+1]) == 10) // if second bowl in 10th frame is a spare
score += 10;
else
score += Integer.parseInt(roll1[i+1]) + Integer.parseInt(roll2[i+1]);
}
}
else // if first bowl in 9th frame is NOT a strike
if (roll2[i].equals("/") || Integer.parseInt(roll1[i]) + Integer.parseInt(roll2[i]) == 10) // if roll 2 in 9th frame is a spare, add 10 points
{
score += 10;
if (roll1[i+1].equals("X") || Integer.parseInt(roll1[i+1]) == 10) // if roll 1 in 10th frame is a strike, add 10 more points
score += 10;
else // else add integer value of roll 1 in frame 10
score += Integer.parseInt(roll1[i+1]);
}
else // else if roll 1 and roll 2 in frame 9 are not strikes or spare
score = Integer.parseInt(roll1[i]) + Integer.parseInt(roll2[i]);
} // end calculations for frame 9
else // Calculating 10th frame
{
if (roll1[i].equals("X") || Integer.parseInt(roll1[i]) == 10)// if first throw on frame 10 is a strike, add 10 points
{
score += 10;
if (roll2[i].equals("X") || Integer.parseInt(roll2[i]) == 10) // if second throw on frame 10 is a strike, add 10 more points
score += 10;
if (bonusball1.equals("X") || Integer.parseInt(bonusball1) == 10) // if bonus ball on frame 10 is a strike, add 10 more points
score += 10;
else // if second throw on frame 10 is NOT a strike
{
if (bonusball1.equals("/") || Integer.parseInt(roll2[i]) + Integer.parseInt(bonusball1) == 10) // if bonus ball = spare or roll 2 + bonus ball = 10, add 10 points
score += 10;
else // else if first throw = strike, second throw != strike, and bonus ball != spare
score += Integer.parseInt(roll2[i]) + Integer.parseInt(bonusball1);
}
} // end if statement if first throw on frame 10 is a strike
else // if first throw on frame 10 is NOT a strike
if (roll2[i].equals("/") || Integer.parseInt(roll1[i]) + Integer.parseInt(roll2[i]) == 10) // if roll 2 is a spare, score is 10
{
score += 10;
if (bonusball1.equals("X") || Integer.parseInt(bonusball1) == 10) // if bonus ball is a strike, add 10 points
score += 10;
else
score += Integer.parseInt(bonusball1);
}
else
score = Integer.parseInt(roll1[i]) + Integer.parseInt(roll2[i]);
}
framescore[i] = score; // assigning the score to framescore[i] to print out in score card
}
// Test printing for all values input into both arrays of roll1[10] and roll2[10] + bonusball1
// to ensure proper values have been input before printing
/*for (int i = 0; i < framescore.length; i++){
System.out.printf("%n%nFrame: %d", i+1);
System.out.printf("%nRoll1: %s", roll1[i]);
System.out.printf("%nRoll2: %s", roll2[i]);
if (i == 9)
System.out.printf("%nBonusball: %s", bonusball1);
}*/
// SCORECARD OUTPUT
// Output of Frames, Results of each frame (what was bowled), Score of each frame, and running total is next
String frameprint = "Frame:";
String resultprint = "Result:";
String framescoreprint = "Frame Score:";
String runtotalprint = "Running Total:";
char STRIKE = 'X'; // char value to print X for results output if bowler enters X or 10 as their value
char SPARE = '/'; // char value to print / for results output if bowler enters / or roll1 + roll2 = 10
System.out.println("\n\n\t\t\t\t ***** SCORE CARD *****");
System.out.println("\n_______________________________________________________________________________________");
System.out.printf("%-18s", frameprint);
for (int i = 0; i < framescore.length; i++){ // printing out frames 1 - 10 on score card
System.out.printf("%-7d", i+1);}
System.out.println("\n_______________________________________________________________________________________");
System.out.printf("%-18s", resultprint);
for (int i = 0; i < framescore.length; i++){
if (i < 9)
{
if (roll1[i].equals("X") || Integer.parseInt(roll1[i]) == 10) // if first bowl was a strike, print X
System.out.printf("%-7c", STRIKE); // print an X
else if (!roll1[i].equals("X") || Integer.parseInt(roll1[i]) == 10) // if first bowl was NOT a strike
{
System.out.printf("%-1s ", roll1[i]); // print first bowl
if (roll2[i].equals("/") || Integer.parseInt(roll1[i]) + Integer.parseInt(roll2[i]) == 10) // if second bowl was a spare
System.out.printf("%-5c", SPARE); // print a /
else
System.out.printf("%-5s", roll2[i]); // else if second bowl is not a spare, print second bowl
} // end else if statement for if first bowl was NOT a strike
} // end if statement for if i < 9
if (i != 9)
continue;
if (i == 9) // printing of the 10th frame on score card
{
if (roll1[i].equals("X") || Integer.parseInt(roll1[i]) == 10) // if first bowl in frame 10 is a strike
{
System.out.printf("%-2c", STRIKE);
if (roll2[i].equals("X") || Integer.parseInt(roll2[i]) == 10) // if second bowl in frame 10 is a strike
{
System.out.printf("%-2c", STRIKE);
if (bonusball1.equals("X") || Integer.parseInt(bonusball1) == 10) // if third bowl in frame 10 is a strike
System.out.printf("%-2c", STRIKE);
else // else if third bowl in frame 10 is NOT a strike, print the value of bonus ball
System.out.printf("%-2s", bonusball1);
}
else // else if first bowl in frame 10 is a strike and second is NOT a strike
{
System.out.printf("%-2s", roll2[i]);
if (bonusball1.equals("/") || Integer.parseInt(roll2[i]) + Integer.parseInt(bonusball1) == 10) // if roll 2 and bonus ball equal spare
System.out.printf("%-2c", SPARE);
else // else if second roll + bonus ball is not a spare
System.out.printf("%-2s", bonusball1);
}
}
else // else if first roll in frame 10 is NOT a strike
{
System.out.printf("%-2s", roll1[i]);
if (roll2[i].equals("/") || Integer.parseInt(roll1[i]) + Integer.parseInt(roll2[i]) == 10) // if roll 1 + roll 2 = 10 in frame 10
{
System.out.printf("%-2c", SPARE);
System.out.printf("%-2s", bonusball1);
}
else // else if first roll is NOT a strike and second roll is NOT a spare or strike
System.out.printf("%-2s", roll2[i]);
}
}
} // end of for loop for printing each frames bowling results
System.out.println("\n_______________________________________________________________________________________");
System.out.printf("%-18s", framescoreprint);
//Next is printing of the score results per frame
for (int i = 0; i < framescore.length; i++){
System.out.printf("%-7d", framescore[i]);
}
System.out.println("\n_______________________________________________________________________________________");
System.out.printf("%-18s", runtotalprint);
// Next is printing of the running total per frame
for (int i = 0; i < framescore.length; i++){
runtotal += framescore[i];
System.out.printf("%-7d", runtotal);
}
System.out.println("\n_______________________________________________________________________________________");
System.out.println("\n\n-------------------------------------");
System.out.print("\t*** END OF PROGRAM ***");
} // end of public static void main(String[] args)
}


Interface: PacketTimeStamp
interface PacketTimeStamp<typedef precision_tag, typedef size_type>Commands
command void clear(message_t *msg)
command bool isValid(message_t *msg)
command void set(message_t *msg, size_type value)
Commands - Details
clear
command void clear(message_t *msg)
- Parameters:
-
'message_t *ONE msg' Message to modify.
Sets the isValid flag to FALSE.
isValid
command bool isValid(message_t *msg)
- Parameters:
-
'message_t *ONE msg' Message to examine.
Returns TRUE if the time stamp of the message is valid. Under special
circumstances the radio chip might not be able to correctly assign a
precise time value to an incoming packet (e.g. under very heavy traffic
multiple interrupts can occur before they could be serviced, and even
if capture registers are used, it is not possible to get the time stamp
for the first or last unserviced event), in which case the time stamp
value should not be used. It is recommended that the isValid command be
called from the receive or sendDone event handler.
set
command void set(message_t *msg, size_type value)
- Parameters:
-
'message_t *ONE msg' Message to modify.
Sets the isValid flag to TRUE and the time stamp value to the
specified value.
timestamp
command size_type timestamp(message_t *msg)
- Parameters:
-
'message_t *ONE msg' Message to get timestamp from.
Return the time stamp for the given message. Please check with the
isValid command if this value can be relied upon. If this command is
called after transmission, then the transmit time of the packet
is returned (the time when the frame synchronization byte was
transmitted). If this command is called after the message is received,
the tne receive time of the message is returned. It is recommended that
the timestamp command be called only from the receive or sendDone event
handler.


In-Memory Seeds
cfd0883d
72f9a6bf
Load a seed
In-memory seeds listed in the order that they were loaded.
Displays lock icon if a passphrase was set.


A toolbox for systemic risk based on liabilities matrices. Contains a Gibbs sampler for liabilities matrices where only row and column sums of the liabilities matrix as well as some other fixed entries are observed. Includes models for power law distribution on the degree distribution.
| Version: | 0.4.1 |
| Imports: | lpSolve, Rcpp (≥ 0.11.2), stats, utils |
| LinkingTo: | Rcpp |
| Suggests: | coda, testthat, knitr |
| Published: | 2017-11-14 |
| Author: | Axel Gandy and Luitgard A.M. Veraart |
| Maintainer: | Axel Gandy <a.gandy at imperial.ac.uk> |
| License: | GPL-3 |
| NeedsCompilation: | yes |
| Citation: | systemicrisk citation info |
| Materials: | NEWS |
| CRAN checks: | systemicrisk results |
| Reference manual: | systemicrisk.pdf |
| Vignettes: |
Example: Hierarchical Models Some Introductory Examples Some Introductory Examples |
| Package source: | systemicrisk_0.4.1.tar.gz |
| Windows binaries: | r-devel: systemicrisk_0.4.1.zip, r-release: systemicrisk_0.4.1.zip, r-oldrel: systemicrisk_0.4.1.zip |
| OS X binaries: | r-release: systemicrisk_0.4.1.tgz, r-oldrel: systemicrisk_0.4.1.tgz |
| Old sources: | systemicrisk archive |
Please use the canonical form https://CRAN.R-project.org/package=systemicrisk to link to this page.


In algebra, we learned that a sequence is a set of numbers that follow
a set order. There are two types: arithmetic and geometric. An arithmetic sequence is
a set of numbers of which the difference between consecutive terms is constant.
A geometric sequence is a set of numbers of which the ratio between consecutive terms
is constant. A series is the sum of all the terms in some defined
sequence. It is represented using 'Σ' for summation.
Geometric Series
In a geometric sequence, we have the expression an = r × an − 1,
where r is the ratio and an − 1 is the previous term in the sequence.
In a geometric series, we implement the summaton notation Σ. This makes our expression:
Now, a series can either converge or diverge.
A convergent series is one that approaches a specific value, and a divergent series is one that does not.
If a geometric series has a ratio that is constrained within the bounds of (-1, 1), then it
will converge towards the value of a0(1 − r)-1.
That means that if the initial value is 1 and the ratio is ½, then the series will converge to 2.
p-Series
A p-series is one that follows the following structure:
s =
Σ
n = 1
∞
k⁄n p
If p is greater than 1, then the series will converge. If p is less than or equal to 1, then the series
is divergent. A notable example of this type of series is the Basel problem (here is a child of this problem):
n-th Term
The n-th term test is a way to test if a series will certainly diverge; however, it has some flaws
in that it cannot determine if a series will certainly converge.
How does it work? Say we have the following series:
s =
Σ
n = 0
∞
an
The n-term test for this series would be finding
limn → ∞ an .
If the limit does not approach zero, then the series definitely diverges.
If the limit does approach zero, then further tests must be done in order to determine
the convergence or divergence of the series.
The flaw of this test can be seen in the harmonic series:
s =
Σ
n = 1
∞
1⁄n
The harmonic series is divergent, but the n-th term test determines that the limit
does in fact approach zero. Therefore, it cannot accurately determine if the series is convergent
and is only useful for enabling future testing methods, such as the integral test, or declaring
that a series definitely diverges. Furthermore, any convergent series must pass the n-th term test
in order for that series to be convergent. In other words, all convergent series pass the n-th term
test but passing the n-th term test does not make a series convergent.
Telescoping Method
This requires the ability to rewrite a certain series in the foollowing way:
s =
Σ
n = a
∞
(an − bn)
=
Σ
n = a
∞
an
−
Σ
n = b
∞
an
For example:
s =
Σ
n = 1
∞
(1⁄n − 1⁄n + 1)
=
Σ
n = 1
∞
1⁄n
−
Σ
n = 2
∞
1⁄n
=
Σ
n = 1
1
1⁄n
= 1
Note that this only works if the series passes the n-term test.
This is because if you write out the complete expanded form of the
series, you would get end up needing to find the n-th term to solve for the series.
Integral Test
In order to perform the integral test, there are three constraints for the series:


Cool warps
When I was first learning complex analysis, I thought conformal mappings were too cool not to mess around with.  The Matlab code to make the GIFs is on my GitHub page, and some sample outputs are below.
But first, a little more detail:
Conformal mappings are mappings that preserve angles locally. If I map an image in a conformal way, then if you zoom in enough on a spot in the output, it will eventually look like a zoomed in version of the original (albeit likely rotated). This code generates warping GIFs by interpolating between (i.e. blending) conformal mappings of the complex plane.
In all of the following, I assume that I tile the complex plane with the given image. Then I iterate over all the pixels in the output to assign a value to each one. The values come from mapping the pixel positions in the output by the inverse function of the conformal map we’re trying to achieve and then modding by the dimensions of the image (hence, the tiling assumption).
For each GIF, I randomly generate an order for my pre-coded set of mappings, which should be conformal in the first quadrant. Then I interpolate from one to the next to create the cool space zoom effects; this often, but not always, preserves the assumption that things will be conformal, so it’s fun to look out for points in the GIFs where the map’s no longer conformal and the outputs look weird.


Salim Khan turns 84: Rare photos of the veteran screenwriter Salim Khan turns 84 today. Born on November 24, 1935, Salim is best known for his association with Javed Akhtar in the 1970s and 80s. 24 Nov 2019, 08:17 Veteran screenwriter Salim Khan celebrates his 84th birthday today. Salim is best known for his association with Javed Akhtar in the 1970s and 80s. Together referred to as Salim-Javed, the two wrote the scripts for iconic films like Sholay, Don and Deewar. Salim is also the father of actors Salman, Sohail and Arbaaz Khan. (Photo: Express archive) Salim Abdul Rashid Khan was born in Indore on November 24, 1935. (Photo: Express archive) Salim Khan debuted as a solo screenwriter in Do Bhai. Here, he can be seen with his son and actor Sohail Khan. (Photo: Express archive) Salim Khan and Javed Akhtar are regarded as the greatest and most successful Hindi screenwriters of all time. The duo won three Filmfare Awards for Shakti, Deewar and Zanjeer. (Photo: Express archive) Salim-Javed's last gig together was Shekhar Kapur's science-fiction drama Mr. India. (Photo: Express archive) Salim Khan also worked as an actor in films like Teesri Manzil and Wafadar. In this photo, Salim can be seen with a young Sohail. (Photo: Express archive) Salim Khan married twice, once with Salma Khan in 1964 and then with Helen in 1981 (Photo: Express archive)


CGeomBuilder.h File Reference
Detailed Description
: CCompiledVertex, CCompiledTexCoord, CCompiledEdge, CCompiledPoly, CCompiledMesh, CGeomCompiler definition.
Definition in file CGeomBuilder.h.
Include dependency graph for CGeomBuilder.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Generated on Tue Feb 8 21:59:11 2005 for MarSTDv2004 by
1.4.1


About This Site
Daniel Blair 2017
This is a simplen website which serves the purpose of gathering the geneological information for the blair family clan in Winnipeg Manitoba, Canada. This is a continuation of the work put in by Peggy Blair and digitized by Daniel Blair. This data is open source and is intended for you to view and contribute. We want to make sure that this research is as updated as possible. You can contribute through our geneology site or through the GitHub repository.


Toggle navigation
Kitchen Khilladi
Create Contestant
Judge Voting
Judge Result
User Voting
Voting Result


Building
T7: 18th Feb 2016
Did you learn anything while building the calculator?
Aside from never taking my calculator or other machinery for granted again...
- Order and scope is important: Trying to logically think through and anticipate as many possible situations, outcomes, etc and trying to deal with each one in the correct order to make it all work. I couldn't quite make the calculator handle oddballs like handling negative numbers because there'd be double operators, or not allowing multiple decimals to be entered for one number.
- Vastness of JS: My current lack of the correct vocabulary and knowledge of what JS is capable of was very apparent when tackling some of the issues. But learning workarounds is always beneficial too.
- Other things: Along the way when researching I found some other interesting tidbits but I didn't use them for my calculator, such as the short version of the if loop:
condition ? expression1 : expression2
What was your experience extending the racer game?
I struggled with solving how to move from one row to the next. Still can't get it to work, but will go back to it if there's time. It was interesting tidying up the old file. It was relatively well ordered so it wasn't too difficult to build on to it.
It's always difficult too, to leave something unfinished. But I'm slowly learning to accept just moving on sometimes and try to make it as function as possible, then go back if there's time.


Home
About
CTSO
Shop
Contact
Contact Us
Name
Email
Address
What is your Current Grade?
Freshmen
Sophomore
Junior
Senior
Do you have any questions?
Submit


| Created by | {{currentCase.user.displayName}} |
| Created on | {{currentCase.created| date:'medium'}} |
| Patient | {{currentCase.patient_id.pat_name}} |
| Investigation name | {{inv_name}} |
| Phenotype | {{inv_phenotype}} |
Overview: {{inv_phenotype}}
Loading...| Overview | {{overview.omim.phenotype}} |
| Omim results | {{overview.omim.omim_size}} gene(s) matched from the phenotype {{overview.omim.phenotype}} |
| Variant intersection | {{overview.pat_var.variants.length}} |


Discrete Structure
Introduction
Discrete Mathematics deals with discrete objects. Discrete objects are those objects that can be counted and are not connected for e.g. houses, trees, desks, integers, etc. So dealing with these discrete objects requires different concepts like counting techniques, knowledge of different discrete structures that are needed to understand what exactly discrete structure is like sets, relations, graphs, etc. we start our quest with foundation and go in depth later.Logic
Logic is a language for reasoning. Since logic can helps us to reason the mathematical models it needs some rules associated with logic so that we can apply those rules for mathematical reasoning. There are lots of applications of logic in the field of computer science for e.g. designing circuits, programming, program verifications, etc.
Propositions and Propositional Calculus
Proposition is a fundamental concept in logic. Proposition is a declarative sentence that is either true or false, but not both. See the examples below:
2 + 2 = 5. (False), 7 - 1 = 6. (True)
It is hot today. (If it is hot then true)
Kathmandu is the capital of Nepal. (True)
All the above examples are either true or false.
Try to analyze the sentences below:
x > 5, Come here, Who are you?, 3 + 4
The above sentences are not propositions since we cannot say whether they are true or false.
Propositions are denoted conventionally by using small letters like p, q, r, s …. The truth value of proposition is denoted by T for true proposition and F for false proposition.
Reminder: p, q ,r ,s … are not actual propositions but they are propositional variables i.e. place holders for propositions.
The logic that deals with propositions is called propositional logic or propositional calculus
Logical Operators/Connectives
Logical operators are used to construct mathematical statements having one or more propositions by combining the propositions. The combined proposition is called compound Proposition. The truth table is used to get the relationship between truth values of propositions. Here we present the logical operators along with their behavior in truth table:
Negation (not)
Given a proposition p, negation operator (¬) is used to get negation of p denoted by ¬p called “not p”.
Example: Negation of the proposition “ I love birds” is “ I do not love birds” if the sentence I love birds is denoted by p then its negation is denoted by ¬p.
Truth table
p ¬p
T F
F T
Conjunction (and)
Given two propositions p and q, the proposition “p and q” denoted by p∧q is the proposition that is true whenever both the propositions p and q are true, false otherwise. The proposition that is obtained by the use of “and” operator is also called conjunction of p and q.
Example: If we have propositions p = “Ram is intelligent” and q = “Ram is diligent” the conjunction of p and q is Ram is intelligent and diligent. This proposition is true only when Ram is intelligent and he is diligent also, false otherwise.
 The proposition that is obtained by the use of “or” operator is also called disjunction of p and q.
Example: If we have propositions p = “Ram is intelligent” and q = “Ram is diligent” the disjunction of p and q is Ram is intelligent or he is diligent. This proposition is false only when Ram is not intelligent and not diligent, true otherwise.
Truth Table
p q p∨q
T T T
T F T
F T T
F F F
Exclusive or (Xor)
Given two propositions p and q, the proposition exclusive or of p and q denoted by p ⊕ q is the proposition that is true whenever only one of the propositions p and q is true, false otherwise. As opposed to the disjunction above which is inclusive the general meaning of the English sentence can be used to know whether the “or” used is inclusive or exclusive. Example: If we have propositions p = “Ram drinks coffee in the morning” and q = “Ram drinks tea in the morning” the exclusive or of p and q is Ram drinks coffee or tea in the morning.


Yesterday I installed emoncms v6 on CentOS 5. I chose v6 as I wanted to avoid installing redis on my machine. I understand that emoncms expects to live in /var/www/emoncms while CentOS has a default document root at /var/www/html. Using an Alias directive and a <directory /var/www/emoncms> entry I got the login page to load correctly. I have also verified that mod_rewrite is on and using the .htaccess file. The backend is MySQL and the database got populated with tables, so access is working there as well.
On to the actual question.... When I try to register a user nothing happens. I see a red bar appearing (where an error message would have to appear?), but there is no error message shown. In the error_log of Apache it shows "File does not exist: /var/www/html/var". Similar issues are reported and seem to be related to mod_rewrite, but as far as I can tell that is working. I tested by forcing a rewrite to the Google webpage (from the .htaccess file) and that redirect worked without problems. What should I try next?
Re: New instance - cannot register user
Could there be a CentOS configuration for where public html should be that is conflicting, causing the error "File does not exist: /var/www/html/var", it sounds like you have everything else ok.
Might be worth checking the response in your browser console window to a login request it may give some more debug info to go on. Check the response under the 'Network' tab in chrome or firefox
Re: New instance - cannot register user
Thanks Trystan for the quick reply. I have tried the console from Firefox as you suggested and when I hit the register button it shows a 404 for the URL http://hostname.local.lan/emoncms/user/register.json. The login page is shown when I go to http://hostname.local.lan/emoncms, so the URL appears to be correct. The access, rewrite and error logfiles of Apache don't show this 404 error or the emoncms/user/register.json URL which I would have expected.
Anything else I should try?
Re: New instance - cannot register user
I'm also having the same issue.
I did find why there are no 404 being shown in the logs. The .htaccess file is configured to send the error to another file that doesn't exist (/home/<some username>/error.log
Is is the error I'm getting:
PHP Fatal error: Call to a member function fetch_array() on a non-object in /var/www/html/emoncms/Modules/user/user_model.php on line 377
This error relates to this line:
$result = $this->mysqli->query("SELECT id FROM users WHERE username = '$username';");
$row = $result->fetch_array();
What interesting, and I haven't really started to look into the source code is I'm using redis and not mysql
Re: New instance - cannot register user
tsjoender: the error 404 for the URL http://hostname.local.lan/emoncms/user/register.json is what you would expect if mod_rewrite is not configured properly, might be worth checking the 000-default settings again and doing an apache2 restart?
spoutin: I will fix the htaccess issue. Are you upgrading or installing from scratch, is sounds like the database has not been setup fully. The redis version of emoncms still uses mysql for disk persistence.
Re: New instance - cannot register user
Thanks, i didn't have the database created. I didn't realize I needed both databases. I have never used redis before and I wasn't sure how it worked.
Tsjoeder: To check if mod_rewrite is installed on Centos look at the following things.
cat /etc/httpd/conf/httpd.conf |grep rewrite
LoadModule rewrite_module modules/mod_rewrite.so
you should see the above output. Also ensure the module is not commented out (look for the #)
vi or nano /etc/httpd/conf/httpd.conf
look for the following line:
<Directory "/var/www/html">
then scroll down from there and look for
AllowOverride
it should be set to All (default is None)
That should be it.
On another note, I didn't create an alias for emoncms to run out of /var/www. I'm running it from /var/www/html/emoncms and it seems to be working ok.
Re: New instance - cannot register user
First of all: Happy new year to you all!
Thanks again Trystan and thanks Spoutin for your time. I had tried to change the PHP logfile location (to /var/tmp), but then no file is created, so no
logs I could check. I had also tried the AllowOverride All in the <directory>/var/www/html</directory> section, but unfortunately no success either.
Mod_rewrite seems to work because if I comment out:
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
and replace it with
RewriteRule ^(.*)$ http://www.google.com [R]
Then I'm sent to the Google page when I enter the URL http://hostname.local.lan/emoncms/bla. This is why I do not suspect that mod_rewrite is not active,
but maybe this test is not conclusive?
Interestingly when I move the emoncms directory to /var/www/html and remove the alias, but add the AllowOverride All to a
<directory>/var/www/html/emoncms</directory> section, then the error "File does not exist: /var/www/html/var" is not shown anymore in the Apache error log.
Furthermore the PHP errorfile is now created and shows the error:
"PHP Fatal error: Call to undefined function filter_var() in /var/www/html/emoncms/Modules/user/user_model.php on line 140"
That seems related to my PHP version being 5.1.6 as the filter_var function is introduced in 5.2.x... The server on which I intend to run Emoncms runs
other things as well, so upgrading may break things. I'll think about how to proceed on this one... Perhaps I'll start with an Ubuntu virtual machine to
test Emoncms out.
Re: New instance - cannot register user
I'm having trouble with an install of emoncms on debian wheezy, and could use some advice.
I tried using apt-get and the pre-packaged install, but that method seems to be broken.
So I tried following the instructions here:
https://github.com/emoncms/emoncms/blob/master/docs/LinuxInstall.md
All went swimmingly until I got to:
For <Directory /> and <Directory /var/www/> change AllowOverride None to AllowOverride All. This may be on lines 7 and 11 of /etc/apache2/sites-available/000-default. Modern versions of Ubuntu store these in the main config file: /etc/apache2/apache2.conf.
$ sudo nano /etc/apache2/sites-available/000-default
or
$ sudo nano /etc/apache2/apache2.conf
/etc/apache2/apache2.conf contains no <Directory ...> entries at all, and /etc/apache2/sites-available/000-default doesn't exist.
I carried on until this point:
Update your database settings to use your new secure password:
$username = "USERNAME"; $password = "YOUR_SECURE_PASSWORD_HERE"; $server = "localhost"; $database = "emoncms";
I assumed username=emoncms and password=<the secure one I created during MySQL setup>.
But at the end of the install, I find I cannot register a user.
http://<IP_ADDRESS>/emoncms/user/register.json gives me "404 Not Found" in the console.
I tried following the suggestions here:
http://blog.asiantuntijakaveri.fi/2013/11/ubuntu-1310-x64-with-emoncms.html
regarding .htaccess setup and <Directory ...> entries in /etc/apache2/apache2.conf but now I get "500 Internal Server Error".
I've reached the outer limits of my knowledge: can anyone point me in the right direction?
Many thanks
Re: New instance - cannot register user
Hi
I just ran into this config edit problem.
Try sudo nano /etc/apache2/sites-enabled/000-default
I think the directory has been changed.
Edit
I also have a problem on a new installation on a Pi.
I can reach the login page but register does not work, I just get a pink line. I am fairly sure I have followed the instructions correctly. Any ideas anyone?
Regards
Ian
Re: New instance - cannot register user
I recall not being able to find a "sites-enabled" file when I last had a similar issue, Since then I've used the following to create the "sites-enabled" during a scripted installation process
sudo sh -c "echo 'Alias /emoncms /var/www/emoncms' > /etc/apache2/sites-available/emoncms"
sudo sh -c "echo '<Directory /var/www/emoncms>' >> /etc/apache2/sites-available/emoncms"
sudo sh -c "echo ' Options FollowSymLinks' >> /etc/apache2/sites-available/emoncms"
sudo sh -c "echo ' AllowOverride All' >> /etc/apache2/sites-available/emoncms"
sudo sh -c "echo ' DirectoryIndex index.php' >> /etc/apache2/sites-available/emoncms"
sudo sh -c "echo ' Order allow,deny' >> /etc/apache2/sites-available/emoncms"
sudo sh -c "echo ' Allow from all' >> /etc/apache2/sites-available/emoncms"
sudo sh -c "echo '</Directory>' >> /etc/apache2/sites-available/emoncms"
sudo a2ensite emoncms
sudo service apache2 restart
Paul
Re: New instance - cannot register user
Ian,
that is exactly the error I have.
A trawl through Apache2 docs suggests sites-enabled and sites-available directories serve separate functions, but I will look into it further and report back!
Thanks for the pointer.
Re: New instance - cannot register user
Paul,
I've read the Apache2 docs, which suggest that what you've done there is create a new virtual host and enable it, rather than edit the default one. That is probably the right way to do it.
I don't seem to have a config file called "000-default":possibly it is just called "default"? That's what threw me, being an Apache2 noob!
I need to investigate further.
Thanks for the hint.
Matt
Re: New instance - cannot register user
I suspect the "default" apache2 setup may have changed at some point maybe, if (at least) 3 of us have failed to find the same file in the location many before us have found it ok.
Interested to hear what you find, as I can't explain why it didn't work, I just remember what I did to get it to work
Paul.
Re: New instance - cannot register user
I currently can't post certain code in the forum because the spam rules keep banning me!! (3 times in last 24hrs), but there is always a way around things until it gets sorted....
CORRECTION - the above should read a2ensite & a2dissite.
Re: New instance - cannot register user
Paul, Ian,
The good news: I got it to work!
Thanks for the guidance.
Annoyingly, I keep getting blocked when I try to post my solution!
Something in there the forum's filters are objecting to (this thread http://openenergymonitor.org/emon/node/10037).
Matt
Re: New instance - cannot register user
Paul
I have the same problem posting, but I found the same.
I got it working by editing the default virtual host.
When I tried to create my own emoncms virtual host, I couldn't make it work.
I believe the default symlink gets prefixed 000- so that it gets enabled 1st at run time.
Did you mean a2ensite and a2dssite to enable/disable virtual hosts?
Matt
Re: New instance - cannot register user
Matt
For the linux challenged (me in this instance) can you give the exact steps you have to do to get it to work.
Ian
Re: New instance - cannot register user
Matt, yes of course a2ensite and a2dissite!!
I was distracted by being banned 3 times by the OEM server whilst posting the above!!
Ian, Do you have 'sites-available' and 'sites-enabled' folders?
If you have a 'sites-available' folder, does it contain an apache configuration file called 'default'?
If so, you need to edit that file in accordance with your installation (make a backupcopy of it first), and then create a symlink (which will be automatically named 000-default) in your 'sites-enabled folder. So from your 'sites-available folder;
So now when Apache runs, it will look in the 'sites-enabled' folder and read the 'default' file in ''sites-available' via the symlink.
Hope this helps.
Paul
Re: New instance - cannot register user
Ian,
I'd love to, but seem to be banned from posting certain things!
Matt
Re: New instance - cannot register user
Hi Ian, Sent you a PM.
Re: New instance - cannot register user
Hi there, I have the same problem, could you please also let me know how you solved it ?
thanks !
Tony
Re: New instance - cannot register user
I did it by adding this:
<Directory /var/www/html/emoncms/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
In the /etc/apache2/apache2.conf file
Re: New instance - cannot register user
Hi fluppie,
Interesting that you posted the same "fix" as shown here. (with the exception of html in your path, it's identical)
It's dated - timestore was in use when it was written.
Some rather eye-opening comments regarding the mod rewrite stanza are on that page too.


Verify that the given point lies on the curve. Find the equation of the tangent line to the curve at the point.
%UseLnInsteadOfLog
a=RandomInteger(-2,2);
b=RandomInteger(-2,2);
c=RandomInteger(2,4);
leftFun{}({{x}},{{y}})= x^2 + x y + 2/c y^2 ;
left=leftFun{}(x,y);
right= leftFun{}(a,b);
theFun=left-right;
theFinalSlope=(answer = (d/dx theFun;
-(d/dx y=0;d/dx theFun)_2 / CoefficientOf{}(d/dx y, d/dx theFun)
)_2;
x=a;
y=b;
answer
)_4
\(
left
=
right
\) at the point: \((x,y)=\)
\left(a,b\right)
.
PlotImplicit(theFun, (-10, -10), (10, 10), (50,50),2600)
+PlotWindow(300,300)
+PlotSetId("canvas1")
The tangent line equation:
y-b-(x-a) *( (answer = (d/dx theFun;
-(d/dx y=0;d/dx theFun)_2 /CoefficientOf{}(d/dx y, d/dx theFun)
)_2;
x=a;
y=b;
answer
)_4)- EqualityToArithmeticExpression( AlgebraAnswer)==0
Enter the tangent equation in the form such as \(y= 5 x+3 \).
EnsureExpressionDependsOnlyOn(AlgebraAnswer,x,y);
Thaw
(
if (not Contains(AlgebraAnswer,StringToAtom("=")),
"
The tangent equation is expected to contain the equality sign.",
Freeze(
%PlotShowJavascriptOnly
PlotImplicit(theFun, (-10, -10), (10, 10), (42,42), 2000)
+PlotWindow(300,300)
+
Plot2D( (theCF=CoefficientOf(y, EqualityToArithmeticExpression{}AlgebraAnswer); y=0;
EqualityToArithmeticExpression{}( AlgebraAnswer)/(-theCF))_3, -5,5, "blue" )
+PlotSetId("canvas1")
)))
y-b=theFinalSlope (x-a)


Across: 1. Grown this way? (5) 4. He appealed to bluegrass fans, and to cows, appropriately (3 6) 9. Tenure I arranged for circle of companions (7) 10,22dn. Twistedly parrot (i.e. mock) famous star gazer (7 5) 11. He might have played the best guitar parts in "Tommy", were song rewritten (3 10) 13. On lake, our ice mostly firm, and a bit slippery for old magpie (3 8) 17. Place that loves Samba as essential to three-piece bands (3) 18. Demolish tea? (3) 19. Taken back? Some stewardesses so personally taken back! (11) 20. Injured emu carer, a calm career for a quiet achiever (6 7) 25. To West Autralian, 'net naturally uses this device (7) 26. What one thought of onion wisely kept quiet by one! (7) 27. Homes were getting rebuilt in uncertain location (9) 28. Trout off at teacher (5) Down: 1. Vows we reel off as creatures prone to change (10) 2. Has to reform vows (5) 3. Role doing transport? (9) 4. Dreadful first sore lingered (5) 5. Storage of metals ruined roads (9) 6. David who has set many crosswords and written strange tales (5) 7. Seaside infrastructure cleverly hid sprays (9) 8. Cheekiness essentially turned into successful trademark (4) 12. U.N. error, and disaster for bird (10) 14. Demand I maul mutt boisterously (9) 15. Punctuate "hate'n'hype" with a different approach? (9) 16. Plant used to wrap limb with iodine (9) 21. Update on little Frankfurter turning up with iodine deficiency (5) 22. see 10 across 23. Kick out mischievous civet (5) 24. "Sub" (as subwoofer) provides it (4)


tell/1
tell(
+FileOrStream)
Makes file FileOrStream the current output stream.
If there is an open output stream associated with FileOrStream,
and that stream was opened by tell/1
, then it is made the
current output stream. Otherwise, the specified file is opened for
output in text mode with default options and made the current output stream.
Different file names (that is, names that do not unify) represent different streams (even if they correspond to the same file). Therefore, assuming food and ./food represent the same file, the following sequence will open two streams, both connected to the same file.
tell(food) ... tell('./food')
It is important to remember to close streams when you have finished with
them. Use told/0
or close/[1,2]
.
instantiation_error
existence_error
fileerrors
Prolog flag is on
.
domain_error
told/0
, open/[3,4]
, current_output/1
, ref-iou-sfh.


Words of Advice
When writing or using Python bindings there is some things you must keep in mind.
Duck punching and virtual methods
The combination of duck punching, the practice of altering class characteristics of already instantiated objects, and virtual methods of wrapped C++ classes, can be tricky. That was an optimistic statement.
Let’s see duck punching in action for educational purposes.
import types import Binding obj = Binding.CppClass() # CppClass has a virtual method called 'virtualMethod', # but we don't like it anymore. def myVirtualMethod(self_obj, arg): pass obj.virtualMethod = types.MethodType(myVirtualMethod, obj, Binding.CppClass)
If some C++ code happens to call CppClass::virtualMethod(…) on the C++ object held by “obj” Python object, the new duck punched “virtualMethod” method will be properly called. That happens because the underlying C++ object is in fact an instance of a generated C++ class that inherits from CppClass, let’s call it CppClassWrapper, responsible for receiving the C++ virtual method calls and finding out the proper Python override to which handle such a call.
Now that you know this, consider the case when C++ has a factory method that gives you new C++ objects originated somewhere in C++-land, in opposition to the ones generated in Python-land by the usage of class constructors, like in the example above.
Brief interruption to show what I was saying:
import types import Binding obj = Binding.createCppClass() def myVirtualMethod(self_obj, arg): pass # Punching a dead duck... obj.virtualMethod = types.MethodType(myVirtualMethod, obj, Binding.CppClass)
The Binding.createCppClass() factory method is just an example, C++ created objects can pop out for a number of other reasons. Objects created this way have a Python wrapper holding them as usual, but the object held is not a CppClassWrapper, but a regular CppClass. All virtual method calls originated in C++ will stay in C++ and never reach a Python virtual method overridden via duck punching.
Although duck punching is an interesting Python feature, it don’t mix well with wrapped C++ virtual methods, specially when you can’t tell the origin of every single wrapped C++ object. In summary: don’t do it!
Python old style classes and PySide
Because of some architectural decisions and deprecated Python types. Since PySide 1.1 old style classes are not supported with multiple inheritance.
Below you can check the examples:
Example with old style class:
from PySide6 import QtCore class MyOldStyleObject: pass class MyObject(QtCore, MyOldStyleObject): pass
this example will raise a ‘TypeError’ due to the limitation on PySide, to fix this you will need use the new style class:
from PySide6 import QtCore class MyOldStyleObject(object): pass class MyObject(QtCore, MyOldStyleObject): pass
All classes used for multiple inheritance with other PySide types need to have ‘object’ as base class. ********************** Frequently Asked Questions **********************
This is a list of Frequently Asked Questions about Shiboken. Feel free to suggest new entries using our Mailing list or our IRC channel!
General
What is Shiboken?
Shiboken is a Generator Runner plugin that outputs C++ code for CPython extensions. The first version of PySide had source code based on Boost templates. It was easier to produce code but a paradigm change was needed, as the next question explains.
Why did you switch from Boost.Python to Shiboken?
The main reason was the size reduction. Boost.Python makes excessive use of templates resulting in a significant increase of the binaries size. On the other hand, as Shiboken generates CPython code, the resulting binaries are smaller.
Creating bindings
Can I wrap non-Qt libraries?
Yes. Check Shiboken source code for an example (libsample).
Is there any runtime dependency on the generated binding?
Yes. Only libshiboken, and the obvious Python interpreter and the C++ library that is being wrapped.
What do I have to do to create my bindings?
Most of the work is already done by the API Extractor. The developer creates a typesystem file with any customization wanted in the generated code, like removing classes or changing method signatures. The generator will output the .h and .cpp files with the CPython code that will wrap the target library for python.
Is there any recommended build system?
Both API Extractor and generator uses and recommends the CMake build system.
Can I write closed-source bindings with the generator?
Yes, as long as you use a LGPL version of Qt, due to runtime requirements.
What is ‘inject code’?
That’s how we call customized code that will be injected into the generated at specific locations. They are specified inside the typesystem.


Toggle navigation
Terrier Resident Support
John Smith
Yesterday
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...
John Smith
Yesterday
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...
John Smith
Yesterday
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...
Read All Messages
New Comment
4 minutes ago
3 New Floor Message
12 minutes ago
Message Sent
4 minutes ago
New Event
4 minutes ago
Upcoming RA Appo
in 3 hours
See All Alerts
User Profile
Settings
Logout
Homepage
Mail
Community Message Board
Lost and Found
My Floor
Appointment with RA
Floor Events
Maintenance Report Filing
Housing Swap Request
Housing Survey
Swap to
South Campus
West Campus
East Campus
Resident Supports
Events happening right now
Cheatsheet for international students
Let's meet up and talk!
Meeting Request Form
Your Name
Your preferred name or nickname.
Room Number
Email Address on File
<EMAIL_ADDRESS>I want to talk about ...
Just wanna talk and hang out
I'm not getting along with my roommate
What classes should I take next year?
I am so stressed out!

Let's plan our floor event together!
Not enough options here, let me type it.
So, what do you really wanna talk about?
How urgent is this?
Today
Tomorrow
Within the week
Soon
Whenver my RA has time
When is the best time to meet for you?
8:00AM
9:00AM
10:00AM
11:00AM
12:00PM
1:00PM
2:00PM
3:00PM
4:00PM
5:00PM
6:00PM
7:00PM
8:00PM
Submit Button
Reset Button


A look into some of the world's most famous wine producing regions
49.2 million hectoliters
This designation refers to a wine that has unique characteristics exclusively due to it's geographical environment along with natural and human factors. All grapes and production activities originate from the specific area. There is even a list of qualified denominations. This wine is known to have the highest restrictions; therefore, it also has the highest value in the classification system.
This designation still refers to a specific region where production takes place, but differs from PDO quality in that a minimum of 85% of the grapes must come from the designated region. This is considered the middle tier of the classification system.
These wines are considered the lowest value due to having no geographical restrictions or production rules.


A simple text editor is all you need to learn HTML.
Learn HTML Using Notepad or TextEdit
- Web pages can be created and modified by using professional HTML editors.
- However, for learning HTML we recommend a simple text editor like Notepad (PC) or TextEdit (Mac).
- We believe in that using a simple text editor is a good way to learn HTML.
- Follow the steps below to create your first web page with Notepad or TextEdit.
Step 1: Open Notepad (PC)
- Windows 8 or later:
- Also change some preferences to get the application to save files correctly. In Preferences > Format > choose "Plain Text"
- Then under "Open and Save", check the box that says "Display HTML files as HTML code instead of formatted text".
- Then open a new document to place the code.
Step 2: Write Some HTML
Write or copy the following HTML code into Notepad:
<!DOCTYPE html>

My First Heading

My first paragraph.

Step 3: Save the HTML Page
- Save the file on your computer. Select File > Save as in the Notepad menu.
- Name the file "index.htm" and set the encoding to UTF-8 (which is the preferred encoding for HTML files).
Step 4: View the HTML Page in Your Browser
- Open the saved HTML file in your favorite browser (double click on the file, or right-click - and choose "Open with").


Let's get in touch.
As of May 2018, I'm residing in Toronto, Ontario, with an open work permit and am currently seeking for job opportunities.
If you'd like to get in touch with me, you can reach me at<EMAIL_ADDRESS>or find me at LinkedIn.
As of May 2018, I'm residing in Toronto, Ontario, with an open work permit and am currently seeking for job opportunities.
If you'd like to get in touch with me, you can reach me at<EMAIL_ADDRESS>or find me at LinkedIn.


Watch: Kevin Gates Tries To Spell His Own Lyrics In Hilarious Beats 1 Clip – “Could I Get A Pronunciation”
by Team SOHHLouisiana rapper Kevin Gates knows his words. The hip-hop artist recently appeared on Apple Music’s Beats 1 for an epic spelling competition. Watch and comment below!