text
stringlengths
454
608k
url
stringlengths
17
896
dump
stringclasses
91 values
source
stringclasses
1 value
word_count
int64
101
114k
flesch_reading_ease
float64
50
104
Natural). For many purposes, natural uranium must be enriched in $\mathrm{^{235}U}$ to be used in reactors and weapons. For most power reactors, low-enriched uranium (LEU) of 3% – 5% is used; research reactors typically use high-assay LEU (HALEU) of 5 – 20% $\mathrm{^{235}U}$; naval reactors and some designs of fast-neutron reactor use highly enriched uranium (with greater than 20% $\mathrm{^{235}U}$); uranium enriched by 85% or more is used in nuclear weapon primaries and known as "weapons-grade" uranium. Several enrichment processes have been demonstrated experimentally but the two deployed commercially are the gaseous diffusion process and the more efficient centrifuge process. Atomic vapor laser isotope separation (AVLIS) and similar technologies have also shown promise. The capacity of enrichment plants is measured in terms of separative work units (SWU). The SWU is not a unit of energy, but rather expresses the amount of effort involved in enriching an amount of uranium from one $\mathrm{^{235}U}$ concentration (the feed assay) to another (product assay), leaving a depleted residue with a lower $\mathrm{^{235}U}$ concentration (the tails assay). It is defined as $$ SWU = W = PV(x_\mathrm{P}) + TV(x_\mathrm{T}) - FV(x_\mathrm{F}), \quad \mathrm{where}\;V(x) = (1-2x)\ln\left(\frac{1-x}{x}\right) $$ is the value function, a thermodynamic intensive quantity which expresses the energy input required to decrease the entropy of the sample in changing its composition and is defined so that the SWU is independent of concentration. Appendix A in Whitley, Rev. Mod. Phys. 56, 41 (1984) has more details of the derivation of $V(x)$. Here, $F$, $P$ and $T$ are the masses of the feed, product and tail uranium, respectively, and $x_\mathrm{F}$, $x_\mathrm{P}$, and $x_\mathrm{T}$ are their fractional $\mathrm{^{235}U}$ concentrations. The SWU formally has units of mass (kg): it increases in proportion to the amount of uranium to be processed. For a fixed amount of feed uranium, $F$, with known assay, $x_\mathrm{F}$, the target product assay, $x_\mathrm{P}$ is obtained by enrichment, leaving a tails assay, $x_\mathrm{T}$, which could be chosen to minimize the cost function per kg of product, $$ J = \frac{L_\mathrm{F}F + L_\mathrm{SWU}W}{P}, $$ where $L_\mathrm{F}$ is the unit (per kg) cost of the feed uranium and $L_\mathrm{SWU}$ is the cost of each kg separative work. $J$ turns out to be much more sensitive to the relative values of $L_\mathrm{F}$ and $L_\mathrm{SWU}$ and to $x_\mathrm{F}$ than to $x_\mathrm{P}$. The optimum tails assay, $x_\mathrm{T}$ is determined to be 0.3% by the code below, assuming realistic values of $L_\mathrm{F}$ = USD 100 / kg, $L_\mathrm{SWU}$ = USD 200 / kg, and natural uranium. import numpy as np from scipy.optimize import minimize import matplotlib.pyplot as plt) def cost_per_P(xT, xF, xP, LF, LSWU): """Return the cost per SWU. xT, xF and xP are the tails, feed and product assays, respectively. LF is the cost per unit mass of feed uranium, LSWU is the cost (in the same currency) per unit mass of separative work, SWU. """ return LF * (xP-xT)/(xF-xT) + LSWU * SWU_per_P(xF, xP, xT) # Feed assay is the natural abundance of U-235. xF = 7.2e-3 # cost per kg of feed uranium, cost per kgSWU, in USD. LF, LSWU = 100, 200 # Target product assay: the cost function is not very sensitive to xP. xP = 0.05 # Target tails assays, xT: 0 < xT < xF. xT = np.linspace(1e-4, xF*0.9, 100) plt.plot(xT, cost_per_P(xT, xF, xP, LF, LSWU)) plt.xlabel('$x_\mathrm{T}$') plt.ylabel('Cost function, $J$ (USD)') plt.show() # Minimize the cost function as a function of tails assay. res = minimize(cost_per_P, [5.e-4], args=(xF, xP, LF, LSWU), method='Nelder-Mead') print('Optimum xT =', res.x[0]) Output: Optimum xT = 0.0030625000000000092 Now consider the separative work per ton of feed uranium as a function of the desired product assay, $x_\mathrm{P}$: The above plot demonstrates why enrichment facilities are such a proliferation concern: the relative extra effort involved in generating >85% enriched uranium for weapons purposes is small compared to the effort to enrich by only, say, 20% for a research reactor. The code generating this plot is below. import numpy as np from scipy.optimize import minimize import matplotlib.pyplot as plt GREY = '#444444') # Feed uranium mass, kg F = 1000 # Feed assay is the natural abundance of U-235. xF = 7.11e-3 # Optimum tails assay, 0.3% xT = 0.003 # Target product assays: from just above natural abundance to 99%. xP = np.linspace(xF*1.01, 0.99, 100) # Product mass, tails mass P = F * (xF - xT) / (xP - xT) T = F - P # Separative work per ton of feed uranium. W_per_ton_F = SWU(F, xF, xP, xT) / F * 1000 # Separative work per ton of enriched product uranium. W_per_kg_P = SWU(F, xF, xP, xT) / P plt.plot(xP, W_per_ton_F) plt.xlabel('$x_\mathrm{P}$') plt.ylabel('Separative work per ton of feed uranium') def find_nearest(arr, val): """Return the index of the value nearest to val in arr.""" idx = (np.abs(arr - val)).argmin() return idx # Plot some representative points on the SWU plot. idx = find_nearest(xP, 0.2) plt.plot(xP[idx], W_per_ton_F[idx], 'o', color='tab:red') plt.text(xP[idx] + 0.02, W_per_ton_F[idx], 'Research reactor, 20%\n{:.1f} kg at {:.0f} SWU/kg product' .format(P[idx], SWU_per_P(xF, xP[idx], xT)), va='top' ) idx = find_nearest(xP, 0.85) plt.plot(xP[idx], W_per_ton_F[idx], 'o', color='tab:red') plt.text(xP[idx], W_per_ton_F[idx] + 20, 'Weapons grade, 85%\n{:.1f} kg at {:.0f} SWU/kg product' .format(P[idx], SWU_per_P(xF, xP[idx], xT)), va='bottom', ha='center' ) idx = (xP >= 0.035) & (xP <= 0.05) x, y = xP[idx], W_per_ton_F[idx] plt.plot(x, y, 'o', color='tab:red') x, y, Pbar = np.mean(x), np.mean(y), np.mean(P[idx]) plt.text(x + 0.02, y, 'Power reactor, 3.5% - 5%\n{:.1f} kg at {:.0f} SWU/kg product' .format(Pbar, SWU_per_P(xF, x, xT)), va='top' ) # Tidy up. plt.ylim(0, 1000) plt.box(on=None) ax = plt.gca() ax.yaxis.grid() ax.tick_params(axis='x', colors=GREY) ax.tick_params(axis='y', colors=GREY, length=0) ax.xaxis.label.set_color(GREY) ax.yaxis.label.set_color(GREY) plt.show() Comments are pre-moderated. Please be patient and your comment will appear soon. There are currently no comments New Comment
https://scipython.com/blog/uranium-enrichment-and-the-separative-work-unit-swu/
CC-MAIN-2021-39
refinedweb
1,098
58.99
First of all – sorry about the misleading title – this post is about getting the doors working in the Endless Elevator game that we are currently developing. I thought it was a good pun and that as this post is all about our development process that it wasn’t too bad. The only career advice I got is just to start making games…any games. You’d think making a door that opens and closes would be a pretty simple thing to do but surprisingly it wasn’t. I designed and built some 3D models of building components in MagicaVoxel and exported them as .obj files. I use MagicaVoxel because it’s free and really quick and simple to use. When I model components I can be sure that they are all exactly the same scale and that all the different bits (no matter when I made them) are going to fit together without any hassle. But the models are not optimised for game engines as they have a reasonably high poly count due to the modelling process within the program. Most of the models come out with heaps of unnecessary triangles that need to be managed first. In most cases I will import the object into Blender and use the “decimate” modifier on the planes (with an angle of about 20 if you are interested). In the case of the door object it was pretty simple, it is just a door after all, and I didn’t need to optimise it. Here is what the door looks like in MagicaVoxel: Notice that the door object is sitting just forward of the enclosing frame and that when exporting the object the center is at the middle bottom plane of that frame. The door is off center because it’s modelled to fit exactly in a doorway that sits exactly in that position within the frame. This saves me a huge amount of time lining everything up when it gets to Unity as the position of the door (or any other object for that matter) is already in the right spot. The problem is that the point of origin for the door is in the wrong spot. It exports a few units behind the door and on the floor! This becomes important when you try and rotate that object (like you would when opening and closing a door) and the pivot point is not where the hinges should be. To fix this I had to import the .obj file into Blender and reposition the point of origin for the model. This is what it looks like in Blender when I did this: To do it I selected the edge that I wanted the door to pivot on when opened. Then in Edit Mode: Mesh -> Snap -> Curser to Selected In Object Mode: Object -> Transform -> Origin to 3D Curser So that puts the curser onto the correct position in the middle of that edge where the hinges would be and resets the point of origin (which is where it will pivot when rotated in Unity) to the right spot. Once we were all imported into Unity and looking good I set up a prefab for the “Doorway” object with the door as a child object. The doorway object has a bunch of colliders to stop the player walking through the walls and a big sphere collider where the door would be to trigger the open / close function when the player walks into it. This is what the doorway looks like in Unity: Next I scripted up a few options for opening the door. I’ll post the script at the end of this article but basically there were three options of opening the door that I wanted to test. (Actually I tried it about six ways but whittled it down to the most simple methods – and just as an aside there is an actual “hinge” object type in Unity if you ever need it). This is how the script looks in the editor: Notice the slider at the bottom to control how far I want the door to open. It’s really handy to have this when playing in the editor and getting your settings right. If you want to know more about using it see this post The three tick boxes are for testing the three different ways of opening the door. Snappy was a quick simple transform of the position from open to closed with no “in betweening”. It looks a bit unnatural as the door magically goes from closed to open but it’s not too bad and most people are pretty used to similar behaviour in video games. The active line in the code is: the_door.transform.Rotate(-Vector3.up * 90 * Time.deltaTime); The next method works more like a door should. In that it swings open and closed the whole way in a steady fashion. But the big problem with this method was that it was OK when the character was going into the doorway and with the swing of the door but when it was time to come back out of the doorway the door was in the way. There was not enough room to trigger the door opening from the other side without being hit by the door as it opened. Plus if the player enters the collider from the wrong trajectory the character gets pushed through a wall by the swinging door which is sub-optimal. I called this method InTheWay! The active line here is: the_door.transform.rotation = Quaternion.Euler(targetPositionOpen); In an effort to combat this I chose to do a hybrid method that opened the door to a point that wouldn’t hit the player and then do the magic transform to get all the way open. I call this one aBitBoth. It looks a little weird too. Like there is an angry fairy pulling the door closed with a snap after the character enters. Here are all three to compare. Snappy In The Way A Bit of Both I’m not too sure which one I’m going to use at this stage as the Snappy method works best for now but I like the In The Way method better. I looks more normal and I like that you have to wait just a few milliseconds for the door to swing (adds tension when you are in a hurry to escape a bullet in the back). I could do something like halt the player movement from the rear of the door when it triggers to open from the closed side or maybe play around with the radius of the sphere. Neither solutions seem like great ideas to me right now but something like that will need to be done if I’m going to use that method. Maybe I could just have the door swing both ways and open to the outside when he is behind it but that’s probably a bit weird for a hotel door. Here is that script that I was testing with: using UnityEngine; public class OpenDoor : MonoBehaviour { public bool openMe; public GameObject the_door; public bool snappy; public bool inTheWay; public bool aBitBoth; public Vector3 targetPositionOpen; public Vector3 targetPositionClosed; [Range(0F, 180F)] public float turningOpen; void Start () { targetPositionClosed = new Vector3(0f, 180f, 0f); targetPositionOpen = new Vector3(0f, turningOpen, 0f); } void Update() { if (openMe) { OpenMe(); } else { CloseMe(); } } private void OpenMe() { if (inTheWay) { if (the_door.transform.rotation.eulerAngles.y > turningOpen) { the_door.transform.Rotate(-Vector3.up * 90 * Time.deltaTime); } } if (snappy) { the_door.transform.rotation = Quaternion.Euler(targetPositionOpen); } if (aBitBoth) { if (the_door.transform.rotation.eulerAngles.y > turningOpen) // 144f { the_door.transform.Rotate(-Vector3.up * 90 * Time.deltaTime); } else { the_door.transform.rotation = Quaternion.Euler(targetPositionOpen); } } } private void CloseMe() { if (inTheWay) { if (the_door.transform.rotation.eulerAngles.y <= 180) { the_door.transform.Rotate(Vector3.up * 90 * Time.deltaTime); } } if (snappy) { the_door.transform.rotation = Quaternion.Euler(targetPositionClosed); } if (aBitBoth) { if (the_door.transform.rotation.eulerAngles.y <= turningOpen) // 144f { the_door.transform.Rotate(Vector3.up * 90 * Time.deltaTime); } else { the_door.transform.rotation = Quaternion.Euler(targetPositionClosed); } } } void OnTriggerEnter(Collider col) { string colName = col.gameObject.name; Debug.Log("Triggered OpenDoor!!! : " + colName); if (col.gameObject.name == "chr_spy2Paintedv2" || col.gameObject.name == "BadSpy_Package(Clone)") { openMe = true; } } void OnTriggerExit(Collider col) { if (col.gameObject.name == "chr_spy2Paintedv2" || col.gameObject.name == "BadSpy_Package(Clone)") { openMe = false; } } } One thought on “Getting a Foot in the Door of Game Design” Just found this script in the Unify Community Wiki that resets the pivot point. This might be another option instead of using Blender.
https://www.zuluonezero.net/2018/11/24/getting-a-foot-in-the-door-of-game-design/
CC-MAIN-2021-31
refinedweb
1,412
70.13
Details - Reviewers - - Commits - rG85a0f8fe6c5c: [COFF, ARM64] Fix ABI implementation of struct returns rGd9f52f48dc51: [COFF, ARM64] Fix ABI implementation of struct returns rC359932: [COFF, ARM64] Fix ABI implementation of struct returns rZORGd9f52f48dc51: [COFF, ARM64] Fix ABI implementation of struct returns rG357b29cc2cf8: [COFF, ARM64] Fix ABI implementation of struct returns rL359932: [COFF, ARM64] Fix ABI implementation of struct returns rZORG357b29cc2cf8: [COFF, ARM64] Fix ABI implementation of struct returns Diff Detail Event Timeline Got rid of the confusing SuppressSRet logic. The "inreg" attribute is now used to indicate sret returns in X0. The document you linked in the LLVM change () says that small POD types are returned directly in X0 or X0 and X1, but this looks like it will always return them indirectly. I think we also need to check the size of the type, and fall back the the plain C ABI for small types. It looks like there's some missing documentation in the ARM64 ABI document involving homogeneous aggregates... in particular, it looks like non-POD types are never homogeneous, or something along those lines. I guess we can address that in a followup, though. @TomTan could you look into updating the ARM64 ABI documentation? Testcase: struct Pod { double b[2]; }; struct NotAggregate { NotAggregate(); double b[2]; }; struct NotPod { NotAggregate x; }; Pod copy(Pod *x) { return *x; } // ldp d0,d1,[x0] NotAggregate copy(NotAggregate *x) { return *x; } // stp x8,x9,[x0] NotPod copy(NotPod *x) { return *x; } // ldp x0,x1,[x8] For NotPod, it is aggregate which is specific in the document Yes, it's an aggregate which is returned in registers... but it's returned in integer registers, unlike Pod which is returned in floating-point registers. struct Pod is HFA (Homogenous Floating-Point Aggregates) which is returned in floating-point register, struct NotPod is not HFA so still returned in integer registers. The ARM64 ABI document will be updated to reflect this, thanks. @efriedma Return info for HFA and HVA is updated in. Return info for HFA and HVA is updated That's helpful, but not really sufficient; according to the AAPCS rules, both "Pod" and "NotPod" from my testcase are HFAs. Could you provide some more details on why NotPod is HFA, according to AAPCS? In general, computing whether a composite type is a "homogeneous aggregate" according to section 4.3.5 depends only on the "fundamental data types". It looks through "aggregates" (C structs/C++ classes), unions, and arrays. The test applies "without regard to access control or other source language restrictions". Section 7.1.6 mentions there are additional rules that apply to non-POD structs, but that's just referring to the Itanium C++ ABI rule that types which are "non-trivial for the purposes of calls" are passed and returned indirectly. Both clang and gcc agree that "NotPod" is an HFA on AArch64 Linux. So the question is, what rule is MSVC using to exclude "NotPod" from being an HFA? Confirmed just now that the current diff (196774) does work, but it'd be good to correct user-provided constructors and trivial destructors before this lands. The current diff (196894) seems to have the same std::setw issue as the previous one. Here's what it's trying to compile: _MRTIMP2 _Smanip<streamsize> __cdecl setw(streamsize wide) { // manipulator to set width return (_Smanip<streamsize>(&swfun, wide)); } Here's the definition for _Smanip: template<class _Arg> struct _Smanip { // store function pointer and argument value _Smanip(void (__cdecl *_Left)(ios_base&, _Arg), _Arg _Val) : _Pfun(_Left), _Manarg(_Val) { // construct from function pointer and argument value } void (__cdecl *_Pfun)(ios_base&, _Arg); // the function pointer _Arg _Manarg; // the argument value };. I'd like to see a few more tests to cover the interesting cases that came up during development of this patch: - The user-provided constructor issue: there should be testcases with an explicit user-provided constructor, a non-trivial constructor that's explicitly defaulted, and a non-trivial constructor that's implicitly defaulted. - The difference between a user-defined and a non-trivial destructor: there should be a testcase with an implicit non-trivial destructor (which is non-trivial because a member has a non-trivial destructor). - A testcase with a trivial copy constructor, but a non-trivial copy-assignment operator. - A testcase with a struct with a base class. And with those modifications, everything seems to work correctly. I'd be fine with the LLVM portion landing at this stage, but one more rev and another test cycle for this patch would be ideal. Thanks Eli. @richard.townsend.arm Can you please confirm whether Electron works with this patch and D60348? Just completed testing... everything seems to be working correctly. So long as the all the tests pass, let's commit! :D
https://reviews.llvm.org/D60349?id=195932
CC-MAIN-2020-10
refinedweb
787
50.46
dpm_getstatus_getreq - get status for a dpm_get request #include <sys/types.h> #include "dpm_api.h" int dpm_getstatus_getreq (char *r_token, int nbfromsurls, char **fromsurls, int *nbreplies, struct dpm_getfilestatus **filestatuses) dpm_getstatus_getreq gets status for a dpm_get request. The input arguments are: r_token specifies the token returned by a previous get request. nbfromsurls specifies the number of files for which the status is requested. If zero, the status of all files in the get request is returned. fromsurls specifies the array of file names. The output arguments are: nbreplies will be set to the number of replies in the array of file statuses. filestatuses will be set to the address of an array of dpm_getfilestatus structures allocated by the API. The client application is responsible for freeing the array when not needed anymore. struct dpm_getfilestatus { char *from_surl; char *turl; u_signed64 filesize; int status; char *errstring; time_t pintime; }; This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately. EFAULT nbfromsurls is strictly positive and fromsurls is NULL or r_token, nbreplies or filestatuses is a NULL pointer. ENOMEM Memory could not be allocated for marshalling the request. EINVAL nbfromsurls is not positive, the token is invalid/unknown or all file requests have errors. SENOSHOST Host unknown. SEINTERNAL Database error. SECOMERR Communication error.
http://huge-man-linux.net/man3/dpm_getstatus_getreq.html
CC-MAIN-2018-26
refinedweb
219
50.94
Expression Encoder with little bits of MovieMaker and DVD Maker. James has just updated the Expression Encoder blog with details of Expression Encoder 3. The product that has been keeping us busy for a while now. Once it’s out I’ll try to post a little bit more than I have in the past :-) Link the entire duration of the source. Each clip is represented by the SourceClip class and that contains two properties StartTime and EndTime. These properties indicate the times within the source file that the clip represents. For example, if I wanted to change it so that I only encoded the first 15 seconds of the file I could do something like the following. MediaItem item = new MediaItem(@"C:\myvideo.wmv"); item.SourceClips[0].EndTime = new TimeSpan(0, 0, 15); MediaItem item = new MediaItem(@"C:\myvideo.wmv"); item.SourceClips[0].EndTime = new TimeSpan(0, 0, 15); If I wanted to include the time from 0-15 seconds and from 30-45 seconds of the file I could add the following lines. TimeSpan timeStart = new TimeSpan(0, 0, 30); TimeSpan timeEnd = new TimeSpan(0, 0, 45); item.SourceClips.Add(new SourceClip(timeStart, timeEnd)); TimeSpan timeStart = new TimeSpan(0, 0, 30); TimeSpan timeEnd = new TimeSpan(0, 0, 45); item.SourceClips.Add(new SourceClip(timeStart, timeEnd)); You can keep added SourceClip’s for as many sections of the source that you wish to add before calling the Encode method. MediaItem(@"C:\myvideo.wmv"); int metadataCount = 0; foreach (KeyValuePair<string, string> pair in mediaItem.Metadata) { Console.WriteLine(pair.Key + "-" + pair.Value); } More frequently you’ll probably want to specify certain metadata before encoding the file. You can do this by doing something like the following before calling the Job’s Encode method mediaItem.Metadata[MetadataNames.Title] = "My Home Movies"; mediaItem.Metadata[MetadataNames.Author] = "Dean Rowe"; These are using the predefined metadata names that we’ve specified. If you want to specify your own custom metadata you can simply do something like mediaItem.Metadata["Fred"] = "Foo"; my searches weren’t fruitful. I found ones with numbers or words, but nothing that allowed me to uses images – which I thought would make it more fun for the young kids. I thought about using Excel to generate the cards or maybe Word but that didn’t look to be as straightforward as I ‘d hope it might be. Then I thought “What about writing a quick WFP app?”. I hadn’t tried printing from WPF first, so I knocked up a quick app to try that out. Once that proved straightforward I just had to write some simple XAML to layout the card, get some halloween clipart from office online and write a little code to load and randomize the images. So here’s what I ended up with. Each time you run it the app you get a “random” card and every time you click “Print” a new card is generated so you can just keep printing until you have enough cards. The kids loved it. We gave a few prizes for the kids that got a line first and then we let the kids keeping playing until everybody had filled their card. Note that I deliberately chose to include every image on every card, so everybody filled out their card and shouted “house” at the same time. Of course it would be quite easy to change this behaviour. If you ever want to do something like this yourself, just launch Visual Studio and create a new WPF application. Here’s what my window1.xaml looked like. <Window xmlns="" xmlns:x="" x:Class="UntitledProject4.Window1" x: <StackPanel x: <Border x: <ItemsControl ItemsSource="{Binding ElementName=Window, Path=Images}" > <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <Border Width="142" Height="142" BorderBrush="#FF000000" BorderThickness="5,5,5,5"> <Image Width="Auto" Height="Auto" Source="{Binding Path=FileName}" Margin="10,10,10,10"/> </Border> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </Border> <Button HorizontalAlignment="Left" Margin="20,20,0,44" Width="97" Height="30" Content="Print" Click="OnPrint" IsDefault="True"/> </StackPanel> </Window> and here’s the corresponding C# file. using System; using System.Collections.ObjectModel; using System.Windows; using System.Windows.Controls; namespace UntitledProject4 { public class ImageData { public ImageData(string fileName) { this.FileName = fileName; } public string FileName { get; set; } } public partial class Window1 { /// <summary> /// The list of images that are databound to. /// </summary> private ObservableCollection<ImageData> m_images = new ObservableCollection<ImageData>(); /// <summary> /// The print dialog. We store it as a member variable so any printer settings are preserved /// across multiple prints. /// </summary> private PrintDialog m_prtDlg = new PrintDialog(); /// <summary> /// Initialize a instance of the Window1 class, that holds a bingo card. /// </summary> public Window1() { // Load the images - in this case I'm just loading them from c:\temp\halloween for (int i = 1; i <= 25; i++) { m_images.Add(new ImageData(@"C:\temp\halloween\" + i.ToString() + ".bmp")); } // Randomize them. this.RandomizeImages(); this.InitializeComponent(); } /// <summary> /// Gets the collection of images to use for the bingo card. /// </summary> public ObservableCollection<ImageData> Images { get { return m_images; } } /// <summary> /// Called to print the bingo card. The images are randomized after every print. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">The event arguments</param> private void OnPrint(object sender, RoutedEventArgs e) { if (m_prtDlg.ShowDialog() == true) { m_prtDlg.PrintVisual(this.BingoCard, "Bingo"); } RandomizeImages(); } /// <summary> /// Randomly shuffle the images /// </summary> private void RandomizeImages() { Random random = new Random(); int imagesCount = m_images.Count; for (int i = 0; i < imagesCount; i++) { int randomIndex = random.Next(0, imagesCount); ImageData imageData = m_images[randomIndex]; m_images[randomIndex] = m_images[i]; m_images[i] = imageData; } } } } Hopefully the code should be self explanatory... As James recently posted on the Expression Encoder team blog, we’ve just released an update to Expression Encoder 2 so that if you wish to use our object model from Visual Basic.NET you can now do that. Download. Just posted a link to the Intellisense and Help files for the object model to the Expression Encoder Team blog. Head over, try them out and let us know what you think. Thanks help file for the SDK object model and some XML files that will enable Intellisense comments within Visual Studio. Expect those soon.... The session that our very own James and Charles did at Mix this morning is already online. I haven't had a chance to watch it myself yet, but I'm sure James and Charles did an excellent job. Here's a very small snippet of code that uses the Expression Encoder object model to create a job, add a media file to the job and then encode it. There's a lot more to the object model, but I thought this would give a little taste of the basics. In the object model we wanted to expose most features of the full Encoder application, but we also wanted to make sure the user could do the simple operations without having to write a lot of code. public void EncodeAFile() { // Create a job and a media item for the video we wish to encode Job job = new Job(); MediaItem mediaItem = new MediaItem(@"C:\input\MyVideo.avi"); // Add the media item to the job job.MediaItems.Add(mediaItem); // Set the output directory where any encoded files will go. job.OutputDirectory = @"c:\output"; // Set up the progress callback function job.PublishProgress += new EventHandler<PublishProgressEventArgs>(OnPublishProgress); // Encode the file job.Encode(); } void OnPublishProgress(object sender, PublishProgressEventArgs e) { Console.WriteLine(e.Progress); } Our very own James has done a great job listing all the new features of Expression Encoder 2, over on the Expression Encoder team blog. Check out the post here, and you can download the Beta here. One of the things I've been working on for our version 2, is the .NET object model that we're now exposing. Over the next few posts, I'm hoping to talk about how you can use some of the features in the object model, along with a few code snippets showing how things go together.
http://blogs.msdn.com/deanro/
crawl-002
refinedweb
1,328
56.86
![endif]--> Show minor edits - Show changes to markup If you send a string or character that is not recognized, you'll get a list of supported commands. To send messages to the board, use a program like Coolterm to connect to the FTDI port. The board communicates at 57600bps. When sending messages, terminate with a carriage return (CR). Supported commands and their parameters : The Arduino WiFi Shield has an FTDI compatible connector that enables you to get diagnostic information from the onboard ATmega 32U. You can connect to the 32U with a FTDI cable : You can also use a USB2Serial board :
http://arduino.cc/en/Hacking/WiFiShield32USerial?action=diff&source=n&minor=n
CC-MAIN-2014-15
refinedweb
101
62.98
I'm having serious trouble with this program. I am supposed to create an application that allows the user to enter in a customer's account number, and should look-up a name and balance based on the account number entered in by the user. I have been given 3 lists of data (account numbers, names and balances) meant to be implemented into arrays. Each array has 20 elements. Here is what I have. /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package accountsearch; import java.util.Scanner; /** * * @author Ian */ public class AccountSearch { /** * @param args the command line arguments */ public static void main(String[] args) { String [] name = new String[20]; double [] balance = new double[20]; int [] account = new int[20]; String tmp5pr; System.out.println("Hello, please enter an account number."); Scanner scanner = new Scanner (System.in); int i = scanner.nextInt(); //declare array elements for array "name". name[0] = "Abula"; name[1] = "Allen"; name[2] = "Austin"; name[3] = "Bailey"; name[4] = "Balovich"; name[5] = "Bates"; name[6] = "Bettencourt"; name[7] = "Blackburn"; name[8] = "Boucher"; name[9] = "Brown"; name[10] = "Duncan"; name[11] = "Estrada"; name[12] = "Fernandez"; name[13] = "Gallagher"; name[14] = "Gonzales"; name[15] = "Ha"; name[16] = "Hernandez"; name[17] = "Howard"; name[18] = "Johnston"; name[19] = "Nguyen"; // declare array elements for "balance". balance[0] = 970.12; balance[1] = 268.01; balance[2] = 3821.94; balance[3] = 3193.97; balance[4] = 444.21; balance[5] = 4253.79; balance[6] = 2916.99; balance[7] = 906.31; balance[8] = 1291.99; balance[9] = 2001.18; balance[10] = 2963.20; balance[11] = 1152.60; balance[12] = 1113.05; balance[13] = 3703.46; balance[14] = 2667.88; balance[15] = 3042.25; balance[16] = 72.04; balance[17] = 2229.66; balance[18] = 3130.92; balance[19] = 3004.99; //declare array elements for "account" account[0] = 7221379; account[1] = 6853921; account[2] = 4215534; account[3] = 5551298; account[4] = 6224649; account[5] = 6502286; account[6] = 8448936; account[7] = 2883903; account[8] = 6752376; account[9] = 3564698; account[10] = 6373150; account[11] = 6375372; account[12] = 8736368; account[13] = 7218536; account[14] = 6681985; account[15] = 3909086; account[16] = 5221192; account[17] = 5901163; account[18] = 2427821; account[19] = 6331655; } } I have been told that simply using while statements could help me at this point. I just do not know where to turn, any direction would be greatly appreciated. Thanks!
http://www.dreamincode.net/forums/topic/260490-parallel-arrays-in-java/page__p__1515310
CC-MAIN-2013-20
refinedweb
393
62.54
0 Hi all, I am having problem about file operations. There are a few numbers in my txt file. I want the program to calculate average of these numbers in the txt file. The code I have written is as below. Number of numbers in the file is 5. When I return count it returns 5 .The sum of numbers should be 92 but I get 94, and I get average 18.8 but the correct average should be 18,4 (txt file is attached). So can anyone help me about it? Do you think is it a good idea to calculate it in this way? Thanks the code: int main() { ifstream fin; fin.open("numbers.txt"); if (fin.fail()) { cout << "erorr on opening the file \n"; exit (1); } cout << "the caculated average is " << avg_file(fin) << endl; double calculated_avg = avg_file(fin); } double avg_file(ifstream& source_file) { double number_in_file; double total = 0; int count = 0; source_file >> number_in_file; while (! source_file.eof()) { source_file >> number_in_file; total = number_in_file + total; count ++; } //average of numbers in file return (count); }
https://www.daniweb.com/programming/software-development/threads/213671/file-operation
CC-MAIN-2018-43
refinedweb
171
76.72
I bought the kindle version of this book not too long ago and have been happily chugging through. Got a null point exception when I tried to run the example (p153) and finally realized that I needed to add mDate = new Date() to the Crime constructor. This code wasn’t in my version of the book as far as I can tell. Code to initialize mDate missing from Kindle version How did you come to this conclusion, did you get an error with public Date getDate() { return mDate; } I have the Kindle version, but did not get any such error, but my app crashed so something is off. But all the other variables in Crime.java are not technically initialized either, so not sure if that’s it. Did initializing mDate fix your app? UPDATE: I tried adding the mDate initialization code as you suggested and it worked. Maybe because Date was coming in as an import, it needed to be initialized in the Crime() method? I don’t think I understand WHY this worked, but sure glad it works, because I was getting no errors at all and only a “ThrottleService” error in my LogCat (which I had no idea was that was)… so thanks a lot for pointing this out!! Spookily I had the same issue in that I had failed to initialise mDate and I have a physical book rather than an eBook. Anyway, after much hunting down, I found my error and the code to initialise this was on page 149 so I’m wondering if others may have missed this. This is what the code for Crime.java should begin with: [code]public class Crime { private UUID mId; private String mTitle; private Date mDate; private boolean mSolved; public Crime() { // Generate unique identifier mId = UUID.randomUUID(); mDate = new Date(); }[/code]
https://forums.bignerdranch.com/t/code-to-initialize-mdate-missing-from-kindle-version/5276
CC-MAIN-2018-43
refinedweb
304
76.86
at how to split a list into even chunks in Python. For most cases, you can get by using generators: def chunk_using_generators(lst, n): for i in range(0, len(lst), n): yield lst[i:i + n] Though, there are other interesting ways to do this, each with their own pros and cons! Split a List Into Even Chunks of N Elements A list can be split based on the size of the chunk defined. This means that we can define the size of the chunk. If the subset of the list doesn't fit in the size of the defined chunk, fillers need to be inserted in the place of the empty element holders. We will be using None in those cases. Let's create a new file called chunk_based_on_size.py and add the following contents: def chunk_based_on_size(lst, n): for x in range(0, len(lst), n): each_chunk = lst[x: n+x] if len(each_chunk) < n: each_chunk = each_chunk + [None for y in range(n-len(each_chunk))] yield each_chunk print(list(chunk_based_on_size([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], 7))) The above chunk_based_on_size() function takes the arguments: lst for the list and chunk_size for a number to split it by. The function iterates through the list with an increment of the chunk size n. Each chunk is expected to have the size given as an argument. If there aren't enough elements to make a split of the same size, the remaining unused elements are filled with None. Running this script returns the following list of lists: $ python3 chunk_based_on_size.py [[1, 2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13, None]] The list has been split into equal chunks of 7 elements each. Python has utilities to simplify this process. We can use the zip_longest function from itertools to simplify the previous function. Let's create a new file chunk_using_itertools.py and add the following code: from itertools import zip_longest def chunk_using_itertools(lst): iter_ = iter(lst) return list(zip_longest(iter_, iter_, iter_, iter_, iter_, iter_, iter_)) print(chunk_using_itertools([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])) This code iterates elements and returns a chunk of the desired length - based on the arguments you provide. We've put 7 iter_ arguments here. The zip_longest() function aggregates and returns elements from each iterable. In this case, it would aggregate the elements from the list that's iterated 7 times in one go. This then creates numerous iterators that contain 7 sequential elements, which are then converted to a list and returned. When you execute this snippet, it'll result in: $ python3 chunk_using_itertools.py [[1, 2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13, None]] This shorter function produces the same input. However, it's much more limited as we have to manually write how many elements we want in the code, and it's a bit awkward to just put a bunch of iter_s in the zip_longest() call. The best solution would be using generators. Let's create a new file, chunk_using_generators.py: def chunk_using_generators(lst, n): for i in range(0, len(lst), n): yield lst[i:i + n] print(list(chunk_using_generators([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], 7))) This generator yields a sublist containing n elements. At the end, it would have yielded a sublist for every chunk. Running this code produces this output: $ python3 chunk_using_generators.py [[1, 2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13]] This solution works best if you don't need padding with None or otherwise. Split a List Into a N Even Chunks In the previous section, we split the list based on the size of individual chunks so that each chunk has the same amount of elements. There's another way to interpret this problem. What do we do when we want to split a list not based on the number of elements in each chunk, but on the number of chunks we want to be created? For example, instead of splitting a list into chunks where every chunk has 7 elements, we want to split a list into 7 even chunks. In this case, we may not know the size of each chunk. The logic is similar to the previous solutions, however, the size of the chunk is the ceiling value of the length of the list divided by the number of chunks required. Similar to the previous code samples, if a chunk happens to have vacant spots, those will be filled by the filler value None: import math def chunk_based_on_number(lst, chunk_numbers): n = math.ceil(len(lst)/chunk_numbers) for x in range(0, len(lst), n): each_chunk = lst[x: n+x] if len(each_chunk) < n: each_chunk = each_chunk + [None for y in range(n-len(each_chunk))] yield each_chunk print(list(chunk_based_on_number([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], chunk_numbers=7))) We determine how many lists we need to create and store that value in n. We then create a sublist for the two elements at a time, padding the output in case our chunk size is smaller than the desired length. When we execute that file we'll see: $ python3 chunk_based_on_number.py [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, None]] As seen in the output above, the list has been split into 7 individual lists of equal sizes, based on the argument chunk_numbers provided. Conclusion In this article, we have seen some of the ways by which a list can be split into even-sized chunks and lists based on custom methods and by using the built-in modules. The solutions mentioned in this tutorial, are not limited to the ones defined here, but there are multiple other creative ways by which you can split your list into even-chunks too.
https://stackabuse.com/how-to-split-a-list-into-even-chunks-in-python/
CC-MAIN-2021-17
refinedweb
989
66.78
HTML and CSS Reference In-Depth Information Objective complete - mini debriefing Game view is responsible for drawing things on a canvas. For this project, we are going to use EaselJS for most of the canvas drawings. It is recommended that you check their documentaion in order to have a big picture of what classes and funcionaliies it provides. The following is the EaselJS documentaion URL: We used the Text class to draw a Hello message on the canvas. It takes three parameters: text value, font style, and text color. All the three parameters are of string type. The format of the font's style and text color is the same as how we define them in CSS. We can use color name, Hex code, or the rgba funcion. Why use library to draw on a canvas? Canvas is stateless. It is like a real paining canvas. Once you have drawn something on it, there are just colors. We need logic to keep track of things and then redraw it every ime on a canvas. The libraries, including EaselJS, help us manage objects and draw on a canvas for us. Note that all the classes in the CreateJS suite have namespace createjs . It prevents conflicts on the other variables. This is why we used createjs.Text when referring to the EaselJS's Text class. The addChild method The simplest way to display anything in the EaselJS-controlled canvas is by adding it to the stage using the addChild method. Don't confuse the addChild method with the appendChild method from JavaScript. We are not adding new DOM elements to the game. We are handling all the game object hierarchies inside the canvas tag. We also manage the children hierarchy in JavaScript and draw them on the canvas. We can think of the canvas area as a stage. Throughout the development, we will keep on adding things to the stage. We will learn more on adding children to a non-stage object in the next task when creaing numbered boxes. Search WWH :: Custom Search
http://what-when-how.com/Tutorial/topic-435qror1/HTML5-Game-Development-138.html
CC-MAIN-2017-47
refinedweb
342
75.81
Hello world, I want to use IntelliJ to run the Java software I have here: The software has 2 folders: samples/ source/ It appears that the Java code in samples/ depends on source/ I want to know how to create a project which allows me to run the code in samples/ I poked at it a bit using the menus in IntelliJ and quickly realized I should ask for help. Question: How to create/configure an Intellij project which can run the code here: ?? Hello world, Create a project with 2 modules, one for source, another for modules, make samples module depend on the source module. ok, I did this. cd /tmp/ git clone cd /tmp/ibjts/ idea.sh Then I saw idea14 appear. How to create a project? Menu has these options: -New Project -New Project from existing sources I picked -New Project from existing sources I gave it this path: - /tmp/ibjts/ It asks for project name. I gave it 'myproject' Now I see a project and it has this path: /tmp/ibjts/myproject Question: How to add modules to this project? I see no 'add module' action in the menus. This might seem like a simple question but I am used to interpreted languages like Python, Ruby, and JavaScript which make it very easy to reuse other peoples code. I sense progress. I added this folder as a module: /tmp/ibjts/samples/ and now, the java-code there appears in idea14. yay! The first file is: /tmp/ibjts/samples/Java/apidemo/AccountInfoPanel.java The first import is: import static com.ib.controller.Formats.fmt0; And it contains some red. So, I import this folder as a module: /tmp/ibjts/source/ And that import is still red. Question1: Is /tmp/ibjts/samples/ the correct folder when I added the 1st module? I sense that I have these folder-choices for the 1st module: /tmp/ibjts/samples/ /tmp/ibjts/samples/Java/ /tmp/ibjts/samples/Java/apidemo/ Which one should I use? Perhaps I see a clue in this file: /tmp/ibjts/samples/Java/apidemo/AccountInfoPanel.java There, I see the declaration: package apidemo; Perhaps this Java-call has something to do with an idea-module? Question2: Did I use the correct folder when I added the 2nd module? I sense that I have these folder-choices for the 2nd module: /tmp/ibjts/source/ /tmp/ibjts/source/JavaClient/ /tmp/ibjts/source/JavaClient/com/ /tmp/ibjts/source/JavaClient/com/ib/ /tmp/ibjts/source/JavaClient/com/ib/client/ /tmp/ibjts/source/JavaClient/com/ib/contracts/ /tmp/ibjts/source/JavaClient/com/ib/controller/ What is the correct folder choice when I add the 2nd module? I chose /tmp/ibjts/source/ but I worry that is a wrong choice. Attached is the correctly configured project with the dependencies between the modules. Attachment(s): ibjts.zip I sense more progress. Your zip file is very useful. I will try to use it to recreate the steps I need to follow to create my own project. I've spent 40 minutes trying but have no success yet. I see that I am wrestling with two basic questions: 1. How to reuse code in Java? 2. How to use IntelliJ to reuse code in Java? I now know that to share my code I need a package declaration in my file.java And, that declaration needs to match a folder structure. Also I know that CLASSPATH is used to communicate locations of file.class And I know that I can use javac to create file.class from file.java Today I learned that IntelliJ asks me to use a hierarchy: A project has modules which have classes Also I know that project is tied to a folder. And that a module is tied to a folder. What eludes me is the detailed thought process behind building a project from two folders of code. I know that both folders depend on jdk7 and that folder-A depends on folder-B. To me that seems like 3 simple facts that I can convey to IntelliJ. IntelliJ should then give me a project which has all the dependencies connected together. I used idea14 to study your project. I see 2 modules: Java[samples] tied to folder ibjts/samples/Java JavaClient tied to folder ibjts/source/JavaClient I assume that that the first module has [samples] next to it for some reason. Perhaps I use [samples] to identify the project? I browsed various java files under ibjts/samples/Java. I see no red anywhere so this project is okay. I exited idea14. I did these shell commands: cd /tmp/ git clone cd /tmp/ibjts/ Here I see 2 folders: samples source I know that samples depends on source and they both depend on jdk I run this: idea.sh I create a 'project from existing sources' named samples from this folder: /tmp/ibjts/samples/Java/ I see lots of red in the java files. I create a module from this folder: ibjts/source/JavaClient On the left-hand-side, Now my project looks like your project. But, I still see lots of red in the java files. Actually the java files in ibjts/source/JavaClient/ seem to be okay; IntelliJ has found their dependencies. Question: How to make the red go away from /tmp/ibjts/samples/Java/ ?? See . Make sure samples module has sources module in the dependencies. ah, I figured it out! I see in your project where you set that the samples-module depends on the JavaClient-module. I did this in my project: UI-path: file - ProjectStructure - modules - samples - plus-sign - moduleDependency All my red is ... GONE. yay! Thanks!!!
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206169519-Newb-how-to-combine-2-folders-into-1-project-
CC-MAIN-2020-16
refinedweb
941
74.08
#include <wx/preferences.h> Manage preferences dialog. This class encapsulates the differences – both in appearance and behaviour – between preferences dialogs on different platforms. In particular, OS X preferences look very different from the typical notebook control used on other platforms, and both OS X and GTK+ preferences windows are modeless unlike Windows options dialogs that are typically modal. wxPreferencesEditor is able to hide the differences by hiding the creation of preferences window from the API. Instead, you create an instance of wxPreferencesEditor and add page descriptions in the form of wxPreferencesPage using its AddPage() method. After setting up the editor object, you must call Show() to present preferences to the user. Destructor. Destroying this object hides the associated preferences window if it is open at the moment. The destructor is non-virtual as this class is not supposed to be derived from. Add a new page to the editor. The editor takes ownership of the page and will delete it from its destructor (but not sooner). Hide the currently shown dialog, if any. This is typically called to dismiss the dialog if the object whose preferences it is editing was closed. Returns whether changes to values in preferences pages should be applied immediately or only when the user clicks the OK button. Currently, changes are applied immediately on OS X and GTK+. The preprocessor macro wxHAS_PREF_EDITOR_APPLY_IMMEDIATELY is defined in this case as well. Returns whether the preferences dialog is shown modally. If this method returns false, as it currently does in wxGTK and wxOSX, Show() simply makes the dialog visible and returns immediately. If it returns true, as it does in wxMSW and under the other platforms, then the dialog is shown modally, i.e. Show() blocks until the user dismisses it. Notice that it isn't necessary to test the return value of this method to use this class normally, its interface is designed to work in both cases. However it can sometimes be necessary to call it if the program needs to handle modal dialogs specially, e.g. perhaps to block some periodic background update operation while a modal dialog is shown. Show the preferences dialog or bring it to the top if it's already shown. Notice that this method may or may not block depending on the platform, i.e. depending on whether the dialog is modal or not.
https://docs.wxwidgets.org/3.0/classwx_preferences_editor.html
CC-MAIN-2019-18
refinedweb
393
55.84
We all love wizards. Here’s a common pattern I use for wizards. It sucks and the code’s ugly but it works. We’re going to create a 3-step wizard for creating a User. class User < ActiveRecord::Base validatespresenceof :email, :password validatesconfirmationof to edituser ‘_b.rhtml’ when going to the second step in the wizard. This way we avoid conditional logic in this view. app/views/users/_b.rhtml Step Two<%= error_messages_for :user %> <% form_for :user, :url => user_path(:id => @user, :step => @step), :html => { :method => :put } do |form| -%> <%= form.text_field :name %> <%= submit_tag 'Submit' %><% end -%> Here we collect some optional User information in a form that PUTs to #update, passing along the current step in the wizard. Here’s #update: def update @step = params[:step] @user = User.find params[:id] if laststep? if @user.updateattributes params[:user].merge(:created => true) redirectto userpath(@user) else render :action => :edit end else if @user.updateattributes params[:user] redirectto edituserpath(step? if @user.updateattributes params[:user].merge(:created => true) redirectto userpath(: app/views/users/_c.rhtml Step 3 (last step) <%= errormessagesfor :user %> <% formfor :user, :url => userpath(:id => @user, :step => @step), :html => { :method => :put } do |form| -%> <%= form.textarea :bio %> <%= submittag 'Submit' %><% end -%> It collects more optional User in a form that PUTs to #update just like step ‘b’ (2) did. You might be wondering why I chose letters instead of numbers for my wizard stages. Rails complains if you try to have a partial named 1.rhtml or 2.rhtml for some reason.
http://robots.thoughtbot.com/its-the-wiz-and-nooobody-beats-it
CC-MAIN-2014-35
refinedweb
247
60.72
Hash lookup in Ruby, why is it so fast? Note: Our friend and CEO at Crowd Interactive, David Padilla, wrote this great piece about hash lookup in Ruby. Be sure to check out MagmaConf! Have you ever noticed that in Ruby looking for a specific key-value pair in a Hash is very fast? Allow me to explain the logic behind hashes in Ruby with a language that you probably understand: Ruby. Let's imagine for a second that we want to emulate the functionality in hashes because, for some strange reason, they have not been implemented yet. If we want to have some sort of key-value structure, we'll have to implement it ourselves, so let's get to work. First, we'll need a Struc to represent a HashEntry, or the key-value objects that we will add to our hashes. HashEntry = Struct.new(:key, :value) Now, we'll need a class that represents our Hashes or (to avoid conflicts with the original Hash class) HashTable. class HashTable attr_accessor :bins def initialize self.bins = [] end end We add the bins attribute to the class. bins will be an array where we'll store our HashEntry elements. Now, let's write a method to add a HashEntry to a HashTable. To follow convention, we'll use the traditional << as method name. class HashTable attr_accessor :bins def initialize self.bins = [] end def <<(entry) self.bins << entry end end Great, now we can add HashEntry elements to our HashTable like so: entry = HashEntry.new :foo, :bar table = HashTable.new table << entry What if we want to look for an entry by key? Let's write the [] method on the HashTable class to handle that. def [](key) self.bins.detect { |entry| entry.key == key } end What we're doing here is simply going element by element comparing the given key until we find what we're looking for. Efficient? Let's figure it out. Benchmarking We'll use Ruby's benchmarking tools to figure out how much time we're spending looking for elements on our hash tables. require 'benchmark' # # HashTable instance # table = HashTable.new # # CREATE 1,000,000 entries and add them to the table # (1..1000000).each do |i| entry = HashEntry.new i.to_s, "bar#{i}" table << entry end # # Look for an element at the beginning, middle and end of the HashTable. # Benchmark it # %w(100000 500000 900000).each do |key| time = Benchmark.realtime do table[key] end puts "Finding #{key} took #{time * 1000} ms" end When we run this benchmark, we get the following results: Finding 100000 took 33.641 ms Finding 500000 took 192.678 ms Finding 900000 took 345.329 ms What we see here is that lookup times increase depending on the amount of entries and its position within the array or bins. This is obviously very inefficient and unacceptable for real life scenarios. Now, let's see how Ruby tackles this problem internally. Bins Instead of using a single array to store all its entries, hashes in Ruby use an array of arrays or "bins". First, it calculates a unique integer value for each entry. For this example we will use Object#hash. Then, Ruby divides this hash integer by the total number of bins and obtains the remainder or modulus. This modulus will be used as the bin index for that specific entry. When you lookup for a key, you calculate its bin index again using the same algorithm and you look for the corresponding object directly on that bin. Let's add an attribute on the HashTable class that will determine how many bins each HashTable will have, and we'll initialize it with 500. class HashTable # ... attr_accessor :bin_count def initialize self.bin_count = 500 self.bins = [] end # ... end (Now, let's write a method that calculates the bin for a specific entry depending on the number of bins.) class HashTable # ... def bin_for(key) key.hash % self.bin_count end # ... end When storing the HashEntry in the HashTable, we won't just store it on an array, we'll store it on an array that corresponds to the bins index depending on what the bin_for method returns: class HashTable # ... def <<(entry) index = bin_for(entry.key) self.bins[index] ||= [] self.bins[index] << entry end # ... end And last, whenever we want to retrieve a HashEntry, we'll recalculate the bin index again using the bin_for method and once we have that, we'll know exactly where to look for our entry. def [](key) index = bin_for(key) self.bins[index].detect do |entry| entry.key == key end end When we run the same benchmark that we used earlier, we can see times improve dramatically: Finding 100000 took 0.025 ms Finding 500000 took 0.094 ms Finding 900000 took 0.112 ms (Not only did times improve, but we got rid of the variance that we used to have depending on the position of the element in the bin pool. There's still room for improvement here. Let's add more bins and see what happens.) class HashTable # ... def initialize self.bin_count = 300000 self.bins = [] end # ... end When we run the benchmark we get: Finding 100000 took 0.014 ms Finding 500000 took 0.016 ms Finding 900000 took 0.005 ms Even more improvement. This mean that the more bins, the less time spent looking for a specific key in a bin. How many bins does Ruby actually use? Ruby manages the size of the bins dynamically. It starts with 11 and as soon as one of the bins has 5 or more elements, the bin size is increased and all hash elements are reallocated to their new corresponding bin. At some point you pay an exponentially increased time penalty while Ruby resizes the bin pool, but if you think about it, its worth the time since this will keep lookup times and memory usage as low as possible. Further reading If you want to learn where this algorithm came from and a little more about Ruby internals, I really recommend that you read Pat Shaughnessy's Ruby Under a Microscope book. Pat explains how the Ruby VM works in a way that anyone can understand. No C knowledge required, I really enjoyed reading it. You can find the working example I used for this example on this gist. You could also read some of the Rubinius source code. Take a look at their implementation of the Hash class, you'll probably understand a little more of the logic they used after you've read this post and Pat's book. Thanks for reading. Share your thoughts with @engineyard on Twitter
https://blog.engineyard.com/2013/hash-lookup-in-ruby-why-is-it-so-fast
CC-MAIN-2016-22
refinedweb
1,105
75.3
Category talk:Wikiversity I wonder about the usage of this category, as applied to pages in the Wikiversity namespace. It would be a little like having a Category:Educational resource, to be applied to all mainspace pages.... So much to do, so little time. --Abd (discuss • contribs) 23:32, 26 January 2014 (UTC) - That's the type of cleanup we can do by bot, if you tell me what you want and we have some type of consensus on it. -- Dave Braunschweig (discuss • contribs) 23:40, 26 January 2014 (UTC) - Yes, thanks. Any mass changes should be first discussed adequately, of course. We haven't put a great deal of thought, as far as I know, into category structure. It's mostly grown like Topsy. Right now, it's not a priority, because this category does very little harm except to add, perhaps, to useless clutter on pages. We'll see. --Abd (discuss • contribs) 00:07, 27 January 2014 (UTC) - I *am* thinking about proposing to remove Category:Wikiversity from all Wikiversity namespace pages, and then we can look at the appropriateness of the category elsewhere. We have this category, for example, on at least one user page I noticed. Is that appropriate? As a general rule, probably not. But I haven't examined the general case, nor that specific one in detail. - Okay, I just looked at the user page I'd seen. User:JWSchmidt/Student Union. JWS had become a bit paranoid by that time (and he had some cause to be so). He created the page as a copy of Wikiversity:Student Union, with the edit summary, (making a copy that is safe from deletionists), The page never was deleted, and though it was proposed for deletion,[1], that was never likely. - We handle matters like this very differently now, and routinely. (On Wikipedia, a WP space activity or proposal will hardly ever be deleted, instead it is "deprecated" if inactive or obsolete.) This was a great example of how not to stand for Wikiversity as open, i.e., by attacking the "enemies" of openness. - The category was there from the original text in WV space. I will poke out the category. Coincidentally, I just invited JWS, one of the founders of Wikiversity, to request unblock. I'd leave it to him to request deletion of that user page as totally unnecessary. No page on Wikiversity would be totally safe from "deletionists," were they to take over here, certainly not user space pages of blocked users. You can see from, say, [2], what was happening in JWS' view. The user he was revert warring with was highly disruptive, by the way. It's not that there was no risk to this community. There was. But JWS got stuck there, and he was effectively allowing himself to be trolled into edit warring, so horrified was he by the "attack of the Wikipedians." Yet he was, at the time, a Wikipedia administrator, which was only removed, later, for inactivity. --Abd (discuss • contribs) 00:32, 27 January 2014 (UTC) User space pages in[edit source] My opinion is that both should either be removed from categories (with the initial colon), or moved to Wikiversity space in some way. The problem with category linking to user space, like this, is that pages which are, by our traditions, under user control, can then be presented or seen as if they are approved by the community. I do support linking to user pages on mainspace discussion (or other space discussion) pages, but not through the category system (or, as recently proposed, "user categories" could be used, there are other possibilities that would address the concern about possible misunderstanding and still be easy to manage.) --Abd (discuss • contribs) 00:53, 27 January 2014 (UTC)
https://en.wikiversity.org/wiki/Category_talk:Wikiversity
CC-MAIN-2020-50
refinedweb
630
62.38
Last month, I wrote about Linux’s file access API. For this month’s column, I’m gong to talk about some of the other important file-related system calls, and touch on how the kernel file implementation affects the system call interface. In the POSIX world, it’s important to remember that a single file can have more than one name (that is, if it even has a name), and can also have symbolic links pointing to it. This means that a file does not necessarily have to have a name, and even if it does, it does not have to be a unique name. Files exist separately from their names as far as the filesystem is concerned. The most obvious examples of this are symbolic links, also called symlinks or soft links. Symlinks are special files that specify another filename. Most system calls (including open() “follow the symlink” if they are told to access the symbolic link. They are then referred to a file by the symlink (if you’re familiar with HTTP, think of these as a bit like a server redirect). For example, the file /etc/localtime is normally a symbolic link to the file that says what time zone the machine lives in (this is /usr/share/zoneinfo/ US/Eastern on my system). When a program needs to discover something about the system’s time zone, it opens /etc/localtime. As open() follows symlinks, the program automatically reads this information from /usr/share/zoneinfo/US/Eastern. One potential pitfall of symlinks is that they can be circular; there is nothing to stop the file /tmp/a from pointing to /tmp/b, even when /tmp/b points back to /tmp/a. When this happens, the system gets stuck. It looks at /tmp/a, which sends it to /tmp/b, which sends it back to /tmp/a, and around and around it goes. To avoid this problem, Linux will only follow a fixed number of symbolic links while resolving a filename; if there are more than five, it returns ELOOP. Symbolic or soft links are one way several path names can refer to the same file; hard links are another. A hard link is the binding of a file in a filesystem to a file name; creating a hard link “links” the file into a directory. Nothing stops a single file from being linked into more than one directory (or into a single directory multiple times); in fact, the ln command facilitates this. The “link count” is the number of directories that file appears in. When a file name is removed (or “unlinked”), the entry for that file name is removed from the directory which contains it. The file itself is kept around as long as its link count is above 0, or a running process has the file open. Hard links and symlinks differ in a few important ways. 1. When the file name referred by a symlink is removed, the symbolic link is left pointing to nothing. This is known as a “dangling link.” This does not happen with hard links. 2. A file can only be hard linked into a single filesystem while symbolic links can point across filesystems. 3. A symbolic link may (and often does) point to a directory, while hard-linking directories is strongly discouraged. It is not allowed by many filesystems. Once you get comfortable with the idea that a file may have more than one path name associated with it, the next thing to remember is that a file may have no path names associated with it. This can happen when a file is opened by a process and then unlinked from the file system. Files like TCP/IP sockets and unnamed pipes (which are used for interprocess communication) are also nameless. Rather than a filename, every open file on a system has a single in-core inode. “Core” is an antiquated way of saying “memory,” and “inode” is short for “information node”. So, in-core inode means “a bit of information kept in memory.” This doesn’t sound nearly as fancy, but it means the same thing. The “single” part of “single in-core inode” is worth noting. It means that no matter how many times the file has been open, or how many processes are accessing it, only a single in-core inode describes the open file. As you may have already guessed, there is one other form of inode. On-disk inodes describe a file in a filesystem. They are filesystem specific. Every file in a filesystem has a single on-disk inode, and they function similarly to in-core inodes. If you’re wondering where I’m going with this, we need to understand concept of an inode for the kernel’s file model to make any sense. And we need to talk about the kernel’s file model for some of the details of the file API to make any sense at all. When a process opens a file, it gets a small, positive integer known as a file descriptor. That file descriptor is an index into a table of pointers to file structures. The file structure contains information specific to that particular opening of the file. Specifically, the file structure contains the file pointer (which determines where the next read() or write() will happen within the file) and the file’s access mode (this says whether the file is open for reading or both reading and writing). The file structure also contains a pointer to the in-core inode. While each open file has a single in-core inode, it may have more than one file structure for an open file. Figure 1 illustrates how this happens for a file that has been open()ed by two separate processes. Note that each process has a different file pointer and access mode, but both share a single in-core inode. There are a couple of ways for file descriptors to share a single file structure. The most esoteric is for a file descriptor to be sent from one process to another through a Unix domain socket. A second, less complex method occurs after a fork(), when a parent process and its child share a single file structure for every file that was open before the fork() occurred. This behavior is important to remember, as it has caused its fair share of obscure bugs. The last way for two or more file descriptors to refer to a single file structure is when some of those file descriptors have been created by the dup() or dup2() system calls. int dup(int fd); int dup2(int fd, int targetfd); Both the dup() and dup2() system calls return a file descriptor that points to the same file structure as the first parameter passed to either one. dup() is guaranteed to return the smallest file descriptor available, while dup2() will return the targetfd file descriptor. If targetfd already refers to an open file descriptor, that file will be closed. Figure 2 shows what happens if Process A executes dup2(2,5). In this case, Process A’s file descriptors 2 and 5 end up referring to a single file structure, but Process B’s file descriptor still refers to a separate file structure. dup() and dup2() are used by shells to redirect standard input, output, and error for a process. For example, this code fragment redirects the standard output of the running process to the file “output:” fd = open(“output”, O_RDWR | O_CREAT), 0666); if (fd < 0) { perror(“failed to open file output”); exit(1); } dup2(fd, 1); close(fd); Most of the file-related system calls that manipulate a file’s inode (either in-core inode or on-disk inode) have two forms. One form expects a file name, and the other expects a file descriptor. Since both file names and file descriptors resolve to a single inode, both forms yield equivalent results. chdir(), which changes the process’s current working directory is a good example of this. int chdir(const char * dirname); int fchdir(int fd); The first form, chdir(), changes into the directory specified by a path name while the second makes the directory referenced by file descriptor, fd, the current directory. In many cases, chdir() is easier to use, as it makes changing current directories as simple as chdir(“/tmp”). fchdir() has its place too, however; one popular use is letting the process remember the current directory and change back to it. For example: currDir = open(“.”, O_RDONLY); chdir(“/tmp”); . . /* do some real work */ . fchdir(currDir); close(currDir); Not only is this a bit easier than using getcwd() to remember the name of the original directory, but it is also guaranteed to work even if a user removes the original directory while the process is working in /tmp. As this process keeps a file descriptor open to the original directory, that directory is always being used by at least one process, so the system doesn’t remove it until the process has finished with it. The stat() family of functions actually comes in three varieties: stat(), fstat(), and lstat(). All of them return information stored in a file’s inode (one of the in-core inodes or on-disk inodes is used, depending on the file type. For system programs, it doesn’t really matter which is used). All of the information returned by stat() is placed in a struct stat, which looks like this: struct stat { dev_t st_dev; ino_t st_ino; mode_t st_mode; nlink_t st_nlink; uid_t st_uid; gid_t st_gid; dev_t st_rdev; off_t st_size; unsigned long st_blksize; unsigned long st_blocks; time_t st_atime; time_t st_mtime; time_t st_ctime; }; To get access to struct stat, be sure to include sys/ stat.h. Figure 3 explains what each of these fields means. Most of these fields are straightforward. The most complicated of the bunch is st_mode, which warrants a little more explanation. Figure 3: Functions of Various Struct Stat Fields Linux supports many different file types: pipes, sockets, directories, and normal files. And each of these file types is identified by a few unique bits in the file mode. Here’s the symbolic name (a #define) for each file type: S_IFSOCK Sockets S_IFLNK Symbolic link S_IFREG Regular file S_IFBLK Block device S_IFCHR Character device S_IFDIR Directory S_IFIFO Pipe (either named or unnamed) There are macros that make it a bit easier to check a file’s type. For example, to check if a file is a symlink, pass the file’s mode to S_ISLNK. To make this a bit more explicit, Figure 4illustrates a small program that tells you what type of files are listed on the command line. An example of what the program does when it’s run can be seen in Figure 5. Figure 4: Identifying File Types Listed on the Command Line #include <errno.h> #include <stdio.h> #include <string.h> #include <sys/stat.h>; } Figure 5: Output from Figure 4 # ./filetype /dev/socket /etc/passwd /dev/log /dev/null /dev/hda /tmp /etc/passwd regular /dev/log socket /dev/null char /dev/hda block /tmp directory The rest of the file mode contains the file’s permissions and permission modifies. The permissions are the lowest 9 bits, and are the same as the bits passed to chmod(). By logically ANDing st_mode with 0x1FF (or 0777), you are left with just the permission bits which can be checked easily enough. If you aren’t familiar with Unix permission bits, you will find that man 1 chmod contains a simple explanation. The file permission modifiers consist of the setuid bit, setgid bit, and the sticky bit. The setuid and setgid modifiers allow a process running that file to masquerade as another user or member of another group. The sticky bit has a long history, but is now rarely used. Usually it is set only for directories, where it changes how permissions are checked when a file gets removed. Normally, users can remove a file from any directory where they have write permission. For publicly accessible directories (like /tmp), this means that any user can erase any file, since the directory is world-writable. When the directory has the sticky bit set, users can only remove files they own. If your system is properly configured, you will see that the sticky bit is set on /tmp [see Figure 6]. Figure 6: The Sticky Bit # ls -ld /tmp /etc drwxrwxrwt 5 root root 2048 May 4 21:46 /tmp drwxr-xr-x 25 root root 3072 May 2 18:33 /etc The ‘t’ at the end of the first field means that the sticky bit is set for the /tmp directory; notice that it’s missing from /etc. The file permission modifiers are bits 12, 11, and 10 of the file mode, and have the same values they do for the chmod command. You can test for them by checking for a non-zero result from logically ANDing a file mode with one of the following constants: S_ISUID Setuid bit S_ISGID Setgid bit S_ISVTX Sticky bit Now that we’ve explained the file mode (albeit quite briefly), let’s look at the three forms of stat(). int fstat(int fd, struct stat *sb); int stat(const char * filename, struct stat * sb); int lstat(const char * filename, struct stat * sb); First the similarities: All of these functions return 0 on success and fill in the struct sb pointed to by the last parameter. Now, for the differences. fstat() is the most noticeably different; it returns information on the inode referred to by the passed-in file descriptor. stat() returns information on the file that is specified by the first parameter, and follows symbolic links. This means that it will never return information on a symlink itself, since symlinks are always de-referenced. lstat() works a lot like stat(), but does not follow symlinks. If you lstat() a symbolic link, a struct stat with a file type of S_IFLNK is returned. For all other file types, lstat() and stat() behave identically. Note that in most cases, you would want to use stat() rather than lstat(). So much for our whirlwind tour of inodes. We’ll continue next month by talking about more file-related system calls. Now that we’ve introduced all of the important concepts, we’ll be able to work through the rest of the major filesystem calls in no time. Erik Troan is a developer for Red Hat Software and co-author of the book Linux Application Development. He can be reached at ewt@redhat.com.
http://www.linux-mag.com/id/285/
CC-MAIN-2018-30
refinedweb
2,426
69.01
Sometimes you are developing an ATL COM server that does not have a GUI, and you would like an icon in the shell (or "system tray" as it's also known), to display some sort of runtime information. I needed this for a project I was working on at the time, and was inspired by the little icon that appears when you connect to the Internet with your modem. It shows you how long you've been connected, and the number of bytes sent and received. The icon also changes when there is activity - a nice touch. I had a look at some of the source code available on Code Project, but none did exactly what I wanted. For a start most of the ATL servers I was developing did not have a GUI or a window associated with them. I wanted a utility class that I could derive from when creating my ATL COM server that worked out of the box, and that handled all the complexities of creating a hidden window, dealing with menus etc. So what does this code do? Well this class allows you to display an icon of your choosing in the shell, which can be changed as often as you like. You can update the tip text associated with the icon when you like. You can respond to mouse events that are generated over your tray icon. And, the class will display a popup menu of your choosing on demand. You might want to check out other articles on Code Project concerning the shell. This is just a very simple class to get support for the system tray into your ATL COM server quickly. If nothing else then it's example code. This code was developed with Visual Studio 6.0, I haven't tested it in Visual Studio .NET. Compile the Visual C++ project and make sure it registers the COM server that it builds. This has a minimal COM server with some functions to demonstrate how to use the helper class. Start the VB demo application ShellTest.exe; you will see an icon appear in the shell area. You can enable or disable the icon by clicking on the "Visible in shell" checkbox. Type some text into the tip edit box and click "Update", and the tip text will change. Check the "animate" button and the icon will change. You can alter how often the icon animates by entering a valid (say, 100) in the frequency edit box, and then click the update button. Right click on the shell icon. You will see a context menu appear. Select "About" and a dialog will appear. The class has a number of functions that you'll want to call to work with the shell: virtual void SetShellTipText (std::string &TipText) Call SetShellTipText to pass in the tip text you want displayed. If you specify more than 64 characters, it will be truncated. This is because the basic version of the common controls only supports this number of characters. SetShellTipText virtual void SetShellIcon (WORD IconResource) Pass in the resource ID of the icon (e.g. IDI_ICON1) that you want displayed in the shell. IDI_ICON1 virtual void SetShellTimer (bool bEnabled, WORD wTimerDuration) Call SetShellTimer to enable a windows timer for your shell icon, if you want to use one. Your ATL server class will then receive WM_TIMER messages, which you can do some processing with. You can also switch off a running timer by calling this with bEnabled = false. The timer duration is specified in milliseconds. SetShellTimer WM_TIMER bEnabled = false virtual void SetShellVisible (bool bVisible = true) Calling SetShellVisible with true displays the icon in the shell, and if you have requested to use the timer, starts it off. Calling this with false removes the icon from the shell and stops any timer. SetShellVisible true false virtual WORD ShowPopupMenu (WORD PopupMenuResource) Call ShowPopupMenu with the resource ID of your menu (e.g. IDR_POPUP_MENU). It will return back the menu ID that was selected, or zero if no menu item was selected. ShowPopupMenu IDR_POPUP_MENU I'm assuming you used the wizard to create an ATL COM server, and have added an ATL object to your project. All the changes you'll need to make are to the header file of your ATL object. Add the file ShellIconHelper.h to your workspace. This contains the class CShellIconHelper. CShellIconHelper In the header file for your COM server, add in the line #include "ShellIconHelper.h". #include "ShellIconHelper.h" You might also need to change project settings for your COM server so that exceptions are supported, as the helper class uses STL. Go to project/settings and select "C++ language" category. Check the "Enable exception handling". If you really don't want exception handling then you could just change the ShellIconHelper class to use LPCSTR instead of std::string - quite a trivial change. ShellIconHelper LPCSTR std::string Add the class CShellIconHelper to the list of derived classes of your COM server class. As it's a templated class you need to specify the name of the class in angle brackets, in the same fashion as many of the other derived classes listed. //////////////////////////////////////////////// // CMyServer class ATL_NO_VTABLE CMyServer : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CMyServer, &CLSID_MyServer>, public ISupportErrorInfo, public IDispatchImpl<IMyServer, &IID_IMyServer, &LIBID_SYSTEMTRAYDEMOLib>, public CShellIconHelper<CMyServer> Add a message map to this class (in the section with the other macro declarations), so that your COM server handles windows messages correctly. In this case we want to respond to timer messages and user commands (i.e. when the user moves the mouse over our shell icon). BEGIN_MSG_MAP(CMyServer) MESSAGE_HANDLER(WM_TIMER, OnTimer) MESSAGE_HANDLER(WM_USER, OnUserCommand) END_MSG_MAP() If you don't want to use the timer or user commands, just leave out the MESSAGE_HANDLER lines. But you must have the BEGIN_MSG_MAP(...) and END_MSG_MAP() macros in your class - otherwise it won't compile. MESSAGE_HANDLER BEGIN_MSG_MAP(...) END_MSG_MAP() Override the method OnFinalConstruct in this class. We'll set up the icon in the system tray here. Note, you can choose to display the icon at any time once your server is loaded (or not at all). I chose OnFinalConstruct as it's a handy place to do this. OnFinalConstruct public: HRESULT FinalConstruct() { // Configure the shell, then create it by calling SetShellVisible SetShellTipText (std::string("Some tip text")); SetShellIcon (IDI_ICON1); SetShellVisible (); SetShellTimer (true, 1000); return S_OK; } Override the method OnFinalRelease in this class. The code we add here removes the icon from the system tray when the application shuts down. Note: You must include this section of code, with the call to SetShellVisible (false) otherwise your application may well get an access violation during unloading. OnFinalRelease SetShellVisible (false) public: void FinalRelease () { SetShellVisible (false); } Add a handler in for the timer messages. This gets called periodically, at the frequency you specified in the call to SetShellTimer. If you want to change the icon or the text for your system tray icon, you should call SetShellIcon and SetShellTipText. SetShellIcon LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { SetShellIcon (IDI_ICON1); SetShellTipText(std::string("Some text")); return 0; } Add a handler in for user commands. This allows you to respond to mouse events over your system tray icon. For example, you'll probably want to display a popup menu when the user right clicks your icon, as shown here. The lParam contains the message that Windows has passed you. You call the function ShowPopupMenu, with a Resource ID of a menu you want displayed. This function returns the ID of the menu option selected (as defined in the resource files for your project), or 0 if no menu option is selected. lParam LRESULT OnUserCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&bHandled) { if (lParam == WM_RBUTTONUP) { // Show the popup menu. The return code is the menu // item the user selected, or zero if they didn't // make a choice (i.e. by clicking outside of the popup menu). WORD cmd = ShowPopupMenu (IDR_POPUP_MENU); } return 0; } template <typename T> class CShellIconHelper : public CWindowImpl<T> The class CShellIconHelper derives from the ATL class CWindowImpl - this gives us our hidden window, that we need to use to display the icon and to receive windows messages. If your ATL object already derives from CWindowImpl (maybe it's an ActiveX control), then you can remove this derivation. CWindowImpl gives us a public member m_hWnd - this stores the window handle of our hidden window. CWindowImpl m_hWnd = ::LoadIcon(_Module.GetResourceInstance), MAKEINTRESOURCE (m_CurrentIconResource)); ::lstrcpyn(notifyIconData.szTip, m_CurrentText.c_str(), 64); // Limit to 64 chars ::Shell_NotifyIcon (msg, ¬ifyIconData); } ShellNotify does the actual work of updating the shell icon and tip text. It's really quite simple - just fill in the NOTIFYICONDATA structure with the required information and call Shell_NotifyIcon. Note that the shell supports "balloon messages" on certain versions of Windows with the newer version of the common controls. I decided against supporting these, as I wanted the code to run on as many platforms as possible. ShellNotify NOTIFYICONDATA Shell_NotifyIcon virtual WORD ShowPopupMenu (WORD PopupMenuResource) { HMENU hMenu, hPopup = 0; hMenu = ::LoadMenu (_Module.GetModuleInstance(), MAKEINTRESOURCE (PopupMenuResource)); if (hMenu != 0) { POINT pt; ::GetCursorPos (&pt); // TrackPopupMenu cannot display the menu bar so get // a handle to the first shortcut menu. hPopup = ::GetSubMenu (hMenu, 0); // To display a context menu for a notification icon, the // current window must be the foreground window before the // application calls TrackPopupMenu or TrackPopupMenuEx. Otherwise, // the menu will not disappear when the user clicks outside of the // menu or the window that created the menu (if it is visible). ::SetForegroundWindow (m_hWnd); WORD cmd = ::TrackPopupMenu (hPopup, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, m_hWnd, NULL); // See MS KB article Q135788 ::PostMessage (m_hWnd, WM_NULL, 0, 0); // Clear up the menu, we're not longer using it. ::DestroyMenu (hMenu); return cmd; } return 0; } The only other noteworthy piece of code is the function ShowPopupMenu, which displays and then tracks a popup menu. Note that it gets a "sub menu" from the menu you have defined, as you cannot display a menu bar. Also it calls SetForegroundWindow before it tracks the pop up menu; this is required so that if you click away from the popup menu without selecting an item it will automatically disappear. You must also post a message to the window after tracking the popup menu; this behavouir is "by design"! The function returns the menu item you selected, or zero if you didn't select anything. SetForegroundWindow I tested this project with an ATL DLL and ATL EXE server. I didn't try with a service - there are other articles on Code Project you might want to look at for services. I also want to get this to work under Visual Studio .NET. Finally the class should support "Balloon" tips. This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below. A list of licenses authors might use can be found here = (HICON) ::LoadImage (_Module.GetResourceInstance(), MAKEINTRESOURCE (m_CurrentIconResource), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); ::lstrcpyn(notifyIconData.szTip, m_CurrentText.c_str(), 64); // Limit to 64 chars ::Shell_NotifyIcon (msg, ¬ifyIconData); } General News Suggestion Question Bug Answer Joke Praise Rant Admin Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
https://www.codeproject.com/Articles/2473/Placing-an-icon-in-the-system-tray-from-an-ATL-COM?fid=4142&df=90&mpp=10&noise=1&prof=True&sort=Position&view=Expanded&spc=None&select=241460&fr=1
CC-MAIN-2017-39
refinedweb
1,874
62.98
. problem: slow network requests. problem: DNS timeouts. problem: ndots: - look up google.com.namespace.svc.cluster.local. - look up google.com.svc.cluster.local. - look up google.com.cluster.local. - look up google.com.eu-west-1.compute.internal. - look up. problem: it’s hard to tell what DNS resolver(s) your system is using This isn’t a bug by itself, but when you run into a problem with DNS, often it’s related in some way to your DNS resolver. I don’t know of any foolproof way to tell what DNS resolver is being used. A few things I know: - on Linux, I think that most things use /etc/resolv.conf to choose a DNS resolver. There are definitely exceptions though, for example your browser might ignore /etc/resolv.conf and use a different DNS-over-HTTPS service instead. - if you’re using UDP DNS, you can use sudo tcpdump port 53to see where DNS requests are being sent. This doesn’t work if you’re using DNS over HTTPS or DNS over TLS though. I also vaguely remember it being even more confusing on MacOS than on Linux, though I don’t know why. problem: DNS servers that return NXDOMAIN instead of NOERROR Here’s a problem that I ran into once, where nginx couldn’t resolve a domain. - I set up nginx to use a specific DNS server to resolve DNS queries - when visiting the domain, nginx made 2 queries, one for an Arecord, and one for an AAAArecord - the DNS server returned a NXDOMAINreply for the Aquery - nginx decided “ok, that domain doesn’t exist”, and gave up - the DNS server returned a successful reply for the AAAAquery - nginx ignored the”. problem: negative DNS caching. problem: nginx caching DNS records foreverancer. problem: Java caching DNS records forever. problem: that entry in /etc/hosts you forgot about Another variant on caching issues: entries in /etc/hosts that override your usual DNS settings! This is extra confusing because dig ignores /etc/hosts, so everything SEEMS like it should be fine (” dig whatever.com is working!“). problem: your email isn’t being sent / is going to spam The way email is sent and validated is through DNS (MX records, SPF records, DKIM records), so a lot of email problems are DNS problems. problem: internationalized domain names don’t work You can register domain names with non-ASCII characters or emoji like !!. problem: TCP DNS is blocked by a firewall A couple of people mentioned that some firewalls allow UDP port 53 but not TCP port 53. But large DNS queries need to use TCP port 53, so this can cause weird intermittent problems that are hard to debug. problem: musl doesn’t support TCP DNSl’s getaddrinfo makes a DNS query - the DNS server notices that the response is too big to fit in a single DNS response packet - the DNS server returns an empty truncated response, expecting that the client will retry by making a TCP DNS query musldoes not support TCP so it does not retry A blog post about this: DNS resolution issue in Alpine Linux problem: round robin DNS doesn’t work with: problem: a race condition when starting a service. that’s all!.
https://jvns.ca/blog/2022/01/15/some-ways-dns-can-break/
CC-MAIN-2022-21
refinedweb
541
70.53
Chapter 6 Changes in cluster abundance 6.1 Overview In a DA analysis, we test for significant changes in per-label cell abundance across conditions. This will reveal which cell types are depleted or enriched upon treatment, which is arguably just as interesting as changes in expression within each cell type. The DA analysis has a long history in flow cytometry (Finak et al. 2014; Lun, Richard, and Marioni 2017) where it is routinely used to examine the effects of different conditions on the composition of complex cell populations. By performing it here, we effectively treat scRNA-seq as a “super-FACS” technology for defining relevant subpopulations using the entire transcriptome. We prepare for the DA analysis by quantifying the number of cells assigned to each label (or cluster) in our WT chimeric experiment (Pijuan-Sala et al. 2019). In this case, we are aiming to identify labels that change in abundance among the compartment of injected cells compared to the background. #--- loading ---# library(MouseGastrulationData) sce.chimera <- WTChimeraData(samples=5:10) sce.chimera #--- feature-annotation ---# library(scater) rownames(sce.chimera) <- uniquifyFeatureNames( rowData(sce.chimera)$ENSEMBL, rowData(sce.chimera)$SYMBOL) #--- quality-control ---# drop <- sce.chimera$celltype.mapped %in% c("stripped", "Doublet") sce.chimera <- sce.chimera[,!drop] #--- normalization ---# sce.chimera <- logNormCounts(sce.chimera) #--- variance-modelling ---# library(scran) dec.chimera <- modelGeneVar(sce.chimera, block=sce.chimera$sample) chosen.hvgs <- dec.chimera$bio > 0 #--- merging ---# library(batchelor) set.seed(01001001) merged <- correctExperiments(sce.chimera, batch=sce.chimera$sample, subset.row=chosen.hvgs, PARAM=FastMnnParam( merge.order=list( list(1,3,5), # WT (3 replicates) list(2,4,6) # td-Tomato (3 replicates) ) ) ) #--- clustering ---# g <- buildSNNGraph(merged, use.dimred="corrected") clusters <- igraph::cluster_louvain(g) colLabels(merged) <- factor(clusters$membership) #--- dimensionality-reduction ---# merged <- runTSNE(merged, dimred="corrected", external_neighbors=TRUE) merged <- runUMAP(merged, dimred="corrected", external_neighbors=TRUE) abundances <- table(merged$celltype.mapped, merged$sample) abundances <- unclass(abundances) head(abundances) ## ## ## Caudal epiblast 2 2 0 0 22 45 6.2 Performing the DA analysis Our DA analysis will again be performed with the edgeR package. This allows us to take advantage of the NB GLM methods to model overdispersed count data in the presence of limited replication - except that the counts are not of reads per gene, but of cells per label (Lun, Richard, and Marioni 2017). The aim is to share information across labels to improve our estimates of the biological variability in cell abundance between replicates. library(edgeR) # Attaching some column metadata. extra.info <- colData(merged)[match(colnames(abundances), merged$sample),] y.ab <- DGEList(abundances, samples=extra.info) y.ab ## An object of class "DGEList" ## $counts ## ## ## 29 more rows ... ## ## $samples ## group lib.size norm.factors batch cell barcode sample stage ## 5 1 2298 1 5 cell_9769 AAACCTGAGACTGTAA 5 E8.5 ## 6 1 1026 1 6 cell_12180 AAACCTGCAGATGGCA 6 E8.5 ## 7 1 2740 1 7 cell_13227 AAACCTGAGACAAGCC 7 E8.5 ## 8 1 2904 1 8 cell_16234 AAACCTGCAAACCCAT 8 E8.5 ## 9 1 4057 1 9 cell_19332 AAACCTGCAACGATCT 9 E8.5 ## 10 1 6401 We filter out low-abundance labels as previously described. This avoids cluttering the result table with very rare subpopulations that contain only a handful of cells. For a DA analysis of cluster abundances, filtering is generally not required as most clusters will not be of low-abundance (otherwise there would not have been enough evidence to define the cluster in the first place). ## Mode FALSE TRUE ## logical 10 24 Unlike DE analyses, we do not perform an additional normalization step with calcNormFactors(). This means that we are only normalizing based on the “library size”, i.e., the total number of cells in each sample. Any changes we detect between conditions will subsequently represent differences in the proportion of cells in each cluster. The motivation behind this decision is discussed in more detail in Section 6.3. We formulate the design matrix with a blocking factor for the batch of origin for each sample and an additive term for the td-Tomato status (i.e., injection effect). Here, the log-fold change in our model refers to the change in cell abundance after injection, rather than the change in gene expression. We use the estimateDisp() function to estimate the NB dispersion for each cluster (Figure 6.1). We turn off the trend as we do not have enough points for its stable estimation. ## Min. 1st Qu. Median Mean 3rd Qu. Max. ## 0.0614 0.0614 0.0614 0.0614 0.0614 0.0614 Figure 6.1: Biological coefficient of variation (BCV) for each label with respect to its average abundance. BCVs are defined as the square root of the NB dispersion. Common dispersion estimates are shown in red. We repeat this process with the QL dispersion, again disabling the trend (Figure 6.2). ## Min. 1st Qu. Median Mean 3rd Qu. Max. ## 1.25 1.25 1.25 1.25 1.25 1.25 ## Min. 1st Qu. Median Mean 3rd Qu. Max. ## Inf Inf Inf Inf Inf Inf Figure 6.2: QL dispersion estimates for each label with respect to its average abundance. Quarter-root values of the raw estimates are shown in black while the shrunken estimates are shown in red. Shrinkage is performed towards the common dispersion in blue. We test for differences in abundance between td-Tomato-positive and negative samples using glmQLFTest(). We see that extra-embryonic ectoderm is strongly depleted in the injected cells. This is consistent with the expectation that cells injected into the blastocyst should not contribute to extra-embryonic tissue. The injected cells also contribute more to the mesenchyme, which may also be of interest. ## factor(tomato)TRUE ## Down 1 ## NotSig 22 ## Up 1 ## Coefficient: factor(tomato)TRUE ## logFC logCPM F PValue FDR ## ExE ectoderm -6.5663 13.02 66.267 1.352e-10 3.245e-09 ## Mesenchyme 1.1652 16.29 11.291 1.535e-03 1.841e-02 ## Allantois 0.8345 15.51 5.312 2.555e-02 1.621e-01 ## Cardiomyocytes 0.8484 14.86 5.204 2.701e-02 1.621e-01 ## Neural crest -0.7706 14.76 4.106 4.830e-02 2.149e-01 ## Endothelium 0.7519 14.29 3.912 5.371e-02 2.149e-01 ## Erythroid3 -0.6431 17.28 3.604 6.367e-02 2.183e-01 ## Haematoendothelial progenitors 0.6581 14.72 3.124 8.351e-02 2.505e-01 ## ExE mesoderm 0.3805 15.68 1.181 2.827e-01 6.258e-01 ## Pharyngeal mesoderm 0.3793 15.72 1.169 2.850e-01 6.258e-01 6.3 Handling composition effects 6.3.1 Background As mentioned above, we do not use calcNormFactors() in our default DA analysis. This normalization step assumes that most of the input features are not different between conditions. While this assumption is reasonable for most types of gene expression data, it is generally too strong for cell type abundance - most experiments consist of only a few cell types that may all change in abundance upon perturbation. Thus, our default approach is to only normalize based on the total number of cells in each sample, which means that we are effectively testing for differential proportions between conditions. Unfortunately, the use of the total number of cells leaves us susceptible to composition effects. For example, a large increase in abundance for one cell subpopulation will introduce decreases in proportion for all other subpopulations - which is technically correct, but may be misleading if one concludes that those other subpopulations are decreasing in abundance of their own volition. If composition biases are proving problematic for interpretation of DA results, we have several avenues for removing them or mitigating their impact by leveraging a priori biological knowledge. 6.3.2 Assuming most labels do not change If it is possible to assume that most labels (i.e., cell types) do not change in abundance, we can use calcNormFactors() to compute normalization factors. This seems to be a fairly reasonable assumption for the WT chimeras where the injection is expected to have only a modest effect at most. ## [1] 1.0055 1.0833 1.1658 0.7614 1.0616 0.9743 We then proceed with the remainder of the edgeR analysis, shown below in condensed format. Many of the positive log-fold changes are shifted towards zero, consistent with the removal of composition biases from the presence of extra-embryonic ectoderm in only background cells. In particular, the mesenchyme is no longer significantly DA after injection. y.ab2 <- estimateDisp(y.ab2, design, trend="none") fit.ab2 <- glmQLFit(y.ab2, design, robust=TRUE, abundance.trend=FALSE) res2 <- glmQLFTest(fit.ab2, coef=ncol(design)) topTags(res2, n=10) ## Coefficient: factor(tomato)TRUE ## logFC logCPM F PValue FDR ## ExE ectoderm -6.9215 13.17 70.364 5.738e-11 1.377e-09 ## Mesenchyme 0.9513 16.27 6.787 1.219e-02 1.143e-01 ## Neural crest -1.0032 14.78 6.464 1.429e-02 1.143e-01 ## Erythroid3 -0.8504 17.35 5.517 2.299e-02 1.380e-01 ## Cardiomyocytes 0.6400 14.84 2.735 1.047e-01 4.809e-01 ## Allantois 0.6054 15.51 2.503 1.202e-01 4.809e-01 ## Forebrain/Midbrain/Hindbrain -0.4943 16.55 1.928 1.713e-01 5.178e-01 ## Endothelium 0.5482 14.27 1.917 1.726e-01 5.178e-01 ## Erythroid2 -0.4818 16.00 1.677 2.015e-01 5.373e-01 ## Haematoendothelial progenitors 0.4262 14.73 1.185 2.818e-01 6.240e-01 6.3.3 Removing the offending labels Another approach is to repeat the analysis after removing DA clusters containing many cells. This provides a clearer picture of the changes in abundance among the remaining clusters. Here, we remove the extra-embryonic ectoderm and reset the total number of cells for all samples with keep.lib.sizes=FALSE. offenders <- "ExE ectoderm" y.ab3 <- y.ab[setdiff(rownames(y.ab), offenders),, keep.lib.sizes=FALSE] y.ab3$samples ## group lib.size norm.factors batch cell barcode sample stage ## 5 1 2268 1 5 cell_9769 AAACCTGAGACTGTAA 5 E8.5 ## 6 1 993 1 6 cell_12180 AAACCTGCAGATGGCA 6 E8.5 ## 7 1 2708 1 7 cell_13227 AAACCTGAGACAAGCC 7 E8.5 ## 8 1 2749 1 8 cell_16234 AAACCTGCAAACCCAT 8 E8.5 ## 9 1 4009 1 9 cell_19332 AAACCTGCAACGATCT 9 E8.5 ## 10 1 6224 y.ab3 <- estimateDisp(y.ab3, design, trend="none") fit.ab3 <- glmQLFit(y.ab3, design, robust=TRUE, abundance.trend=FALSE) res3 <- glmQLFTest(fit.ab3, coef=ncol(design)) topTags(res3, n=10) ## Coefficient: factor(tomato)TRUE ## logFC logCPM F PValue FDR ## Mesenchyme 1.1274 16.32 11.501 0.001438 0.03308 ## Allantois 0.7950 15.54 5.231 0.026836 0.18284 ## Cardiomyocytes 0.8104 14.90 5.152 0.027956 0.18284 ## Neural crest -0.8085 14.80 4.903 0.031798 0.18284 ## Erythroid3 -0.6808 17.32 4.387 0.041743 0.19202 ## Endothelium 0.7151 14.32 3.830 0.056443 0.21636 ## Haematoendothelial progenitors 0.6189 14.76 2.993 0.090338 0.29683 ## Def. endoderm 0.4911 12.43 1.084 0.303347 0.67818 ## ExE mesoderm 0.3419 15.71 1.036 0.314058 0.67818 ## Pharyngeal mesoderm 0.3407 15.76 1.025 0.316623 0.67818 A similar strategy can be used to focus on proportional changes within a single subpopulation of a very heterogeneous data set. For example, if we collected a whole blood data set, we could subset to T cells and test for changes in T cell subtypes (memory, killer, regulatory, etc.) using the total number of T cells in each sample as the library size. This avoids detecting changes in T cell subsets that are driven by compositional effects from changes in abundance of, say, B cells in the same sample. 6.3.4 Testing against a log-fold change threshold Here, we assume that composition bias introduces a spurious log2-fold change of no more than \(\tau\) for a non-DA label. This can be roughly interpreted as the maximum log-fold change in the total number of cells caused by DA in other labels. (By comparison, fold-differences in the totals due to differences in capture efficiency or the size of the original cell population are not attributable to composition bias and should not be considered when choosing \(\tau\).) We then mitigate the effect of composition biases by testing each label for changes in abundance beyond \(\tau\) (McCarthy and Smyth 2009; Lun, Richard, and Marioni 2017). ## factor(tomato)TRUE ## Down 1 ## NotSig 23 ## Up 0 ## Coefficient: factor(tomato)TRUE ## logFC unshrunk.logFC logCPM PValue ## ExE ectoderm -6.5663 -7.0015 13.02 2.626e-09 ## Mesenchyme 1.1652 1.1658 16.29 1.323e-01 ## Cardiomyocytes 0.8484 0.8498 14.86 3.796e-01 ## Allantois 0.8345 0.8354 15.51 3.975e-01 ## Neural crest -0.7706 -0.7719 14.76 4.501e-01 ## Endothelium 0.7519 0.7536 14.29 4.665e-01 ## Haematoendothelial progenitors 0.6581 0.6591 14.72 5.622e-01 ## Def. endoderm 0.5262 0.5311 12.40 5.934e-01 ## Erythroid3 -0.6431 -0.6432 17.28 6.118e-01 ## Caudal Mesoderm -0.3996 -0.4036 12.09 6.827e-01 ## FDR ## ExE ectoderm 6.303e-08 ## Mesenchyme 9.950e-01 ## Cardiomyocytes 9.950e-01 ## Allantois 9.950e-01 ## Neural crest 9.950e-01 ## Endothelium 9.950e-01 ## Haematoendothelial progenitors 9.950e-01 ## Def. endoderm 9.950e-01 ## Erythroid3 9.950e-01 ## Caudal Mesoderm 9.950e-01 The choice of \(\tau\) can be loosely motivated by external experimental data. For example, if we observe a doubling of cell numbers in an in vitro system after treatment, we might be inclined to set \(\tau=1\). This ensures that any non-DA subpopulation is not reported as being depleted after treatment. Some caution is still required, though - even if the external numbers are accurate, we need to assume that cell capture efficiency is (on average) equal between conditions to justify their use as \(\tau\). And obviously, the use of a non-zero \(\tau\) will reduce power to detect real changes when the composition bias is not present. Session Info R version 4.2.0 (2022-04-22) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.4 LTS Matrix products: default BLAS: /home/biocbuild/bbs-3.15-bioc/R/lib/libRblas.so LAPACK: /home/biocbuild/bbs-3.38.1 limma_3.52.1 [3] SingleCellExperiment_1.18.0 SummarizedExperiment_1.26.1 [5] Biobase_2.56.0 GenomicRanges_1.48.0 [7] GenomeInfoDb_1.32.2 IRanges_2.30.0 [9] S4Vectors_0.34.0 BiocGenerics_0.42.0 [11] MatrixGenerics_1.8.0 matrixStats_0.62.0 [13] BiocStyle_2.24.0 rebook_1.6.0 loaded via a namespace (and not attached): [1] statmod_1.4.36 locfit_1.5-9.5 xfun_0.31 [4] bslib_0.3.1 splines_4.2.0 lattice_0.20-45 [7] htmltools_0.5.2 yaml_2.3.5 XML_3.99-0.9 [10] rlang_1.0.2 jquerylib_0.1.4 CodeDepends_0.6.5 [13] GenomeInfoDbData_1.2.8 stringr_1.4.0 zlibbioc_1.42.0 [16] codetools_0.2-18 evaluate_0.15 knitr_1.39 [19] fastmap_1.1.0 highr_0.9 Rcpp_1.0.8.3 [22] filelock_1.0.2 BiocManager_1.30.18 DelayedArray_0.22.0 [25] graph_1.74.0 jsonlite_1.8.0 XVector_0.36.0 [28] dir.expiry_1.4.0 digest_0.6.29 stringi_1.7.6 [31] bookdown_0.26 grid_4.2.0 cli_3.3.0 [34] tools_4.2.0 bitops_1.0-7 magrittr_2.0.3 [37] sass_0.4.1 RCurl_1.98-1.6 Matrix_1.4-1 [40] rmarkdown_2.14 R6_2.5.1 compiler_4.2.0 References Finak, G., J. Frelinger, W. Jiang, E. W. Newell, J. Ramey, M. M. Davis, S. A. Kalams, S. C. De Rosa, and R. Gottardo. 2014. “OpenCyto: an open source infrastructure for scalable, robust, reproducible, and automated, end-to-end flow cytometry data analysis.” PLoS Comput. Biol. 10 (8): e1003806. Lun, A. T. L., A. C. Richard, and J. C. Marioni. 2017. “Testing for differential abundance in mass cytometry data.” Nat. Methods 14 (7): 707–9. McCarthy, D. J., and G. K. Smyth. 2009. “Testing significance relative to a fold-change threshold is a TREAT.” Bioinformatics 25 (6): 765–71. Pijuan-Sala, B., J. A. Griffiths, C. Guibentif, T. W. Hiscock, W. Jawaid, F. J. Calero-Nieto, C. Mulas, et al. 2019. “A Single-Cell Molecular Map of Mouse Gastrulation and Early Organogenesis.” Nature 566 (7745): 490–95. 6.4 Comments on interpretation 6.4.1 DE or DA? Two sides of the same coin While useful, the distinction between DA and DE analyses is inherently artificial for scRNA-seq data. This is because the labels used in the former are defined based on the genes to be tested in the latter. To illustrate, consider a scRNA-seq experiment involving two biological conditions with several shared cell types. We focus on a cell type \(X\) that is present in both conditions but contains some DEGs between conditions. This leads to two possible outcomes: We have described the example above in terms of clustering, but the same arguments apply for any labelling strategy based on the expression profiles, e.g., automated cell type assignment (Basic Chapter 7). Moreover, the choice between outcomes 1 and 2 is made implicitly by the combined effect of the data merging, clustering and label assignment procedures. For example, differences between conditions are more likely to manifest as DE for coarser clusters and as DA for finer clusters, but this is difficult to predict reliably. The moral of the story is that DA and DE analyses are simply two different perspectives on the same phenomena. For any comprehensive characterization of differences between populations, it is usually necessary to consider both analyses. Indeed, they complement each other almost by definition, e.g., clustering parameters that reduce DE will increase DA and vice versa. 6.4.2 Sacrificing biology by integration Earlier in this chapter, we defined clusters from corrected values after applying fastMNN()to cells from all samples in the chimera dataset. Alert readers may realize that this would result in the removal of biological differences between our conditions. Any systematic difference in expression caused by injection would be treated as a batch effect and lost when cells from different samples are aligned to the same coordinate space. Now, one may not consider injection to be an interesting biological effect, but the same reasoning applies for other conditions, e.g., integration of wild-type and knock-out samples (Section 5) would result in the loss of any knock-out effect in the corrected values. This loss is both expected and desirable. As we mentioned in Section 3, the main motivation for performing batch correction is to enable us to characterize population heterogeneity in a consistent manner across samples. This remains true in situations with multiple conditions where we would like one set of clusters and annotations that can be used as common labels for the DE or DA analyses described above. The alternative would be to cluster each condition separately and to attempt to identify matching clusters across conditions - not straightforward for poorly separated clusters in contexts like differentiation. It may seem distressing to some that a (potentially very interesting) biological difference between conditions is lost during correction. However, this concern is largely misplaced as the correction is only ever used for defining common clusters and annotations. The DE analysis itself is performed on pseudo-bulk samples created from the uncorrected counts, preserving the biological difference and ensuring that it manifests in the list of DE genes for affected cell types. Of course, if the DE is strong enough, it may result in a new condition-specific cluster that would be captured by a DA analysis as discussed in Section 6.4.1. One final consideration is the interaction of condition-specific expression with the assumptions of each batch correction method. For example, MNN correction assumes that the differences between samples are orthogonal to the variation within samples. Arguably, this assumption is becomes more questionable if the between-sample differences are biological in nature, e.g., a treatment effect that makes one cell type seem more transcriptionally similar to another may cause the wrong clusters to be aligned across conditions. As usual, users will benefit from the diagnostics described in Chapter 1 and a healthy dose of skepticism.
http://bioconductor.org/books/3.15/OSCA.multisample/differential-abundance.html
CC-MAIN-2022-33
refinedweb
3,376
50.63
======================================== Maze FAQ ======================================== Sorry this is NOT an organized FAQ it's still useful though ------------------------------------------------------------ Oh, you're really going to love this one. It's an obfuscated C code mazegenerator. Fun fun fun. Well, if you can figure it out, there's youralgorithm. Fun fun fun.,"_.":" |"];} Pretty cute, no? -- Brad Threatt | MISSING! Single white male Jesus look-alike in blue | Members Only jacket. Answers to the name 'Dave Gillespie'. Safe sex is | Last seen with roller-skating couple in Pasadena. for wimps. | If found, please return to the cs10 lab immediately. ======================================== In <1992Mar5.210706.24104@wpi.WPI.EDU> rcarter@wpi.WPI.EDU (Randolph Carter (nee. Joseph H. Allen)) writes: >,"_.":" |"];} ^^ This should be 28 if rand() returns a 32-bit quantity. >>Pretty cute, no? >No style at all.... :-) ======================================== >-- >/* rcarter@wpi.wpi.edu */ /* Amazing */ /*]]);} Well, it doesn't produce a maze, but try this one...);} (I disclaim any credit for this!) -- John Brownie School of Mathematics and Statistics University of Sydney Internet: jhb@maths.su.oz.au ======================================== Excerpts from programming: 6-Mar-92 Re: Algorithm to create a m.. Mark Howell@movies.enet. (5723) Here's the single level maze algorithm, solver and printer. /* * MazeGen.c -- Mark Howell -- 8 May 1991 * * Usage: MazeGen [width [height [seed]]] */ #include <stdio.h> #include <stdlib.h> #include <time.h> #define WIDTH 39 #define HEIGHT 11 #define UP 0 #define RIGHT 1 #define DOWN 2 #define LEFT 3 #ifdef TRUE #undef TRUE #endif /* TRUE */ #define TRUE 1 #define cell_empty(a) (!(a)->up && !(a)->right && !(a)->down && !(a)->left) typedef struct { unsigned int up : 1; unsigned int right : 1; unsigned int down : 1; unsigned int left : 1; unsigned int path : 1; unsigned int visited : 1; } cell_t; typedef cell_t *maze_t; void CreateMaze (maze_t maze, int width, int height); void SolveMaze (maze_t maze, int width, int height); void PrintMaze (maze_t maze, int width, int height); int main (int argc, char *argv []) { int width = WIDTH; int height = HEIGHT; maze_t maze; if (argc >= 2) width = atoi (argv [1]); if (argc >= 3) height = atoi (argv [2]); if (argc >= 4) srand (atoi (argv [3])); else srand ((int) time ((time_t *) NULL)); if (width <= 0 || height <= 0) { (void) fprintf (stderr, "Illegal width or height value!\n"); exit (EXIT_FAILURE); } maze = (maze_t) calloc (width * height, sizeof (cell_t)); if (maze == NULL) { (void) fprintf (stderr, "Cannot allocate memory!\n"); exit (EXIT_FAILURE); } CreateMaze (maze, width, height); PrintMaze (maze, width, height); (void) putchar ('\n'); SolveMaze (maze, width, height); PrintMaze (maze, width, height); free (maze); exit (EXIT_SUCCESS); return (0); }/* main */ void CreateMaze (maze_t maze, int width, int height) { maze_t mp, maze_top; char paths [4]; int visits, directions; visits = width * height - 1; mp = maze; maze_top = mp + (width * height) - 1; while (visits) { directions = 0; if ((mp - width) >= maze && cell_empty (mp - width)) paths [directions++] = UP; if (mp < maze_top && ((mp - maze + 1) % width) && cell_empty (mp + 1)) paths [directions++] = RIGHT; if ((mp + width) <= maze_top && cell_empty (mp + width)) paths [directions++] = DOWN; if (mp > maze && ((mp - maze) % width) && cell_empty (mp - 1)) paths [directions++] = LEFT; if (directions) { visits--; directions = ((unsigned) rand () % directions); switch (paths [directions]) { case UP: mp->up = TRUE; (mp -= width)->down = TRUE; break; case RIGHT: mp->right = TRUE; (++mp)->left = TRUE; break; case DOWN: mp->down = TRUE; (mp += width)->up = TRUE; break; case LEFT: mp->left = TRUE; (--mp)->right = TRUE; break; default: break; } } else { do { if (++mp > maze_top) mp = maze; } while (cell_empty (mp)); } } }/* CreateMaze */ void SolveMaze (maze_t maze, int width, int height) { maze_t *stack, mp = maze; int sp = 0; stack = (maze_t *) calloc (width * height, sizeof (maze_t)); if (stack == NULL) { (void) fprintf (stderr, "Cannot allocate memory!\n"); exit (EXIT_FAILURE); } (stack [sp++] = mp)->visited = TRUE; while (mp != (maze + (width * height) - 1)) { if (mp->up && !(mp - width)->visited) stack [sp++] = mp - width; if (mp->right && !(mp + 1)->visited) stack [sp++] = mp + 1; if (mp->down && !(mp + width)->visited) stack [sp++] = mp + width; if (mp->left && !(mp - 1)->visited) stack [sp++] = mp - 1; if (stack [sp - 1] == mp) --sp; (mp = stack [sp - 1])->visited = TRUE; } while (sp--) if (stack [sp]->visited) stack [sp]->path = TRUE; free (stack); }/* SolveMaze */ void PrintMaze (maze_t maze, int width, int height) { int w, h; char *line, *lp; line = (char *) calloc ((width + 1) * 2, sizeof (char)); if (line == NULL) { (void) fprintf (stderr, "Cannot allocate memory!\n"); exit (EXIT_FAILURE); } maze->up = TRUE; (maze + (width * height) - 1)->down = TRUE; for (lp = line, w = 0; w < width; w++) { *lp++ = '+'; if ((maze + w)->up) *lp++ = ((maze + w)->path) ? '.' : ' '; else *lp++ = '-'; } *lp++ = '+'; (void) puts (line); for (h = 0; h < height; h++) { for (lp = line, w = 0; w < width; w++) { if ((maze + w)->left) *lp++ = ((maze + w)->path && (maze + w - 1)->path) ? '.' : ' '; else *lp++ = '|'; *lp++ = ((maze + w)->path) ? '.' : ' '; } *lp++ = '|'; (void) puts (line); for (lp = line, w = 0; w < width; w++) { *lp++ = '+'; if ((maze + w)->down) *lp++ = ((maze + w)->path && (h == height - 1 || (maze + w + width)->path)) ? '.' : ' '; else *lp++ = '-'; } *lp++ = '+'; (void) puts (line); maze += width; } free (line); }/* PrintMaze */ ======================================== Excerpts from programming: 6-Mar-92 Re: Algorithm to create a m.. "Jon C. R. Bennett"@andr (4255) gillies@m.cs.uiuc.edu (Don Gillies) writes: > grid. Mark each square in the grid with a unique number. Make a list what you want to do is make each grid in the maze into a set. > > rooms = n*n /* each spot in the grid is a unique room */ > > repeat > pick a random wall without replacement. > if the numbers X and Y in the grid on both sides of the wall > are different -- > delete the wall and use a recursive depth > first search or brute-force loop to replace > all Y in the grid with X's. what you do here is instead pick a wall if the rooms on either side of the wall belong to differnent sets delete the wall union the two sets together. the rest is the same the brute force solution runs in O(n^2) this runs in O(n) (where n is the number of grids) so if you had a 100 x 100 maze, this method takes 10,000 time steps, the brute force could take as many as 100,000,000 steps. jon p.s. below you will find some code to generate a maze this way --------------------------------------------------- /* maze.c a maze generator Jon Bennett jcrb@cs.cmu.edu */ /* the maze is generated by making a list of all the internal hedges and randomizing it, then going lineraly through the list, we take a hedge and se if the maze squares adjacent to it are already connected (with find) is not the we connect them (with link), this prevents us from creating a maze with a cycle because we will not link two maze squares that are already connect by some path */ #include <stdio.h> #define DOWN 1 #define RIGHT 2 struct maze_loc{ int rank; int x,y; struct maze_loc *ptr; }; struct hedge_loc{ int x,y,pos,on; }; struct maze_loc *maze; struct hedge_loc *hedge; struct hedge_loc **hedge_list; void link(a,b) struct maze_loc *a,*b; { if(a->rank == b->rank){ a->ptr=b; b->rank++; return; } if(a->rank > b->rank){ b->ptr=a; return; } a->ptr=b; } struct maze_loc *find(a) struct maze_loc *a; { if(a != a->ptr){ a->ptr = find(a->ptr); } return a->ptr; } main(argc,argv) int argc; char **argv; { int x,y,i,j,k,l,tmp; struct maze_loc *a,*b; struct hedge_loc *htmp; if(argc!=3) exit(1); srandom(time(0)); x=atoi(argv[1]); y=atoi(argv[2]); /*malloc the maze and hedges */ maze=(struct maze_loc *)malloc(sizeof(struct maze_loc)*x*y); hedge=(struct hedge_loc *)malloc(sizeof(struct hedge_loc)*((x*(y-1))+((x-1)*y))); hedge_list=(struct hedge_loc **)malloc(sizeof(struct hedge_loc *)*((x*(y-1))+((x-1)*y))); /*init maze*/ for(j=0;j<y;j++){ for(i=0;i<x;i++){ maze[x*j+i].x = i; maze[x*j+i].y = j; maze[x*j+i].ptr = &maze[x*j+i]; maze[x*j+i].rank=0; } } /*init hedges*/ for(j=0;j<(y-1);j++){ for(i=0;i<x;i++){ hedge[x*j+i].x = i; hedge[x*j+i].y = j; hedge[x*j+i].pos=DOWN; hedge[x*j+i].on=1; hedge_list[x*j+i]= &hedge[x*j+i]; } } k=x*(y-1); for(j=0;j<y;j++){ for(i=0;i<(x-1);i++){ hedge[k+(x-1)*j+i].x = i; hedge[k+(x-1)*j+i].y = j; hedge[k+(x-1)*j+i].pos=RIGHT; hedge[k+(x-1)*j+i].on=1; hedge_list[k+(x-1)*j+i]= &hedge[k+(x-1)*j+i]; } } k=(x*(y-1))+((x-1)*y); /*randomize hedges*/ for(i=(k-1);i>0;i--){ htmp=hedge_list[i]; j=random()%i; hedge_list[i]=hedge_list[j]; hedge_list[j]=htmp; } fflush(stdout); l=k; /*create maze*/ for(i=0;i<l;i++){ j=hedge_list[i]->x; k=hedge_list[i]->y; a=find(&maze[x*k+j]); if(hedge_list[i]->pos==DOWN){ b=find(&maze[x*(k+1)+j]); } else { b=find(&maze[x*k+j+1]); } if(a!=b){ link(a,b); hedge_list[i]->on=0; } } printf("+"); for(i=0;i<x;i++){ printf("-+"); } printf("\n"); l=x*(y-1); for(j=0;j<y;j++){ printf("|"); for(i=0;i<(x-1);i++){ if(hedge[l+(x-1)*j+i].on){ printf(" |"); } else { printf(" "); } } printf(" |\n|"); if(j<(y-1)){ for(i=0;i<x;i++){ if(hedge[j*x+i].on){ printf("--"); } else { printf(" -"); } } printf("\n"); } } for(i=0;i<x;i++){ printf("-+"); } printf("\n"); } ======================================== Excerpts from programming: 9-Mar-92 Re: Algorithm to create a m.. Don Gillies@m.cs.uiuc.ed (609) Here is another algorithm I just thought of -- how well does it work? 1. create a GRAPH with n*n nodes. 2. for each node in the graph create 4 edges, linking it to the node in the north, south, east, and west direction. 3. Assign a random weight to every edge. 4. Run a minimum spanning tree algorithm (take your choice from any algorithms textbook) to produce a graph. A minimum spanning tree has a path from every node to every other node, and no cycles, hence, it corresponds to a perfect maze. Don Gillies - gillies@cs.uiuc.edu - University of Illinois at Urbana-Champaign ======================================== Excerpts from programming: 8-Apr-92 re mazes Chris_Okasaki@LOCH.MESS. (5437) Thanks for the messages. FYI, here is the maze tutorial I used to send out. Chris -------------- This seems to come up every couple of months, doesn't it? Maybe we should make a FAQL for this group... Anyway, maze generation--a topic near and dear to my heart! I'm going to describe the three most common methods. Note that these will all generate mazes without loops or rooms or anything like that. Restricting a maze to be a tree (in the graph-theoretical sense of the term) simplifies things immensely. Mazes with loops are much harder to generate automatically in any nice way. Perhaps the best way is start out generating a tree and then knock a couple of extra walls (all the algorithms start out with all walls present and then knock out walls as necessary). Finally, note that all of these techniques are based on well-known graph algorithms. This isn't surprising since what is being generated is really nothing more than a spanning tree. Technique #1: Depth-first search 1. Pick a random starting location as the "current cell" and mark it as "visited". Also, initialize a stack of cells to empty (the stack will be used for backtracking). Initialize VISITED (the number of visited cells) to 1. 2. While VISITED < the total number of cells, do the following: If the current cell has any neighbors which haven't yet been visited, pick one at random. Push the current cell on the stack and set the current cell to be the new cell, marking the new cell as visited. Knock out the wall between the two cells. Increment VISITED. If all of the current cell's neighbors have already been visited, then backtrack. Pop the previous cell off the stack and make it the current cell. This algorithm is probably the simplest to implement, but it has a problem in that there are many mazes which it cannot generate. In particular, it will continue generating one branch of the maze as long as there are unvisited cells in the area instead of being able to give up and let the unvisited cells get used by a different branch. This can be partially remedied by allowing the algorithm to randomly backtrack even when there are unvisited neighbors, but this creates the possibility of (potentially large) dead spaces in the maze. For some applications, such as dungeon creation, this behavior might be desirable. A refinement which cuts down on the amount of dead space is to vary the probability of backtracking as an increasing function on the number of iterations since the last backtrack. Technique #2: Prim's Algorithm 1. Maintain three sets of cells: IN, OUT, and FRONTIER. Initially, choose one cell at random and place it in IN. Place all of the cell's neighbors in FRONTIER and all remaining cells in OUT. 2. While FRONTIER is not empty do the following: Remove one cell at random from FRONTIER and place it in IN. If the cell has any neighbors in OUT, remove them from OUT and place them in FRONTIER. The cell is guaranteed to have at least one neighbor in IN (otherwise it would not have been in FRONTIER); pick one such neighbor at random and connect it to the new cell (ie knock out a wall). This algorithm works by growing a single tree (without concentrating on any one particular branch like the previous algorithm). An interesting variation on this algorithm is to run two (or more) instances of it at once, starting in different locations and generating non-interesecting trees. This can be useful, for instance, for generating multiple disjoint areas on a single level of a dungeon (perhaps connected by secret doors or perhaps requiring adventurers to blast through walls themselves). Technique #3: Kruskal's Algorithm This is perhaps the most advanced of the maze generation algorithms, requiring some knowledge of the union-find algorithm. It is also the most fun to watch in progress! Basically what the union-find algorithm does is give you a FAST implementation of equivalence classes where you can do two things: FIND which equivalence class a given object belongs to, or UNION two equivalance classes into a single class. Any moderately advanced book on algorithms and data structures will have more details. In this algorithm, the objects will be cells in the maze, and two objects will be in the same equivalence class iff they are (perhaps indirectly) connected. 1. Initialize the union-find structures so that every cell is in its own equivalence class. Create a set containing all the interior walls of the maze (ie those walls which lie between neighboring cells). Set COUNT to the number of cells. (COUNT is the number of connected components in the maze). 2. While COUNT > 1 do the following: Remove a wall from the set of walls at random. If the two cells that this wall separates are already connected (test by doing a FIND on each), then do nothing; otherwise, connect the two cells (by UNIONing them and decrementing COUNT) and knock out the wall. Note that none of these algorithms make any assumptions about the topology of the maze. They will work with 2-d or 3-d grids, toroids, hexagons, whatever. However, in the more highly connected topologies (such as 3-d grids), the deficiencies of the first algorithm will become even more apparent (it will tend to produce long, winding paths with very little branching). Have fun with these! Chris ================================ /* * maz.c - generate a maze * * algorithm posted to rec.games.programmer by jallen@ic.sunysb.edu * program cleaned and reorganized by mzraly@ldbvax.dnet.lotus.com * * don't make people pay for this, or I'll jump up and down and * yell and scream and embarass you in front of your friends... * * compile: cc -o maz -DDEBUG maz.c * */ #include <stdio.h> static int multiple = 57; /* experiment with this? */ static int offset = 1; /* experiment with this? */ #ifdef __STDC__ int maze(char maz[], int y, int x, char vc, char hc, char fc); void mazegen(int pos, char maz[], int y, int x, int rnd); #else int maze(); void mazegen(); #endif /* * maze() : generate a random maze of size (y by x) in maz, using vc as the * vertical character, hc as the horizontal character, and fc as the floor * character * * maz is an array that should already have its memory allocated - you could * malloc a char string if you like. */ #ifdef __STDC__ int maze(char maz[], int y, int x, char vc, char hc, char fc) #else int maze(maz, y, x, vc, hc, fc) char maz[], vc, hc, fc; int y, x; #endif { int i, yy, xx; int max = (y * x); int rnd = time(0L); /* For now, return error on even parameters */ /* Alternative is to decrement evens by one */ /* But really that should be handled by caller */ if (!(y & 1) | !(x & 1)) return (1); /* I never assume... */ for (i = 0; i < max; ++i) maz[i] = 0; (void) mazegen((x + 1), maz, y, x, rnd); /* Now replace the 1's and 0's with appropriate chars */ for (yy = 0; yy < y; ++yy) { for (xx = 0; xx < x; ++xx) { i = (yy * x) + xx; if (yy == 0 || yy == (y - 1)) maz[i] = hc; else if (xx == 0 || xx == (x - 1)) maz[i] = vc; else if (maz[i] == 1) maz[i] = fc; else if (maz[i - x] != fc && maz[i - 1] == fc && (maz[i + x] == 0 || (i % x) == (y - 2))) maz[i] = vc; else maz[i] = hc; /* for now... */ } } return (0); } /* * mazegen : do the recursive maze generation * */ #ifdef __STDC__ void mazegen(int pos, char maz[], int y, int x, int rnd) #else void mazegen(pos, maz, y, x, rnd) int pos, y, x, rnd; char maz[]; #endif { int d, i, j; maz[pos] = 1; while (d = (pos <= x * 2 ? 0 : (maz[pos - x - x] ? 0 : 1)) | (pos >= x * (y - 2) ? 0 : (maz[pos + x + x] ? 0 : 2)) | (pos % x == x - 2 ? 0 : (maz[pos + 2] ? 0 : 4)) | (pos % x == 1 ? 0 : (maz[pos - 2] ? 0 : 8))) { do { rnd = (rnd * multiple + offset); i = 3 & (rnd / d); } while (!(d & (1 << i))); switch (i) { case 0: j = -x; break; case 1: j = x; break; case 2: j = 1; break; case 3: j = -1; break; default: break; } maz[pos + j] = 1; mazegen(pos + 2 * j, maz, y, x, rnd); } return; } #ifdef DEBUG #define MAXY 24 #define MAXX 80 #ifdef __STDC__ main(int argc, char *argv[]) #else main(argc, argv) int argc; char *argv[]; #endif { extern int optind; extern char *optarg; int x = 79; int y = 23; char hor = '-'; char ver = '|'; char flo = ' '; char maz[MAXY * MAXX]; int i; while ((i = getopt(argc, argv, "h:v:f:y:x:m:o:")) != EOF) switch (i) { case 'h':ÿÿÿÿ More<< Random maze-generator FAQ By Unknown Author | Published Jan 15 2002 10:11 AM in Game Programming Note: Please offer only positive, constructive comments - we are looking to promote a positive atmosphere where collaboration is valued above all else.
http://www.gamedev.net/page/resources/_/technical/game-programming/random-maze-generator-faq-r1637?forceDownload=1&_k=880ea6a14ea49e853634fbdc5015a024
CC-MAIN-2014-10
refinedweb
3,194
69.92
. not too fab at C myself, but here's some past solutions: Hope that helps :-) Rob. I need ANSI C *ONLY* There is no ANSI C solution to your question since there is no such API specified by ANSI. You have POSIX standard solution which is what you would see in *nix machines (readdir etc.), or there is a windows solution using findNextFile (or something similar). If you are interested in details for either of them, let me know and I can explain them. Once again, ANSI C does not specify APIs for directory listings Cheers! sunnycoder This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries. I'm writing code for windows, but I try to keep it ANSI wherever possible. An example using the win32 api would be nice. -mike Cheers! Based on the _A_SUBDIR attribute you might want to build two lists (one of files and one of directorys). Also if you are displaying the list directly to the user you might consider not displaying _A_HIDDEN and _A_SYSTEM files, although I always prefer to see them. Hope this helps -david #include <io.h> #include "stdio.h" #include "time.h" void listDir(char *path) { struct _finddata_t fileInfo; intptr_t fPtr; char attribs[8]; char timeBuff[32]; printf(" checking path : %s\n",path); if((fPtr = _findfirst(path, &fileInfo )) == -1L) return; else { do{ // decode the archive flag attribs[0] =( fileInfo.attrib & _A_ARCH ) ? 'A' : '.'; // decode the read only flag attribs[1] =( fileInfo.attrib & _A_RDONLY ) ? 'R' : '.'; // decode the hidden file flag attribs[2] = ( fileInfo.attrib & _A_HIDDEN ) ? 'H' : '.'; // decode the System file flag attribs[3] =( fileInfo.attrib & _A_SYSTEM ) ? 'S' : '.'; // for readability attribs[4] = '-'; // is this a subdirectory 'D' or a File 'F' attribs[5] = (fileInfo.attrib & _A_SUBDIR ) ? 'D' : 'F'; attribs[6] = 0x00; // get the time of the last write to this file ctime_s( timeBuff, 30, &fileInfo.time_write ); // other times available on non FAT systems are create time // fileInfo.time_access and fileInfo.time_write these are -1 on FAT disks printf("%-32s %s %9.ld %s",fileInfo.name, attribs, fileInfo.size , timeBuff); }while(_findnext(fPtr, &fileInfo) == 0); _findclose(fPtr); } } main(int argc, char *argv[]) { listDir("c:\\*.*"); } -dave
https://www.experts-exchange.com/questions/21424173/ANSI-C-list-directory-contents.html
CC-MAIN-2018-22
refinedweb
371
57.87
mq_notify mq_notify() Ask to be notified when there's a message in the queue Synopsis: #include <mqueue.h> int mq_notify( mqd_t mqdes, const struct sigevent* notification ); Arguments: - mqdes - The message-queue descriptor, returned by mq_open(), of the message queue that you want to get notification for. - notification - NULL, or a pointer to a sigevent structure that describes how you want to be notified.:: - SIGEV_SIGNAL - SIGEV_SIGNAL_CODE - SIGEV_SIGNAL_THREAD - SIGEV_PULSE. Returns: -1 if an error occurred (errno is set). Any other value indicates success. Errors: - EBADF - Invalid message queue mqdes. - EBUSY - A process has already registered for notification for the given queue. Classification: See also: mq_open(), mq_receive(), mq_send(), sigevent mq, mqueue in the Utilities Reference
http://www.qnx.com/developers/docs/6.4.1/neutrino/lib_ref/m/mq_notify.html
CC-MAIN-2013-20
refinedweb
112
50.73
In the 3.1 release of NativeScript we added support for the Chrome DevTools Elements panel when debugging Android applications. We are happy to announce that as of 3.3.0, iOS applications' view hierarchies can be previewed and tinkered with. Here's what it looks like: To start debugging with Chrome DevTools on iOS simply run tns debug ios –chrome in the terminal. tns debug ios –chrome A month ago we introduced our brand new NativeScript Marketplace and the verified plugins categorisation. Now we are thrilled to announce that there are already 14 verified plugins. Among them recently verified are Grid View, Image Swipe,and Purchase - all created by Peter Staev. Do you want to make your plugin verified? Here is how to do that! Do you want to know when a plugin becomes verified? Follow us on Twitter! Also stay tuned for more marketplace features like Author page, Recently Verified Plugins, Recently Updated Plugins and NativeScript Templates. At NativeScript Developer Day we announced that the professional components in NativeScript UI are now free (published in npm as nativescript-pro-ui). This doesn’t mean that we will stop extending the product with features and bug fixes. The new version (3.2.0) is now released and addresses issues that were reported in nativescript-ui-feedback in the RadListView, RadDataForm, RadChart, RadCalendar and RadAutoComplete components. It also includes minor features like new properties and events in RadChart, RadSideDrawer and RadAutoComplete. The highlight of the release is the highly-requested new view mode in the RadCalendar – Day View Mode: A more detailed list with features and fixes is available in NativeScript UI’s Release Notes. A few things changed regarding CSS. First - the CSS is now applied on views a little bit before onLoaded. We used to re-apply CSS any time id or className is set on a View, including during startup. This saves 10% from the view instantiation. Second, the tns-core-modules can now load CSS from modules provided by webpack either by css-loader or raw-loader, and there is a mechanism to force the parsing of that CSS before application startup. This allows us to include the CSS in the snapshot and boost startup times in apps that use the NativeScript theme in Android. This is triggered by registering the stylesheets used in app.css to vendor.ts: import * as application from "application"; import "ui/styling/style-scope"; // When required, wires for application events. global.registerModule("app.css", () => require("~/app")); global.registerModule("app-common.css", () => require("~/app-common")); application.loadAppCss(); You will also need to register the app.css and app-common.css to be handled by raw-loader in the webpack config, that change is currently on PR in the nativescript-dev-webpack, so it will soon be in the default configuration you get when you install the plugin. Finally - A huge THANKS to all of you folks that helped to make NativeScript better with your PRs: (expect a newsletter every 4-8 weeks)
https://www.nativescript.org/blog/nativescript-hallow-3.3-n-release
CC-MAIN-2018-34
refinedweb
500
57.77
FULL PRODUCT VERSION : java version "1.8.0_40" Java(TM) SE Runtime Environment (build 1.8.0_40-b25) Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode) ADDITIONAL OS VERSION INFORMATION : Microsoft Windows [Version 6.3.9600] EXTRA RELEVANT SYSTEM CONFIGURATION : Tested on 2 Windows 8.1 64-bit VMs and a native install. A DESCRIPTION OF THE PROBLEM : When you bring up the awt FileDialog if you try to delete an existing file the program will hang until force closed. If you create a new file from the dialog you can delete files without any problems. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Run the attached source code and it'll bring up a FileDialog. Select an existing file and hit delete. The program will now hang until you force close it. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Prints the filepath specified. ACTUAL - Program hangs and must be force closed. It will also eat up a lot of CPU usage while hanging. ERROR MESSAGES/STACK TRACES THAT OCCUR : No log file as program hangs instead of crashing. REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- import java.awt.Frame; import java.awt.FileDialog; public class test { public static void main(String[] args) { final FileDialog fd = new FileDialog((Frame)null, "Save As"); fd.setMode(FileDialog.SAVE); fd.setVisible(true); if (fd.getFile() == null) { return; } String rv = fd.getDirectory() + fd.getFile(); System.out.println(rv); } } ---------- END SOURCE ----------
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8075516
CC-MAIN-2020-16
refinedweb
240
53.47
Refactor Code in Your Lunch Break: Getting Started with Codemods Maintaining a codebase can be a frustrating experience for any developer, especially a JavaScript codebase. With ever-changing standards, syntax, and third party package breaking changes, it can be hard to keep up. In recent years, the JavaScript landscape has changed beyond recognition. Advancements in the core JavaScript language has meant that even the simplest simple task of variable declaration has been changed. ES6 introduced let and const, arrow functions, and many more core changes, each bringing improvements and benefits to developers and their applications. Pressure on developers to produce and maintain code that will stand up to the test of time is on the increase. This article will show you how you can automate large-scale refactoring tasks with the use of codemods and the JSCodeshift tool, allowing you to easily update your code to take advantage of newer language features, for example. Codemod Codemod is a tool developed by Facebook to help with the refactor of large-scale codebases. It enables the developer to refactor a large codebase in a small amount of time. In some cases, a developer might use an IDE to perform the refactor of a class or variable name, however, this is usually scoped to one file at a time. The next tool in a developer’s refactoring tool kit is a global find and replace. This can work in many cases with the use of complex regular expressions. Many scenarios are not suited to this method; for example, when there are multiple implementations that need to be changed. Codemod is a Python tool that takes a number of parameters including the expression you wish to match and the replacement. codemod -m -d /code/myAwesomeSite/pages --extensions php,html \ '<font *\2</span>' In the above example, we are replacing the usage of the <font> tag with a span and inlining the color style. The first two parameters are flags to indicate multiple line matching (-m) and the directory to start processing from (-d /code/myAwesomeSite/pages). We can also restrict the extensions that are processed (–extensions php,html). We then supply the match expression and the replacement. If the replacement is not provided we will be prompted for one at runtime. The tool works, but it is very similar to existing regular expression matching tools. JSCodeshift JSCodeshift is the next step up in the refactor toolkit. Also developed by Facebook, its a tool for running codemods across multiple files. As a Node module, JSCodeshift provides a clean and easy-to-use API, and uses Recast under the hood. Recast is an AST-to-AST (Abstract Syntax Tree) transformation tool. Recast Recast is a Node module that exposes an interface for parsing and reprinting JavaScript code. It can parse code in string format and generates an object from this which follows an AST structure. This allows us to inspect the code for patterns such as a function declarations. var recast = require("recast"); var code = [ "function add(a, b) {", " return a + b", "}" ].join("\n"); var ast = recast.parse(code); console.log(ast); //output { "program": { "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "add", "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 }, "lines": {}, "indent": 0 } }, ........... As we can see from the above example, we pass in the code string for a function that adds two numbers. When we parse and log the object we can see the AST. We see the FunctionDeclaration and the name of the function etc. As this is just a JavaScript object we can modify it as we see fit. Then we can trigger the print function to return the updated code string. AST (Abstract Syntax Tree) As mentioned before, Recast builds an AST from our code string. An AST is a tree representation of the abstract syntax of source code. Each node of the tree represents a construct in the source code and the node provides important information about the construct. ASTExplorer is a browser-based tool that can help to parse and understand the tree of your code. Using ASTExplorer we can view the AST of a simple code example. Starting with our code, we will declare a const called foo and this will equal the string of ‘bar’. const foo = 'bar'; This results in the below AST: We can see the VariableDeclaration under the body array, which contains our const. All VariableDeclarations have an id attribute that contains our important information such as name etc. If we were building a codemod to rename all instances of foo we can use this name attribute and iterate over all the instances to change the name. Installation and Usage Using the tools and techniques from above we can now fully take advantage of JSCodeshift. As JSCodeshift is a node module we can install it at the project or global level. npm install -g jscodeshift Once installed, we can use existing codemods with JSCodeshift. We must provide some parameters to tell JSCodeshift what we want to achieve. The basic syntax is calling jscodeshift with a path of the file or files we wish to transform. The essential parameter is the location of the transform (-t). This can either be a local file or a URL to a codemod file. The transform parameter defaults to look for a transform.js file in the current directory. Other useful parameters include dry run (-d), which will apply the transform but not update the files, and Verbose (-v), which will log out all information about the transform process. Transforms are codemods, simple JavaScript modules that export a function. This function accepts the following parameters: - fileInfo - api - options FileInfo holds all the information about the file being currently processed, including path and source. Api is an object that provides access to the JSCodeshift helper functions such as findVariableDeclarators and renameTo. Our last parameter is options, which allows us to pass options from the CLI through to the codemod. For example, if we were running on a deployment server and wanted to add the code version to all files, we could pass it via the CLI jscodeshift -t myTransforms fileA fileB --codeVersion=1.2. Options would then contain {codeVersion: '1.2'}. Inside the function we expose, we must return the transformed code as a string. For example if we have the code string of const foo = 'bar' and we would like to transform it to replace the const foo with const bar, our codemod would look like this: export default function transformer(file, api) { const j = api.jscodeshift; return j(file.source) .find(j.Identifier) .forEach(path => { j(path).replaceWith( j.identifier('bar') ); }) .toSource(); } As you can see, we chain a number of functions together and call toSource() at the end to generate the transformed code string. There are some rules we must follow when returning the code. Returning a string that is different to the input will trigger a successful transform. If the string is the same as the input then the transform will be unsuccessful and if nothing is returned then the transform will not be necessary. JSCodeshift then uses these results when processing stats on the transforms. Existing codemods In most cases, developers will not need to write their own codemod. Many common refactoring actions have already been turned into codemods. Some examples include js-codemod no-vars which will convert all instances of var into either let or const, based on the variable usage. For example, let if the variable is reassigned at a later time and const when the variable is never reassigned. js-codemod template-literals will replace instances of string concatenation with template literals e.g. const sayHello = 'Hi my name is ' + name; //after transform const sayHello = `Hi my name is ${name}`; How codemods are written We can take the no-vars codemod from above and break down the code to see how a complex codemod works. const updatedAnything = root.find(j.VariableDeclaration).filter( dec => dec.value.kind === 'var' ).filter(declaration => { return declaration.value.declarations.every(declarator => { return !isTruelyVar(declaration, declarator); }); }).forEach(declaration => { const forLoopWithoutInit = isForLoopDeclarationWithoutInit(declaration); if ( declaration.value.declarations.some(declarator => { return (!declarator.init && !forLoopWithoutInit) || isMutated(declaration, declarator); }) ) { declaration.value.kind = 'let'; } else { declaration.value.kind = 'const'; } }).size() !== 0; return updatedAnything ? root.toSource() : null; The above code is the core of the no-vars codemod. First, a filter is run on all VariableDeclaration’s this includes var, let, and const. The filter only returns var declarations. Which are passed into a second filter, this calls the custom function isTruelyVar. This is used to determine the nature of the var (e.g is the var inside a closure or declared twice or is a function declaration which might be hoisted). This will determine if is safe to do the conversion on the var. For each var that passes the isTruelyVar filter, they are processed in a forEach loop. Inside the loop, a check is made on the var, if the var is inside a loop e.g. for(var i = 0; i < 10; i++) { doSomething(); } To detect if the var is inside a loop the parent type can be checked. const isForLoopDeclarationWithoutInit = declaration => { const parentType = declaration.parentPath.value.type; return parentType === 'ForOfStatement' || parentType === 'ForInStatement'; }; If the var is inside a loop and is not mutated then is can be changed to a const. Checking for mutations can be done by filtering over the var nodes AssignmentExpression’s and UpdateExpression’s. AssignmentExpression will show where and when the var was assigned to e.g var foo = 'bar'; UpdateExpression will show where and when the var was updated e.g. var foo = 'bar'; foo = 'Foo Bar'; //Updated If the var is is inside a loop with mutation then a let is used as let can be reassigned after being instantiated. The last line the in codemod checked if anything was updated e.g. any var’s were changed. If so the new source of the file is returned else null is returned, which tells JSCodeshift that no processing was done. The full source for the codemod can be found here. The Facebook team have also added a number of codemods for updating React syntax and to handle changes to the React API. Some codemods include react-codemod sort-comp which sorts React lifecycle methods to match the ESlint sort-comp rule. The most recent and popular React codemod is React-PropTypes-to-prop-types which helps in the recent change from the core React team to move React.PropTypes into its own node module. This means from React v16, developers will need to install prop-types if they wish to continue using propTypes in components. This is a great example of the use case for a codemod. The method of using PropTypes is not set in stone. The following are all valid: Importing React and accessing PropTypes from the default import: import React from 'react'; class HelloWorld extends React.Component { static propTypes = { name: React.PropTypes.string, } ..... Importing React and the named import for PropTypes: import React, { PropTypes, Component } from 'react'; class HelloWorld extends Component { static propTypes = { name: PropTypes.string, } ..... Importing React and the named import for PropTypes but declaring PropTypes on a stateless component: import React, { PropTypes } from 'react'; const HelloWorld = ({name}) => { ..... } HelloWorld.propTypes = { name: PropTypes.string }; Having the three ways to implement the same solution makes it especially hard to perform a regular expression to find and replace. If we had the above three in our code base we could easily upgrade to the new PropTypes pattern by running the following: jscodeshift src/ -t transforms/proptypes.js In this example, we pulled the PropTypes codemod from the react-codemods repo and added it to a transforms directory in our project. The codemod will add import PropTypes from 'prop-types'; to each file and replace any instances of React.PropTypes with PropTypes. Conclusion Facebook have pioneered in code maintenance enabling developers to adjust with their ever changing API and code practices. JavaScript fatigue has become a large problem and as I have shown, having tools that can help with the stress of updating existing code can assist towards the reduce of this fatigue. In the world of server-side development with database reliance, developers regularly create migration scripts to maintain database support and to ensure users are up to date with the latest version of their database. JavaScript library maintainers could provide codemods as a migration script when major versions are released, with breaking changes a codemod could handle the upgrade process. This would fit into the existing migration process as with npm install’s scripts can be run. Having a codemod run automatically at install/upgrade time could speed up upgrades and provide more confidence in the consumer. Including this into the release process would be beneficial for not just consumers but also reduce overhead for maintainers when updating examples and guides. In this article, we have seen the powerful nature of codemods and JSCodeshift and how they can quickly update complex code. From the beginning with the Codemod tool and moving on to tools such as ASTExplorer and JSCodeshift we can now build codemods to suit our own needs. Taking advantage of the already wide range of pre-made codemods allows developers to advance in time with the masses. Have you used codemods yet? What is in your toolkit? What other refactors would be a great use for codemods? Let me know in the comments! This article was peer reviewed by Graham Cox and Michael Wanyoike. Thanks to all of SitePoint’s peer reviewers for making SitePoint content the best it can be!
https://www.sitepoint.com/getting-started-with-codemods/
CC-MAIN-2018-43
refinedweb
2,265
55.13
. Your first Python recipe¶ From the Flow, select one of the datasets that you want to use as input of the recipe. In the right column, in the “Actions” tab, click on “Python” In the recipe creation window, create a new dataset that will contain the output of your Python code. Validate to create the recipe You can now write your Python code. (Note that if needed, you might need to fill the partition dependencies. For more information, see Working with partitions) First of all, you need to load the Dataiku API (the Dataiku API is preloaded when you create a new Python recipe) import dataiku") Alternatively, you can get the inputs of the recipe as they are in the Input/Output tab with from dataiku import recipe # object_type can be omitted if there are only datasets all_input_datasets = recipe.get_inputs(object_type='DATASET') single_input_dataset = recipe.get_input(object_type='DATASET') second_input_dataset = recipe.get_input(index=1, object_type='DATASET') Interaction with the Dataset object can be made in two flavors : Using a streaming read and write API Using Pandas dataframes Using Pandas¶ Pandas is a popular python package for in-memory data manipulation. Note Starting DSS 8.0, pandas 1.0 is supported for Python >= 3.6.1. Previous Python versions require an earlier Pandas version Using the dataset via Pandas will load your dataset in memory, it is therefore critical that your dataset is “small enough” to fit in the memory of the DSS server. The core object of Pandas is the DataFrame object, which represents a dataset. Getting a Pandas DataFrame from a Dataset object is straightforward: # Object representing our input dataset cars = dataiku_with_schema output_ds = dataiku.Dataset("myoutputdataset") output_ds.write_with_schema(my_dataframe). When you use the write_with_schema method, this is what happens: the schema of the dataframe is used to modify the schema of the output dataset, each time the Python recipe is run. This must obviously be used with caution, as mistakes could lead the “next” parts of your Flow to fail. You can also select to only write the schema (not the data): # Set the schema of ‘myoutputdataset’ to match the columns of the dataframe output_ds.write_schema_from_dataframe(my_dataframe) And you can write the data in the dataframe without changing the schema: # Write the dataframe without touching the schema output_ds.write_from_dataframe(my_dataframe) Using the streaming. import dataiku from collections import Counter cars = dataiku with output.get_writer() as writer: for (origin,count) in origin_count.items(): writer.write_row_array((origin,count)) Note Don’t forget to close your writer. If you don’t, your data will not get fully written. In some cases (like SQL output datasets), no data will get written at all. We strongly recommend that you use the with keyword in Python to ensure that the writer is closed. Preparation processors. In these cases, rather than creating a Python recipe, you should consider using a Python UDF within the Preparation. For simple operations, using a Python UDF has several advantages over the Python recipes: You do not need an « intermediate » dataset after the preparation
https://doc.dataiku.com/dss/latest/code_recipes/python.html?highlight=write_schema_from_dataframe
CC-MAIN-2022-33
refinedweb
501
62.27
Find K’th largest element in a stream in Python In this tutorial, you will learn how to find the K’th largest element in a stream in Python. First, understand the question. We have a stream of numbers like “1,5,3,10,23,45,9” then the 3 rd largest element is 10. Because, if we arrange the stream in descending order then it’s like “45,23,10,9,5,3,1 “. Now, we can easily say that 45 is 1st, 23 is 2nd and 10 is the 3rd largest number. See how can make a Python code of this problem………. Code of Kth_Largest() def Kth_Largest(k,stream): try: List = list(map(int,stream.split(','))) List.sort() if k > len(List) or k <= 0: print('Value of K is: 0 < K < ',len(List)+1," for this stream",sep="") else: print(k,'th Largest number of this stream is: ',List[-k],sep="") except: print(" Sorry! you didn't maintain the input stream format. \n Input stream format is like "'"1,3,6,10,23"'" (use , between two numbers).") Kth_Largest(4,”3,45,23,9,97,12,5″) Output: 4th Largest number of this stream is: 12 Let’s understand the code - The def function contained two arguments 1st for the value of K and 2nd for the stream. - try and except function are used because if someone inputs the stream in a wrong format then the code won’t show the Error but it shows the guideline of the stream formate. Ex…. Kth_Largest(4, “3 45 23 9 97 12 5”) Output: Sorry you didn't maintain the input stream format Input stream format is like "1,3,6,10,23" (use , between two numbers) This code shows the guidelines instead of Error event the input stream format is wrong because of try and except functions. - list(map(int,stream.split(‘,’)) is used to split the stream from every ” , ” and transform into the list. - if and else statements are used to restrict the value of K. Because K value is: 0 < K < (len(List) +1).
https://www.codespeedy.com/find-kth-largest-element-in-a-stream-in-python/
CC-MAIN-2021-10
refinedweb
347
78.48
Beginning C#: Getting Started with C# Introduction Starting this month, I'm beginning a new set of articles in this column. "Beginning C#" is going to start right at the very beginning and teach C# as a language, right from the ground up. We'll start with the obligatory hello world example, and work our way up through variables, loops, decisions, structures, objects, and everything else that makes up the language. Let's Get Started So, what do you need to do to start programming in C#? Many people don't realise that you don't actually need Visual Studio, VS-Code, Sharp develop, or anything like that to actually write C# applications. Granted, these large application suites DO make things easier, but you can get along just fine with the .NET runtime being installed and a simple text editor, such as Notepad. If you're working on Linux or an Apple Mac, all you need is "Mono" installed. You actually don't need the full Xamarin studio or anything like that. The very first thing you need to make sure is that you have an up-to-date .NET runtime installed on your PC (if you're using Windows) and the current version of Mono installed if you're running a non-Windows system). Unfortunately, I don't have time to cover installation on Linux/Unix/Mac in this column, but once you have the tools up and running, most of the language stuff we cover will work without modification. On Windows, check your system hard drive (the one where your 'Windows' folder is) and look for a folder called 'Microsoft.NET' in your Windows folder: Figure 1: The main .NET install folder If you have this folder on your PC, you're good to go. If you do not, you need to download and install the latest .NET runtime. You can get this from (at the time of writing). This URL may change over time, so your best course of action usually is to search for ".NET runtime download" in your favourite search engine. Figure 2: .NET Download portal Simply click the large red download button and follow the instructions. You'll most likely also need to locate your downloads folder and run the installer you downloaded, in case your browser does not allow you to run downloads directly. Once everything is installed head back to the location shown in Figure 1, that should now be present, and you should now see 'Framework' and 'Framework64' folders. (If you're working on a 32bit machine only, you may not see 'Framework64'.) If you have 'Framework64', click on that to open its folder. Otherwise, just click 'Framework'. Whichever you choose, you should see something like what's shown in Figure 3: Figure 3: Inside the framework folder In my case, I have .NET versions 2, 3, 3.5, 4, and 4.5 installed. If you're observant, you'll have noticed that there is no 4.5 folder. That's because 4.5 is installed as an upgrade to v4.0, which, as a result, means the assemblies and tools are installed under v4.0 Click the v4.0 folder (or whichever your highest version is), and you should see something similar to Figure 4: Figure 4: MS .NET Tools Within this folder is everything you need to write and compile .NET applications in C#, Visual Basic, and even JavaScript. (Yes, the .NET framework provides a tool to compile JavaScript into an EXE file.) You can see the C# compiler in Figure 4; it's called 'csc.exe'. Open a command prompt and browse to the folder you have open. You can do this one of two ways: - Go into Start->All Programs->Accessories and click the command prompt (Windows 7 and below), or press and hold the Windows key while pressing 'r', followed by entering 'cmd' in the run dialog, then pressing ok (all platforms). - Right-click the white space to the right of the file listing in Explorer while holding down the Shift key, and then choosing 'Open command windows here' from the menu. Whichever method you use, your goal is to end up with a command prompt open, pointing to your V4.0 .NET runtime folder: Figure 5: Command prompt open in .NET tools folder From here, if you type 'csc' and press Return, the C# compiler should announce itself. Figure 6: Say hello to the 'csc' C# compiler You can, if you want, try 'vbc' for Visual Basic and 'jsc' for the JavaScript compiler. For this series, however, we're only interested in the C# one. At this point, we know we have a functional language compiler, but we're still on our system drive. Because of the various Windows file protections, you'll have a bit of a miserable time if you start compiling C# code here, so to make this more useful, we need to make sure that 'csc.exe' is available in the System path. What's in a Path? Under Windows, there is the concept of something called the "System Path" (a similar concept exists in other systems, too). The "System Path" is a list of disk locations to be searched when just a file name is specified for an application to be run. For example, if you had "C:\folder1", "C:\folder2", and "C:\folder3", and your system path looked like "C:\folder1;C:\Folder2", any .exe files placed in 'folder1' or 'folder2' could be run from 'folder3' or anywhere else on the system just by typing 'appname.exe'. You could not, however, switch to 'folder2' and run an EXE file located in 'folder3' unless you typed the full location; for example, 'C:\folder3\appname.exe'. By making sure that your .NET v4 folder is added to your Windows System path, you can run 'csc' (and the other tools) from anywhere on your system, and that includes any folders where you might be developing C# programs. To add a folder to your path, you need to right-click your 'My Computer' icon and choose Properties: Figure 7: Right-click 'My Computer' Upon doing this, you should see the computer Properties window open. Figure 8: Windows computer properties The next thing you need to click is the "Advanced System Settings" entry, which will in turn open the following dialog box: Figure 9: The advanced System Settings dialog And finally, click "Environment Variables" to open up the location where the "System Path" lives. Figure 10: The environment variables editor You'll notice in Figure 10 that there are two 'Path' entries. The top one (marked by the green arrow) affects only the logged-in user's profile (in this case mine, shawty). The bottom one (marked with the red arrow) affects every user on the system. I personally use a number of different accounts for different purposes, so I use the system-wide entry. Whichever you use is up to you. Double-click the 'Path' you want to modify and you'll open the editor for that variable: Figure 11: The 'Path' editor Check that you don't already have your .NET folder in there already (it's much easier by copy and pasting the path into Notepad), and add the folder to the end of the path, if it's not already included. Figure 12: Adding our .NET folder to the path Remember to separate your addition from what's already there with a semicolon ';' so that Windows knows this is a new folder and not part of an existing one. Once you do this, click 'ok' all the way back out, and you should now be able to open a 'Command Line' anywhere on your system and run the compiler: Figure 13: csc.exe now runs from anywhere To finish this first post off, we're going to create a simple hello world program. Open a command line window in any folder on your system that you want to work in, either by using the Start menu, Windows Run or the right-click + Shift method. Then, type the following and press Return: Notepad hello.cs You should see that Notepad opens. When it does, type the following C# code into Notepad, aand then save it by using File->Save and return back to your already open command line. using System; class Program { static void Main() { Console.WriteLine("Hello World!!"); } } Back at your command line, type: Csc hello.cs And press Return. All being well, your program should compile, and produce an EXE file ready to run: Figure 14: Compiling and running your first C# program I'll explain what we did next month, but for now try adding a few more "Console.WriteLine" or "Console.Write" statements and seeing what the difference is. Remember, a big part of learning a new language is about experimentation, so don't be afraid to change things in the code we've done in this post, and see what happens. A very, very good way of learning how something works is learning how to fix it when it breaks. Until next month. Have Fun Playing! Shawty RE: DRPosted by Peter Shaw on 01/30/2016 03:33am I'm please you like the idea. As I develop the posts then I will be building up your C# knowledge in small chunks. I always find it important to start small however, and as we progress the larger picture will emerge.Reply RE: A good way to remind us these things are toolsPosted by Peter Shaw on 01/30/2016 03:31am A very good comment Gavin, and one which many developers should always bear in mind. IDE's like Visual Studio are there mostly to increase the productivity output of those tools, but when your in Bear Grylls mode and only have your basic toolkit to survive with, it's always important to remember it can still be used without all the bells and whistles.Reply A good way to remind us these things are toolsPosted by Gavin on 01/26/2016 02:46pm In the day-to-day duties of the dev who spends a large % of time using a language such as c#, which can be a very large % indeed in enterprise development and becoming a way of life, can find writings like this a nice reminder that such things are but a tool in a very large box.Reply DRPosted by J Engelbrecht on 01/17/2016 10:25pm For a start excellent. I am a begiiner at programming and runnng deep in age. Please be practical with your next lessons. Specificlally in the explanation how the various elements are interlocking with each other. We do not get handbooks showing the holistic picture if you want to program.Reply
http://www.codeguru.com/columns/dotnet/beginning-c-getting-started-with-c.html
CC-MAIN-2016-50
refinedweb
1,796
70.23
I am a beginner in C++. I am trying to implement copy constructor. I hope I had followed the correct syntax of copy constructor. But whenever I compile my code it'll finish without any errors but at run time it says "Program finished with exit code 10". I'm working in Clion IDE. When I tried in Mac terminal it showed "Bus error: 10" I could figure out that copy constructor is causing this problem. I tried by Commenting it and running the program, it worked fine, when I uncomment it the above problem is caused. Please help me figure out where I went wrong. Thank you. Here is my code: #include <iostream> using namespace std; class Person { char *name; int age; public: Person (); Person (char *, int age = 18); Person (const Person &p); void output (); }; Person ::Person() { name = new char[20](); age = 0; } Person ::Person(char *str, int age) { name = new char[50](); strcpy(name, str); this->age = age; } Person ::Person(const Person &p) { strcpy(name, p.name); age = p.age; } void Person ::output() { cout << "\nName = " << name; cout << "\nAge = " << age << endl; cout <<"-------------------------------------------------------------------------------------------------------------------------\n"; } int main () { Person p1; Person p2("Name"); Person p3 ("Name", 20); Person p4 = p2; cout << "\nThe Output of the Object Called by Default Constructor\n\n"; p1.output(); cout << "\nThe Output of the Object Called by Parameterised Constructor with Default Argument\n\n"; p2.output(); cout << "\nThe Output of the Object Called by Parameterised Constructor Overriding Default Argument \n\n"; p3.output(); cout << "\nThe Output of the Object Called by Copy Constructor (Copying p2 Object that is the second output)\n\n"; p4.output(); return 0; } Were is you allocation? Person ::Person(const Person &p) { strcpy(name, p.name); age = p.age; } You should allocate memory for your member name the size of strlen(p.name)+1 bytes before copying data to it.
https://codedump.io/share/RM2WsFEhSLMk/1/program-finished-with-exit-code-10
CC-MAIN-2018-22
refinedweb
307
65.12
In February 2002, Greg Ward posted to the Python getopt-sig mailing list announcing his comparison of option-parsing libraries in which three scripts were written to implement an example command line interface using each of the libraries under examination. This generated a certain amount of discussion on the mailing list concerning the design philosophy of each of the candidates presented in the comparison. However, some of the issues raised in the discussion were never resolved to the satisfaction of all parties involved, possibly due to the fundamental differences in opinion between contributors to the list. In May 2002, Guido van Rossum suggested that the candidates should be updated to reflect some of the discussion which followed the earlier comparison. Having written an option-parsing library of my own, I wrote a script to implement the example interface used in the comparison. However, my library did not scale well to large numbers of options and I had to perform more work on it before it could be publically released. I was confident enough in the library's capabilities to include a version of the example script in the library distribution, so I feel that it can now be compared with the other candidates. Update: The library was not formally compared with the others because Optik was accepted into future releases of the Python standard library. Some of this work may yet be incorporated into other projects. A version of the following example is included in the CMDSyntax library, but the latest version is available to be downloaded separately. I have annotated the example on this page to help explain the approach used by the library. The script begins by importing the library and the sys module. The syntax accepted by the script is defined in a string which is, in this case, rather long. Note that square brackets are used to denote optional arguments and the vertical bar is used as an exclusive OR operator. #! /usr/bin/env python import cmdsyntax, sys # Define the syntax: note that the CMDSyntax library doesn't support the # usage of the -v option which allows -vv and -vvv, etc. syntax = """ [-h | --help] | [--version] | ( [ (-v | --verbose=V) | (-q | --quiet) ] [( -d DEVICE) | (--device=DEVICE)] [(-b DIR) | --output-base=DIR] [(-t TRACKS) | --tracks=TRACKS] [ (-p | --use-pipes | --synchronous) | ( (-f | --use-files | --asynchronous) [ (-k | --keep-tmp) | --no-keep-tmp [-R | --rip-only] ] ) ] [-P | --playback] [-e | --eject] [(-A ARTIST) | --artist=ARTIST] [(-L ALBUM) | --album=ALBUM] [(-D DISC) | --disc=DISC] [(-y YEAR) | --year=YEAR] [--offset=OFFSET] ) """ Although the example syntax contains lots of options which may be omitted, some of them are synonyms, and others are contradictory when used in conjunction. I have avoided the issue of aliased commands setting options by default to be overridden by options explicitly set by the user. if __name__ == "__main__": # Create a syntax object. syntax_obj = cmdsyntax.Syntax(syntax) Inside the main namespace, an object is created which parses the syntax definition and constructs a tree structure for subsequent use. # Match the command line arguments against the syntax definition. matches = syntax_obj.get_args(sys.argv[1:]) The input from the command line is passed to the relevant method and compared with the syntax definition. A list of matches is returned; this will be empty if no valid matches were found. This next part is optional, as it concerns the optional creation of a graphical form interface on supported systems in the case that no valid matches were returned. if matches == [] and cmdsyntax.use_GUI() != None: print "Using the GUI..." print form = cmdsyntax.Form(sys.argv[0], syntax_obj) match = form.get_args() # A valid matches was found. if match != {}: # Put the unambiguous match in a list so that it can be dealt # with in the same manner as matches from command line input. matches = [match] If a valid match was returned from the form, it is placed inside a list for compatibility with the rest of the script. if matches == []: # No matches found: print the syntax definition and exit. print "Syntax: %s %s" % (sys.argv[0], syntax) sys.exit() The availability of valid matches is checked and, if none are found, the syntax definition is printed on exit. # At this point, there may be a number of matches if the syntax # specification was ambiguous. Assuming that it wasn't, take the # first match. match = matches[0] The first match presented is used. # Note that the CMDSyntax library does not coerce command line arguments # to types; this is up to the application. Using the source for the # Optik solution to ripoff, we can determine which arguments have # types other than the string type. def coerce_using(value, fn): try: return fn(value) except ValueError: print "Could not coerce %s using %s." % (value, fn) return value The library does not coerce arguments from the command line to types automatically, so a function is defined to do this in a simple manner. # Integer types: if match.has_key("verbose"): match["verbose"] = coerce_using(match["verbose"], int) if match.has_key("disc"): match["disc"] = coerce_using(match["disc"], int) if match.has_key("DISC"): match["DISC"] = coerce_using(match["DISC"], int) if match.has_key("offset"): match["offset"] = coerce_using(match["offset"], int) The relevant arguments are coerced to integers if possible. Note that the values are kept in a dictionary. print match sys.exit() The match dictionary is printed and the script exits. You can contact me or read the discussion at.
http://www.boddie.org.uk/david/Projects/Python/CMDSyntax/Bake-off/
CC-MAIN-2017-51
refinedweb
891
54.63
Search Firefox favorites? Discussion in 'Firefox' started by Bob Newman, May 29, 2006. Want to reply to this thread or ask your own question?It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum. - Similar Threads Search Bar not displaying search EnginesZimran Douglas, Jan 6, 2005, in forum: Firefox - Replies: - 1 - Views: - 1,123 - Splibbilla - Jan 7, 2005 Where does Firefox store the bookmarks (favorites) list?Jackson, Oct 23, 2005, in forum: Firefox - Replies: - 4 - Views: - 205,182 - Jackson - Oct 23, 2005 Favorites searchBob Newman, Mar 27, 2006, in forum: Firefox - Replies: - 2 - Views: - 508 Search in FavoritesAlex Vinokur, Sep 27, 2004, in forum: Computer Support - Replies: - 1 - Views: - 404 - PA Bear - Sep 27, 2004 import of google notebook in mozilla firefox favoritesihshm, Jan 15, 2008, in forum: Firefox - Replies: - 0 - Views: - 489 - ihshm - Jan 15, 2008
http://www.velocityreviews.com/threads/search-firefox-favorites.295441/
CC-MAIN-2015-27
refinedweb
160
65.96
Is there any method in tensorflow like get_output in lasagne I found that it is easy to use lasagne to make a graph like this. import lasagne.layers as L class A: def __init__(self): self.x = L.InputLayer(shape=(None, 3), name='x') self.y = x + 1 def get_y_sym(self, x_var, **kwargs): y = L.get_output(self.y, {self.x: x_var}, **kwargs) return y through the method get_y_sym, we could get a tensor not a value, then I could use this tensor as the input of another graph. But if I use tensorflow, how could I implement this? 1 answer - answered 2018-11-14 22:52 zephyrus I'm not familiar with lasagne but you should know that ALL of TensorFlow uses graph based computation (unless you use tf.Eager, but that's another story). So by default something like: net = tf.nn.conv2d(...) returns a reference to a Tensor object. In other words, netis NOT a value, it is a reference to the output of the convolution node created by tf.nn.conv2d(...). These can then be chained: net2 = tf.nn.conv2d(net, ...)and so on. To get "values" one has to open a tf.Session: with tf.Session() as sess: net2_eval = sess.run(net2) See also questions close to this topic - Keras custom loss function error: InvalidArgumentError: ConcatOp I am building a model to identify if two image belongs to the same class or not. For this, I fist use CNN to encode both images and then compare the "similarity" (inner product in this example) of the two embedding. ''' build model ''' conv_base = Xception_greyscale((256,256,1),'max',False) feature_model = models.Sequential() feature_model.add(conv_base) feature_model.add(layers.Dense(1024,activation=tf.sigmoid)) img1 = layers.Input(shape=(256,256,1)) img2 = layers.Input(shape=(256,256,1)) feature1 = feature_model(img1) feature2 = feature_model(img2) output = layers.Lambda(lambda features: tf.reduce_mean(features[0]*features[1],axis=1))([feature1,feature2]) model = models.Model([img1,img2],output) My y_true will be a vector of zero and one (one being example belong to same class). In the loss function, y_pred would be encourage to increase for positive example and decrease for negative example def loss_(y_true,y_pred): return -1 * y_true * y_pred + (1-y_true) * y_pred model.compile(loss=loss_, optimizer=optimizers.Adam(lr=1e-3), metrics=[loss_]) However, I got the following error when I do fit/train_on_batch/evaluate but not predict. model.train_on_batch(data[0],data[1]), where data[0] is a list [img1,img2] (img1 has shape (batch,256,256,1) and data[1] is a 1d numpy array of the shape (batch,). and I checked my output is a tensor of shape (batch,). I do not understand the error message as I do not even have an concat. Must be something Keras does internally, which makes it really hard for me to debug. Thank you for your help!! InvalidArgumentError: ConcatOp : Dimensions of inputs should match: shape[0] = [2,1] vs. shape[1] = [1,1] [[{{node loss_4/lambda_1_loss/broadcast_weights/assert_broadcastable/is_valid_shape/has_valid_nonscalar_shape/has_invalid_dims/concat}} = ConcatV2[N=2, T=DT_INT32, Tidx=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](loss_4/lambda_1_loss/broadcast_weights/assert_broadcastable/is_valid_shape/has_valid_nonscalar_shape/has_invalid_dims/ExpandDims, loss_4/lambda_1_loss/broadcast_weights/assert_broadcastable/is_valid_shape/has_valid_nonscalar_shape/has_invalid_dims/ones_like, loss_4/lambda_1_loss/broadcast_weights/assert_broadcastable/is_valid_shape/has_valid_nonscalar_shape/has_invalid_dims/concat/axis)]] - Why mean used instead of sum in loss functions? Why mean used instead of sum in loss functions? i.e. is there any reason why this is prefered def mae_loss(y_true, y_pred): loss = tf.reduce_mean(tf.abs(y_true-y_pred)) return loss to this def mae_loss(y_true, y_pred): loss = tf.reduce_sum(tf.abs(y_true-y_pred)) return loss In Keras source code mean variant is also used: - Why Keras does not see my GPU while TensorFlow does? Following an answer from SO, I have run: # confirm TensorFlow sees the GPU from tensorflow.python.client import device_lib assert 'GPU' in str(device_lib.list_local_devices()) # confirm Keras sees the GPU from keras import backend assert len(backend.tensorflow_backend._get_available_gpus()) > 0 # confirm PyTorch sees the GPU from torch import cuda assert cuda.is_available() assert cuda.device_count() > 0 print(cuda.get_device_name(cuda.current_device())) The first test is working, while the other ones do not. Running nvcc --versiongives: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2017 NVIDIA Corporation Built on Fri_Sep__1_21:08:03_CDT_2017 Cuda compilation tools, release 9.0, V9.0.176 And nvidia-smi also work. list_local_devices()provides: [name: "/device:CPU:0" device_type: "CPU" memory_limit: 268435456 locality { } incarnation: 459307207819325532, name: "/device:XLA_GPU:0" device_type: "XLA_GPU" memory_limit: 17179869184 locality { } incarnation: 9054555249843627113 physical_device_desc: "device: XLA_GPU device", name: "/device:XLA_CPU:0" device_type: "XLA_CPU" memory_limit: 17179869184 locality { } incarnation: 5902450771458744885 physical_device_desc: "device: XLA_CPU device"] sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))returns: Device mapping: /job:localhost/replica:0/task:0/device:XLA_GPU:0 -> device: XLA_GPU device /job:localhost/replica:0/task:0/device:XLA_CPU:0 -> device: XLA_CPU device Why are Keras and PyTorch unable to run on my GPU? (RTX 2070) - Issue with installing Keras library from Anaconda I have been trying to install 'Keras' library from Anaconda on my laptop. I have the latest version of Anaconda. After that, I tried conda update conda conda update --all The above two succeeds. After that I tried conda install -c conda-forge keras conda install keras Both of the above fails with the below error. ERROR conda.core.link:_execute(502): An error occurred while installing package >'::automat-0.7.0-py_1'. CondaError: Cannot link a source that does not exist. >C:\Users\Anaconda3\Scripts\conda.exe I downloaded "automat-0.7.0-py_1" from anaconda site into one local folder and tried conda install from there. It works. However when I try to install Keras again, that again fails. I am clueless now what to do. - How to run multiple model in theano I am run my theano code with MLP, I wonder that if I can run 6 model with same structure, And get the output and update together, as the following code: import numpy as np import theano import theano.tensor as T from numpy.random import RandomState from functools import reduce inputs = [] outputs = [] updatess = [] for i in range(6): W = [] input = T.matrix('x1') W_values1 = np.random.randn(1000,250) W1 = theano.shared(value=W_values1.astype(theano.config.floatX), borrow=True) b_values1 = np.zeros((250,), dtype=theano.config.floatX) b1 = theano.shared(value=b_values1.astype(theano.config.floatX), name='%s_b' % ('b'), borrow=True) output1 = T.dot(input, W1) + b1 W.append(W1) L1 = abs(W1).sum() L2_sqr = (W1 ** 2).sum() reg_cost = (0.001 * L1 + 0.000001 * L2_sqr) reg_gparams = [T.grad(reg_cost, p) for p in W] updates = [(param, param - 0.001*gparam) for param, gparam in zip( W, reg_gparams)] inputs.append(input) outputs.append(output1) updatess.append(updates) for input, output, updates in zip([inputs], outputs, updatess): take_step = theano.function(input, outputs=output, updates=updates) But I got the error as following: UnusedInputError: theano.function was asked to create a function computing outputs given cert ain inputs, but the provided input variable at index 1 is not part of the computational graph needed to compute the outputs: x1. To make this error into a warning, you can pass the parameter on_unused_input='warn' to thean o.function. To disable it completely, use on_unused_input='ignore'. What does it mean? And how can I fix it? - "TypeError: Unknown parameter type: <class 'dict_values'>" I am using this code: "" When I run the code, I get the error that: TypeError: unsupported operand type(s) for +: 'dict_values' and 'list' This error is related to this line of the code: train = theano.function(inps.values()+[target_values],cost, updates=updates) I changed this line to: train = theano.function(inputs=[inps.values(), target_values], outputs=cost, updates=updates) This time I get the error that: TypeError: Unknown parameter type: This seems that Theano.function does not accept Dictionary.values as inputs? Thanks - 'dict_values' object does not support indexing I am using this python 2 code: When I run the code in python 3, I get the error that: 'dict_values' object does not support indexing This error is corresponding to this line: network[i] = InputLayer(shape=(batch_size,1,parameters.FREQ_WINDOW),input_var=input_var[i],name="input_layer_1") So, I changed input_var=input_var[i]to input_var=None. Do you think it is the way that this error should be solved? Thanks in advance - CUDA is installed, but device gpu is not available on Centos Cluster for theano, lasagne I am getting following error on Kepler K80 but not on K40c : WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available This is unusual, since the environment is the same: | NVIDIA-SMI 410.72 Driver Version: 410.72 I also tried nvcc.flags=-D_FORCE_INLINES but it didn't help. best regards
http://quabr.com/53299543/is-there-any-method-in-tensorflow-like-get-output-in-lasagne
CC-MAIN-2018-51
refinedweb
1,447
51.04
When to Use Box Plots - Jun 11 • 8 min read - Key Terms: box plots Box plots help visualize the distribution of quantitative values in a field. They are also valuable for comparisons across different categorical variables or identifying outliers, if either of those exist in a dataset. Box plots typically detail the minimum value, 25th percentile (aka Q1), median (aka 50th percentile), 75th percentile (aka Q3) and the maximum value in a visual manner. Note: different software and libraries such as Microsoft Excel, Seaborn and others may place the end whiskers and show outliers differently on box plots. Please understand your software's implementation well when you need to interpret results. Often times, the aspects of a box plot are: You can learn more in detail about box and whisker plots through this Khan Academy article. Percentiles are frequently used in comparisons in the real-world. For example, in my high school graduating class, my GPA ranked in the top 25th percentile. That means I had a higher GPA than 75% of students in my graduating class. Below, I'll walk through several examples of when bar plots are useful. Import Modules import seaborn as sns import matplotlib.pyplot as plt % matplotlib inline Set figure sizes to be larger and fonts to be larger. sns.set(rc={'figure.figsize':(10, 6)}) sns.set_context("talk") Example: Resting Heart Rate (Pulse) In this public dataset, there's a sample of people's heart rates taken. To perform that measurement, people measured the number of times their heart beated in a single minute. The count of beats per minute is also called a pulse. Load Exercise Dataset df_exercise = sns.load_dataset('exercise') Preview Exercise Dataset Below, you can see a random sample of 5 rows of data. Note how each row represents health/exercise metrics for a single person and tracks their heart rate (pulse) as well as what kind of activity was done before the heart rate measurement. df_exercise.sample(n=5) Plot Resting Pulse Data ax = sns.boxplot(x=df_exercise[df_exercise['kind']=='rest']['pulse']) ax.axes.set_title("Box Plot of People's Resting Heart Rate", fontsize=20, y=1.01) plt.xlabel("pulse [beats per minute]", labelpad=14); Interpreting Pulse Data Quartiles The median resting heart rate is roughly 92 beats per minute. The minimum recorded resting heart rate is 80 beats per minute and the maximum is 100 beats per minute. 75% of people recorded a resting heart rate above 85.5 beats per minute. 25% of people recorded a resting heart rate above 95.75 beats per minute. Also, in order to see exact numeric values of the quartiles in a box and whisker plot, you can also print out those values in a table format similar to the one below: df_exercise[df_exercise['kind']=='rest']['pulse'].describe() count 30.000000 mean 90.833333 std 5.831445 min 80.000000 25% 85.500000 50% 91.500000 75% 95.750000 max 100.000000 Name: pulse, dtype: float64 Example: Heart Rate Comparison for Resting, Walking and Running In the example above, the visual box plot tells a similar story to the printed table results. However, the visual representation of box plots becomes more valuable with side-to-side comparisons by a categorical variable. I want to know how the distribution of heart rate differs for people resting, walking and running. I'd assume that with more exercise activity, the median heart rate increases. Box Plot for Heart Rate Comparisons by Activity ax2 = sns.boxplot(x='kind', y='pulse', data=df_exercise, saturation=0.65) ax2.axes.set_title("Box Plot of People's Heart Rate by Kind of Activity", fontsize=20, y=1.01) plt.ylabel("pulse [beats per minute]", labelpad=14) plt.xlabel("activity", labelpad=14); Interpretation of Heart Rate by Activity As expected, the median heart increases by the level of exercise activity. There's a significant jump in the median heart rate for those running from walking since running is a strenous exercise activity. The distribution of recorded heart rates for those running varies much more than the distribution for those recorded after rest or walking. The maximum recorded heart rate for running is 150 beats per minute. Example: Distribution of Total Bills by Day of Week In this public dataset, there's records from restaurant orders. Specifically, we'll look at orders by day of week and the total bill amounts in U.S. dollars. Get Tips Dataset df_tips = sns.load_dataset('tips') Preview Tips Dataset Below, you can see a preview of 5 rows of the dataset. Note how each row represents meal order and there's fields for total bill amount and day of the week. df_tips.sample(n=5) Plot Distribution of Total Bill Amount by Day ax3 = sns.boxplot(x="day", y="total_bill", data=df_tips, saturation=0.6) ax3.axes.set_title("Box Plots of Total Bill Amounts by Day of Week", fontsize=20, y=1.01) plt.xlabel("day", labelpad=14) plt.ylabel("total bill [$]", labelpad=14); Interpretation of Outliers for Thursday The Python visualization library I use in the example above is called Seaborn. Their calculation of outliers in box plots is as so: any point in which the value is greater than (Q3-Q1)*1.5 + Q3. For total_bill values on Thursday, the leftmost boxplot, we can see 5 outliers. Let's calculate that threshold that determines total_bills as outliers. First, we need to identify the exact Q3 and Q1 values. Q1 = df_tips[df_tips['day']=='Thur']['total_bill'].quantile(0.25) Q3 = df_tips[df_tips['day']=='Thur']['total_bill'].quantile(0.75) outlier_threshold = (Q3-Q1)*1.5 + Q3 round(outlier_threshold, 2) 31.72 Any total bill value greater than 31.72 U.S. dollars on Thursday is considered an outlier. Let's examine the data to see how many outliers exist. The math below queries our tips dataset for orders on Thursday and greater than 31.72 U.S. dollars. We see 5 outliers. If we look at the Thursday box plot above, we see those 5 outliers plotted. df_tips[(df_tips['day']=='Thur') & (df_tips['total_bill']>31.71)]['total_bill'].values array([ 32.68, 34.83, 34.3 , 41.19, 43.11]) Interpretation of Box Plots of Total Bill Amounts By Day For total bill amounts on Thursday, the maximum non-outlier value is ~30 U.S. dollars. Generally, people spend more money at this restaurant on weekends, Saturdays and Sundays, than weekdays since the median total bill of Saturday and Sunday are greater than the median values of Thursday and Friday. On weekends, there's much more variance in people's spending patterns for meals than on weekdays. Saturday has the highest recorded outlier at over 50 U.S. dollars.
https://dfrieds.com/data-visualizations/when-use-box-plots
CC-MAIN-2019-26
refinedweb
1,110
58.69
#include <tiffio.h> AStrip(TIFF *tif, uint32 row, uint32 *raster) TIFFReadRGBAStrip reads a single strip of a strip-based image into mem- ory, storing the result in the user supplied RGBA raster. The raster is assumed to be an array of width times rowsperstrip 32-bit entries, where width is the width of the image (TIFFTAG_IMAGEWIDTH) and rowsper-- tion. When reading a partial last strip in the file the last line of the image will begin at the beginning of the buffer.). See the TIFFRGBAImage(3TIFF) page for more details on how various image types are converted to RGBA values.. TIFFReadRGBAStrip is just a wrapper around the more general TIFFRGBAIm- age(3TIFF) facilities. It's main advantage over the similar TIFFRead- RGBAImage() function is that for large images a single buffer capable of holding the whole image doesn't need to be allocated, only enough for one strip. The TIFFReadRGBATile() function does a similar opera- tion for tiled images. Missing needed "PhotometricInterpretation" tag. The image did not have a tag that describes how to display the data. TIFFRead- RGBAImage can not handle.RGBAImage(3TIFF), TIFFReadRGBAImage(3TIFF), TIFF- ReadRGBATile(3TIFF), libtiff(3TIFF) Libtiff library home page: libtiff December 10, 1998 TIFFReadRGBAStrip(3TIFF)
http://www.syzdek.net/~syzdek/docs/man/.shtml/man3/TIFFReadRGBAStrip.3.html
crawl-003
refinedweb
201
54.22
PDL::Course - A journey through PDL's documentation, from beginner to advanced. This is written by David Mertens with edits by Daniel Carrera. PDL's documentation is extensive. Some sections cover deep core magic while others cover more usual topics like IO and numerical computation. How are these related? Where should you begin? This document is an attempt to pull all the key PDL documentation together in a coherent study course, starting from the beginner level, up to the expert. I've broken down everything by level of expertise, and within expertise I've covered documentation, library, and workflow modules. The documentation modules are useful for what they tell you; the library modules are useful for the functions that they define for you; the workflow modules are useful for the way that they allow you to get your work done in new and different ways. If you are new to PDL, these documentation modules will get you started down the right path for using PDL. Modules that tell you how to start using PDL. Many of these are library modules technically, but they are included when you use PDL, so I've included them for their documentation. After the first three, most of the docs listed below are rather dry. Perhaps they would be better summarized by tables or better synopses. You should at least scan through them to familiarize yourself with the basic capabilities of PDL. A couple of brief introductions to PDL. The second one is a bit more hands-on. If you are new to PDL, you should start with these. Covers basic piddle-creation routines like sequence, rvals, and logxvals to name a random few. Also covers hist and transpose. Explains a large collection of built-in functions which, given an N-dimension piddle, will create a piddle with N-1 dimensions. PDL came of age right around the turn of the millennium and NiceSlice came on the scene slightly after that. Some of the docs still haven't caught up. NiceSlice is the 'modern' way to slice and dice your piddles. Read the Synopsis, then scroll down to The New Slicing Syntax. After you've read to the bottom, return to and read the stuff at the top. Defines a whole slew of useful built-in functions. These are the sorts of things that beginners are likely to write to the list and say, "How do I do xxx?" You would be well on your way to learning the ropes after you've gotten through this document. Like PDL::Primitive, defines a large set of useful functions. Unfortunately, some of the functions are quite esoteric, but are mixed in with the rest of the simple and easy ones. Skim the whole document, skipping over the complicated functions for now. I would point out in particular the function approx. The Perldl Shell is a REPL (Read-Evaluate-Print-Loop, in other words, a prompt or shell) that allows you to work with PDL (or any Perl, for that matter) in 'real time', loading data from files, plotting, manipulating... Anything you can do in a script, you can do in the PDL Shell, with instant feedback! The main workhorse module. You'll include this in nearly every PDL program you write. The sorts of modules that you'll likely use on a normal basis in scripts or from within the perldl shell. Some of these modules you may never use, but you should still be aware that they exist, just in case you need their functionality. In addition to explaining the original slicing and dicing functions - for which you can usually use PDL::NiceSlice - this also covers many dimension-handling functions such as mv, xchg, and reorder. This also thoroughly documents the range function, which can be very powerful, and covers a number of internal functions, which can probably be skipped. This covers a lot of the deeper conceptual ground that you'll need to grasp to really use PDL to its full potential. It gets more complex as you go along, so don't be troubled if you find yourself loosing interest half way through. However, reading this document all the way through will bring you much closer to PDL enlightenment. PDL has quite a few IO modules, most of which are discussed in this summary module. A collection of some of Tuomas's ideas for making good use of PDL. Explains what bad values are and how and why they are implemented. Although writing PDL::PP code is considered an Advanced topic, and is covered in the next section, you should be aware that it is possible (and surprisingly simple) to write PDL-aware code. You needn't read the whole thing at this point, but to get some feel for how it works, you should read everything up through the first example. A copy of this documentation is contained in PDL::PP-Inline. Explains how to subclass a piddle object. This was discussed in the Preface. It is an automatically generated file that lists all of the PDL modules on your computer. There are many modules that may be on your machine but which are not documented here, such as bindings to the FFTW library, or GSL. Give it a read! Complex number support. No, PDL does not have complex number support built into the core, but this should help you out. PDL's own Fast Fourier Transform. If you have FFTW, then you should probably make use of it; this is PDL's internal implementation and should always be available. PDL does not have bindings for every sub-library in the GNU Scientific Library, but it has quite a few. If you have GSL installed on your machine then chances are decent that your PDL has the GSL bindings. For a full list of the GSL bindings, check PDL::Index. A somewhat uniform interface to the different interpolation modules in PDL. Includes some basic bad-value functionality, including functions to query if a piddle has bad values ( isbad) and functions to set certain elements as bad ( setbadat and setbadif). Among other places, bad values are used in PDL::Graphics::PLplot's xyplot to make a gap in a line plot. A cool module that allows you to tie a Perl array to a collection of files on your disk, which will be loaded into and out of memory as piddles. If you find yourself writing scripts to process many data files, especially if that data processing is not necessarily in sequential order, you should consider using PDL::DiskCache. A PDL subclass that allows you to store and manipulate collections of fixed-length character strings using PDL. A whole collection of methods for manipulating images whose image data are stored in a piddle. These include methods for convolutions (smoothing), polygon fills, scaling, rotation, and warping, among others. Contains a few functions that are conceptually related to image processing, but which can be defined for higher-dimensional data. For examples this module defines high-dimensional convolution and interpolation, among others. Defines some useful functions for working with RBG image data. It's not very feature-full, but it may have something you need, and if not, you can always add more! Creates the transform class, which allows you to create various coordinate transforms. For example, if you data is a collection of Cartesian coordinates, you could create a transform object to convert them to Spherical-Polar coordinates (although many such standard coordinate transformations are predefined for you, in this case it's called t_spherical). This package states that it "implements the commonly used simplex optimization algorithm." I'm going to assume that if you need this algorithm then you already know what it is. A collection of fairly standard math functions, like the inverse trigonometric functions, hyperbolic functions and their inverses, and others. This module is included in the standard call to use PDL, but not in the Lite versions. Provides a few functions that use the standard mathematical Matrix notation of row-column indexing rather than the PDL-standard column-row. It appears that this module has not been heavily tested with other modules, so although it should work with other modules, don't be surprised if something breaks when you use it (and feel free to offer any fixes that you may develop). Provides many standard matrix operations for piddles, such as computing eigenvalues, inverting square matrices, LU-decomposition, and solving a system of linear equations. Though it is not built on PDL::Matrix, it should generally work with that module. Also, the methods provided by this module do not depend on external libraries such as Slatec or GSL. Implements an interface to all the functions that return piddles with one less dimension (for example, sumover), such that they can be called by suppling their name, as a string. Enables Matlab-style autoloading. When you call an unknown function, instead of complaining and croaking, PDL will go hunt around in the directories you specify in search of a like-named file. Particularly useful when used with the Perldl Shell. Declares the px function, which can be handy for debugging your PDL scripts and/or perldl shell commands. Suppose you define a powerful, versatile function. Chances are good that you'll accept the arguments in the form of a hash or hashref. Now you face the problem of processing that hashref. PDL::Options assists you in writing code to process those options. (You'd think Perl would have tons of these sorts of modules lying around, but I couldn't find any.) Note this module does not depend on PDL for its usage or installation. Ever fired-up the perldl shell just to look up the help for a particular function? You can use pdldoc instead. This shell script extracts information from the help index without needing to start the perldl shell. The sorts of modules and documentation that you'll use if you write modules that use PDL, or if you work on PDL maintenance. These modules can be difficult to use, but enable you to tackle some of your harder problems. Lite-weight replacements for use PDL, from the standpoint of namespace pollution and load time. This was mentioned earlier. Before you begin reading about PDL::PP (next), you should remind yourself about how to use this. Inline::Pdlpp will help you experiment with PDL::PP without having to go through the trouble of building a module and constructing makefiles (but see PDL::pptemplate for help on that). The PDL Pre-Processor, which vastly simplifies making you C or Fortran code play with Perl and piddles. Most of PDL's basic functionality is written using PDL::PP, so if you're thinking about how you might integrate some numerical library written in C, look no further. A script that automates the creation of modules that use PDL::PP, which should make your life as a module author a bit simpler. Allows you to call functions using external shared libraries. This is an alternative to using PDL::PP. The major difference between PDL::PP and PDL::CallExt is that the former will handle threading over implicit thread dimensions for you, whereas PDL::CallExt simply calls an external function. PDL::PP is generally the recommended way to interface your code with PDL, but it wouldn't be Perl if there wasn't another way to do it. Defines the %PDL::Config hash, which has lots of useful information pertinent to your PDL build. Explanation of the PDL documentation conventions, and an interface to the PDL Documentation parser. Following these guidelines when writing documentation for PDL functions will ensure that your wonderful documentation is accessible from the perldl shell and from calls to barf. (Did you notice that barf used your documentation? Time to reread PDL::Core...) A simple replacement for the standard Exporter module. The only major difference is that the default imported modules are those marked ':Func'. Defines some useful functions for getting a piddle's type, as well as getting information about that type. Simply defines the scalar $PDL::Version::Version with the current version of PDL, as defined in PDL.pm. This is most useful if you distribute your own module on CPAN, use PDL::Lite or PDL::LiteF and want to make sure that your users have a recent-enough version of PDL. Since the variable is defined in PDL.pm, you don't need this module if you use PDL. Provides some decently useful functions that are pretty much only needed by the PDL Porters. Explains how to make a piddle by hand, from Perl or your C source code, using the PDL API. Explains the nitty-gritty of the PDL data structures. After reading this (a few times :), you should be able to create a piddle completely from scratch (i.e. without using the PDL API). Put a little differently, if you want to understand how PDL::PP works, you'll need to read this. Copyright 2010 David Mertens (dcmertens.perl@gmail.com). You can distribute and/or modify this document under the same terms as the current Perl license. See:
http://search.cpan.org/~chm/PDL-2.007/Basic/Pod/Course.pod
CC-MAIN-2013-48
refinedweb
2,193
63.8
You want to find new gems to install on your system, or see which gems you already have installed. From the command line, use gem's query command: $ gem query *** LOCAL GEMS *** sources (0.0.1) This package provides download sources for remote gem installation $ gem query --remote *** REMOTE GEMS *** actionmailer (1.1.1, 1.0.1, 1.0.0, 0.9.1, 0.9.0, 0.8.1, …) Service layer for easy email delivery and testing. actionpack (1.10.1, 1.9.1, 1.9.0, 1.8.1, 1.8.0, 1.7.0, …) Web-flow and rendering framework putting the VC in MVC. [… Much more output omitted ….] From Ruby code, use Gem::cache to query your locally installed gems, and Gem::RemoteInstaller#search to query the gems on some other site. Gem::cache can be treated as an Enumerable full of tasty Gem::Specification objects. Gem::Remote-Installer#search returns an Array containing an Array of Gem::Specification objects for every remote source it searched. Usually there will only be one remote sourcethe main gem repository on rubyforge.org. This Ruby code iterates over the locally installed gems: require 'rubygems' Gem::cache.each do |name, gem| puts %{"#{gem.name}" gem version #{gem.version} is installed.} end # "sources" gem version 0.0.1 is installed The format_gems method defined below gives a convenient way of looking at a large set of Gem::Specification objects. It groups the gems by name and version, then prints a formatted list: require 'rubygems/remote_installer' require 'yaml' def format_gems(gems) gem_versions = gems.inject({}) { |h, gem| (h[gem.name] ||= []) << gem; h} gem_versions.keys.sort.each do |name| versions = gem_versions[name].collect { |gem| gem.version.to_s } puts "#{name} is available in these versions: #{versions.join(', ')}" end end Here it is being run on the gems available from RubyForge: format_gems(Gem::RemoteInstaller.new.search(/.*/).flatten) # Asami is available in these versions: 0.04 # Bangkok is available in these versions: 0.1.0 # Bloglines4R is available in these versions: 0.1.0 # BlueCloth is available in these versions: 0.0.2, 0.0.3, 0.0.4, 1.0.0 # … Not only are Ruby gems a convenient packaging mechanism, they're an excellent way to find out about new pieces of Ruby code. The gem repository at rubyforge.org is the canonical location for Ruby libraries, so you've got one place to find new code. You can query the gems library for gems whose names match a certain regular expression: $ gem query --remote --name-matches "test" ** REMOTE GEMS *** lazytest (0.1.0) Testing and benchmarking for lazy people test-unit-mock (0.30) Test::Unit::Mock is a class for conveniently building mock objects in Test::Unit test cases. testunitxml (0.1.4, 0.1.3) Unit test suite for XML documents ZenTest (3.1.0, 3.0.0) == FEATURES/PROBLEMS Or, from Ruby code: format_ gems(Gem::RemoteInstaller.new.search(/test/i).flatten) # ZenTest is available in these versions: 3.0.0, 3.1.0 # lazytest is available in these versions: 0.1.0 # test-unit-mock is available in these versions: 0.30 # testunitxml is available in these versions: 0.1.3, 0.1.4 This method finds gems that are newer than a certain date. It has to keep around both a Date and a Time object for comparisons, because RubyForge stores some gems' dates as Date objects, some as Time objects, and some as string representations of dates.[1] [1] This is because of differences in the underlying gem specification files. Different people build their gemspecs in different ways. require 'date' def gems_newer_than(date, query=/.*/) time = Time.local(date.year, date.month, date.day, 0, 0, 0) gems = Gem::RemoteInstaller.new.search(query).flatten gems.reject do |gem| gem_date = gem.date gem_date = DateTime.parse(gem_date) if gem_date.respond_to? :to_str gem_date < (gem_date.is_a?(Date) ? date : time) end end todays_gems = gems_newer_than(Date.today-1) todays_gems.size #=> 7 format_gems(todays_gems) # filament is available in these versions: 0.3.0 # mechanize is available in these versions: 0.4.1 # mongrel is available in these versions: 0.3.12.1, 0.3.12.1 # rake is available in these versions: 0.7.1 # rspec is available in these versions: 0.5.0 # tzinfo is available in these versions: 0.2.0 By default, remote queries look only at the main gem repository on rubyforge.org: Gem::RemoteInstaller.new.sources # => [""] To query a gem repository other than rubyforge.org, pass in the URL to the repository as the --source argument from the command line. This code starts a gem server on the local machine (it can serve all of your installed gems to other machines), and queries it: $ gem_server & $ gem query --remote --source # *** REMOTE GEMS *** # Updating Gem source index for: # sources (0.0.1) # This package provides download sources for remote gem installation From Ruby code, modify the Gem.sources variable to retrieve gems from another source: Gem.sources.replace(['']) format_ gems(Gem::RemoteInstaller.new.search(/.*/).flatten) # sources is available in these versions: 0.0.1 Recipe 18.7, "Distributing Your Gems," for more on hosting your own gem repository The Ruby Application Archive is a companion to rubyforge.org: rather than hosting Ruby projects, it links to Ruby packages hosted all around the Web; you're more likely to see projects on the RAA that aren't packaged as gems (see Recipe 18.8 for tips on installing
http://codeidol.com/community/ruby/finding-libraries-by-querying-gem-respositories/24308/
CC-MAIN-2018-26
refinedweb
901
60.72
From: Terje Slettebø (tslettebo_at_[hidden]) Date: 2002-05-24 23:04:07 >From: "Neal D. Becker" <nbecker_at_[hidden]> > I was surprised to find that lexical_cast<bool> only accepts ascii > numbers. I think it should also accept "true/false". iostream can be > set to output bool as "true/false". Good point. The reason it doesn't accept "true/false", is that it uses a default-constructed stringstream, and with such a stream the ios_base::boolalpha flag is not set, so reading/writing bool uses 0 and 1, rather than true/false (or some other locale-dependent names). To get around this, you need to be able to set the state of the stringstream used to perform the conversion. That's possible in the lexical_cast version I've uploaded in the Boost files section (lexical_cast_proposition). Note, however, that due to implicit conversion from char * to bool, this doesn't work in that version. In fact, I've found now that much of the conversions doesn't work, now, because of the implicit conversions. The reason this wasn't detected in the unit test, was that the test used to convert back and forth, and compare if you got the same result. In other words, it didn't check the result of the conversion, directly. I've now changed the unit test, to test the result of the conversion. I'll upload new versions of lexical_cast and the test, soon, and I'll post a note about it when I do. Currently, to avoid changing the interface of lexical_cast, configuring the stringstream object is done using a static stringstream object in the lexical_cast implementation. However, this is not thread-safe, so I'm working on a new version where you can supply the stringstream object as an optional argument to lexical_cast. Either way will be possible, to get feedback. So, in order to configure the stream used for the conversion, in the proposed version, this may either be perfomed without changing the interface, using a static object, which is not thread-safe, or allow change in the interface, to add a parameter, and get a thread safe-stream configuration. To solve what you say, here, one may use either of the following ways: Using static stringstream object (not thread-safe): --- Start --- #define BOOST_LEXICAL_CAST_STREAM // To enable stream configuration, using static stringstream #include <iostream> #include <iomanip> #include "lexical_cast.hpp" int main() { std::cout << boost::lexical_cast<bool>("1") << '\n'; // Prints "1" std::cout << boost::lexical_cast<bool>("0") << '\n'; // Prints "0" boost::lexical_cast_stream<bool,char *>::stream() << std::boolalpha; boost::lexical_cast_stream<bool,char *>::stream() >> std::boolalpha; std::cout << boost::lexical_cast<bool>("true") << '\n'; // Prints "1" std::cout << boost::lexical_cast<bool>("false") << '\n'; // Prints "0" std::cout << boost::lexical_cast<std::string>(true) << '\n'; // Prints "true" std::cout << boost::lexical_cast<std::string>(false) << '\n'; // Prints "false" } The names used for true/false also depends on the locale, which may be changed, as well. --- End --- Alternative way, using optional stream parameter (thread-safe): --- Start --- #include <iostream> #include <iomanip> #include "lexical_cast.hpp" int main() { std::cout << boost::lexical_cast<bool>("1") << '\n'; // Prints "1" std::cout << boost::lexical_cast<bool>("0") << '\n'; // Prints "0" boost::lexical_cast_stream<bool,char *>::stream_type stream; stream << std::boolalpha; stream >> std::boolalpha; std::cout << boost::lexical_cast<bool>("true",stream) << '\n'; // Prints "1" std::cout << boost::lexical_cast<bool>("false",stream) << '\n'; // Prints "0" std::cout << boost::lexical_cast<std::string>(true,stream) << '\n'; // Prints "true" std::cout << boost::lexical_cast<std::string>(false,stream) << '\n'; // Prints "false" } --- End --- The names uses the locale here, as well. Using such stream configuration, you can configure the stream in any way, such as setting precision, number base (dec, hex, oct), field width, locale, etc. What is people's opinion on such configuration, and how it's done, here? Any suggestion for alternative ways? It appears to in order to get a thread-safe version, the stream parameter has to be supplied. However, this changes the interface, if that functionality is to be used. Note: The second version isn't made, yet. A version with both possibilities will be made available, soon. As usual, any comments are welcome. Regards, Terje Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk
https://lists.boost.org/Archives/boost/2002/05/30074.php
CC-MAIN-2019-43
refinedweb
705
53.31
# A Quick Guide To Angular Pipes Impressive web development is the result of a successful synergy of robust back-end and an appealing front-end. Usually, the back-end is thought to be the ‘brains’ of a webpage and the front-end is merely the shiny exterior. However, with the right front-end development framework, powerful computations can happen directly on the front-end as well. Angular happens to be one of such impressive front-end development frameworks. Through its templates, Angular offers the opportunity for data to be processed and formatted in a certain way right there in the HTML code. This is made possible through functions with easy-to-understand syntax and usage, and they are called **pipes**. This article will serve as a quick guide to tell you all the meaty stuff to know about pipes and how to effectively use them. Pipes come in various types and can significantly simplify data collection and processing in use cases where the front-end is the main gateway of obtaining the data. The article will also discuss how pipes are tested during the unit testing of Angular applications (which is not as difficult as it may seem for some). #### The Ins And Outs Of Angular Pipes Before moving on to discussing Angular pipes, it is imperative to understand what Angular components and templates are. Pipes are present in the template part of the component, making it necessary to understand the former to grasp the utility of the latter. Angular applications are fundamentally made up of units called **components**. Each component is centered around a certain functionality or visual aspect of the application. These components are self-contained and consist of both its working logic along with instructions about its visual rendering. The latter is stored in what are called **templates**. Templates are simply HTML code that can be in the form of a separate file or inline code within the *@Component* decorator (which is written in TypeScript). An example of an Angular component can be seen below. ``` import { Component, OnInit } from '@angular/core'; @Component({ selector: 'ang_app_example', templateUrl: './component.ang_example.html', styleUrls: ['./component.ang_example.css'] }) export class ExampleAngApp implements OnInit { constructor() { } } ``` Here, the **template URL** is storing the relative path to a separate HTML file stored in the respective directory. Usually, the functionality of the template is to mainly describe the visual layout of the component and show any data that is required. However, in cases like template-driven forms, the data that the back-end has to work with is mainly received through the front-end. Examples of these include a form taking in the personal details of a customer or information about a shipping order. The data received in such cases is mainly in the form of strings and instead of passing them as is to the back-end, pipes help us format them beforehand. Pipes result in significant simplification of back-end logic and a smoother application, as in the above scenario. Oftentimes, data needs to be formatted in a particular way before being displayed. Once again, pipes come to the rescue here and avoid unnecessarily long code. One thing to note here is that pipes do not change the value of the variable, rather just formats it and inputs it as directed. #### Using All The Different Kinds Of Angular Pipes Pipes are used in the HTML code through the pipe operator ( | ). On one end of the operator, the variable whose value is to be formatted is placed and the particular formatting function(s) on the other hand. There can be multiple such functions, as we shall see in a bit. Given below is a short example of a simple pipe in action. ``` Today's date is {{todayDate | date}} ``` Here the date function is being used to simply format the value of **todayDate** into a regular date format. A specific format can be further specified, as in the example below. Through the **fullDate**, we also get the day today along with the full date. ``` Today's date is {{today | date:'fullDate'}} ``` One of the most interesting aspects of pipes is that they can be chained so that the data can undergo multiple formattings. In the following example, we obtain the date all in uppercase. Something similar is possible for formatting it into lowercase or even titlecase. ``` The hero's birthday is {{ birthday | date | uppercase}} ``` Various kinds of pipes exist, such as date, currency, decimal, JSON, and percentage, to name a few. However, the need to construct custom formatting can always arise in the rapidly expanding world of web development. That can be catered to through coding a particular pipe as required. Creating one’s own pipes is highly encouraged as it promotes easier-to-understand code and reusability of functionality throughout the code. Given below is an example of coding a custom pipe that raises a value to the exponent of some power given as well. ``` import { Pipe, PipeTransform } from '@angular/core'; @Pipe({name: 'raiseExponential'}) export class raiseExponentialPipe implements PipeTransform { transform(value: number, exponent = 1): number { return Math.pow(value, exponent); } } ``` This pipe can now be used for a value in the following manner. ``` Two to the exponent 10 is: {{2 | raiseExponential: 10}} ``` Pipes are mainly of two types: 1. Pipes that first check if the data is bound to a certain variable has changed with any kind of event and then run to update the value. These are called **pure** pipes. 2. Pipes run every time there is an event. These are called **impure** pipes. As anyone can tell, it is better to strive towards creating pure pipes as the other kind can have a significant effect on the performance of the application. Impure pipes can prove expensive especially when used in chaining. #### Testing Angular Pipes Once an Angular application is complete, its unit testing is essential to further polish it and improve in any way necessary. If the said Angular application implements pipes for its purposes, then they are to be tested too. In particular, the pipes are tested to see if the formatting is working as intended and is handling corner cases as well. As pipes are straightforward functions that take in an input and throw out an output, testing pipes is really easy. Simply, they are provided with all kinds of boundary values to test if the *transform()* function is handling all kinds of parameters well and is giving intended values. #### Conclusion We saw how pipes can be used in our Angular applications to further improve its performance and do something as mundane as data formatting right there in the front-end. The article showed you all the different ways you could use pipes, alone and in chains, and the different kinds of pipes there are. To find out the full list of pipes provided by Angular itself, one can check out their pipes API [documentation](https://angular.io/api/common#pipes). We saw that testing the pipes is fairly easy and mainly focuses on the *transform()* function that the pipe implementation uses at the back-end. We discussed pure and impure pipes and also learned why the former is encouraged while the latter is discouraged.
https://habr.com/ru/post/561156/
null
null
1,193
52.29
Closed Bug 1501269 Opened 11 months ago Closed 11 months ago Instruction caches aren't flushed on arm64 Windows Categories (Core :: JavaScript Engine: JIT, enhancement, P1) Tracking () mozilla65 People (Reporter: dmajor, Assigned: dmajor) References (Blocks 1 open bug) Details Attachments (1 file) vixl::CPU::EnsureIAndDCacheCoherency is not implemented on arm64 Windows: the code is behind `#ifdef __aarch64__` which isn't defined (instead Windows uses `_M_ARM64`). And we can't simply change the ifdef because the Windows build wouldn't understand the inline asm anyway. This leads to super-perplexing crashes where the CPU executes a garbage instruction from a stale cache, but by the time the debugger breaks in to complain about it, the caches have been updated and the code seems totally fine. Thanks to lth for helping to track this down. Instead of commenting/assuming we're running on the simulator, it would have been nice if they had asserted that :) // If the host isn't AArch64, we must be using the simulator, so this function // doesn't have to do anything. USE(address, length); Also there's a similar #ifdef in CPU::GetCacheType? > Also there's a similar #ifdef in CPU::GetCacheType? Yeah, but as far as I can tell, it's (currently) only setting up the cache line size to be used by EnsureIAndDCacheCoherency. In my local builds I got around this by using the Windows API FlushInstructionCache in EnsureIAndDCacheCoherency if _M_ARM64 is defined. Are we allowed to land changes in our copy of the vixl code? Or would it be better to do this at the callsite at ? I'm going to be re-importing VIXL soon, due to ARMv8.3 updates. So it's likely that changes will get clobbered. In general, updating VIXL on our side is not safe, because it's not easy to recover the diff to VIXL trunk. Usually what we've done is make "Moz" versions of the VIXL files. So for example, instead of changing VIXL simulator code, we have `js/src/jit/arm64/vixl/MozSimulator-vixl.cpp`, which is just `js/src/jit/arm64/vixl/Simulator-vixl.cpp` with a "Moz" prefix. Then instead of using the VIXL version, we use the "Moz" version. In this case it's probably a bad idea to keep around a version of cacheFlush() that doesn't actually flush the cache on some systems. What I would suggest is to delete the current implementation and re-implement cacheFlush() in a "Moz" file, within the exact same namespace, such that if I re-imported VIXL without modification, the build would fail due to conflicting symbols. Flags: needinfo?(sstangl) It might be worth noting that VIXL upstream is, but they don't have an issue tracker as far as I can tell. Jacob Bramley has historically been receptive to this kind of thing -- it would be good to report the issue to him, at jacob.bramley@arm.com. Priority: -- → P1 Assignee: nobody → dmajor Pushed by dmajor@mozilla.com: Make EnsureIAndDCacheCoherency work on aarch64-windows. r=sstangl Status: NEW → RESOLVED Closed: 11 months ago status-firefox65: --- → fixed Resolution: --- → FIXED Target Milestone: --- → mozilla65
https://bugzilla.mozilla.org/show_bug.cgi?id=1501269
CC-MAIN-2019-39
refinedweb
518
61.67
In this section, you will learn how to write numeric data into the binary file. Numeric data converts compactly and faster in a binary format than the text. In the given example, at first, we have created two arrays, integer and double type. Then we have opened the FileOutputStream and specify the file to create. This stream is then wrapped with an instance of DataOutputStream which contains several useful methods for writing primitive data into the file. Here is the code: import java.io.*; public class JavaFileBinary { public static void main(String arg[]) throws Exception { int[] arr1 = { 1, 2, 3, 4, 5 }; double[] arr2 = { 1.5, 2.5, 3.5, 4.5, 5.5 }; File file = new File("C:/student.dat"); FileOutputStream fos = new FileOutputStream(file); DataOutputStream dos = new DataOutputStream(fos); for (int i = 0; i < arr1.length; i++) { dos.writeInt(arr1[i]); dos.writeDouble(arr2[i]); } dos.close(); } } In the above code, the methods writeInt (int i) and the writeDouble (double d) of class DataOutputStream methods provides the way to write the data to the file.
http://www.roseindia.net/tutorial/java/core/files/javafilebinary.html
CC-MAIN-2014-52
refinedweb
177
65.42
>>>>> "Camm" == Camm Maguire <address@hidden> writes: Camm> OK, I've just checked in an implementation which returns the pair as a Camm> *cons*. This probably isn't right, but either a list wrapper could be Camm> written in arraylib.lsp, or someone could kindly explain to me what Camm> *lisp object* the answer would form. It is probably simpler to do Camm> this at the C level right to begin with. A cons is definitely wrong. I see 2 ways to do this. Return a cons, but don't call the function array-displacement. Then have the Lisp function array-displacement call this internal function have have it return (values array offset). Alternatively, look at how ceiling or floor is implemented and do what it does to get the desired return values. And call this function array-displacement, which should probably be in the LISP or COMMON-LISP package. Thanks for fixing this so quickly!!!!! Ray
http://lists.gnu.org/archive/html/gcl-devel/2002-05/msg00029.html
CC-MAIN-2014-15
refinedweb
156
66.33
If you're looking for Windows 2000 information, you've come to the right place. In addition to a comprehensive white paper, revised in November, TechRepublic has built a collection of 20 essential Windows 2000 links for IT pros. Windows 2000. It’s on store shelves, and the first service pack has already been announced. Your firm is probably setting up a few Win2K test machines, as a result. Maybe you’re even deploying it on your live network. As with any new operating system, you may experience trouble with hardware and driver compatibility. You might have questions about minimum system requirements. Windows 2000 also includes many new tools and utilities that will change the manner in which systems are deployed and networks are administered. Thus, don’t be surprised if you have questions about the best methods for designing your namespace and Active Directory structure, too. TechRepublic drafted a white paper describing many of the new operating system’s new features and benefits, as well as addressing a number of issues you need to be familiar with. But we know one document can’t answer all the questions you have. (You’d need a wheelbarrow to cart it around!) So we’ve built a collection of the top 20 essential Windows 2000 links that no administrator, support technician, or systems engineer should be without. Best of all, it’s free. Follow this link to download our "Essential Windows 2000 links for IT pros." If we missed an essential site, let us know. We’ll check out all the sites you recommend and update the document with the valuable Web resources you provide. Send your suggestions here .
https://www.techrepublic.com/article/download-our-collection-of-essential-win2k-links/
CC-MAIN-2020-45
refinedweb
277
64.91
mailto Simple Dart package for creating mailto links in your Flutter and Dart apps The mailto package helps you build mailto links and provides you with an idiomatic Dart interface that: - supports one or many to, cc, and bccfields - supports custom body and subject for the emails - encodes every value for your correctly - is blazingly fast ⚡️😜 Important links - Read the source code and star the repo! - Check package info on pub.flutter-io.cn - Open an issue - Read the docs - This Dart package is created by the SMAHO development team Usage You may want to launch the email client on your user's phone with certain fields pre-filled. For Flutter apps, it's recommended to use the url_launcher package for launching the links you create with the mailto package. import 'package:mailto/mailto.dart'; // For Flutter applications, you'll most likely want to use // the url_launcher package. import 'package:url_launcher/url_launcher.dart'; // ...somewhere in your Flutter app... launchMailto() async { final mailtoLink = Mailto( to: ['to@example.com'], cc: ['cc1@example.com', 'cc2@example.com'], subject: 'mailto example subject', body: 'mailto example body', ); // Convert the Mailto instance into a string. // Use either Dart's string interpolation // or the toString() method. await launch('$mailtoLink'); } Validation The package provides a simple validation function. You could use this function in an assert to catch issues in development mode. The package doesn't validate automatically, so either use the validation function or make sure that the parameters you use are correct. Mailto.validateParameters( // New lines are NOT supported in subject lines subject: 'new lines in subject \n FTW', // What does this even mean? cc: ['\n\n\n', ''], ); Known limitations of mailto URIs I tested the package manually in Flutter apps on iOS and Android (Gmail, FastMail, Yahoo email client), and in the browser on macOS, and the package has an extensive test suite that incorporates many examples from the RFC 6068 - The 'mailto' URI Scheme document. Unfortunately, each client handle mailto links differently: Gmail does not add line-breaks in the message body, FastMail skips the bcc, Yahoo is not able to handle encoded values in subject and body, and these are only the three clients I tested. The iOS email client seems to handle everything well, so 🎸🤘🎉. The package might also not work if the resulting mailto links are extremely long. I don't know the exact character count where the links fail, but I'd try to keep things under 1000 characters. Important: Make sure you understand these limitations before you decide to incorporate mailto links in your app: letting users open their email clients with pre-filled values is a quick and easy way to let your users get in touch with you with extremely little development effort. At the same time, you need to keep in mind that it's very unlikely that these links are going to work consistently for all of your users. If you need something bullet-proof, this package is not the right tool for solving your problem, so please consider alternative solutions (e.g. Flutter forms and a working backend). In case you find potential improvements to the package, please create a pull request or let's discuss it in an issue. I might not merge all pull requests, especially changes that improve things for one client, but makes it worse for others. We consider the iOS mail app and Gmail on Android the two most important mail clients. Examples You'll find runnable, great examples on the project's GitHub repository in the /example folder. Flutter example app - Clone the repository - Change directory to cd example/flutter flutter runand wait for the app to start - You can fill out the forms with your own input or click the "Surprise me" button to see how your mail client handles tricky input HTTP server serving an HTML web page with a mailto link The mailto package works in any Dart program: be it Flutter, AngularDart, or on the server. import 'dart:io'; import 'package:mailto/mailto.dart'; Future<void> main() async { final mailto = Mailto( to: [ 'example@example.com', 'ejemplo@ejemplo.com', ], cc: [ 'percentage%100@example.com', 'QuestionMark?address@example.com', ], bcc: [ 'Mike&family@example.org', ], subject: 'Let\'s drink a "café"! ☕️ 2+2=4 #coffeeAndMath', body: 'Hello this if the first line!\n\nNew line with some special characters őúóüűáéèßáñ\nEmoji: 🤪💙👍', ); final server = await HttpServer.bind(InternetAddress.loopbackIPv4, 3000); String renderHtml(Mailto mailto) => '''<html><head><title>mailto example</title></head><body><a href="$mailto">Open mail client</a></body></html>'''; await for (HttpRequest request in server) { request.response ..statusCode = HttpStatus.ok ..headers.contentType = ContentType.html ..write(renderHtml(mailto)); await request.response.close(); } } - Clone the repository - Change directory to cd example/http_server - Start HTTP server dart main.dart - Open your browser and visit localhost:3000 - Click on the link - If you have an email client installed on your computer, this client will be opened when you click the link on the HTML page. Screenshots
https://pub.flutter-io.cn/documentation/mailto/latest/
CC-MAIN-2022-05
refinedweb
826
52.29
On Tue, May 28, 2013 at 8:23 AM, Ian Lynagh <ian at well-typed.com> wrote: > > Dear Haskellers, > > I have made a wiki page describing a new proposal, > NoImplicitPreludeImport, which I intend to propose for Haskell 2014: > > > > What do you think? -1 for me. Breaking every single Haskell module for some namespace reorganization doesn't seem worth it. I don't think alternative Prelused (one of the justifications) is a good idea to begin with, as programmers will have to first understand which particular version of e.g. map this module uses, instead of knowing it's the same one as every other module uses. Changes like this will likely cause years worth of pain e.g. see the Python 2/Python 3 failure. The likely practical result of this is that every module will now read: module M where #if MIN_VERSION_base(x,y,z) import Prelude #else import Data.Num import Control.Monad ... #endif for the next 3 years or so. -- Johan -------------- next part -------------- An HTML attachment was scrubbed... URL: <>
http://www.haskell.org/pipermail/haskell-prime/2013-May/003850.html
CC-MAIN-2014-35
refinedweb
172
66.54
I have been busy the last day and I had a stack of Todoist related emails to answer. In Gmail I don't have the option to see all the unanswered emails. But, no problem, it took me about 3 minutes to write a script that does that :) It's amazingly simple to script Gmail, and one could do all kind of analytics. You'll only need Python and libgmail. Here is the code that will extract all the unanswered emails according to a query and print a link to them. With some pipe loving you can pipe the output, view it in a browser and answer those emails fast. import libgmail ga = libgmail.GmailAccount("<USER>@gmail.com", "<PASSWORD>") ga.login() messages = ga.getMessagesByQuery('label:todoist', True) link = '<a href="\ ?fs=1&tf=1&source=atom&view=cv&search=all\ &th=%(id)s&shva=1">%(subject)s</a>' for thread in messages: if len(thread) == 1: d = {'id': thread.id, 'subject': thread.subject} print '<p>%s</p>' % (link % d) Run this script by doing this: python answer_todoist_emails.py > emails_to_answer.html Open emails_to_answer.html in a browser: Clicking on a link will open up Gmail light (i.e. only the current thread): If you liked this hack, you may like the others:
http://amix.dk/blog/viewEntry/19105
CC-MAIN-2014-15
refinedweb
211
77.33
Archive for August, 2004|Monthly archive page The Delegate Class – Use It! Just used Flash’s new Delegate Class this morning. I know some about Java, but I just recently finished a fairly complicated web site (ASP.Net / C#) so I’ve been in the mindset of creating a component, say a combo named “cboCustomer” and “cboCategory” and creating it’s event handlers as public void cboCustomer_OnSelectedIndexChanged(EventArgs e){…} and public void cboCategory_OnSelectedIndexChanged(EventArgs e){…} In the past with Flash you would have to receive the event with a listener and then examine the EventObject.target to see which element was clicked. Scope also got a bit funky here as well depending on how you assign things. Using the Delegate class in Flash, I can create my combos “cboCustomer”, “cboCategory” and their event handlers just like in C#: public function cboCustomer_onChange(e:Object):Void {…} and public function cboCategory_onChange(e:Object):Void {…} Now, when I use addEventListener, I use the Delegate class as the subject of the event: cboCustomer.addEventListener(”change”, Delegate.create(this, cboCustomer_onChange)); and cboCategory.addEventListener(”change”, Delegate.create(this, cgoCategory_onChange); Now the Delegate will automatically send the event to the proper handler depending on which control was clicked! BTW the scope will be in the surrounding class, not in the component. Cool! I’m Firing My Web Host, Twice I’ve been using UplinkEarth for a couple of years now. They have everything I need and seem to be reasonable in price. I don’t check out my site too often, but it seem that lately when I do it’s down, or my email is down. And they seem to want to charge me for things like ColdFusion MX ($4.95/domain/month), SQL Server ($12/month). My total is ending up around $50/month, which I think is too much. There are many out there – what I wanted was ASP.NET support with ColdFusion MX (incl. Flash Remoting). There’s a certain Canadian host that seems to be popular with many of the higher profile Flash folks out there. The info on the site was a bit sparse, but it was CA$12.50/month and seemed to have what I was looking for. While things like subdomain and database setup worked fine, I was having trouble getting Flash Remoting, MovableType, ftp accounts, email client connections going. Web mail existed, but not via mail.mydomain.com – it has to be done via the (rather outdated) control panel or with an obscure ip + path. While one of these issues took a day, most others took several (email issues have not been resolved). As of Saturday night I switched to CrystalTech. CF hosting only – I need Flash Remoting support, but I also need to have ASP.NET so I guess I’ll open up a separate account when I need it. That kind of sucks, but they have a 30 day guarantee so if necessary I can move elsewhere (HostMySite?). Sunday morning within about an hour I have my weblog up and running. I can get my mail easily with their web client. My mail client works fine now. Multiple ftp accounts are not a problem. I feel bad that I’m going to have to dump the Canadian company, bad enough that I’m not using their name here, they are very nice and extremely hands on, but I think that their forte probably lies in Unix servers, not Windows servers. I don’t think I should have to submit a support ticket and wait for days to have basic functionality for a web domain. AS2 Remoting Class Install Incomplete? I decided to start messing with the new AS2 Remoting classes today, so I downloaded and ran the install from the Macromedia site. I started to code in my usual style. I created a preload movie clip and dropped it on the stage at frame 10. I dropped the Remoting and RemotingDebug classes, the “main” movieclip described below, as well as a few other components into the preload clip. I added the usual preload code here. I created a movieclip called main, set the linkage to a class called main.as and dropped it on the stage at frame 20. Within my main class I have this: import mx.core.UIObject; import mx.controls.ComboBox; import mx.remoting.Service; class main extends UIObject { var CapsService:Service; var cboCats:ComboBox; function main() { } } This yields a class not found error for mx.remoting.Service. A look in the mx/remoting/Service directory shows no files! A search of the groups on Google led to a link to download the as classes for AS2 Remoting. After copying these files over everything works fine. Is the install really incomplete? Did I need to drop the remoting classes onto my “main” movieclip rather than on the _root? Of Salad and Service (and Meat) So I call Joyce on the way home yesterday and she says the wants to celebrate the end of one of her projects by going to Fogo de Chao. Pretty strange – she really is not much of a carnivore but she said she was paying so how can I complain? We’ve been there several times and compared to other Churrascaria’s we’ve been to, they are without a doubt the best. (I can’t include the ones in Brasil – my first time I was so overwhelmed, I hardly remember the experience – or was it the Caipirinhas?) First off, the place ain’t cheap. Joyce had the salad bar only and that was $20. The full deal is $43. With drinks and no desert the bill came to just over $100. Neither of us even really ate that much. I mean I got pretty full, but not stuffed. What make this place worth all that money is the service. These people are on top of it. They listen to every comment that comes from your table without you knowing it. For example, they give you sides of cooked bananas, mashed potatoes and polenta. Somehow as we started our meal we didn’t receive these. Joyce mentioned to me that she thought we should have our sides by now, and BOOM. There they were. One of the waitresses heard Joyce’s comment and rushed to get us the sides. Once my Mom mentioned that she always liked mint jelly with her lamb. BOOM. There’s the mint jelly. It’s just fun to watch the staff work the room. Nothing is ever lacking, even when there are at least 200 people in the room. Stuff your wallet with cash and go there.. An Incredible IDE Several years ago, I was involved pretty heavily with Visual Basic and ASP. I used MS Visual Studio Pro for VB, but I always used Homesite for ASP stuff. After putting it off for a couple of years I finally decided to jump into ASP.NET to create a database driven shopping cart site. I upgraded my Visual Studio license to the 2003 version and I was on my way. I must say that developing with this IDE is a dream. The code hinting is amazing, even showing the properties, methods, etc of my own custom classes. If only the Flash IDE could approach this! My only complaint is that the DataGrid component does not support (as far as I can tell) hierarchical/relational data.. Gerling Tour Pics Rockin’ Aussies Gerling have wrapped up their first US tour. There are some genuinely hilarious pictures on their tour blog at.
http://darbymedia.wordpress.com/2004/08/
crawl-002
refinedweb
1,255
74.39
display combination of a stacked area chart and line chart in one iframe using jfree - JSP-Servlet display combination of a stacked area chart and line chart in one iframe using jfree hello i have a problem related to jfree chart, i want.../chartgraphs/stacked-bar-chart.shtml Jfree chart problem - Swing AWT Jfree chart problem hello i have a problem related to jfree chart i have some data and i want to display data in two different chart stacked... of stacked areachart and line chart in one frame. I want to display hybrid graph jfree chart jfree chart i need donut chart using jfree chart tutorial - Java3D chart tutorial Hi I need a JFree Chart class library in order to design a chart with java Hi friend, For JFree Chart class library... information,Tutorials and Examples on JFree Chart visit to : JFREE error JFREE error hi......... the code for making chart is: WHICH..."); JFreeChart chart = ChartFactory.createBarChart ("BarChart using JFreeChart...(Color.red); ChartFrame frame1=new ChartFrame("Bar Chart",chart jfree - Java Beginners (300,300); } } For more information,Examples and Tutorials on jfree chart...jfree how use the "import jfree" on jdk1.5.0_6,,? or how to plot... xyDataset = new XYSeriesCollection(series); JFreeChart chart Jfree - Java Beginners on jfree chart visit to : Thanks...(20)); pieDataset.setValue("Six", new Integer(10)); JFreeChart chart = ChartFactory.createPieChart ("Pie Chart using JFreeChart", pieDataset, true,true JFREE chart - Java Beginners JFREE chart how can i get the latest save image of my action class.....thanks,i want my chart to display dynamically from my database Hi... database on your chart AreaChart Control in Flex4 AreaChart control in Flex4: The AreaChart Control is a MX Component. There is no Spark component. The AreaChart Control represents an area bounded by a line connecting the data values. You can provide the data to the chart by using chart library - Java3D chart library hi Where can i download jfreechart-1.0.4-demo.jar and jcommon-1.08.jar files Hi friend, For download jfreechart-1.0.4-demo.jar and jcommon-1.08.jar files visit JFree - Java Beginners JFree how to import JFree to jdk1.6.0_05, not to new version,, or how to get java new version (that used JFree ) ? regads Hi friend, For solving the problem visit to : Jfree exception Jfree exception import java.sql.*; import org.jfree.chart.... org.jfree.data.xy.*; import org.jfree.data.*; public class Chart{ public static... = new XYSeriesCollection(series); JFreeChart chart jfree missing import file jfree missing import file hi....... i have checked the jar file of jfree that import file of RECTANGLEINSETS is not there then what to do now? how.... This jar contains the required class file JFREE error again JFREE error again hi......... As i had asked u the jfree error i want to tel u that i have taken the both the jar files jfree and jcommon........................ Check whether the jar files consists of class RectangleIntsets java line chart java line chart Hi, I want to draw a graphic in java line chart and ? searched the documents ?n the web. I found the example codes ?n your site () and tr?ed ?n my Draw Statistical chart in jsp Draw Statistical chart in jsp  ... chart in jsp by getting values from database.. To draw a bar chart, we have used JFreeChart Library. JFreeChart is a chart library used to generate different jfree - Java Beginners jfree how use the "import jfree" on jdk1.5.0_6,, or how to plot data in xy line on jdk1.5.0_6... and tomcat as my server. I have also tried it by adding jfreechart jar file jar file jar file how to create a jar file in java jar file jar file steps to create jar file with example jar file jar file jar file where it s used pie chart Bar Chart flow chart coding for chart draw chart in web application draw chart in web application how to draw bar chat from the record store in database? i.e. draw the bar chart according to selected record Doubt regarding charts and jsp the bar chart in normal java application. But I want the Bar Chart to be executed... java application output to an jsp page? thanks in advance Put the jar... the following links: surface chart - Java3D surface chart i have to make a surface chart of a piece of land with data given for each point in the xy plane....the chart should be such that the areas with different data range should show up in different colour. seriously Running Jar file in Windows Running Jar file in Windows Running Jar file in Windows Extract Jar File Extract Jar File How to extract jar file? Hi Please open the command Prompt and to the jar file and write the command jar -xvf JaraFileName.jar XYArea Chart XYArea Chart  ... a XYArea Chart. Description of Program For creating a XYArea Chart we.... Then we add the data in this object that will show in our XYArea chart. After org.apache.commons.collections15.Transformer jar file org.apache.commons.collections15.Transformer jar file Dear, Please can you provide me the link for the following jar file: import org.apache.commons.collections15.Transformer; tahnks too much Jfreechart zoomin and zoomout - Framework Jfreechart zoomin and zoomout how to zoomin and zoom out chart using button plus and minus or slide bar in jFree chart pom.xml local jar pom.xml local jar Hi, I have placed one jar file in the WEB-INF/lib folder now I wan't to use this jar in the maven build and test phases. How to use this jar file? Thanks jar file with html jar file with html I have a jar file. On double click it shows an applet page. Please tell me how to connect that applet into html or jsp page Adding Jar into Eclipse Adding Jar into Eclipse Hi, Please provide Step by step procedure to add jar, tld files and configurations in Eclipse Helios version and i am using Jboss5. Thanks&Regards, Shiva s Java FTP jar Java FTP jar Which Java FTP jar should be used in Java program for uploading files on FTP server? Thanks Hi, You should use commons-net-3.2.jar in your java project. Read more at FTP File Upload in Java File path for jar file File path for jar file Hi Experts, I have created one eclipse... jar file of that application, unfortunately it is giving the error that resource... handle the paths given to program in jar files
http://www.roseindia.net/tutorialhelp/comment/95199
CC-MAIN-2014-49
refinedweb
1,096
73.47
Often,. We can represent a shape with a matrix like the following: where each pair (xi,yi) is a "landmark" point of the shape and we can transform every generic point (x,y) using this function: In this transformation we have that θ is a rotation angle, tx and ty are the translation along the x and the y axis respectively, while s is a scaling coefficient. Applying this transformation to every point of the shape described by X we get a new shape which is a transformation of the original one according to the parameters used in T. Given a matrix as defined above, the following Python function is able to apply the transformation to every point of the shape represented by the matrix: import numpy as np import pylab as pl from scipy.optimize import fmin def transform(X,theta,tx=0,ty=0,s=1):""" Performs scaling, rotation and translation on the set of points in the matrix X Input: X, points (each row have to be a point [x, y]) theta, rotation angle (in radiants) tx, translation along x ty, translation along y s, scaling coefficient Return: Y, transformed set of points """ a = math.cos(theta) b = math.sin(theta) R = np.mat([[a*s,-b*s],[b*s, a*s]]) Y = R*X # rotation and scaling Y[0,:]= Y[0,:]+tx # translation Y[1,:]= Y[1,:]+ty return Y Now, we want to find the best pose (translation, scale and rotation) to match a model shape X to a target shape Y. We can solve this problem minimizing the sum of square distances between the points of X and the ones of Y, which means that we want to find where T' is a function that applies T to all the point of the input shape. This task turns out to be pretty easy using the fmin function provided by Scipy: def error_fun(p,X,Y):""" cost function to minimize """return np.linalg.norm(transform(X,p[0],p[1],p[2],p[3])-Y)def match(X,Y,p0):""" Match the model X with the shape Y returns the set of parameters to transform X into Y and a set of partial solutions. """ p_opt = fmin(error_fun, p0, args=(X,Y),retall=True)return p_opt[0],p_opt[1]# optimal solutions, other solutions In the code above we have defined a cost function which measures how close the two shapes are and another function that minimizes the difference between the two shapes and returns the transfomation parameters. Now, we can try to match the trifoil shape starting from one of its transformations using the functions defined above: # generating a shape to match t = np.linspace(0,2*np.pi,50) x =2*np.cos(t)-.5*np.cos(4*t ) y =2*np.sin(t)-.5*np.sin(4*t ) A = np.array([x,y])# model shape# transformation parameters p =[-np.pi/2,.5,.8,1.5]# theta,tx,ty,sAr= transform(A,p[0],p[1],p[2],p[3])# target shape p0 = np.random.rand(4)# random starting parameters p_opt, allsol = match(A,Ar,p0)# matching It's interesting to visualize the error at each iteration: pl.plot([error_fun(s,A,Ar)for s in allsol]) pl.show() and the value of the parameters of the transformation at each iteration: pl.plot(allsol) pl.show() From the graphs above we can observe that the the minimization process found its solution after 150 iterations. Indeed, after 150 iterations the error become very close to zero and there is almost no variation in the parameters. Now we can visualize the minimization process plotting some of the solutions in order to compare them with the target shape: def plot_transform(A,p):Afound= transform(A,p[0],p[1],p[2],p[3]) pl.plot(Afound[0,:].T,Afound[1,:].T,'-')for k,i in enumerate(range(0,len(allsol),len(allsol)/15)): pl.subplot(4,4,k+1) pl.plot(Ar[0,:].T,Ar[1,:].T,'--',linewidth=2)# target shape plot_transform(A,allsol[i]) pl.axis('equal') pl.show() In the graph above we can see that the initial solutions (the green ones) are very different from the shape we are trying to match (the dashed blue ones) and that during the process of minimization they get closer to the target shape until they fits it completely. In the example above we used two shapes of the same form. Let's see what happen when we have a starting shape that has a different form from the target model: t = np.linspace(0,2*np.pi,50) x = np.cos(t) y = np.sin(t)Ac= np.array([x,y])# the circle (model shape) p0 = np.random.rand(4)# random starting parameters# the target shape is the trifoil again p_opt, allsol = match(Ac,Ar,p0)# matching In the example above we used a circle as model shape and a trifoil as target shape. Let's see what happened during the minimization process: for k,i in enumerate(range(0,len(allsol),len(allsol)/15)): pl.subplot(4,4,k+1) pl.plot(Ar[0,:].T,Ar[1,:].T,'--',linewidth=2)# target shape plot_transform(Ac,allsol[i]) pl.axis('equal') pl.show() In this case, where the model shape can't match the target shape completely, we see that the minimization process is able to find the circle that is closer to the trifoil. {{ parent.title || parent.header.title}} {{ parent.tldr }} {{ parent.linkDescription }}{{ parent.urlSource.name }}
https://dzone.com/articles/shaping-matching-experiments
CC-MAIN-2017-30
refinedweb
918
51.38
All Articles | Submit Article | To create a DataTable, you need to use System.Data namespace, generally when you create a new class or page, it is included by default by the Visual Studio. Lets write following code to create a DataTable object. Here, I have pased a string as the DataTable name while creating DataTable object. // instantiate DataTableDataTable dTable = new DataTable("Dynamically_Generated"); // instantiate DataTable To create column in the DataTable, you need to use DataColumn object. Instantiate the DataColumn object and pass column name and its data type as parameter. Then call add method of DataTable column and pass the DataColumn object as parameter. // create columns for the DataTableDataColumn auto = new DataColumn("AutoID", typeof(System.Int32));dTable.Columns.Add(auto);// create another columnDataColumn name = new DataColumn("Name", typeof(string));dTable.Columns.Add(name);// create one more columnDataColumn address = new DataColumn("Address", typeof(string));dTable.Columns.Add(address); dTable.Columns.Add(auto); dTable.Columns.Add(name); dTable.Columns.Add(address); To specify a column as AutoIncrement (naturally it should be an integer type of field only), you need to set some properties of the column like AutoIncrement, AutoIncrementSeed. See the code below, here I am setting the first column "AutoID" as autoincrement field. Whenever a new row will be added its value will automatically increase by 1 as I am specified AutoIncrementSeed value as 1. // specify it as auto increment fieldauto.AutoIncrement = true;auto.AutoIncrementSeed = 1;auto.ReadOnly = true; auto.AutoIncrement = auto.AutoIncrementSeed = 1; auto.ReadOnly = If you want a particular column to be a unique column ie. you don't want duplicate records into that column, then set its Unique property to true like below. auto.Unique = true; auto.Unique = To set the primary key column in the DataTable, you need to create arrays of column and store column you want as primary key for the DataTable and set its PrimaryKey property to the column arrays. See the code below. // create primary key on this fieldDataColumn[] pK = new DataColumn[1];pK[0] = auto;dTable.PrimaryKey = pK; // create primary key on this field pK[0] = auto; dTable.PrimaryKey = pK; Till now we have created the DataTable, now lets populate the DataTable with some data. There are two ways to populate DataTable. Using DataRow object Look at the code below, I have created a DataRow object above the loop and I am assiging its value to the dTable.NewRow() inside the loop. After specifying columns value, I am adding that row to the DataTable using dTable.Rows.Add method. // populate the DataTable using DataRow objectDataRow row = null;for (int i = 0; i < 5; i++){row = dTable.NewRow();row["AutoID"] = i + 1;row["Name"] = i + " - Ram";row["Address"] = "Ram Nagar, India - " + i;dTable.Rows.Add(row);} // populate the DataTable using DataRow object { row = dTable.NewRow();row[ row = dTable.NewRow(); row[dTable.Rows.Add(6, "Manual Data - 1", "Manual Address - 1, USA");dTable.Rows.Add(7, "Manual Data - 2", "Manual Address - 2, USA"); // manually adding rows using array of values dTable.Rows.Add(6, dTable.Rows.Add(7, Modifying Row Data To edit the data of the row, sets its column value using row index or by specifying the column name. In below example, I am updating the 3rd row of the DataTable as I have specified the row index as 2 (dTable.Rows[2]). // modify certain values into the DataTabledTable.Rows[2]["AutoID"] = 20;dTable.Rows[2]["Name"] = "Modified";dTable.Rows[2]["Address"] = "Modified Address";dTable.AcceptChanges(); // modify certain values into the DataTable dTable.Rows[2][ dTable.AcceptChanges(); Deleting Row To delete a row into DataTable, call the rows.Delete() method followed by AcceptChanges() method. AcceptChanges() method commits all the changes made by you to the DataTable. Here Row[1] is the index of the row, in this case 2nd row will be deleted as in collection (here rows collection) count start from 0. // Delete rowdTable.Rows[1].Delete();dTable.AcceptChanges(); // Delete row dTable.Rows[1].Delete(); To filter records from the DataTable, use Select method and pass necessary filter expression. In below code, the 1st line will simply filter all rows whose AutoID value is greater than 5. The 2nd line of the code filters the DataTable whose AutoID value is greater than 5 after sorting it. DataRow[] rows = dTable.Select(" AutoID > 5");DataRow[] rows1 = dTable.Select(" AutoID > 5", "AuotID ASC"); DataRowatabledTable1.Rows.Add(thisRow.ItemArray);} foreach dTable1.Rows.Add(thisRow.ItemArray); Working with Aggregate functions (Updated on 18-Nov-08) We can use almost all aggregate functions with DataTable, however the syntax is bit different than standard SQL. Suppose we need to get the maximum value of a particular column, we can get it in the following way. DataRow[] rows22 = dTable.Select("AutoID = max(AutoID)");string str = "MaxAutoID: " + rows22[0]["AutoID"].ToString(); string str = To get the sum of a particular column, we can use Compute method of the DataTable. Compute method of the DataTable takes two argument. The first argument is the expression to compute and second is the filter to limit the rows that evaluate in the expression. If we don't want any filteration (if we need only the sum of the AutoID column for all rows), we can leave the second parameter as blank (""). object objSum = dTable.Compute("sum(AutoID)", "AutoID > 7");string sum = "Sum: " + objSum.ToString();// To get sum of AutoID for all rows of the DataTableobject objSum = dTable.Compute("sum(AutoID)", ""); object string sum = // To get sum of AutoID for all rows of the DataTable object objSum = dTable.Compute("sum(AutoID)", ""); Oops !. There is no direct way of sorting DataTable rows like filtering (Select method to filter DataRows). There are two ways you can do this. Using DataView See the code below. I have created a DataView object by passing my DataTable as parameter, so my DataView will have all the data of the DataTable. Now, simply call the Sort method of the DataView and pass the sort expression. Your DataView object have sorted records now, You can either directly specify the Source of the Data controls object like GridView, DataList to bind the data or if you need to loop through its data you can use ForEach loop as below. // Sorting DataTableDataView dataView = new DataView(dTable);dataView.Sort = " AutoID DESC, Name DESC";foreach (DataRowView view in dataView){Response.Write(view["Address"].ToString());} // Sorting DataTable dataView.Sort = Response.Write(view[ Using DataTable.Select() method Yes, you can sort all the rows using Select method too provided you have not specified any filter expression. If you will specify the filter expression, ofcourse your rows will be sorted but filter will also be applied. A small drawback of this way of sorting is that it will return array of DataRows as descibed earlier so if you are planning to bind it to the Data controls like GridView or DataList you will have for form a DataTable by looping through because directly binding arrays of rows to the Data controls will not give desired results. DataRow[] rows = dTable.Select("", "AutoID DESC"); If you need XmlSchema of the DataTabe, you can use WriteXmlSchema to write and ReadXmlSchema to read it. There are several overloads methods of both methods and you can pass filename, stream, TextReader, XmlReader etc. as the parameter. In this code, the schema will be written to the .xml file and will be read from there. // creating schema definition of the DataTabledTable.WriteXmlSchema(Server.MapPath("~/DataTableSchema.xml"));// Reading XmlSchema from the xml file we just createdDataTable dTableXmlSchema = new DataTable();dTableXmlSchema.ReadXmlSchema(Server.MapPath("~/DataTableSchema.xml")); // creating schema definition of the DataTable dTable.WriteXmlSchema(Server.MapPath( dTableXmlSchema.ReadXmlSchema(Server.MapPath( If you have a scenario, where you need to write the data of the DataTable into xml format, you can use WriteXml method of the DataTable. Note that WriteXml method will not work if you will not specify the name of the DataTable object while creating it. Look at the first code block above, I have passed "Dynamically_Generated" string while creating the instance of the DataTable. If you will not specify the name of the DataTable then you will get error as WriteXml method will not be able to serialize the data without it. // Note: In order to write the DataTable into XML, // you must define the name of the DataTable while creating it// Also if you are planning to read back this XML into DataTable, you should define the XmlWriteMode.WriteSchema too // Otherwise ReadXml method will not understand simple xml file dTable.WriteXml(Server.MapPath("~/DataTable.xml"), XmlWriteMode.WriteSchema);// Loading Data from XML into DataTableDataTable dTableXml = new DataTable();dTableXml.ReadXml(Server.MapPath("~/DataTable.xml")); // Note: In order to write the DataTable into XML, dTable.WriteXml(Server.MapPath( dTableXml.ReadXml(Server.MapPath( If you are planning to read the xml you have just created into the DataTable sometime later then you need to specify XmlWriteMode.WriteSchema too as the 2nd parameter while calling WriteXml method of the DataTable otherwise normally WriteXml method doesn't write schema of the DataTable. In the abscence of the schema, you will get error (DataTable does not support schema inference from Xml) while calling ReadXml method of the DataTable. Hope this article will be useful. If you have any question, comments or suggestions, please respond to this article. Thank you very much for reading it and Happy DataTable :) Submit Article
http://www.dotnetfunda.com/articles/article131.aspx
crawl-002
refinedweb
1,547
57.57
Created on 2005-06-17 17:18 by wharbecke, last changed 2005-12-04 15:08 by akuchling. This issue is now closed. The SimpleXMLRPCServer constructor does not set FD_CLOEXEC on the socket that listens for new connections. When the XML RPC server spawns other daemons, and the XML RPC server is stopped before the spawned daemon dies, the spawned daemon will hog the inherited socket and the XML RPC server will be unable to open its listening socket again (ADDR_IN_USE). Since there is no reason why a spawned process should inherit the listen socket, the close-on-exec flag should be used to prevent inheriting the socket to spawned processes. import socket + import fcntl import xmlrpclib ... def __init__(self, addr, ... SocketServer.TCPServer.__init__(self, addr, requestHandler) ! # close on exec - spawned shell should not access the service ! # listen socket ! flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD) ! flags |= fcntl.FD_CLOEXEC ! fcntl.fcntl(self.fileno(), fcntl.F_SETFD, flags) ! There is a similar fix in the Zope distribution, see aed4d.html Logged Logged In: YES user_id=11375 Fixed in rev41585. SimpleXMLRPCServer now sets allow_reuse_address to True, and also sets FD_CLOEXEC.
https://bugs.python.org/issue1222790
CC-MAIN-2017-51
refinedweb
187
57.57
import "go.chromium.org/luci/common/iotools" Package iotools contains a collection of I/O-related utility structs and methods. bufferingreaderat.go byteslicereader.go chainreader.go countingWriter.go countingreader.go doc.go panicwriter.go responsewriter.go ErrPanicWriter is panic'd from the Writer provided to the callback in WriteTracker in the event of an io error. NewBufferingReaderAt returns an io.ReaderAt that reads data in blocks of configurable size and keeps LRU of recently read blocks. It is great for cases when data is read sequentially from an io.ReaderAt, (e.g. when extracting files using zip.Reader), since by setting large block size we can effectively do lookahead reads. For example, zip.Reader reads data in 4096 byte chunks by default. By setting block size to 512Kb and LRU size to 1 we reduce the number of read operations significantly (128x), in exchange for the modest amount of RAM. The reader is safe to user concurrently (just like any ReaderAt), but beware that the LRU is shared and all reads from the underlying reader happen under the lock, so multiple goroutines may end up slowing down each other. WriteTracker helps to write complex writer routines correctly. This wraps a Writer with an implementation where any Write method will panic with the ErrPanicWriter error, catch that panic, and return the original io error as well as the number of written bytes. This means that the callback can use its Writer without tracking the number of bytes written, nor any io errors (i.e. it can ignore the return values from write operations entirely). If no io errors are encountered, this will return the callback's error and the number of written bytes. ByteSliceReader is an io.Reader and io.ByteReader implementation that reads and mutates an underlying byte slice. func (r *ByteSliceReader) Read(buf []byte) (int, error) Read implements io.Reader. func (r *ByteSliceReader) ReadByte() (byte, error) ReadByte implements io.ByteReader. ChainReader is an io.Reader that consumes data sequentially from independent arrays of data to appear as if they were one single concatenated data source. The underlying io.Reader will be mutated during operation. func (cr *ChainReader) Read(p []byte) (int, error) Read implements io.Reader. func (cr ChainReader) ReadByte() (byte, error) ReadByte implements io.ByteReader. func (cr ChainReader) Remaining() int64 Remaining calculates the amount of data left in the ChainReader. It will panic if an error condition in RemainingErr is encountered. func (cr ChainReader) RemainingErr() (int64, error) RemainingErr returns the amount of data left in the ChainReader. An error is returned if any reader in the chain is not either nil or a bytes.Reader. Note that this method iterates over all readers in the chain each time that it's called. CountingReader is an io.Reader that counts the number of bytes that are read. func (c *CountingReader) Read(buf []byte) (int, error) Read implements io.Reader. func (c *CountingReader) ReadByte() (byte, error) ReadByte implements io.ByteReader. type CountingWriter struct { io.Writer // The underlying io.Writer. // Count is the number of bytes that have been written. Count int64 // contains filtered or unexported fields } CountingWriter is an io.Writer that counts the number of bytes that are written. func (c *CountingWriter) Write(buf []byte) (int, error) Write implements io.Writer. func (c *CountingWriter) WriteByte(b byte) error WriteByte implements io.ByteWriter. ResponseWriter wraps a given http.ResponseWriter, records its status code and response size. Assumes all writes are externally synchronized. func NewResponseWriter(rw http.ResponseWriter) *ResponseWriter NewResponseWriter constructs a ResponseWriter that wraps given 'rw' and tracks how much data was written to it and what status code was set. func (rw *ResponseWriter) Flush() Flush sends any buffered data to the client. func (rw *ResponseWriter) Header() http.Header Header returns the header map that will be sent by WriteHeader. func (rw *ResponseWriter) ResponseSize() int64 ResponseSize is size of the response body written so far. func (rw *ResponseWriter) Status() int Status is the HTTP status code set in the response. func (rw *ResponseWriter) Write(buf []byte) (int, error) Write writes the data to the connection as part of an HTTP reply. func (rw *ResponseWriter) WriteHeader(code int) WriteHeader sends an HTTP response header with the provided status code. Package iotools imports 6 packages (graph) and is imported by 19 packages. Updated 2019-10-14. Refresh now. Tools for package owners.
https://godoc.org/go.chromium.org/luci/common/iotools
CC-MAIN-2019-43
refinedweb
720
51.14
This program is a code generator for Glade that produces C# code. It will make it nearly as easy for you to develop a cross-platform GUI with Gtk as it is with Windows Forms. The generator has been tested on both Windows and Linux with Mono. To be able to run Gtk# GUIs on Windows, you need the Gtk# runtime. You can get it here; it is 23.3 Mb. The GUI designer Glade can be downloaded here. Alternatively, if you have Mono for Windows installed, it is under Start-> Mono 1.2.4 for Windows -> Applications -> Glade. If you are using Linux and are interested in this article, I presume that you already have Mono installed and that you are more familiar with this topic. Thus, I will explain in more detail for Windows users. How does it function? The tool is pretty simple. It watches the *.glade file that you selected in the upper file chooser for changes. A change in this case means that you saved it in Glade. So, when it detects the change it parses the Glade file for widgets and signals. Then it puts them into your code as specified in the *.cs file in the second file chooser. I will later go into more detail. I am now going to explain the procedure for VS 2005. After you have downloaded and installed the Gtk# runtime, download GladeSharperTemplate and put the ZIP file like it is (unzipped!) in the directory: My files\Visual Studio 2005\Templates\Project Templates. Start VS and begin a new GladSharperProject from the templates. The main file looks like this: usingSystem; usingSystem.Collections.Generic; usingSystem.Text; usingGtk; usingGlade; namespaceGladeSharperProject1 { publicclass GladeApp { staticvoid Main(string[] args) { newGladeApp(args); } publicGladeApp(string[] args) { Application.Init(); stringstandardNamespace = System.Reflection.Assembly.GetExecutingAssembly( ).GetName().Name; Glade.XMLgxml = new Glade.XML(null, standardNamespace + "." + "gui.glade", null, null); gxml.Autoconnect(this); //window1.Show(); Application.Run(); } } } Now download and start GladeSharper. As a Glade file, you select gui.glade in your Project folder and as a C# file you select GladeAppDummy.cs -- i.e. the file from above -- in the same folder. Click "Start watcher." Now you can start Glade and open gui.glade in your Project folder again. Design your GUI and save it. Then the widgets and signals are made available in your Editor. You just have to reload the code when VS asks you. Don't forget to uncomment window1.Show() after you've created the first window. window1.Show() To make the application react on the Close button, you create the signal destroy for your window. Save the Glade file. The signal will be added to your code. Then put in Application.Quit(), as shown below: Application.Quit() voidon_window1_destroy(object sender, EventArgse) { Application.Quit(); } The widgets are placed in #region GtkWidgetDeclarations. Don't write any code within this section, as it will be deleted. However, you can move the whole region and it will stay there when the code is updated. You can move the signal handlers freely in your code wherever you like; they will not be moved again or deleted. They also won't get deleted when you deactivate the signal in Glade! So, if a signal is no longer responding, have a look at Glade's properties! #region GtkWidgetDeclarations To find out which EventArgs a signal uses, I had to use Reflection. In the Glade file is the name of the widget and the signal. With Reflection, I look up the signal and find out which EventArgs it uses. You will have something like this: EventArgs EventArgs voidon_window1_client_event(object sender, Gtk.ClientEventArgse) { } voidon_togglebutton1_toggled(object sender, System.EventArgse) { } As you can see, the EventArgs have full qualifiers like System.EventArgs. Sometimes the name of the signal cannot be found in the Gtk# API. In this case, the signal will also be put in the code and it will be functional. It could be, however, that it has special EventArgs. You will recognize this through seeing that EventArgs is not qualified, i.e. there is no preceeding System. System.EventArgs System. voidon_button1_activate(object sender, EventArgse) { } That is the one example I spoke of. The Event here is called Activate, but in the Gtk# API it is called Activated. Either way, the EventArgs of Button.Activated are System.EventArgs so it makes no diference. When you see a signal handler with unqualified EventArgs, you know that GladeSharper was not able to find it in the API. If you look by hand, it may be that the signal has more special EventArgs. Activate Activated Button.Activated A last hint: If you are unsure about whether you saved your code, when the Editor tells you that the code has changed and asks if you want to reload it, just click No. Save your code and click Save in Glade again. I hope you like the generator! If you are missing functions, post in detail in the comments.
https://www.codeproject.com/Articles/19644/Glade-Code-Changer?fid=439947&df=90&mpp=50&noise=3&prof=True&sort=Position&view=None&spc=Relaxed
CC-MAIN-2017-51
refinedweb
821
69.48
czmq − high−level C binding for ZeroMQ #include <czmq.h> cc ['flags'] 'files' −lzmq −lczmq ['libraries'] Classes These classes provide the main socket and message API: • zsock(3) − working with ZeroMQ sockets (high−level) • zstr(3) − sending and receiving strings • zmsg(3) − working with multipart messages • zframe(3) − working with single message frames • zactor(3) − Actor class (socket + thread) • zloop(3) − event−driven reactor • zpoller(3) − trivial socket poller class • zproxy(3) − proxy actor (like zmq_proxy_steerable) • zmonitor(3) − monitor events on ZeroMQ sockets These classes support authentication and encryption: • zauth(3) − authentication actor for ZeroMQ servers • zcert(3) − work with CURVE security certificates • zcertstore(3) − work with CURVE security certificate stores These classes provide generic containers: • zhash(3) − simple generic hash container • zhashx(3) − extended generic hash container • zlist(3) − simple generic list container • zlistx(3) − extended generic list container These classes wrap−up non−portable functionality: • zbeacon(3) − LAN discovery and presence • zclock(3) − millisecond clocks and delays • zdir(3) − work with file−system directories • zdir_patch(3) − work with directory differences • zfile(3) − work with file−system files • zsys(3) − system−level methods • zuuid(3) − UUID support class • ziflist(3) − list available network interfaces And these utility classes add value: • zchunk(3) − work with memory chunks • zconfig(3) − work with textual config files • zrex(3) − work with regular expressions • zgossip(3) − decentralized configuration management These classes are deprecated: • zctx(3) − working with ZeroMQ contexts • zsocket(3) − working with ZeroMQ sockets (low−level) • zsockopt(3) − get/set ZeroMQ socket options • zthread(3) − working with system threads • zauth_v2(3) − authentication for ZeroMQ servers • zbeacon_v2(3) − LAN discovery and presence • zmonitor_v2(3) − socket event monitor • zproxy_v2(3) − zmq_proxy wrapper Scope and Goals CZMQ has these goals: • To wrap the ØMQ core API in semantics that are natural and lead to shorter, more readable applications. • To hide the differences between versions of ØMQ. • To provide a space for development of more sophisticated API semantics. Ownership and License CZMQ is maintained by the ZeroMQ community at github.com/zeromq. Its other authors and contributors are listed in the AUTHORS file. The contributors are listed in AUTHORS. This project uses the MPL v2 license, see LICENSE. Contributing To submit an issue use the issue tracker at. All discussion happens on the zeromq−dev list or #zeromq IRC channel at irc.freenode.net. The proper way to submit patches is to clone this repository, make your changes, and use git to create a patch or a pull request. See. All contributors are listed in AUTHORS. All classes are maintained by a single person, who is the responsible editor for that class and who is named in the header as such. This is usually the originator of the class. When several people collaborate on a class, one single person is always the lead maintainer and the one to blame when it breaks. The general rule is, if you contribute code to CZMQ you must be willing to maintain it as long as there are users of it. Code with no active maintainer will in general be deprecated and/or removed. Building and Installing CZMQ uses autotools for packaging. To build from git (all example commands are for Linux): git clone git://github.com/zeromq/czmq.git cd czmq sh autogen.sh ./configure make all sudo make install sudo ldconfig You will need the pkg−config, libtool, and autoreconf packages. Set the LD_LIBRARY_PATH to /usr/local/libs unless you install elsewhere. After building, you can run the CZMQ selftests: cd src ./czmq_selftest Linking with an Application Include czmq.h in your application and link with CZMQ. Here is a typical gcc link command: gcc −lczmq −lzmq myapp.c −o myapp You should read czmq.h. This file includes zmq.h and the system header files that typical ØMQ applications will need. The provided c shell script lets you write simple portable build scripts: c −lczmq −lzmq −l myapp The Class Model CZMQ consists of classes, each class consisting of a .h and a .c. Classes may depend on other classes. czmq.h includes all classes header files, all the time. For the user, CZMQ forms one single package. All classes start by including czmq.h. All applications that use CZMQ start by including czmq.h. czmq.h also defines a limited number of small, useful macros and typedefs that have proven useful for writing clearer C code. All classes (with some exceptions) are based on a flat C class system and follow these rules (where zclass is the class name): • Class typedef: zclass_t • Constructor: zclass_new • Destructor: zclass_destroy • Property methods: zclass_property_set, zclass_property • Class structures are private (defined in the .c source but not the .h) • Properties are accessed only via methods named as described above. • In the class source code the object is always called self. • The constructor may take arbitrary arguments, and returns NULL on failure, or a new object. • The destructor takes a pointer to an object reference and nullifies it. Return values for methods are: • For methods that return an object reference, either the reference, or NULL on failure. • For methods that signal success/failure, a return value of 0 means sucess, −1 failure. Private/static functions in a class are named s_functionname and are not exported via the header file. All classes (with some exceptions) have a test method called zclass_test.−level C applications at iMatix from 1995−2005, is to create our own fully portable, high−quality libraries of pre−packaged CZMQ: • Some classes may not be opaque. For example, we have cases of generated serialization classes that encode and decode structures to/from binary buffers. It feels clumsy to have to use methods to access the properties of these classes. • While every class has a new method that is the formal constructor, some methods may also act as constructors. For example, a "dup" method might take one object and return a second object. • CZMQ aims for short, consistent names, following the theory that names we use most often should be shortest. Classes get one−word names, unless they are part of a family of classes in which case they may be two words, the first being the family name. Methods, similarly, get one−word names and we aim for consistency across classes (so a method that does something semantically similar in two classes will get the same name in both). So the canonical name for any method is: zclassname_methodname And the reader can easily parse this without needing special syntax to separate the class name from the method name. Containers After a long experiment with containers, we’ve decided that we need exactly two containers: • A singly−linked list. •−linked list. Portability Creating a portable C application can be rewarding in terms of maintaining a single code base across many platforms, and keeping (expensive) system−specific knowledge separate from application developers. In most projects (like ØMQ core), there is no portability layer and application code does conditional compilation for all mixes of platforms. This leads to quite messy code. czmq acts as a portability layer, similar to but thinner than libraries like the [Apache Portable Runtime]() (APR). These are the places a C application is subject to arbitrary system differences: • Different compilers may offer slightly different variants of the C language, often lacking specific types or using neat non−portable names. Windows is a big culprit here. We solve this by patching the language in czmq_prelude.h, e.g. defining int64_t on Windows. • System header files are inconsistent, i.e. you need to include different files depending on the OS type and version. We solve this by pulling in all necessary header files in czmq_prelude.h. This is a proven brute−force approach that increases recompilation times but eliminates a major source of pain. • System libraries are inconsistent, i.e. you need to link with different libraries depending on the OS type and version. We solve this with an external compilation tool, C, which detects the OS type and version (at runtime) and builds the necessary link commands. • CZMQ uses the GNU autotools system, so non−portable code can use the macros this defines. It can also use macros defined by the czmq_prelude.h header file. Technical Aspects • Thread safety: the use of opaque structures is thread safe, though ØMQ applications should not share state between threads in any case. • Name spaces: we prefix class names with z, which ensures that all exported functions are globally safe. • Library versioning: we don’t make any attempt to version the library at this stage. Classes are in our experience highly stable once they are built and tested, the only changes typically being added methods. • Performance: for critical path processing, you may want to avoid creating and destroying classes. However on modern Linux systems the heap allocator is very fast. Individual classes can choose whether or not to nullify their data on allocation. • Self−testing: every class has a selftest method that runs through the methods of the class. In theory, calling all selftest functions of all classes does a full unit test of the library. The czmq_selftest application does this. • Memory management: CZMQ classes do not use any special memory management techiques to detect leaks. We’ve done this in the past but it makes the code relatively complex. Instead, we do memory leak testing using tools like valgrind. Adding a New Class If you define a new CZMQ class myclass you need to: • Write the zmyclass.c and zmyclass.h source files, in src and include respectively. • Add‘#include <zmyclass.h>‘ to include/czmq.h. • Add the myclass header and test call to src/czmq_selftest.c. • Add a reference documentation to doc/zmyclass.txt. • Add myclass to 'src/Makefile.am‘: • The // comment style. • Variables definitions placed in or before the code that uses them. So while ANSI C code might say: zblob_t *file_buffer; /* Buffer for our file */ ... (100 lines of code) file_buffer = zblob_new (); ... The style in CZMQ would be: zblob_t *file_buffer = zblob_new (); Assertions We use assertions heavily to catch bad argument values. The CZMQ classes do not attempt to validate arguments and report errors; bad arguments are treated as fatal application programming errors. We also use assertions heavily on calls to system functions that are never supposed to fail, where failure is to be treated as a fatal non−recoverable error (e.g. running out of memory). Assertion code should always take this form: int rc = some_function (arguments); assert (rc == 0); Rather than the side−effect form: assert (some_function (arguments) == 0); Since assertions may be removed by an optimizing compiler. () − start) >= 10); // @end The template for man pages is in doc/mkman. Development CZMQ is developed through a test−driven process that guarantees no memory violations or leaks in the code: • Modify a class or method. • Update the test method for that class. • Run the selftest script, which uses the Valgrind memcheck tool. • Repeat until perfect. Porting CZMQ When you try CZMQ czmq_prelude.h header file. There are several typical types of changes you may need to make to get functionality working on a specific operating system: • Defining typedefs which are missing on that specific compiler: do this in czmq_prelude.h. • Defining macros that rename exotic library functions to more conventional names: do this in czmq_prelude.h. • Reimplementing specific methods to use a non−standard API: this is typically needed on Windows. Do this in the relevant class, using #ifdefs to properly differentiate code for different platforms. The canonical standard operating system for all CZMQ code is Linux, gcc, POSIX. The czmq manual was written by the authors in the AUTHORS file. Main web site: Report bugs to the email <zeromq−dev@lists.zeromq.org [1] > Copyright (c) 1991−2012 iMatix Corporation −− Copyright other contributors as noted in the AUTHORS file. This file is part of CZMQ, the high−level C binding for 0MQ: This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at. LICENSE included with the czmq distribution. 1. zeromq-dev AT lists DOT zeromq DOT org mailto:zeromq-dev AT lists DOT zeromq DOT org
http://man.sourcentral.org/leap421/7+czmq
CC-MAIN-2017-47
refinedweb
2,028
55.74
So my code words but I don't know why. def reverse(text): rever = [] text = str(text) n = len(text) - 1 text = list(text) print text final = "" while n >= 0: final += str(text[n]) n = n - 1 return final print reverse("examples") I originally has it as n = len(text) but then I got an error that "list index is out of range" making it len(text) -1 fixes the error but Im not sure why... I know my code isn't neat or efficient and doesn't look like others peoples answer to this question but its the only way I could work out how to do it. Thanks for any help
https://discuss.codecademy.com/t/7-reverse/15623
CC-MAIN-2018-26
refinedweb
113
71.18
When I send a /search/photos request to Unsplash API, I get a response with only 10 images. Is it possible to get more than 10 images? When I send a /search/photos request to Unsplash API, I get a response with only 10 images. Is it possible to get more than 10 images? According to the documentation, there is a per_page value that you can set that increases it beyond the default to 10. Thanks @kirupa. I added that option and it’s loading 30 images now, which seems to be the max number of images per page. Now, I’m trying to find out how to add pagination to my app. app.jsx import React, { Component } from "react"; import axios from "axios"; import ImageList from "../ImageList"; class App extends Component { state = { images: [] }; onSearchSubmit = async inputValue => { const API_KEY = "1234"; const response = await axios.get( `{inputValue}&client_id=${API_KEY}` ); this.setState({ images: response.data.results }); }; render() { return ( <> <ImageList images={this.state.images} /> </> ); } } export default App; ImageList.jsx import React, { Component } from "react"; class Gallery extends Component { render() { const childElements = this.props.images.map(item => { return ( <li key={item.id}> <img src={item.urls.regular} alt={item.description} /> </li> ); }); return ( {childElements} ); } } export default Gallery; Any help would be great! You should look into React Router! It is perfect for this kind of work. I am actually part-way through a tutorial on using React Router with the unsplash API to navigate between pages of images! No ETA on when it will be completed, unfortunately. I can’t wait to go through your tutorial. Please let’s know once it’s ready. Meanwhile, I pushed my project to CodeSandBox: maybe some one can have a look and help me to fix the issue. The basic React Router tutorials should be able to help you out. I wrote a basic one here:
https://forum.kirupa.com/t/getting-more-than-10-images-from-an-api-request-to-unsplash-api/639436
CC-MAIN-2019-13
refinedweb
308
60.61
+ Sean Busbey My understanding is this problem is a limitation of Python AVRO library. Currently it seems that the only valid default value is "null". Please try below schema to see whether it works for you. { * "type" : "record",* * "name" : "data",* * "namespace" : "my.example",* * "fields" : [* * {"name" : "domain", "type" : ["null", "string"], "default" : null},* * {"name" : "ip", "type" : ["null", "string"], "default" : null},* * {"name" : "port", "type" : ["null", "int"], "default" : null},* * {"name" : "score", "type" : ["null", "int"], "default" : null}* * ]* *}* Below JIRAs seems to be related: I am pretty sure that the AVRO Java library supports using a non-null default value for record fields. You can try it in a Java program. *Yibing Shi* *Customer Operations Engineer* <> On Fri, Jul 8, 2016 at 3:00 PM, Stanislav Savulchik <s.savulchik@gmail.com> wrote: > I'm not familiar with Avro good enough to propose an "Avro solution" for > your problem :( > > If you want to serialize default values into Avro for some fields you > should provide the default values in code explicitly when writing to Avro. > Another approach is to declare the fields as nullable using union types > (e.g. [null, int]) and use default values in code explicitly when reading > from Avro. > > I believe the "default" key you used in Avro schema is meant for schema > evolution > > - if the reader's record schema has a field that contains a default > value, and writer's schema does not have a field with the same name, then > the reader should use the default value from its field. > > > пт, 8 июл. 2016 г. в 9:52, Sarvagya Pant <sarvagya.pant@gmail.com>: > >> Hi Stanislav, >> >> Thanks for the reply. What I want to achieve is that data arriving in >> Avro writer may not contain all field as specified in the example above. I >> would like to save default value if possible or retrieve the default value >> when using DataFileReader. Is this possible? Should the data always contain >> all the keys specified in the schema. I tried using ["int", "null"], >> "default" : 0, but this was able to save the data if any field is not >> present, but using DataFileReader I got None instead of default value 0. >> Any help will be much appreciated. Thanks. >> >> On Thu, Jul 7, 2016 at 10:39 PM, Stanislav Savulchik < >> s.savulchik@gmail.com> wrote: >> >>> Hi, >>> >>> I believe default values only work for readers, not writers. >>> >>> Spec says that (): >>> > default: A default value for this field, used when reading instances >>> that lack this field (optional). >>> >>> On 7 июля 2016 г., at 21:16, Sarvagya Pant <sarvagya.pant@gmail.com> >>> wrote: >>> >>> I am trying to implement Avro to replace some codes that tries to write >>> data in CSV. This is because CSV cannot store the type of the field and all >>> data are treated as string when trying to consume. I have copied the code >>> for Avro from its website and would like to set a default value if there is >>> no field. >>> >>> My avro file looks like this: >>> >>> { >>> "type" : "record", >>> "name" : "data", >>> "namespace" : "my.example", >>> "fields" : [ >>> {"name" : "domain", "type" : "string", "default" : "EMPTY"}, >>> {"name" : "ip", "type" : "string", "default" : "EMPTY"}, >>> {"name" : "port", "type" : "int", "default" : 0}, >>> {"name" : "score", "type" : "int", "default" : 0} >>> ] >>> } >>> >>> I have written a simple python file that is expected to work. It is >>> given below: >>> >>> import avro.schema >>> from avro.datafile import DataFileReader, DataFileWriter >>> from avro.io import DatumReader, DatumWriter >>> >>> schema = avro.schema.parse(open("data.avsc", "rb").read()) >>> >>> writer = DataFileWriter(open("users.avro", "w"), DatumWriter(), schema) >>> writer.append({"domain": "hello domain", "score" : 20, "port" : 8080}) >>> writer.append({"ip": "1.2.3.4", "port" : 80}) >>> writer.append({"domain": "another domain", "score" : 100}) >>> writer.close() >>> >>> reader = DataFileReader(open("users.avro", "rb"), DatumReader()) >>> for data in reader: >>> print data >>> reader.close() >>> >>> However, if I try to run this program, I get error that data are not >>> mapped according to schema. >>> >>> Traceback (most recent call last): >>> File "D:\arko.py", line 8, in <module> >>> writer.append({"domain": "hello domain", "score" : 20, "port" : >>> 8080}) >>> File "build\bdist.win32\egg\avro\datafile.py", line 196, in append >>> File "build\bdist.win32\egg\avro\io.py", line 769, in write >>> >>> avro.io.AvroTypeException: The datum {'domain': 'hello domain', 'score': >>> 20, 'port': 8080} is not an example of the schema { >>> "namespace": "my.example", >>> "type": "record", >>> "name": "userInfo", >>> "fields": [ >>> { >>> "default": "EMPTY", >>> "type": "string", >>> "name": "domain" >>> }, >>> { >>> "default": "EMPTY", >>> "type": "string", >>> "name": "ip" >>> }, >>> { >>> "default": 0, >>> "type": "int", >>> "name": "port" >>> }, >>> { >>> "default": 0, >>> "type": "int", >>> "name": "score" >>> } >>> ] >>> } >>> [Finished in 0.1s with exit code 1] >>> >>> I am using avro v1.8.0 and python 2.7. What am I doing wrong here? >>> Thanks. >>> >>> -- >>> >>> *Sarvagya Pant* >>> *Kathmandu, Nepal* >>> >>> >>> >> >> >> -- >> >> *Sarvagya Pant* >> *Kathmandu, Nepal* >> >
http://mail-archives.apache.org/mod_mbox/avro-user/201607.mbox/%3CCAEyKDw_623v-s-t4Kn_y8O9i=HmZ1u7Q3GSDtbNfs6w1Mp8tNQ@mail.gmail.com%3E
CC-MAIN-2017-51
refinedweb
762
75.2
See GitHub for future release announcements Release notes are now located in in the GitHub repository. Release notes up to 1.10.0 (December 2015) Version 1.10.0 Tuesday, December 15, 2015 - Issue 606 and Issue 612: Executing a request to Google APIs when using ServiceAccount may have resulted in a deadlock (depending on the current synchronization context). - Issue 616: Travis testing support. - Issue 624: Support in Incremental Auth for Web applications. - Issue 622: Improvements for MediaDownloader. - Issue 592, Issue 617, and Issue 631: Fix concurrency bug in ConfigurableMessageHandler. - Issue 615: From now on, GoogleApiException exposes the RequestError object. - Issue 609: InvalidOperationException exception could be thrown on Windows Phone during authentication. Version 1.9.2 Thursday, July 23, 2015 - The client library code was moved to GitHub. - Issue 238: Support a signed version of Google.Apis. The Pull Request includes updating the NuGet packages, and the release tool. - Issue 548: A batch requests used to fail if the response included duplicate HTTP headers. - Switch ServiceAccountCredentialsigning to be FIPS compliant. - Issue 561: Support JSON service account keys. Version 1.9.1 Monday, December 29, 2014 - Tools/Google.Apis.Release - Do not clean the generated directory, since it contains .NET docs. - NuGet package should refer to the release notes as the project URL. - Improve ComputeCredentialerror while trying to request a new access token, code review. - Issue 503: TokenResponse.IsExpiredreturns true one minute after token expiration, code review. - Support ComputeCredential, code review. - Change version to 1.9.1 and output XML for the new WP8.1 projects. - Issue 471: Support WP 8.1 projects, code review. - Issue 330: Operation could destabilize runtime Google.Api.Services.BaseClientService, code review. - Issue 482: GoogleWebAuthorizationBroker.AuthorizeAsync- browser will not self-close, code review. Version 1.9.0 Tuesday, September 30, 2014 - Issue 471: Support Windows 8.1 application (NOTE: There is not a full solution for WP8.1 and there is a problem in building the project using Google.Apis.Release tool), code review. - Issue 475: Clicking the back button on WP crashes the application, code review. - Issue 471: Support Windows Phone 8.1 - Upgrade JSON.NET to 6.0.4 and update Portable projects to profile 328. - Use profile 136 for now (everything compiles again). Need to investigate how can we support portable-net40+sl50+win+wpa81+wp80 (profile 328) for Newtonsoft.Jsonand Zlib.Portable. Both those packages are missing some configuration for profile 328. - Update projects to support profile 328 (for universal apps). - Issue 478: Update NuGet dependencies, code review. Version 1.8.2 Monday, May 26, 2014 - Issue 452: Fix an incompatible change that was committed before ( FileDataStore), code review. - Issue 464: Cannot send HTTP request when setting an invalid etag, code review. - Issue 463: Add support in token revocation, code review. - Issue 462: Improve FileDataStoreimplementation, code review. - Improve NuGet Publisher logs. - Issue 455: Translate API does not work in POST mode (bug in MaxUrlLengthInterceptor), code review. Version 1.8.1 Monday, March 17, 2014 - No code changes since RC, the library is out of beta! - Developer's guide was improved significantly. Version 1.8.0 (RC) Monday, February 17, 2014 - WP auth bug fix. - Improve comments for doxygen process. - Improve comments to AuthActionFilter. - Fix comments. - Issue 362: Add a resume method to media upload, code review. - Release tool should support RC. - Comment fix (and\or ==> and \ or). - Issue 422: Back button doesn't work on WP auth login. - Issue 431: WebAuthenticationBrokerUserControl.OnBrowserNavigationFailedthrows ArgumentNullExceptionwhen there is no network connectivity, code review. - Issue 436: Add Utility methods to parse DateTimeto stringand stringto DateTime, code review. - Issue 432: BatchRequestwith null callback throws exception, code review. Version 1.7.0 (beta) Wednesday, December 18, 2013 DateTimebug when server gets "2013-12-17T23:26:42Z" and not "updated=2013-12-17T23:26:42.000Z". - Issue 428: Fix a bug when using a DateTimeas a query parameter. - Issue 401: Malformed HTTP request based on not honoring the URI Template spec (). - Issue 425: Set HttpStatusCodeon GoogleApiExceptionwhen available. - Issue 420: RequestAccessTokenAsyncand RefreshAccessTokenAsyncshould be public. - Issue 60: Support a new BatchRequest. - Call ConfigureAwaiton every call to await (when applicable). - Issue 407: Split Google.Apisto Google.Apis.Coreand Google.Apis. - Issue 404: Remove obsolete GoogleApis.Authenticationcode. Version 1.6 (beta) Wednesday, October 23, 2013 - Change the nuspec descriptions. - Fix a bug on creating core Nuget packages. - Remove all content of 3rd party library except DotNetOpenAuth. - Upgrade Newtonsoft.Jsonto 5.0.8 and add a new IClientServiceRequestinterface (not generic). - Rename MVC NuGet package from MVC4 to MVC. - Fix a small bug in the release process. - Issue 351: Reimplement the OAuth 2.0 library (Step 7): Change the release process to support new packages, code review. - Issue 351: Reimplement the OAuth 2.0 library (Step 5): Windows Phone support, code review. - Issue 351: Reimplement the OAuth 2.0 library (Step 6): WinRT Support, code review. - Issue 361: MediaDownloadercan't download drive export list, code review. - Issue 351: Reimplement the OAuth 2.0 library (Step 4): Service Account and MVC, code review. - Issue 351: Reimplement the OAuth 2.0 library (Step 3): Add tests, UserCredentialand flows, code review. - Issue 146: Pass override HTTP header when request URI too long, code review. - Issue 383: ExecuteAsynccreates an unnecessary additional Task, code review. - Issue 377: New build tool releasing a new version, code review. - Issue 351: Reimplement the OAuth 2.0 library (Step 2): Auth PCL - define only data types, code review. - Issue 148: Extension method should be internal (and not public). - Add NuGet.exe to Tootls/.nuget folder. - Issue 351: Reimplement the OAuth 2.0 library (Step 1): Adjustments to current library, code review. - Change the directory of Google.Apis.NuGet.Publisherproject. - Rename IMediaDownloadedfile to IMediaDownloader. - Issue 376: Create a NuGet publisher to publish Google.Apispackages, code review. Version 1.5.0 (beta) Monday, August 19, 2013 - Issue 369: Change default behavior of a HTTP request (Number Tries = 3, BackOff of 503 by default), code review. - Add documentation to DotNet4 project. - Change .hgignoreand add Google.Apis.*xml. - Issues 373 (execute bug), 374 (remove Tests.Utilityassembly) and 375 (clean warnings), code review. - Update .hgignorefile. - Issue 360: Fix a bug in ResumableUploadwhen media size is unknown, code review. - Issue 325: Remove Discovery and codegen parts from the library, code review. - Issue 368: Update NuGet.exe. - Update Microsoft.Http.Client.LICENSE.rtf. Version 1.4.0 (beta) Monday, June 24, 2013 - Issue 322: Use canonical name for service class when possible. - Issue 338: Support media downloader. - Issue 334: Include Google.Apis.FullProfileas part of our release. - Issue 320: Change Google.Apisto be a PCL assembly. - Issue 321: Support CancellationTokenon service and media requests. - Issue 329: Exponential back-off. - Remove ResourcePathfrom a service request. - NuGet packages error on Windows 8. - Update Tools and add add DLLs and licenses in the 3rd party library. - Add NuGet.exe to .nuget folder. - Issues 320, 324 and 260: Upgrade .NET 4.0, create Google.Api.Httpnamespace and support NuGet. - Fix ResumableUploadURI. - Issues 310 and 311: ResumableUpload- support server errors and stream with unknown size. - Issue 308: Set ResumableUploadURL to /upload + resource-uri. - Issue 304: ServiceGeneratorshould use rootUrlkey from the Discovery doc. Version 1.3.0 (beta) Monday, March 18, 2013 - Add a new Google.Apis.Servicesnamespace. - Issue 303: ServiceGeneratordoesn't work with read-only URL files. - Issue 300: Bug in ResumableUploadURL. - Issue 293: Include CLR version (Unit Test). - Issues 293 and 295: Include CLR version and API version in the user agent header. - Issue 292: Improve the build process. - Issue 277: DiscoveryDocumentshould be removed from each generated API. - Issues 193 (specify alt parameter on ServiceRequest) and 249 (omit default values from query).
https://developers.google.cn/api-client-library/dotnet/release_notes?hl=id
CC-MAIN-2022-27
refinedweb
1,257
54.49
API¶ Top level user functions: Bag methods¶ - class dask.bag. Bag(dsk, name, npartitions)¶ Parallel collection of Python objects Examples Create Bag from sequence >>> import dask.bag as db >>> b = db.from_sequence(range(5)) >>> list(b.filter(lambda x: x % 2 == 0).map(lambda x: x * 10)) [0, 20, 40] Create Bag from filename or globstring of filenames >>> b = db.read_text('/path/to/mydata.*.json.gz').map(json.loads) Create manually (expert use) >>> dsk = {('x', 0): (range, 5), ... ('x', 1): (range, 5), ... ('x', 2): (range, 5)} >>> b = Bag(dsk, 'x', npartitions=3) >>> sorted(b.map(lambda x: x * 10)) [0, 0, 0, 10, 10, 10, 20, 20, 20, 30, 30, 30, 40, 40, 40] >>> int(b.fold(lambda x, y: x + y)) 30 accumulate(binop, initial='__no__default__')¶ Repeatedly apply binary function to a sequence, accumulating results. This assumes that the bag is ordered. While this is typically the case not all Dask.bag functions preserve this property. Examples >>> from operator import add >>> b = from_sequence([1, 2, 3, 4, 5], npartitions=2) >>> b.accumulate(add).compute() [1, 3, 6, 10, 15] Accumulate also takes an optional argument that will be used as the first value. >>> b.accumulate(add, initial=-1) [-1, 0, 2, 5, 9, 14] distinct()¶ Distinct elements of collection Unordered without repeats. >>> b = from_sequence(['Alice', 'Bob', 'Alice']) >>> sorted(b.distinct()) ['Alice', 'Bob'] filter(predicate)¶ Filter elements in collection by a predicate function. >>> def iseven(x): ... return x % 2 == 0 >>> import dask.bag as db >>> b = db.from_sequence(range(5)) >>> list(b.filter(iseven)) [0, 2, 4] flatten()¶ Concatenate nested lists into one long list. >>> b = from_sequence([[1], [2, 3]]) >>> list(b) [[1], [2, 3]] >>> list(b.flatten()) [1, 2, 3] fold(binop, combine=None, initial='__no__default__', split_every=None)¶ Parallelizable reduction Fold is like the builtin function reduceexcept that it works in parallel. Fold takes two binary operator functions, one to reduce each partition of our dataset and another to combine results between partitions binop: Binary operator to reduce within each partition combine: Binary operator to combine results from binop Sequentially this would look like the following: >>> intermediates = [reduce(binop, part) for part in partitions] >>> final = reduce(combine, intermediates) If only one function is given then it is used for both functions binopand combineas in the following example to compute the sum: >>> def add(x, y): ... return x + y >>> b = from_sequence(range(5)) >>> b.fold(add).compute() 10 In full form we provide both binary operators as well as their default arguments >>> b.fold(binop=add, combine=add, initial=0).compute() 10 More complex binary operators are also doable >>> def add_to_set(acc, x): ... ''' Add new element x to set acc ''' ... return acc | set([x]) >>> b.fold(add_to_set, set.union, initial=set()).compute() {1, 2, 3, 4, 5} See also foldby(key, binop, initial='__no__default__', combine=None, combine_initial='__no__default__', split_every=None)¶ Combined reduction and groupby. Foldby provides a combined groupby and reduce for efficient parallel split-apply-combine tasks. The computation >>> b.foldby(key, binop, init) is equivalent to the following: >>> def reduction(group): ... return reduce(binop, group, init) >>> b.groupby(key).map(lambda (k, v): (k, reduction(v))) But uses minimal communication and so is much faster. >>> b = from_sequence(range(10)) >>> iseven = lambda x: x % 2 == 0 >>> add = lambda x, y: x + y >>> dict(b.foldby(iseven, add)) {True: 20, False: 25} Key Function The key function determines how to group the elements in your bag. In the common case where your bag holds dictionaries then the key function often gets out one of those elements. >>> def key(x): ... return x['name'] This case is so common that it is special cased, and if you provide a key that is not a callable function then dask.bag will turn it into one automatically. The following are equivalent: >>> b.foldby(lambda x: x['name'], ...) >>> b.foldby('name', ...) Binops It can be tricky to construct the right binary operators to perform analytic queries. The foldbymethod accepts two binary operators, binopand combine. Binary operators two inputs and output must have the same type. Binop takes a running total and a new element and produces a new total: >>> def binop(total, x): ... return total + x['amount'] Combine takes two totals and combines them: >>> def combine(total1, total2): ... return total1 + total2 Each of these binary operators may have a default first value for total, before any other value is seen. For addition binary operators like above this is often 0or the identity element for your operation. split_every Group partitions into groups of this size while performing reduction. Defaults to 8. >>> b.foldby('name', binop, 0, combine, 0) See also toolz.reduceby, pyspark.combineByKey frequencies(split_every=None, sort=False)¶ Count number of occurrences of each distinct element. >>> b = from_sequence(['Alice', 'Bob', 'Alice']) >>> dict(b.frequencies()) {'Alice': 2, 'Bob', 1} groupby(grouper, method=None, npartitions=None, blocksize=1048576, max_branch=None, shuffle=None)¶ Group collection by key function This requires a full dataset read, serialization and shuffle. This is expensive. If possible you should use foldby. See also Examples >>> b = from_sequence(range(10)) >>> iseven = lambda x: x % 2 == 0 >>> dict(b.groupby(iseven)) {True: [0, 2, 4, 6, 8], False: [1, 3, 5, 7, 9]} join(other, on_self, on_other=None)¶ Joins collection with another collection. Other collection must be one of the following: - An iterable. We recommend tuples over lists for internal performance reasons. - A delayed object, pointing to a tuple. This is recommended if the other collection is sizable and you’re using the distributed scheduler. Dask is able to pass around data wrapped in delayed objects with greater sophistication. - A Bag with a single partition You might also consider Dask Dataframe, whose join operations are much more heavily optimized. Examples >>> people = from_sequence(['Alice', 'Bob', 'Charlie']) >>> fruit = ['Apple', 'Apricot', 'Banana'] >>> list(people.join(fruit, lambda x: x[0])) [('Apple', 'Alice'), ('Apricot', 'Alice'), ('Banana', 'Bob')]: >>> b.map(lambda x: x + 1).compute() [1, 2, 3, 4, 5] Apply a function with arguments from multiple bags: >>> from operator import add >>> b.map(add, b2).compute() [5, 7, 9, 11, 13] Non-bag arguments are broadcast across all calls to the mapped function: >>> b.map(add, 1).compute() [1, 2, 3, 4, 5] Keyword arguments are also supported, and have the same semantics as regular arguments: >>> def myadd(x, y=0): ... return x + y >>> b.map(myadd, y=b2).compute() [5, 7, 9, 11, 13] >>> b.map(myadd, y=1).compute() [1, 2, 3, 4, 5] Both arguments and keyword arguments can also be instances of dask.bag.Item. Here we’ll add the max value in the bag to each element: >>> b.map(myadd, b.max()).compute() [4, 5, 6, 7, 8]. pluck(key, default='__no__default__')¶ Select item from all tuples/dicts in collection. >>> b = from_sequence([{'name': 'Alice', 'credits': [1, 2, 3]}, ... {'name': 'Bob', 'credits': [10, 20]}]) >>> list(b.pluck('name')) ['Alice', 'Bob'] >>> list(b.pluck('credits').pluck(0)) [1, 10] random_sample(prob, random_state=None)¶ Return elements from bag with probability of prob. Examples >>> import dask.bag as db >>> b = db.from_sequence(range(5)) >>> list(b.random_sample(0.5, 42)) [1, 3] >>> list(b.random_sample(0.5, 42)) [1, 3] reduction(perpartition, aggregate, split_every=None, out_type=<class 'dask.bag.core.Item'>, name=None)¶ Reduce collection with reduction operators. Examples >>> b = from_sequence(range(10)) >>> b.reduction(sum, sum).compute() 45 remove(predicate)¶ Remove elements in collection that match predicate. >>> def iseven(x): ... return x % 2 == 0 >>> import dask.bag as db >>> b = db.from_sequence(range(5)) >>> list(b.remove(iseven)) [1, 3] repartition(npartitions)¶ Coalesce bag into fewer partitions. Examples >>> b.repartition(5) # set to have 5 partitions starmap(func, **kwargs)¶ Apply a function using argument tuples from the given bag. This is similar to itertools.starmap, except it also accepts keyword arguments. In pseudocode, this is could be written as: >>> def starmap(func, bag, **kwargs): ... return (func(*args, **kwargs) for args in bag) Examples >>> import dask.bag as db >>> data = [(1, 2), (3, 4), (5, 6), (7, 8), (9, 10)] >>> b = db.from_sequence(data, npartitions=2) Apply a function to each argument tuple: >>> from operator import add >>> b.starmap(add).compute() [3, 7, 11, 15, 19] Apply a function to each argument tuple, with additional keyword arguments: >>> def myadd(x, y, z=0): ... return x + y + z >>> b.starmap(myadd, z=10).compute() [13, 17, 21, 25, 29] Keyword arguments can also be instances of dask.bag.Itemor dask.delayed.Delayed: >>> max_second = b.pluck(1).max() >>> max_second.compute() 10 >>> b.starmap(myadd, z=max_second).compute() [13, 17, 21, 25, 29] str¶ String processing functions Examples >>> import dask.bag as db >>> b = db.from_sequence(['Alice Smith', 'Bob Jones', 'Charlie Smith']) >>> list(b.str.lower()) ['alice smith', 'bob jones', 'charlie smith'] >>> list(b.str.match('*Smith')) ['Alice Smith', 'Charlie Smith'] >>> list(b.str.split(' ')) [['Alice', 'Smith'], ['Bob', 'Jones'], ['Charlie', 'Smith']] to_av(optimize_graph=True)¶ Convert into a list of dask.delayedobjects, one per partition. See also to_textfiles. topk(k, key=None, split_every=None)¶ K largest elements in collection Optionally ordered by some key function >>> b = from_sequence([10, 3, 5, 7, 11, 4]) >>> list(b.topk(2)) [11, 10] >>> list(b.topk(2, lambda x: -x)) [3, 4] unzip(n)¶ Transform a bag of tuples to nbags of their elements. Examples >>> b = from_sequence([(i, i + 1, i + 2) for i in range(10)]) >>> first, second, third = b.unzip(3) >>> isinstance(first, Bag) True >>> first.compute() [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] Note that this is equivalent to: >>> first, second, third = (b.pluck(i) for i in range(3)) Other functions¶ dask.bag. from_sequence(seq, partition_size=None, npartitions=None)¶ Create a dask Bag from Python sequence. This sequence should be relatively small in memory. Dask Bag works best when it handles loading your data itself. Commonly we load a sequence of filenames into a Bag and then use .mapto open them. Examples >>> b = from_sequence(['Alice', 'Bob', 'Chuck'], partition_size=2) dask.bag. from_delayed(values)¶ Create bag from many dask Delayed objects. These objects will become the partitions of the resulting Bag. They should evaluate to a listor some other concrete sequence. See also dask.delayed Examples >>> x, y, z = [delayed(load_sequence_from_file)(fn) ... for fn in filenames] >>> b = from_delayed([x, y, z]) dask.bag. read_text(urlpath, blocksize=None, compression='infer', encoding='utf-8', errors='strict', linedelimiter='\n', collection=True, storage_options=None, files_per_partition=None)¶ Read lines from text files See also from_sequence - Build bag from Python sequence Examples >>> b = read_text('myfiles.1.txt') >>> b = read_text('myfiles.*.txt') >>> b = read_text('myfiles.*.txt.gz') >>> b = read_text('s3://bucket/myfiles.*.txt') >>> b = read_text('s3://key:[email protected]/myfiles.*.txt') >>> b = read_text('hdfs://namenode.example.com/myfiles.*.txt') Parallelize a large file by providing the number of uncompressed bytes to load into each partition. >>> b = read_text('largefile.txt', blocksize='10MB') dask.bag. from_url(urls)¶ Create a dask Bag from a url. Examples >>> a = from_url('') >>> a.npartitions 1 >>> a.take(8) (b'Dask\n', b'====\n', b'\n', b'|Build Status| |Coverage| |Doc Status| |Gitter| |Version Status|\n', b'\n', b'Dask is a flexible parallel computing library for analytics. See\n', b'documentation_ for more information.\n', b'\n') >>> b = from_url(['', '']) >>> b.npartitions 2 dask.bag. range(n, npartitions)¶ Numbers from zero to n Examples >>> import dask.bag as db >>> b = db.range(5, npartitions=2) >>> list(b) [0, 1, 2, 3, 4] dask.bag. concat(bags)¶ Concatenate many bags together, unioning all elements. >>> import dask.bag as db >>> a = db.from_sequence([1, 2, 3]) >>> b = db.from_sequence([4, 5, 6]) >>> c = db.concat([a, b]) >>> list(c) [1, 2, 3, 4, 5, 6] dask.bag.. dask.bag.: >>> db.map(lambda x: x + 1, b).compute() [1, 2, 3, 4, 5] Apply a function with arguments from multiple bags: >>> from operator import add >>> db.map(add, b, b2).compute() [5, 7, 9, 11, 13] Non-bag arguments are broadcast across all calls to the mapped function: >>> db.map(add, b, 1).compute() [1, 2, 3, 4, 5] Keyword arguments are also supported, and have the same semantics as regular arguments: >>> def myadd(x, y=0): ... return x + y >>> db.map(myadd, b, y=b2).compute() [5, 7, 9, 11, 13] >>> db.map(myadd, b, y=1).compute() [1, 2, 3, 4, 5] Both arguments and keyword arguments can also be instances of dask.bag.Itemor dask.delayed.Delayed. Here we’ll add the max value in the bag to each element: >>> db.map(myadd, b, b.max()).compute() [4, 5, 6, 7, 8](20) >>> fizz = numbers.filter(lambda n: n % 3 == 0) >>> buzz = numbers.filter(lambda n: n % 5 == 0) >>> fizzbuzz = db.zip(fizz, buzz) >>> list(fizzbuzzz) [(0, 0), (3, 5), (6, 10), (9, 15), (12, 20), (15, 25), (18, 30)] When what you really wanted was more along the lines of the following: >>> list(fizzbuzzz) [(0, 0), (3, None), (None, 5), (6, None), (None 10), (9, None), (12, None), (15, 15), (18, None), (None, 20), (None, 25), (None, 30)]
http://docs.dask.org/en/latest/bag-api.html
CC-MAIN-2019-09
refinedweb
2,143
52.66
To find the largest value in a list or sequence, we construct the following loop: largest = Noneprint 'Before:', largestfor itervar in [3, 41, 12, 9, 74, 15]: if largest is None or itervar > largest : largest = itervar print 'Loop:', itervar, largestprint 'Largest:', largestWhen the program executes, the output is as follows value which we can store in a variable to mark the variable as “empty”. Before the loop starts, the largest value we have seen so far is None since we have not yet seen any values. While the loop is executing, if largest is None then we take the first value we see as the largest so far. You can see in the first iteration when the value of itervar is 3, since largest is None, we immediately set largest to be 3. After the first iteration, largest is no longer None, so the second part of the compound logical expression that checks itervar > largest triggers only when we see a value that is larger than the “largest so far”. When we see a new “even larger” value we take that new value for largest. You can see in the program output that largest progresses from 3 to 41 to 74. At the end of the loop, we have scanned all of the values and the variable largest now does contain the largest value in the list. To compute the smallest number, the code is very similar with one small change: smallest = None print 'Before:', smallestfor itervar in [3, 41, 12, 9, 74, 15]: if smallest is None or itervar < smallest: smallest = itervar print 'Loop:', itervar, smallestprint 'Smallest:', smallest Again, smallest is the “smallest so far” before, during, and after the loop executes. When the loop has completed, smallest contains the minimum value in the list. Again as in counting and summing, the built-in functions max() and min() make writing these exact loops unnecessary. The following is a simple version of the Python built-in min() function: def min(values): smallest = None for value in values: if smallest is None or value < smallest: smallest = value return smallest In the function version of the smallest code, we removed all of the print statements so as to be equivalent to the min function which is already built-in to Python. - 瀏覽次數:2301
http://www.opentextbooks.org.hk/zh-hant/ditatopic/6706
CC-MAIN-2021-17
refinedweb
381
56.63
#include <stdlib.h> int mbtowc(wchar_t *pwc, const char *s, size_t n); int wctomb(char *s, wchar_t wchar); int mblen(const char *s, size_t n); #include <wchar.h> int mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps); int wcrtomb(char *s, wchar_t wc, mbstate_t *ps); int mbrlen(const char *s, size_t n, mbstate_t *ps); wctomb- convert a wide character to a multibyte character mblen- determine the number of bytes in a multibye character mbrtowc- convert a multibyte character to a wide character (restartable) wcrtomb- convert a wide character to a multibyte character (restartable) mbrlen- determine the number of bytes in a multibye character (restartable) Traditional computer systems assumed that a character of a natural language can be represented in one byte of storage. However, languages such as Japanese, Korean, or Chinese, require more than one byte of storage to represent a character. These characters are called ``multibyte characters''. Such character sets are often called ``extended character sets''. The number of bytes of storage required by a character in a given locale is defined in the LC_CTYPE category of the locale (see setlocale(S)). The maximum number of bytes in a multibyte character in an extended character set in the current locale is given by the macro, MB_CUR_MAX, defined in stdlib.h. Multibyte character handling functions provide the means of translating multibyte characters into a bit pattern which is stored in a data type, wchar_t. mbtowc(S) determines the number of bytes that comprise the multibyte character pointed to by s. If pwc is not a null pointer, mbtowc( ) converts the multibyte character to a wide character and places the result in the object pointed to by pwc. (The value of the wide character corresponding to the null character is zero.) At most n bytes are examined, starting at the byte pointed to by s. wctomb(S) determines the number of bytes needed to represent the multibyte character corresponding to the code whose value is wchar, and, if s is not a null pointer, stores the multibyte character representation in the array pointed to by s. At most MB_CUR_MAX bytes are stored. mblen(S) determines the number of bytes comprising the multibyte character pointed to by s. It is equivalent to: mbtowc((wchar_t *)0, s, n) The functions mbrtowc( ), wcrtomb( ), and mbrlen( ) are essentially the same as the above three functions, except that the conversion state on entry is specified by the mbstate_t object pointed to by ps: where internal is the address of the internal mbstate_t object for mbrlen( ). ps can also be a null pointer for mbrtowc( ) and wcrtomb( ). If s is a null pointer, wctomb( ) returns zero. If s is not a null pointer, wctomb( ) returns -1 if the value of wchar does not correspond to a valid multibyte character. Otherwise it returns the number of bytes that comprise the multibyte character corresponding to the value of wchar. mbrlen( ) returns a value between -2 and n, inclusive; see mbrtowc( ). If s is a null pointer, mbrtowc( ) and wcrtomb( ) return the number of bytes necessary to enter the initial shift state. The value returned cannot be greater than MB_CUR_MAX. If s is not a null pointer, wcrtomb( ) returns the number of bytes stored in the array object (including any shift sequences) when wc is a valid wide character; otherwise (when wc is not a valid wide character), an encoding error occurs, the value of the macro [EILSEQ] is stored in errno and -1 is returned, but the conversion state is unchanged. If s is not a null pointer, mbrtowc( ) returns the first of the following that applies: ANSI X3.159-1989 Programming Language -- C, X/Open CAE Specification, System Interfaces and Headers, Issue 4, 1992, and IEEE POSIX Std 1003.1-1990 System Application Program Interface (API) [C Language] (ISO/IEC 9945-1) . mbrtowc(S), wcrtomb(S), and mbrlen(S) are not part of any currently supported standard; they were developed by UNIX System Laboratories, Inc. and are maintained by The SCO Group.
http://osr507doc.xinuos.com/cgi-bin/man?mansearchword=wctomb&mansection=S&lang=en
CC-MAIN-2020-50
refinedweb
666
57.5
Calculate The Biased Standard Deviation Of All Elements In A PyTorch Tensor Calculate the biased standard deviation of all elements in a PyTorch Tensor by using the PyTorch std operation < > Code: Transcript: First, we import the Python math module. import math Then we import PyTorch. import torch We print the PyTorch version we are using. print(torch.__version__) We are using PyTorch 0.3.1.post2. Now, let’s manually create the PyTorch tensor we’re going to use in this example. pt_tensor_ex = torch.FloatTensor( [ [ [36, 36, 36], [36, 36, 36], [36, 36, 36] ] , [ [72, 72, 72], [72, 72, 72], [72, 72, 72] ] ]) We use torch.FloatTensor, we pass in the data structure, and we assign it to the Python variable pt_tensor_ex. We construct this tensor in this way so that it will be straightforward to calculate the biased standard deviation of the tensor. Then we print the pt_tensor_ex Python variable to see what we have. print(pt_tensor_ex) We see that we have one tensor that’s sized 2x3x3 and it’s a PyTorch FloatTensor. The first matrix is full of 36s, and the second matrix is full of 72s, just like we defined it. Next, let’s calculate the biased standard deviation of all the elements in the PyTorch tensor by using the torch.std. pt_biased_std_ex = torch.std(pt_tensor_ex, unbiased=False) We’re passing in our pt_tensor_ex Python variable and we’re going to set the parameter unbiased as False. That means we’re going to be calculating the biased standard deviation. We’re assigning that value that’s going to be returned to the Python variable pt_biased_std_ex. Then we print this variable to see the value. print(pt_biased_std_ex) We see that we get 18.0. All right, now that we have our result, let’s double check it manually to make sure we’re comfortable with what was calculated. First, let’s reacquaint ourselves with how we calculate the biased standard deviation. First, we calculate the mean, then we subtract the mean from each element, then we square the result, and we do a summation over all of the elements, and then we divide the summation result by N, then we take the square root. If we were doing the unbiased estimator, then this would be n-1 which is Bessel’s Correction. But because we’re calculating the biased standard deviation, or the population standard deviation, we divide by N. When we calculate the biased standard deviation, we are asserting that we are calculating the standard deviation over the whole population, which is why we use N rather than n-1. So now, let’s check the calculation manually. We’ll start by calculating the mean of the tensor using torch.mean and passing our pt_tensor_ex variable, and assigning the result to the Python variable pt_tensor_mean_ex. pt_tensor_mean_ex = torch.mean(pt_tensor_ex) We then print the pt_tensor_mean_ex Python variable: print(pt_tensor_mean_ex) To see that the value is 54.0. Now that we have the mean in hand, we want to subtract the mean from every single element in our pt_tensor_ex PyTorch tensor to demean it. pt_tensor_transformed_ex = pt_tensor_ex - pt_tensor_mean_ex Then we’re going to assign it to the Python variable pt_tensor_transformed_ex. When we print this variable: print(pt_tensor_transformed_ex) We see that the first matrix is full of negative 18s, the second matrix is full of positive 18s. 36 minus 54 is negative 18. 72 minus 54 is 18. Okay, we’re happy with that. That makes sense. Then we want to square each element using PyTorch’s pow operation. pt_tensor_squared_transformed_ex = torch.pow(pt_tensor_transformed_ex, 2) So we pass in our pt_tensor_transformed_ex, and we’re going to raise it to the power of 2, and we assign it to the Python variable pt_tensor_squared_transformed_ex. We can then print this variable to see what we get. print(pt_tensor_squared_transformed_ex) We know that 18 squared is 324 and negative 18 squared is 324. So this makes sense. Now that each number has been demeaned and squared, let’s sum all of the elements in the tensor to get one value. pt_tensor_squared_transformed_sum_ex = torch.sum(pt_tensor_squared_transformed_ex) So we use torch.sum, we pass in our pt_tensor_squared_transformed_ex variable, and we’re going to assign it to the Python variable pt_tensor_squared_transformed_sum_ex. When we print this variable: print(pt_tensor_squared_transformed_sum_ex) we can see that we get the value 5832. Because we are using a tensor that is 2x3x3, it means there are 2*3 = 6 * 3 = 18 elements. Also remembering that we’re doing the population standard deviation or the biased standard deviation, we don’t have to use Bessel’s Correction. So we’re going to divide this number by 18 and not 18-1. So we do 5832/18: 5832 / 18 To get 324.0. Lastly, we use the Python math module square root to take this expression and get the square root of it. math.sqrt(5832 / 18) When we do that, we get 18.0. Let’s compare it to the biased standard deviation calculation result we computed earlier. So we print pt_biased_std_ex: print(pt_biased_std_ex) And we see that it’s 18.0 as well. Perfect - We were able to calculate the biased standard deviation of all elements in a PyTorch tensor by using the PyTorch tensor std operation.
https://aiworkbox.com/lessons/calculate-the-biased-standard-deviation-of-all-elements-in-a-pytorch-tensor
CC-MAIN-2020-40
refinedweb
871
64.51
D3blackbox magic trick – render anything in 30 seconds Let me show you a magic trick. 30 seconds to take a random D3 piece of code and add it to your React project. We can try it on the example barchart from before. You can try it online. When you hover on a bar, it changes color. Pretty neat. I recommend you follow along in a CodeSandbox. If you fork the react-d3-axis-hoc CodeSandbox that will be easiest. You should already have the D3blackbox HOC. If you don't, make a new file and paste it in. With your HOC ready, create a new file in CodeSandbox. Call it Barchart.js. Add your imports: import React from "react"import D3blackbox from "./D3blackbox"import * as d3 from "d3" This gives you React, our HOC, and D3. Now right-click view code on that barchart and copy the code. Wrap it in a D3blackbox call. Like this: const Barchart = D3blackbox(function () )})})})export default Barchart That should throw some errors. We have to change the d3.select and get width and height from props. const Barchart = D3blackbox(function () {// Delete the line(s) between here...var svg = d3.select("svg"),// ...and here.// Insert the line(s) between here...var svg = d3.select(this.anchor.current)// ...and here.margin = {top: 20, right: 20, bottom: 30, left: 40},// Delete the line(s) between here...width = +svg.attr("width") - margin.left - margin.right,height = +svg.attr("height") - margin.top - margin.bottom;// ...and here.// Insert the line(s) between here...width = +this.props.width - margin.left - margin.right,height = +this.props.height - margin.top - margin.bottom;// ...and here. Most D3 examples use a global svg variable to refer to their drawing area – the SVG. Change that to the element you want, your anchor, and the whole visualization should render in there. We also replaced reading width and height from the SVG element to getting them from props. This makes our component more reusable and better follows best practices. Next step is to change where our barchart gets its data. Gotta use the public URL. //Delete the line(s) between here...d3.tsv("data.tsv", function(d) {// ...and here.// Insert the line(s) between here...d3.tsv("", function(d) {// ...and here.d.frequency = +d.frequency;return d;// Delete the line(s) between here...}, function(error, data) {if (error) throw error;// ...and here.// Insert the line(s) between here...}).then(function(data) {// ...and here. Same link, absolute version. And we updated the callback-based code to use the D3v5 promises version. That's the most disruptive change going from v4 to v5 I believe. That's it. You now have a Barchart component that renders the example barchart from D3's docs. You can use it like this 👇 I recommend adding this code to the main App component that CodeSandbox creates for you. import Barchart from "./Barchart"// ...return (<svg width="800" height="600"><Barchart x={10} y={10} width={400} height={300} /></svg>) But like I said, don't use this in production. It's great for quick prototypes, trying stuff out, or seeing how an existing visualization might fit your app. A note about D3blackbox To make your life easier, I have open sourced my version of the D3blackbox HOC. You can read more about it at d3blackbox.com Works the same as the HOC we just built together, adds the anchor ref, props, and state to function arguments so it's easier to use. No need to mess with this if you don't want to :) Install it from npm: $ npm install d3blackbox Then use it as you would your own HOC: import React from "react"import D3blackbox from "d3blackbox"import * as d3 from "d3"const Barchart = D3blackbox(function (anchor, props, state) {const svg = d3.select(anchor.current)// the rest of your D3 code})export default Barchart The function you pass into D3blackbox is still your full D3 render. Except now you can access important values directly without using this. You can use my D3blackbox or build your own. What's important is that you now understand how higher order components work.
https://reactfordataviz.com/building-blocks/2/
CC-MAIN-2022-40
refinedweb
685
76.52
Functions in C++ programming Definition of C++ function A function is a collection of statements that performs a specific task. So far you have used functions in two ways: - you have created a function called main in every program you’ve written. - you have called library functions such as pow and sqrt. Functions are commonly used to break a problem down into small manageable pieces, or modules. Instead of writing one long function that contains all the statements necessary to solve a problem, several smaller functions can be written, with each one solving a specific part of the problem. Defining and calling functions A function call is a statement that causes a function to execute. A function definition contains the statements that make up the function. When creating a function, you must write its definition. All function definitions have the following parts: - Name. Every function must have a name. In general, the same rules that apply to variable names also apply to function names. - Parameter list. The parameter list is the list of variables that hold the values being passed to the function. If no values are being passed to the function, its parameter list is empty. - Body. The body of a function is the set of statements that carry out the task the function is performing. These statements are enclosed in a set of braces. - Return type. A function can send a value back to the program module that called it. The return type is the data type of the value being sent back. A function is executed when it is called. Function main is called automatically when a program starts, but all other functions must be executed by function call statements. #include <iostream> using namespace std; void displayMessage() // create displayMessage function { cout << "Hello from the function displayMessage.\n"; } int main() { cout << "Hello from main.\n"; displayMessage(); // Call displayMessage function return 0; } Output: Hello from main. Hello from the function displayMessage. Each call statement causes the program to branch to a function and then back to main when the function is finished. Any argument listed inside the parentheses of a function call is copied into the function’s parameter variable. In essence, parameter variables are initialized to the value of the corresponding arguments passed to them when the function is called. The program demonstrates a function with a parameter. #include <iostream> using namespace std; // Function prototype void displayValue(int num); int main() { cout << "I am passing several values to displayValue.\n"; displayValue(5); // Call displayValue with argument 5 displayValue(10); // Call displayValue with argument 10 displayValue(2); // Call displayValue with argument 2 displayValue(16); // Call displayValue with argument 16 cout << "Now I am back in main.\n"; return 0; } void displayValue(int num) { cout << "The value is " << num << endl; } Output: I am passing several values to displayValue. The value is 5 The value is 10 The value is 2 The value is 16 Now I am back in main. The displayValue function is called four times, and each time num takes on a different value. Any expression whose value could normally be assigned to num may be used as an argument. When a function is called, it is best if each argument passed to it has the same data type as the parameter receiving it. Ads Right
https://www.infocodify.com/cpp/functions
CC-MAIN-2020-34
refinedweb
548
63.9
8056/what-is-the-use-of-assert-keyword-in-java Java assertion feature allows the developer to put assert statements in Java source code to help unit testing and debugging. Assert keyword validates certain expressions. It replaces the if block effectively and throws an AssertionError on failure. An example of a short version of assert keyword: public class Assertion { public static void main(String[] args) { int num = Integer.parseInt(args[0]); assert num <= 10; // stops if num > 10 System.out.println("Pass"); } } Whenever you require to explore the constructor ...READ MORE @Override annotation is used when we override ...READ MORE In Java, items with the final modifier cannot be ...READ MORE If you use String concatenation in a ...READ MORE You can use Java Runtime.exec() to run python script, ...READ MORE First, find an XPath which will return ...READ MORE See, both are used to retrieve something ...READ MORE Nothing to worry about here. In the ...READ MORE There are two approaches to this: for(int i ...READ MORE The native keyword is applied to a method to ...READ MORE OR Already have an account? Sign in.
https://www.edureka.co/community/8056/what-is-the-use-of-assert-keyword-in-java
CC-MAIN-2021-10
refinedweb
188
69.79
As many readers may know, Catch is a test framework that I originally wrote (and still largely maintain) for C++ [Catch]. It’s been growing steadily in popularity and has found its way to the dubious spotlight of HackerNews on more than one occasion. The most recent of such events was late last August. I was holidaying with my family at the time and didn’t get to follow the thread as it was unfolding so had to catch up with the comments when I got back. One of them [HackerNews] stuck out because it called me out on describing Catch as a ‘Modern C++’ framework (the commenter recommended another framework, Bandit, as being ‘more modern’). I first released Catch back in 2010. At that time C++11 was still referred to as C++1x (or even C++0x!) and the final release date was uncertain. So Catch was written to target C++03. When I described it as being ‘modern’ it was in that context and I was emphasising that it was a break from the past. Most other C++ frameworks were just reimplementations of JUnit in C++ and did not really embrace the language as it was then. The use of expression templates for decomposing the expressions under test was also a factor.! [Moene12]. But it is enough that the baseline for what constitutes ‘modern C++’ has definitely moved on. And now C++14 is here too [Sutter14] – pushing it even further forward. ‘Modern’ is not what it used to be What does it mean to be a ‘Modern ‘no ‘modern [Moene]. - Bandit – this is the one mentioned in the Hacker News comment I kicked off with [Karlsson]. - Mettle – Seeing this mentioned in a tweet from @MeetingCpp is what kicked off the train of thought that led me to this article [Porter]. – whose sole purposes is to forward the function pointer onto a global registry. Later, when the tests are being run, the registry is iterated and the function pointers invoked. So a test case like this: TEST_CASE( "test name", "[tags]" ) { /* ... */ } ...written out in full (after macro expansion) looks something Listing 1. (. Since the first version of this article was published on my blog the author of Lest commented that he now uses a macro for test case registration too. He also reported that, at least with present compilers, the lambda-based version has a significant compile-time overhead and (again, as the author commented on my blog) Mettle now uses a macro for expect() in order to capture that information. ‘cost’ ‘hidden’ calls before you get to the expression you supplied (in Visual Studio, at least, this can be mitigated by excluding the Catch namespace using the StepOver registry key [Pennell04]).! That said, the future may hold a non-macro solution even for that, in the form of proposal N4129 for a source_context type to be provided by the language [N4129].. References [Catch] [HackerNews] [Karlsson] [Moene] [Moene12] [N4129] [Pennell04] [Porter] [Sutter14]
https://accu.org/index.php/journals/2064
CC-MAIN-2019-18
refinedweb
494
69.52
Hi there and welcome to kelvSYC's little corner of Wikibooks! I'm a contributor to the various game guides here at Wikibooks. Among my significant projects include the Wikibooks Pokémon Guide, which tries to be the companion to the English Wikipedia's w:Wikipedia:WikiProject Pokédex, and MegaMan Battle Network, a book dedicated to the video game series. I am also an administrator here at Wikibooks (and in no other Wikimedia wiki). If you have some important Wikibooks-related admining to do, then you should leave a message at my talk page. I will try to check VFD and speedy weekly and delete all the filth there, as a continued commitment to an admin. I also intend to strictly enforce the intention of Wikibooks as a repository of instructional material. My admin philosophyEdit Many people (wikipedians especially) are in the belief that Wikibooks is just a repository of book-length material, and thus believe that Wikibooks can be a place to expand Wikipedia articles in the hopes of making it an in-depth encyclopedia. This is contrary to WB:WIN. I do aggresively seek out article forks and nominate them for VFD, but I do this infrequently due to the possibility of organic growth and the fact that I have better things to do. I am also a proponent for enforcing the Wikibooks naming conventions, but I rarely do so due to other commitments and the acknowledgement that it is a gradual process (MediaWiki, however, is very weak in regards to managing how books are organized - tree-like subpage or graph-like namespace conventions are still very arbitrary and have weak back-end support). Let me remind you that Wikibooks is a place for instructional material. VFD precedents have shown that an encyclopedia article or a long biography is not instuctional material in and of itself. My projectsEdit Here are the big books I've been working on lately: MegaMan Battle NetworkEdit I'm the founder of this book, which attempts to be a complete strategy guide to the game. Currently I am working on the walkthrough of BN5, others may come later. The following is my BN5 to-do list To doEdit - Team ProtoMan dialog - finish price lists in Higsby's chip order - finish patch code list for infinite chips in folder - how do I fit in Number Trader codes, NCP compress codes, etc...? PokémonEdit Pokémon is another book that I have created, among which Wikibooks Pokédex is the big part (and constitutes one of the larger Wikibooks). Since WB Pokédex is the largest part of Pokémon, currently a lot of it is data (and thus not very instructional in nature). I hope that contributors can help put more emphasis on teaching others how to finish the game. The following is my WB Pokédex to-do list To do listEdit - Update all move lists for Emerald - FL/E move tutor moves - Links to Wikipedia's Pokédex (although I'd have to deal with some merge talk there) - Perhaps go over the level-up movelists for each series and check if the evolution section needs to be updated (eg. a lower form learns a move but the higher form does not) — or perhaps just eliminate the evolution section altogether... - More Japanese/English parity - eg. only the English cards are listed here so far... - EX Emerald card lists... When WP started, MediaWiki was in its early 1.3 stages, and templates containing links didn't work as most people planned it to work (eg. {{foo|bar=[[baz|]]}} had two template parameters and not one, so you could never use piped links). But now that it works, I may want to redo the evolution templates. The major obstacle to making templates out of the move tables is the 5 inclusion limit currently in MW 1.3. I'd like to standardize widths and mess with the look with CSS a bit later on, so that there is more uniformity in each entry. Now that it's resolved in 1.4, the conversion process can get under way, although it will take a while as I try to perfect my styles. Other plans for Wikibooks Pokédex include: - Attack index for the RPGs (I'm currently considering whether to include them in the Pokédex or put them elsewhere) - Super Smash Bros movelists for the relevant Pokémon (or at least a link to the appropriate book...) - Petitioning for a separate namespace, or alternatively, moving to use the standard subpage convention? Related PagesEdit - For my work in Wikipedia, check out w:User:kelvSYC (talk) - For my work in Wiktionary, check out wikt:User:kelvSYC (talk)
http://en.m.wikibooks.org/wiki/User:KelvSYC
CC-MAIN-2014-42
refinedweb
770
58.62
Results 1 to 3 of 3 - Join Date - Oct 2007 - 84 - Thanks - 26 - Thanked 0 Times in 0 Posts Scanner nextDouble - decimal comma or point I'm just starting with Java and the following is not quite clear to me. I wrote this piece of very basic code and it only let's me input numbers with a decimal comma, not with a decimal point. I thought all computer input had to be with a decimal point? Or is this because of locale settings on my pc? (only tested in Eclips SDK) Code: import java.util.Scanner; public class ingave { private static Scanner myScannerThree; /** * @param args */ public static void main(String[] args) { myScannerThree = new Scanner(System.in); double amount; double getal; System.out.print("Give me a number: "); getal = myScannerThree.nextDouble(); amount = getal + 2.95; System.out.print("You entered "); System.out.print(getal); System.out.print(". The total amount is now: "); System.out.println(amount); } } Last edited by friz; 10-31-2012 at 02:24 AM. - Join Date - Sep 2002 - Location - Saskatoon, Saskatchewan - 17,025 - Thanks - 4 - Thanked 2,668 Times in 2,637 Posts Yeppers, Scanner is locale aware, so the number format is based on your system locale. You can change it using the scanner's useLocale(Locale) method. - Join Date - Oct 2007 - 84 - Thanks - 26 - Thanked 0 Times in 0 Posts Thank you!
http://www.codingforums.com/java-and-jsp/280176-scanner-nextdouble-decimal-comma-point.html?s=36b6f1c8aabc4217c8d1073076dd9600
CC-MAIN-2017-43
refinedweb
227
66.64
Unit Testing Assistance in JavaScript ReSharper helps discover and run unit tests of QUnit and Jasmine frameworks right in Visual Studio. With ReSharper, you can execute a single unit test, all tests in a file, project or solution. You can also execute any number of tests combined in a test session. In this topic: - Configuring JavaScript unit testing preferences - Discovering tests in current document - executing Tests in the current document - Discovering Unit Tests in Solution - executing Unit Tests in Project or Solution - Using Unit Test Sessions - Execution process - Analysing execution results and output Configuring JavaScript unit testing preferences If you use Jasmine framework, make sure to select the framework version on the Tools | Unit Testing | JavaScript Tests options page. By default, when the tests are started, ReSharper launches default web browser to show output from the unit testing framework. It runs the tests and reports the information back to ReSharper. If necessary, you can change the browser in the Tools | Unit Testing | JavaScript Tests options page. You can also choose to run tests with PhantomJS library without launching a browser. To do so, select PhantomJS and specify the path to the PhantomJS executable file and change the default command line arguments, if necessary. You can specify a custom HTML harness for your tests. The harness is compatible with the Chutzpah test runner and can use the special Chutzpah placeholders. To use a custom HTML harness - Tick the Enable custom HTML harness check box in the Tools | Unit Testing | JavaScript Tests options page. - If you do not have a harness file, you can create an empty HTML file, click the Copy default implementation to clipboard and paste the default harness template into the file. - Type a filename or path for the harness file. - Using the Test harness location selector, specify how the filename or path should be treated by the test runner. - Click Save to apply the modifications and let ReSharper choose where to save them, or save the modifications to a specific settings layer using the Save To drop-down list. For more information, see Managing and Sharing ReSharper Settings. Discovering tests in current document ReSharper discovers unit test suites and single unit tests of all supported frameworks right in the editor and adds the corresponding action indicators next to each item in the editor: The example below shows a unit test suite created using the Jasmine framework: - the function is a unit test that you can run - the function is a unit test suite and you can run containing tests - the unit test passed during the last execution. - tests in the unit test suite passed during the last execution. - the unit test failed during the last execution. - at least one test in the unit test suite failed during the last execution. Executing tests in the current document There are several ways to run unit tests in the current document. You can use action indicators, main menu or shortcuts: - To run a single test or all tests in a test class, click on the action indicator next to it or set the caret on the test /test suite and press Alt+Enter . In the action list , choose Run for a test or Run All for a test suite. - Alternatively, you can use the Run Unit Tests commands, which are available in the main menu ( ), in the context menu or with Ctrl+T,R shortcuts correspondingly. These commands work differently depending on the caret position or selection in the editor: - To run a single test or all tests in a test suite , set the caret at the test /test suite name or anywhere inside it in the editor . - To run several tests, select the desired tests in the editor . - To run all tests in the current file, either select all or set the caret outside test suites.. Discovering unit tests in solution ReSharper adds the Unit Test Explorer window to Visual Studio. Using this window, you can explore and run. To open Unit Test Explorer, chooseor in the main menu or press Ctrl+Alt+T. Unit Test Explorer allows you to do the following: - Explore tests in the solution: browse all unit tests in a list or tree view, search tests and filter by a substring, regroup unit tests by project, namespace, etc. - Navigate to source code of any test or test suite by double-clicking it in the view. - run selected tests. - Create unit tests sessions from selected tests and test suites and/or add selected items to the current test session. - Export all tests from solution to a text, XML, or HTML file. Executing unit tests in project or solution You can run tests from the Unit Test Explorer, Solution Explorer, or Class View. Unit Test Explorer gives you the advantage to see only tests and test suites , while using other windows you need to know, which projects, files, and classes contain tests. - To execute tests from Unit Test Explorer, select the desired tests and click Run Unit Tests on the toolbar or use the corresponding shortcuts (Ctrl+T,R ). - To run tests from Solution Explorer or Class View, select one or more items ( suites, files, folders, projects) that contain tests, and use the Run Unit Tests commands, which are available in the main menu ( ), in the context menu or with Ctrl+T,R shortcuts correspondingly. - To run all tests in solution, choosein the main menu or press Ctrl+T,L .. Using unit test sessions ReSharper allows you to group test suites and single unit tests that target specific part of your application into unit test sessions. A unit test session can contain tests from different test suites and projects. You can have multiple test sessions and run them separately as needed. A single test /test suite. You can use clickable links in the failure information to navigate directly to types and methods involved with the failure. aborted in the last test run. The same icons are used to display status of grouping items (suites, projects, etc.) The icons are also used on each session's tab to display the overall execution result of the sessions. The corresponding icons on the status bar show how many tests are in each of the status. The icon shows the total number of tests in the session.
https://www.jetbrains.com/help/resharper/9.2/ReSharper_by_Language__JavaScript__Unit_Testing.html
CC-MAIN-2018-05
refinedweb
1,045
59.43
We all know that every serious project needs CI/CD and I'm pretty sure that it's not necessary to explain why. There are a lot of tools, platforms and solution to choose from when deciding where to build your CI/CD, though. You could pick Jenkins, Travis, CircleCI, Bamboo, and many other, but if you're building CI/CD for cloud-native applications running on Kubernetes, then it just makes sense to also run cloud-native CI/CD along with it using appropriate tool. One such solution that allows you to run CI/CD natively on Kubernetes is Tekton, so in this article we will begin series about building CI/CD with Tekton, starting with introduction, installation and customization of Tekton to kick-start our journey to cloud-native CI/CD on Kubernetes. TL;DR: All resources, scripts and files needed to kick-start your CI/CD with Tekton are available at What is it? (and Why Even Bother?) As title and intro implies, Tekton is cloud native CI/CD tool. It was originally developed at Google and was known as Knative pipelines. It runs on Kubernetes as a set of custom resources (CRDs) such as Pipeline or Task which lifecycle is managed by Tekton's controller. The fact that it natively runs on Kubernetes makes it ideal to manage/build/deploy any applications and resources that are also being deployed on Kubernetes. This shows that it's suitable for managing Kubernetes workloads, but why not use other, more popular tools for this? Commonly used CI/CD solutions such as Jenkins, Travis or Bamboo weren't built to run on Kubernetes or lack proper integration with Kubernetes. This makes it difficult and/or annoying to deploy, maintain and manage the CI/CD tool itself as well as use it to deploy any Kubernetes-native applications with it. Tekton on the other hand can be deployed very easily as Kubernetes operator alongside all the other containerized applications and every Tekton pipeline is just another Kubernetes resource managed the same way as good old Pods or Deployments. This also makes Tekton work well with GitOps practices, as you can take all your pipelines and configurations and maintain them in git, which cannot be said about at least one of the above mentioned tools (yes, I hate Jenkins with burning passion). Same goes for resource consumption - considering that whole Tekton deployment is just a couple of pods - a very little memory and CPU is consumed while pipelines are not running in comparison to other CI/CD tools. With that said, it's pretty clear that if you're running all your workloads on Kubernetes, then it's very much advisable to use some Kubernetes-native tool for your CI/CD. Is the Tekton the only option though? No, there are - of course - other tools you could use, one of them being JenkinsX which is an opinionated way to do continuous delivery with Kubernetes, natively. It packs a lot of tools, which can make your life easier if you don't have any strong preferences for alternative tooling, but it can also be very annoying if you want to customize your tech stack. JenkinsX uses Tekton in the background anyway though, so you might as well learn to use Tekton and then decide, whether you also want all the other components that JenkinsX provides. Another option would be Spinnaker - it's a multi-cloud solution that has been around for a long time. It uses plugins to integrate with various providers, one of them being Kubernetes. It's however, not a build engine - it does not provide tools to test your code, build your application images or push them to registry, for those task you would still need some other CI tool. Let's now take a closer look at what Tekton consists of - the core of Tekton consist of just a few CustomResourceDefinitions (CRDs), which are Tasks and Pipelines which act as a blueprints for TaskRuns and PipelineRuns. These four (plus a few other that are either about to be deprecated or aren't relevant right now) are enough to start running some pipelines and tasks. That however is usually not sufficient, considering that most setups require the builds, deployments - and therefore - also the pipelines to be triggered by some events. That's why we also install Tekton Triggers which provides additional resources, namely - EventListener, TriggerBinding and TriggerTemplate. These three resources provide means for us to listen to particular events - such as (GitHub) webhooks, CloudEvents or events sent by cron jobs - and fire up specific pipelines. Last - and very optional component - is Tekton Dashboard, which is a very simple GUI, yet very convenient tool for inspecting all CRDs, including tasks, pipelines and triggers. It also allows for searching and filtering, which can be helpful when looking for TaskRuns and PipelineRuns. You can also use it to create TaskRuns and PipelineRuns from existing Tasks and Pipelines. All these pieces are managed by controller deployments and pods, which take care of lifecycle of the above mentioned CRDs. Setting Things Up Considering that Tekton consists of multiple components, installing can be a little complicated and can be done in various ways. Usually you will want to install at least Pipelines and Triggers and the most obvious way would be to install it with raw Kubernetes manifests, but you can take the simpler route and install Tekton Operator from OperatorHub, which already includes all the parts. As a prerequisite (for any of the installation approaches) we will obviously need a cluster, here we will use KinD (Kubernetes in Docker) for local pipeline development. We will use following custom config for KinD, as we will need to deploy Ingress controller and expose port 80/443 to be able to reach Tekton Triggers event listener. # kind-tekton.yaml And we can create the cluster with following commands: ~ $ kind create cluster --name tekton --image=kindest/node:v1.20.2 --config=kind-tekton.yaml ~ $ kubectl cluster-info --context kind-tekton ~ $ kubectl config set-context kind-tekton ~ $ kubectl apply -f ~ $ kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=90s. If you happen to be running on OpenShift, the option you could use would be Red Hat Pipeline Operator, which is - again - Kubernetes Operator, but in this case curated by Red Hat and customized for OpenShift. It can be installed with just a few clicks in web console, so in case you have access to OpenShift cluster, then you should give it a try. One downside of using this is a slower release cycle so you will be forced to use not-quite-up-to-date version of Tekton. If OpenShift is not an option or you just want run things on Kubernetes, then installation using raw manifests will work just fine and this is how it's done: ~ $ kubectl apply -f # Deploy pipelines ~ $ kubectl apply -f # Deploy triggers ~ $ kubectl get svc,deploy --namespace tekton-pipelines --selector=app.kubernetes.io/part-of=tekton-pipelines NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/tekton-pipelines-controller ClusterIP 10.106.114.94 <none> 9090/TCP,8080/TCP 2m13s service/tekton-pipelines-webhook ClusterIP 10.105.247.0 <none> 9090/TCP,8008/TCP,443/TCP,8080/TCP 2m13s NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/tekton-pipelines-controller 1/1 1 1 2m13s deployment.apps/tekton-pipelines-webhook 1/1 1 1 2m13s If you want to also include Tekton Dashboard in this installation, then you need to apply one more set of manifests: ~ $ kubectl apply -f # Deploy dashboard ~ $ kubectl get svc,deploy -n tekton-pipelines --selector=app=tekton-dashboard NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/tekton-dashboard ClusterIP 10.111.144.87 <none> 9097/TCP 25s NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/tekton-dashboard 1/1 1 1 25s On top of that we also need extra Ingress to reach the Dashboard: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: dashboard namespace: tekton-pipelines annotations: nginx.ingress.kubernetes.io/rewrite-target: '/$2' spec: rules: - paths: - path: /dashboard(/|$)(.*) pathType: Prefix backend: service: name: tekton-dashboard port: number: 9097 The previously applied Dashboard resources are by default created in tekton-pipelines namespace and include Service named tekton-dashboard that uses port 9097, which are the values referenced in the Ingress above. This Ingress also has rewrite rule to show the dashboard at /dashboard/... path instead of /. This is because we will want to use the default /(root) path for the webhook of our event listener (topic for later). To verify that the Dashboard really is live and everything is running, you can browse to localhost/dashboard/ (assuming you're using KinD) and you should see something like this (minus the actual pipeline): If all this setup seems like way too much effort, then you can grab the tekton-kickstarter repository and just run make and you will have all of the above ready in a minute. With this deployed, we have all the (very) basic pieces up and running, so let's poke around in CLI to see what we actually deployed with those you commands... Exploring Custom Resources If you followed the steps above (or just used make target from the kick-start repository), then you should have quite a few new resources in your cluster now. All the components of Tekton will be located in tekton-pipelines namespace and should include the following: ~ $ kubectl get deploy,service,ingress,hpa -n tekton-pipelines NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/tekton-dashboard 1/1 1 1 2m24s deployment.apps/tekton-pipelines-controller 1/1 1 1 6m57s deployment.apps/tekton-pipelines-webhook 1/1 1 1 6m57s deployment.apps/tekton-triggers-controller 1/1 1 1 6m56s deployment.apps/tekton-triggers-core-interceptors 1/1 1 1 6m56s deployment.apps/tekton-triggers-webhook 1/1 1 1 6m56s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/tekton-dashboard ClusterIP 10.108.143.42 <none> 9097/TCP 2m24s service/tekton-pipelines-controller ClusterIP 10.98.218.218 <none> 9090/TCP,8080/TCP 6m57s service/tekton-pipelines-webhook ClusterIP 10.101.192.94 <none> 9090/TCP,8008/TCP,443/TCP,8080/TCP 6m57s service/tekton-triggers-controller ClusterIP 10.98.189.205 <none> 9090/TCP 6m56s service/tekton-triggers-core-interceptors ClusterIP 10.110.47.172 <none> 80/TCP 6m56s service/tekton-triggers-webhook ClusterIP 10.111.209.100 <none> 443/TCP 6m56s NAME CLASS HOSTS ADDRESS PORTS AGE ingress.networking.k8s.io/dashboard <none> * localhost 80 2m24s NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE horizontalpodautoscaler.autoscaling/tekton-pipelines-webhook Deployment/tekton-pipelines-webhook <unknown>/100% 1 5 1 6m57s These include all the deployments, services as well as autoscaler which can help with higher availability in case of higher number of requests. If HA is required, then you can also look into docs section which explains how to configure Tekton for HA. Besides the resources shown above, you can also find event listeners and their resources in the default namespace. These could share namespace with the core components, but splitting them like this allows you to keep the pipelines and their webhooks divided based on application/project they are used for: kubectl get deploy,service,ingress,hpa -n default NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/el-cron-listener 1/1 1 1 8m40s deployment.apps/el- 1/1 1 1 8m40s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/el-cron-listener ClusterIP 10.100.238.60 <none> 8080/TCP 8m40s service/el- ClusterIP 10.98.88.164 <none> 8080/TCP 8m40s NAME CLASS HOSTS ADDRESS PORTS AGE ingress.networking.k8s.io/ <none> * localhost 80 8m40s Installation of Tekton also brings along couple of CRDs, which are used to manage all tasks, pipelines and triggers: kubectl get crd | grep tekton clustertasks.tekton.dev 2021-02-27T20:23:35Z clustertriggerbindings.triggers.tekton.dev 2021-02-27T20:23:36Z conditions.tekton.dev 2021-02-27T20:23:35Z eventlisteners.triggers.tekton.dev 2021-02-27T20:23:36Z extensions.dashboard.tekton.dev 2021-02-27T20:28:08Z pipelineresources.tekton.dev 2021-02-27T20:23:35Z pipelineruns.tekton.dev 2021-02-27T20:23:35Z pipelines.tekton.dev 2021-02-27T20:23:35Z runs.tekton.dev 2021-02-27T20:23:35Z taskruns.tekton.dev 2021-02-27T20:23:35Z tasks.tekton.dev 2021-02-27T20:23:35Z triggerbindings.triggers.tekton.dev 2021-02-27T20:23:36Z triggers.triggers.tekton.dev 2021-02-27T20:23:36Z triggertemplates.triggers.tekton.dev 2021-02-27T20:23:36Z You can use these CRDs to list and inspect Tasks and Pipelines with kubectl get or kubectl describe. For every user of Kubernetes, the natural way of interacting with resources is using kubectl, but Tekton also has it's own CLI tool called tkn. You can download it from this release page. This CLI allows you to interact with Tekton resources without having to deal with CRDs. As an example you can list or inspect a Pipelines: ~ $ tkn pipeline list NAME AGE LAST RUN STARTED DURATION STATUS database-backup 12 hours ago job-qxcwc 39 minutes ago 8 minutes Failed deploy 12 hours ago --- --- --- --- ~ $ tkn pipeline describe deploy # ... Long and verbose output Besides inspecting resources, you can also use it to start TaskRuns or PipelineRuns and subsequently read the logs without having to look up individual pods: ~ $ tkn task start send-to-webhook-slack ? Value for param `webhook-secret` of type `string`? slack-webhook ? Value for param `message` of type `string`? Hello There! TaskRun started: send-to-webhook-slack-run-d5sxv In order to track the TaskRun progress run: tkn taskrun logs send-to-webhook-slack-run-d5sxv -f -n default ~ $ tkn taskrun logs send-to-webhook-slack-run-d5sxv -f -n default [post] % Total % Received % Xferd Average Speed Time Time Time Current [post] Dload Upload Total Spent Left Speed 100 23 0 0 100 23 0 111 --:--:-- --:--:-- --:--:-- 111 As you can see above, it even prompts you for parameters if you don't specify them initially! One thing that annoys me to no end though, is the reversed order of arguments this CLI tool uses compared to kubectl. With kubectl the order is kubectl <VERB> <RESOURCE> and with tkn it's tkn <RESOURCE> <VERB> - a minor nitpick about otherwise very handy tool. Customizing Everything The installation that we've done already, puts in place some reasonable default values for all the configs. These can be changed a bit to better suit your needs and simplify things down the line. There are 2 ConfigMaps that we will take a look at: First of them is config-defaults, which - as name implies - sets defaults for pipeline and task executions. These include things like default timeout, ServiceAccount or node selector. This ConfigMap also initially includes _example key, which has all the possible (commented out) options and their description, so when in doubt, just run kubectl get cm config-defaults -n tekton-pipelines -o=jsonpath='{ .data._example }'. The other available ConfigMap is feature-flags, which allows you to switch on/off some of the Tekton features. You can mostly leave those on default values. Only one that I change is require-git-ssh-secret-known-hosts, which I prefer to have switched on to require known_hosts to be included when authenticating to git with SSH. To view current settings, you can run kubectl get cm feature-flags -n tekton-pipelines -o=jsonpath='{.data}' | jq .. If you want complete, customized version of both of these configs, you can grab them in my repository here. If you used the make script in this repository to set up your Tekton environment, then these were already applied during installation. Besides these global defaults, there are also other configs you might want to set. Most important of these would be SSH key for authenticating to git. This gets configured in Kubernetes Secret containing SSH private key and known_hosts file in base64 format: apiVersion: v1 kind: Secret metadata: name: ssh-key annotations: tekton.dev/git-0: github.com type: kubernetes.io/ssh-auth data: # cat ~/.ssh/id_rsa | base64 ssh-privatekey: |- ... # cat ~/.ssh/known_hosts | base64 known_hosts: |- ... This secret also includes Tekton annotation(s) ( tekton.dev/git-*) to make it aware that it should use it for authentication for specified provider. Another important Secret is registry credentials which allows you to push Docker images (or pull from private registry). For this one we use dockerconfigjson Secret type and once again we specify Tekton annotation with registry URL of your provider: # kubectl create secret generic reg-cred \ # --from-file=.dockerconfigjson=<DOCKER_CFG_PATH> \ # --type=kubernetes.io/dockerconfigjson apiVersion: v1 kind: Secret metadata: name: reg-cred annotations: tekton.dev/docker-0: ' type: kubernetes.io/dockerconfigjson data: .dockerconfigjson: ... Both of these then need to be added to ServiceAccount that your tasks and pipelines will be using. This should be the ServiceAccount that was previously specified in config-defaults ConfigMap. Speaking of ServiceAccounts - you will need to give it enough permissions to interact with pipelines and optionally add extra permissions based on what your pipelines will be doing. For example, if you want to run kubectl rollout, then your ServiceAccount will need permission for that. Both ServiceAccount and reasonable Roles and RoleBindings are available in the repository here. Last but not least, I also recommend setting LimitRange to make sure that each of your tasks get enough CPU and memory and at the same time doesn't consume way too much. The exact values depend on your use case but some reasonable defaults are shown here. And with that, we have fully prepared and customized installation of Tekton with all the components and their configs, ready to run some pipelines! Conclusion Tekton is a versatile tool that can get quite complicated and therefore one short article definitely isn't enough to go over every piece of it in detail. This introduction should give you enough to get up and running with all the configurations in place. In the following articles in these series, we will explore how to use and build your own custom Tasks and Pipelines, deal with event handling - both HTTP events and scheduled with cron and much more. So, stay tuned for next article and in the meantime you can have a sneak peek at files in tekton-kickstarter repository where all the resources from this and following articles are already available. And in case you have some feedback or suggestion feel free to open an issue in the repository or just star it if like you the content. 😉 Discussion (1) Hi Martin, This blog and the code repo complement each other well, one of the best for sure. I have run into a stupid silly issue post install of the great Make script. The ingress is responding back with HTTP 503 when I tried hitting the webhook end point for git and also manually access localhost/ Can you please guide, the setup was a breeze on Ubuntu 20.04 curl -H 'X-GitHub-Event: push' \ ─╯503 Service Temporarily Unavailable 503 Service Temporarily Unavailable
https://dev.to/martinheinz/cloud-native-ci-cd-with-tekton-laying-the-foundation-13n4
CC-MAIN-2022-21
refinedweb
3,182
52.6
IronPython & the Wing IDE Using the Wing Python IDE with IronPython Contents Introduction The Wing IDE is my favourite IDE for developing with Python. It has all the features you expect in a modern editor: - Syntax highlighting - Goto definition - Fully scriptable for integration with external tools (scripted with Python of course) - Integrated Python shell - Powerful debugger and testing support - Intellisense (autocomplete) - Calltips (the source assistant) showing method / function parameters and docstrings Features like calltips and autocomplete rely on the IDE being able to statically analyse the code and infer the types in use. This is much harder for dynamic languages than it is for statically typed languages. This is because types aren't determined until runtime. Despite this there are plenty of tools available for dynamic languages in general (refactoring tools were first created for Smalltalk) and Python in particular. I wrote about some of the tools available for Python and IronPython in: Not all of the features I listed above work for IronPython in Wing, but you can use the scripting API to plugin compatible tools instead. See Integrating Other Tools into Wing for an example of how to do this. Autocomplete One of the reasons I like Wing is that the autocomplete is the best amongst the Python editor's I've tried. This feature works perfectly with IronPython because IronPython code is Python code. Where is doesn't do so well is when you use any types provided by the .NET framework. Wing does provide a mechanism for teaching it about new libraries where it doesn't have access to the source to analyse it. I've worked with the Wingware guys to adapt this script for IronPython so that we can pre-generate the information that Wing needs for .NET libraries. It works by importing .NET namespaces and introspecting all the classes (and their) methods that they contain. It creates one PI file per namespace. A PI file is just a Python file with a skeleton definition of all the classes - with the correct base classes, methods and their parameters. It even annotates the skeleton Python code with the return types so that when you call methods in your code Wing will know the type of the objects returned by them. Because these PI files are valid Python files Wing can just reuse its knowledge of Python code to analyse them. Generating PI Files The script used to generate the PI files for the .NET framework is an enhanced version of generate_pi.py which comes with Wing. The changes I made initially were integrated into this script so it will run under CPython and IronPython. Note Wing runs on all three major operating systems: Windows, Mac OS X and Linux. This script should run fine with IronPython on Mono. If it doesn't you can generate the files under .NET on Windows and copy them across to the machine you are using Mono on. Here's how you use generate_pi.py: Create a new directory to hold the PI files. I use C:\Wing-pi (the image below shows my configuration on OS X however). You need to add this to the 'Interface File Path' so Wing knows to look here for PI files. You do this from the preferences dialog: Edit menu -> Preferences -> Source Analysis -> Advanced -> Insert From the command line switch to this directory. Execute the following command line: ipy.exe generate_pi.py --ironpython This generates the PI files. It takes around ten minutes or so generating the default set of PI files. As it uses the docstrings, which IronPython pulls in from the XML .NET documentation, it doesn't work so well on 64bit Windows (on 64bit .NET the documentation is kept in a different place and IronPython doesn't know to look there). There are a few caveats and limitations with this currently - but it is still very impressive. The details on how to use this to generate PI files for assemblies not covered in the default set, along with these limitations, are covered below. First some screenshots of the results. In Action Once the PI files are generated you should find this happening as you use .NET types in your IronPython code: Because Wing knows that calling Guid.NewGuid() returns a System.Guid it offers the right members for autcomplete on the object returned by that method call. Not only that but in the source assistant (bottom right of the UI by default) it will show us the documentation for this method: Customizing The script currently generates pi files for the following assemblies and namespaces (and all contained namespaces): System, System.Data, System.Windows.Forms, System.Drawing, System.Xml, Microsoft, clr These are hardcoded in lines 969-971 of the script. You can easily add new ones but eventually we'll enable this from command line arguments. This results in PI files for 105 namespaces taking up about 30mb. Using these doesn't result in a slowdown in Wing which is impressive. (They're loaded on use and cached - many of them cross-reference each other where they return types defined in another namespace.) Note The PI generator script introspects the .NET types to get method parameter names (including distinguishing instance methods from static methods), return types and so on. Where there are multiple overloads of a method it always uses the first one. The IronPython code to do this is shown at: Introspecting .NET Types and Methods from IronPython Limitations There are several limitations / caveats. Some of these can be fixed by improving the script and some by improving Wing. When you do "import System." you aren't offered a list of sub-namespaces to import. The solution to this is to have PI files as packages, which doesn't yet work but will be implemented soon. Methods called None are valid in IronPython (and common as enumeration fields) but are invalid syntax in Python / PI files. These are renamed to None_. The following member types are not recognised by the script and are set to None in the PI files. This means that some potentially useful information is lost but it isn't immediately obvious how best to represent this information for some of these member types: field descriptors (enumerations) In .NET enumerations behave much more like instances than classes. The field descriptor docstrings are usually not helpful but I'm also sure that None is not helpful as a value. It should really be a property returning an instance of the enumeration. The enumaration fireld has an underlying value (accessed as .value__) but I don't think setting it to that would be useful. events (very common and there may be multiple types of events) indexers (Item) attributes that are classes or enumerations. The docstrings can sometimes be useful. e.g. System.ActivationContext.ContextForm >>> ActivationContext.__dict__['ContextForm'].__doc__ '\r\n\r\nenum ContextForm, values: Loose (0), StoreBounded (1)\r\n\r\n' Wing doesn't yet understand the return types of properties. A feature request for this has been made. Currently Wing doesn't show the docstrings for properties in the source assistant (it shows the docstring for the property builtin instead). This looks like a bug in Wing. For .NET types with public constructors an __init__ method could be constructed. Currently they all show in the source assistant as *args. Where a class inherits from something in another namespace (often delegates do this) then the base class needs to be imported into the PI file first. This is not done yet. For most .NET methods the parameter names are determined using reflection. This doesn't work for some - particularly methods like ReferenceEquals, ToObject and so on. (Are these inherited methods or just added by IronPython? Needs investigating.) For these we fallback to __GetCallableSignature which doesn't get the argument names from .NET methods (not really a big deal). It also doesn't cope with indexing in type signatures of parameter types (use of square brackets). It interprets these as default values. If you have fixes for any of these issues then please contribute them back. General Tips on Using Wing with IronPython When you create a new project with Wing it allows you to set the Python interpreter for the project. This interpreter is used for the Python shell, the testing support and for debugging / executing Python files you are working on. This allows you to specify the specific version of Python you are developing for. Note One thing I haven't tried is setting the project interpreter to use Python.NET. Python.NET is a modified CPython interpreter with .NET integration. Whilst its behaviour is not always identical to IronPython (under the hood it is extremely different) it is compatible in many ways. As it is a version of CPython it may not be subject to the same limitations described here. When developing an IronPython project it is tempting to set the interpreter to be IronPython. This does allow the 'Execute Current File' to work correctly. Unfortunately the Python interactive shell, which is a really useful component in Wing for experimenting, is tied to any Python interpreter you set here. This is because the shell and the debugger are very tightly integrated. As Wing IDE is written in Python (and C) it can't use the IronPython interpreter; so you lose the interactive shell. The Wing team hope to fix this so that setting the project interpreter to IronPython doesn't cause you to lose the interactive shell. In the long term they hope to implement debugger support for IronPython (changes coming in IronPython 2.6 will make this possible), but I suspect this will take a long time. I prefer to keep the interactive interpreter and integrate separate tools for running Python files, executing tests and so on. Integrating Other Tools into Wing Wing has a rich and powerful scripting API allowing you to integrate external tools; either launching them as entirely separate processes or piping the results back into a Window in the Wing user interface. The documentation for this is included in Wing, or can be found online at Scripting and Extending Wing IDE. Adding new commands is very easy. Like adding additional PI files the first step is to add a directory where you will keep your Wing scripts. This is done through the preferences dialog: File menu -> Preferences -> IDE Extension Scripting -> Insert By default Wing is configured to reload scripts automatically when they change on disk. This is useful when you are working on them. Functions you define in your scripts become commands that you can then bind to key combinations to trigger them. This is done by adding custom key bindings from the preferences dialog: Edit Menu -> Preferences -> User Interface -> Keyboard -> Custom Key Bindings -> Insert Through the Wing API you have access to the current file, you can create new Windows and so on. Importantly you can also launch external commands. The following command demonstrates executing the current file with IronPython. I usually bind it to the F5 key.', filename] spawn.win32_start_process(cmd, argv, env=env, child_pwd=directory, new_console=True) It executes as an external process through cmd (and so is specific to Windows) and relies on ipy.bat being on your path. I use ipy.bat so that it can pause after execution. It also calls the 'save-all' command which saves all open files prior to execution. You may want to remove this... Note When you bind a key to execute the command you bind the key to the function name, not the script name. In this case you would bind the key to the custom_execute function. I launch it as an external process in this way so as not to block Wing whilst the file is executing. It is simple to have an alternative function which blocks and pipes the output of the file executed back into a scratch buffer in Wing. Using these techniques it is easy to plug any variety of external tools into Wing. I'm particularly fond of PyFlakes which can quickly pick up on common errors in Python code (undefined and unused variables for example - often caused by typos). Have fun with Wing and IronPython. If you have any questions the Wing mailing list is a friendly and responsive place. For buying techie books, science fiction, computer hardware or the latest gadgets: visit The Voidspace Amazon Store. Last edited Mon Jan 16 00:11:25 2012. Counter...
http://www.voidspace.org.uk/ironpython/wing-how-to.shtml
CC-MAIN-2018-26
refinedweb
2,075
64.2
You did since beta1 of Xplat, passing thru beta2. I am an integration freak and I have always insisted that interoperability is key. I will leave the most obvious “release notes” kind of things out of here, such as saying that there are now agents for the x64 version of linux distro’s, and so on…. you can read this stuff in the release notes already and in a zillion of other places. Let’s instead look at my first impression ( = I am amazed: this product is really getting awesome) and let’s do a bit of digging, mostly to note what changed since my previous posts on Xplat (which, by the way, is the MOST visited post on this blog I ever published) – of course there is A LOT more that has changed under the hood… but those are code changes, improvements, polishing of the product itself… while that would be interesting from a code perspective, here I am more interested in what the final user (the System Administrator) will ultimately interact with directly, and what he might need to troubleshoot and understand how the pieces fit together to realize Unix Monitoring in OpsMgr. After having hacked the RedHat MP to work on my CentOS box (as usual), I started to take a look at what is installed on the Linux box. Here are the new services: You will notice the daemons have changed names and get launched with new parameters. Of course when you see who uses port 1270 everything becomes clearer: Therefore I can place the two new names and understand that SCXCIMSERVER is the WSMAN implementation, while SCXCIMPROVAGT is the CIM/WBEM implementation. There is one more difference at the “service” (or “daemon”) level: the fact that there is only ONE init script now: /etc/init.d/scx-cimd So basically the SCX “Agent” will start and stop as a single thing, even if it is composed of multiple executables that will spawn various processes. Another difference: if we look in “familiar” locations like /etc/opt/microsoft/scx/bin/tools/ we see that a number of configuration files is either empty (0 bytes) or missing (like the one described on Ander’s blog to enable verbose logging of WSMan requests), when compared to earlier versions: But that is because I have been told we now have a nice new tool called scxadmin under /opt/microsoft/scx/bin/tools/ , which will let you configure those things: Therefore you would enable VERBOSE logging for all components by issuing the command ./scxadmin -log-set all verbose ./scxadmin -log-set all verbose and you will bring it back to a less noisy setting of logging only errors with ./scxadmin -log-set all errors ./scxadmin -log-set all errors the logs will be written under /var/opt/microsoft/scx/log just like they did before. Other than this, a lot of the troubleshooting techniques I showed in one of my previous posts, like how to query CIM classes directly or thru WSMAN remotely by using winrm – they should really stay the same. I will mention them again here for reference. SCXCIMCLI is a useful and simple tool used to query CIM directly. You can roughly compare it to wbemtest.exe in the WIndows world (other than not having a UI). This utility can also be found in /opt/microsoft/scx/bin/tools A couple of examples of the most common/useful things you would do with scxcimcli: 1) Enumerate all Classes whose name contains “SCX_” in the root/scx namespace (the classes our Management packs use): ./scxcimcli nc -n root/scx -di |grep SCX_ | sort ./scxcimcli nc -n root/scx -di |grep SCX_ | sort 2) Execute a Query ./scxcimcli xq "select * from SCX_OperatingSystem" -n root/scx ./scxcimcli xq "select * from SCX_OperatingSystem" -n root/scx Also another thing that you might want to test when troubleshooting discoveries, is running the same queries through WS-Man (possibly from the same Management Server that will or should be managing that unix box). I already showed this in the past, it is the following command: winrm enumerate -username:root -password:password -r: -auth:basic –skipCACheck but if you launch it that way it will now return an error like the following (or at least it did in my test lab): Error number: -2144108468 0x8033804C The WS-Management service does not support the character set used in the request . Change the request to use UTF-8 or UTF-16. the error message is pretty self explanatory: you need to specify the UTF-8 Character set. You can do it by adding the “-encoding” qualifier: winrm enumerate -username:root -password:password -r: -auth:basic –skipCACheck –encoding:UTF-8 Hope the above is useful to figure out the differences between the earlier beta releases of the System Center CrossPlatform extensions and the version built in OpsMgr 2007 R2 Release Candidate. There are obviously a million of other things in R2 worth writing about (either related to the Unix monitoring or to everything else) and I am sure posts will start to appear on the many, more active, blogs out there (they have already started appearing, actually). I have not had time to dig further, but will likely do so AFTER Easter – as the next couple of weeks I will be travelling, working some of the time (but without my test environment and good connectivity) AND visiting relatives the rest of the time. One last thing I noticed about the Unix/Cross Platform Management Packs in R2 Release Candidate… their current “release date” exposed by the MP Catalog Web Service is the 20th of March… …which happens to be my Birthday - therefore they must be a present for me! :-).
http://blogs.msdn.com/b/dmuscett/archive/2009/03.aspx
CC-MAIN-2014-52
refinedweb
950
51.41
Singleton pattern is a design solution where an application wants to have one and only one instance of any class, in all possible scenarios without any exceptional condition. It has been debated long enough in java community regarding possible approaches to make any class singleton. Still, you will find people not satisfied with any solution you give. They can not be overruled either. In this post, we will discuss some good approaches and will work towards our best possible effort. Sections in this post: - Eager initialization - Lazy initialization - Static block initialization - Bill pugh solution - Using Enum - Adding readResolve() - Adding serial version id - Conclusion Singleton term is derived from its mathematical counterpart. It wants us, as said above, to have only one instance. Lets see the possible solutions: Eager initialization This is a design pattern where an instance of a class is created much before it is actually required. Mostly it is done on system start up. In singleton pattern, it refers to create the singleton instance irrespective of whether any other class actually asked for its instance or not. public class EagerSingleton { private static volatile EagerSingleton instance = new EagerSingleton(); // private constructor private EagerSingleton() { } public static EagerSingleton getInstance() { return instance; } } Above method works fine, but has one drawback. Instance is created irrespective of it is required in runtime or not. If this instance is not big object and you can live with it being unused, this is best approach. Lets solve above problem in next method. Lazy initialization In computer programming, lazy initialization is the tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed. In singleton pattern, it restricts the creation of instance until requested first time. Lets see in code: public final class LazySingleton { private static volatile LazySingleton instance = null; // private constructor private LazySingleton() { } public static LazySingleton getInstance() { if (instance == null) { synchronized (LazySingleton.class) { instance = new LazySingleton(); } } return instance; } } On first invocation, above method will check if instance is already created using instance variable. If there is no instance i.e. instance is null, it will create an instance and will return its reference. If instance is already created, it will simply return the reference of instance. But, this method also has its own drawbacks. Lets see how. Suppose there are two threads T1 and T2. Both comes to create instance and execute “instance==null”, now both threads have identified instance variable to null thus assume they must create an instance. They sequentially goes to synchronized block and create the instances. At the end, we have two instances in our application. This error can be solved using double-checked locking. This principle tells us to recheck the instance variable again in synchronized block in given below way: public class EagerSingleton { private static volatile EagerSingleton instance = null; // private constructor private EagerSingleton() { } public static EagerSingleton getInstance() { if (instance == null) { synchronized (EagerSingleton.class) { // Double check if (instance == null) { instance = new EagerSingleton(); } } } return instance; } } Above code is the correct implementation of singleton pattern. Static block initialization If you have little idea about class loading sequence, you can connect to the fact that static blocks are executed during the loading of class and even before the constructor is called. We can use this feature in our singleton pattern also like this: public class StaticBlockSingleton { private static final StaticBlockSingleton INSTANCE; static { try { INSTANCE = new StaticBlockSingleton(); } catch (Exception e) { throw new RuntimeException("Uffff, i was not expecting this!", e); } } public static StaticBlockSingleton getInstance() { return INSTANCE; } private StaticBlockSingleton() { // ... } } Above code has one drawback. Suppose there are 5 static fields in class and application code needs to access only 2 or 3, for which instance creation is not required at all. So, if we use this static initialization. we will have one instance created though we require it or not. Next section will overcome this problem. Bill pugh solution Bill pugh was main force behind java memory model changes. His principle “Initialization-on-demand holder idiom” also uses static block but in different way. It suggest to use static inner class. public class BillPughSingleton { private BillPughSingleton() { } private static class LazyHolder { private static final BillPughSingleton INSTANCE = new BillPughSingleton(); } public static BillPughSingleton getInstance() { return LazyHolder.INSTANCE; } } As you can see, until we need an instance, the LazyHolder class will not be initialized until required and you can still use other static members of BillPughSingleton class. This is the solution, i will recommend to use. I also use it in my all projects. Using Enum This type of implementation recommend the use of enum. Enum, as written in java docs, provide implicit support for thread safety and only one instance is guaranteed. This is also a good way to have singleton with minimum effort. public enum EnumSingleton { INSTANCE; public void someMethod(String param) { // some class member } } Adding readResolve() So, till now you must have taken your decision that how you would like to implement your singleton. Now lets see other problems that may arise even in interviews also. Lets say your application is distributed and it frequently serialize the objects in file system, only to read them later when required. Please note that, de-serialization always creates a new instance. Lets understand using an example: Our singleton class is: public class DemoSingleton implements Serializable { private volatile static DemoSingleton instance = null; public static DemoSingleton getInstance() { if (instance == null) { instance = new DemoSingleton(); } return instance; } private int i = 10; public int getI() { return i; } public void setI(int i) { this.i = i; } } Lets serialize this class and de-serialize it after making some changes: public class SerializationTest { static DemoSingleton instanceOne = DemoSingleton.getInstance(); public static void main(String[] args) { try { // Serialize to a file ObjectOutput out = new ObjectOutputStream(new FileOutputStream( "filename.ser")); out.writeObject(instanceOne); out.close(); instanceOne.setI(20); // Serialize to a file ObjectInput in = new ObjectInputStream(new FileInputStream( "filename.ser")); DemoSingleton instanceTwo = (DemoSingleton) in.readObject(); in.close(); System.out.println(instanceOne.getI()); System.out.println(instanceTwo.getI()); } catch (IOException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } } } Output: 20 10 Unfortunately, both variables have different value of variable “i”. Clearly, there are two instances of our class. So, again we are in same problem of multiple instances in application. To solve this issue, we need to include readResolve() method in our DemoSingleton class. This method will be invoked when you will de-serialize the object. Inside this method, you must return the existing instance to ensure single instance application wide. public class DemoSingleton implements Serializable { private volatile static DemoSingleton instance = null; public static DemoSingleton getInstance() { if (instance == null) { instance = new DemoSingleton(); } return instance; } protected Object readResolve() { return instance; } private int i = 10; public int getI() { return i; } public void setI(int i) { this.i = i; } } Now when you execute the class SerializationTest, it will give you correct output. 20 20 Adding serial version id So far so good. Till now, we have solved the problem of synchronization and serialization both. Now, we are just one step behind our correct and complete implementation. And missing part is serial version id. This is required in condition when you class structure can change in between you serialize the instance and go again to de-serialize it. Changed structure of class will cause JVM to give exception while de-serializing process. java.io.InvalidClassException: singleton.DemoSingleton; local class incompatible: stream classdesc serialVersionUID = 5026910492258526905, local class serialVersionUID = 3597984220566440782 singleton.SerializationTest.main(SerializationTest.java:24) This problem can be solved only by adding a unique serial version id to class. It will prevent the compiler to throw the exception by telling that both classes are same, and will load the available instance variables only. Conclusion After having discussed so many possible approaches and other possible error cases, i will recommend you below code template to design your singleton class which shall ensure only one instance of class in whole application in all above discussed scenarios.(); } } I hope, this post has enough information to make you understand the most common approaches for singleton pattern. Let me know of you thoughts please. Happy Learning !! Update: I just thought to add some examples which can be referred for further study and mention in interviews: 86 thoughts on “Singleton design pattern in java” Hi Every thing you have written in this post is excellent . I have some doubts. Please clarify it. Singleton means only one instance of class with in a jvm. There is two web application wants to use same singletone class.But whenever , web application uses this singleton class it creates one instance for an application means per application one instnace .But my web application runs under jvm with same server Hi Lokesh, Thanks for the nice explanation. I have one query- how can we ensure or use singelton behaviour in clustered environment? Singleton is “one instance per JVM”, so each node will have its own copy of singleton. I was asked in an interview to Create singleton class using public constructor. is it possible?if yes, could you please provide the details Hi Lokesh, Thanks for info and i have small doubt weather “Bill pugh solution” is Lazy loading or Eager loading. Thanks in advance It’s lazy loaded on demand only. Instead of double checking, why not move the if(instance == null) check in the synchronized block itself – so that only one thread enters, checks and decides to initialize. Please share your thoughts. Thanks. You made valid argument. It will definitely cut-down at least 2-3 lines of code needed to initialize the object. BUT, when application is running and there are N threads which want to check if object is null or not; then N-1 will be blocked because null check is in synchronized block. If we write logic as in double checking then there will not be any locking for “ONLY” checking the instance equal to null and all N threads can do it concurrently. Hi Lokesh, I have read a number of articles on Singleton But after reading this,I think i can confidently say in an interview that I am comfortable with this TOPIC.And also love the active participation of everyone which leads to some nice CONCLUSIONS. This is the best explanation i ever saw about singleton DP……thnx for sharing Hi Lokesh, Your way of converting difficult topic to easier is remarkable. Apart from Gang Of Four Design Patterns, if you can take time out in explaining J2EE Design patterns also then that will be really great. I will try to find time (I am usually hell of busy most of the time). They sequentially goes to synchronized block and create the instance. In the above line the word “Synchronized” has to be modified as “static” I again read the section of lazy initialization. It is correctly written. Any reason why you think so? Hi Lokesh Sir, i am new in java and tryning to make a slideshow in my project.can you please help me what i can do.I have 2 option 1st using JavaScript and 2nd using widget.which are best for any website? Use any already existing widget. No use of re-inventing the wheel. okey Thanks, Great article, thanks! BTW, is it a good idea to use the singleton for a configuration object which can be changed after creation? Thanks! NO. It is not good idea. Thanks! Hello Lokesh, Very nice and informative article. There is one typo that I have observed. While explaining double-checked locking , you are referring to class name as EagerSingleton but it is lazy singleton. I would be more clear if you make the name LazySingleton. Thanks this is just a suggestion to make this excellent article a bit better. Thanks Taufique Shaikh. I will check and update. Thanks for your contribution. Actually useful article!. Nice article… i was looking for this concept with multiple doubts. My all doubts are cleared by reading all these comments. Thanks again LOKESH. Lokesh I would love to understand why you favor the Bill pugh’s solution over the Enum solution? The enum appears to solve synchronization, serialization, and serial version id issues. 1) enums do not support lazy loading. Bill pugh solution does. 2) Though it’s very very rare but if you changed your mind and now want to convert your singleton to multiton, enum would not allow this. If above both cases are no problem for anybody, the enum is better. Anyway, java enums are converted to classes only with additional methods e.g. values() valueOf()… etc. Hi Lokesh, Thanks for writing such a good informative blog. But i had one doubt on singleton. As per my understanding singleton is “Single instance of class per JVM ” . But when application is running production clustered environment with multiple instances of JVM running can break the singleton behavior of the class? i am not sure if does that make any sense or not but question stricked in my mind an thought of clearing it. Amit You are right.. In clustered deployment, there exist multiple instances of singleton. You are right, singleton is one per JVM. That’s why never use singleton to store runtime data. Use it for storing global static data. One major drawback of the singletons presented here (as well as enums in general) is however that they can never be garbage collected which further leads to the classloader which loaded them (and all of the classes it loaded) can never be unloaded and therefore will raise a memory leak. While for small applications this does not matter that much, for larger applications with plugin-support or hot-deployment feature this is a major issue as the application container has to be restarted regularly! While “old-style” singletons offer a simple workaround on using a WeakSingleton pattern (see the code below) enums still have this flaw. A WeakSingleton simply is created like this: public class WeakSingleton { private static WeakReference REFERENCE; private WeakSingleton() { } public final static WeakSingleton getInstance() { if (REFERENCE == null) { synchronized(WeakReference.class) { if (REFERENCE == null) { WeakSingleton instance = new WeakSingleton(); REFERENCE = new WeakReference(instance); return instance; } } } WeakSingleton instance = REFERENCE.get(); if (instance != null) return instance; synchronized(WeakSingleton.class) { WeakSingleton instance = new WeakSingleton(); REFERENCE = new WeakReference(instance); return instance; } } } It bahaves actually like a real singleton. If however no strong reference is pointing at the WeakSingleton it gets eligible for garbage collection – so it may get destroyed and therefore lose any state. If at least one class is keeping a strong reference to the weak singleton it wont get unloaded. This way it is possible to provide singleton support in large application containers and take care of perm-gen out of memory exceptions on un/reloading multiple applications at runtime. However if the weak singleton is used wrongly, it may lead to surprises: // some code here. Assume WeakSingleton was not invoked before so no other object has a reference to the singleton … { WeakSingleton someManager = WeakSingleton.getInstance(); manager.setSomeStateValue(new StateValue()); … StateValue value = manager.getValue(); // safe operation … } … // outside of the block – assume garbage collection hit just the millisecond before StateValue value = manager.getValue(); // might be null, might be the value set before, might be a default value As mentioned before enum singletons don’t provide such a mechanism and therefore will prevent the GC from collecting enums ever. Java internally converts enums to classes and adds a couple of methods like name(), ordinal(), … Basically an enum like: public enum Gender { FEMALE, MALE; } will be converted to public class Gender { public final static Gender FEMALE = new Gender(); public final static Gender MALE = new Gender(); …. } As on declaring Gender.FEMALE somewhere a strong reference will be created for FEMALE that points to itself and therefore will prevent the enum from being garbage collected ever. The workarround with WeakReferences is not possible in that case. The only way currently possible is to set the instances via reflection to null (see). If this enum singleton is however shared among a couple of applications nulling out the instance will with certainty lead to a NullPointerException somewhere else. As enums prevent the classloader which loaded the enum from being garbage collected and therefore prevent the cleanup of space occupied by all the classes it loaded, it leads to memory leaks and nightmares for application container developerand app-developer who have to use these containers to run their business’ apps. Thanks for your comment here. This is real value addition to this post. Yes, I agree that singleton are hard to garbage collect, but frameworks (e.g. Spring) have used them as default scope for a reason and benefits they provide. Regarding weak references, i agree with your analysis. small correction of the WeakSingleton code above as it was already late yesterday when I wrote the post: The class within the first synchronized(…) statemend should be WeakSingleton.class not WeakReference.class. Moreover, the comment-software removed the generic-syntax-tokens (which the compiler is doing too internally but additionally adds a cast for each generic call instead) – so either a generic type has to be added to the WeakReference of type WeakSingleton or a cast on REFERENCE.get() to actually return a WeakSingleton instead of an Object. Moreover, the transformation code for the enum into class is not 100% exact and therefore correct – so don’t quote me on that. It was just a simplification to explain why enums create a memory leak. Hi Lokesh, It seems like the this can be broken using reflexion API as well. is the static inner class will be loaded at first call? or at class load time? It will be loaded at first call. Can you please elaborate more on how it can broken? Thanks Lokesh .But we can use static inner class variable and mark as null using reflexion. Is any way to save the private variable from reflxion??? Unfortunately not. Because java does not prevent you from changing private variables through reflexion. Reflexion is sometimes villain, isn’t it. Yes. Never got the way to block Reflexion. Thanks nice artical in order to block Reflection you just need to throw IllegalStateException from the private constructor. Like this : private Singleton() { // Check if we already have an instance if (INSTANCE != null) { throw new IllegalStateException(“Singleton” + ” instance already created.”); } System.out.println(“Singleton Constructor Running…”); } Hi Lokesh, You can actually change the values of private variables using reflection API. This can be done using getDeclaredField(String name) and getDeclaredFields() methods in Class class. This way you can get the an object of the field and then you can call the set(Object obj, Object value) method on the Field object to change it’s value. For Singleton classes, the private constructor should always be written as follow: private Singleton() { if (DemoSingletonHolder.INSTANCE != null) { throw new IllegalStateException(“Cannot create second instance of this class”); } } You are right. In-fact, very good suggestion. Thanks for the article. Making EagerSingleton instance volatile does not have any significance. As it is a static variable, it will be initialized only once when class is loaded. Thus, it will always be safely published. Agree? yup Lokesh, Many thanks for sharing the wonderful information….I have got one problem in my mind from my product only. We have helperclasse for almost entire the functionality ad we create single ton instance of each class.Now suppose I have a helperclass CustomeHelper and there Is method called createCustomer(). Singleton instance of this class is present. Now this is very important class of my application. And access by so may teller from banks…..Than if I will get the second request than It would not be process because my class is single ton…1st thread is using the instance of singleton class…..Could you pls share your point…. Singleton means only one instance of class. It does not add any other specific behavior implicitly, So createCustomer() will be synchronized only if you declare it to be, not because CustomeHelper class is singleton. Regarding your request would be blocked, this depends on cost of synchronization. If cost is not much, the you can do it without any problem. This happens all the time at DAO layer. why we need this readResolve() method and how it will solve the issue, is not clear. Can u please explain how it is resolving the issue of more than one instances of singleton class. Yes, Lokesh is right. Actually clone method will not work if you don’t implement Clonable interface. I hope it will through clone not supported exception. Yes. Hi Lokesh, Very good post… I have a doubt – is it possible to generate a duplicate object of a singleton class, using serialization? Can u plz provide some ideas that how to make sure to make singleton class more safe. Thanks in advance. Yes, it’s possible. Please re-read the “Adding readResolve()” section again. Hi Lokesh, You have done a great job. Every thing you have written in this post is excellent. I have some doubts. Please clarify them. Can we go for a class with all static methods instead of Singleton? Can we achieve the same functionality like Singleton ? Give me some explanation please. Both are different things. Singleton means one instance per JVM. Making all methods static does not stop you from creating multiple instances of it. Though all methods are static so they will be present at class level only i.e. single copy. These static methods can be called with/without creating instances of class but actually you are able to create multiple instances and that’s what singleton prevents. So in other words, You may achieve/implement the application logic but it is not completely same as singleton. Suppose If I make constructor private and write all methods as static. Like almost equal to Math class(final class, private constructor, all static methods), then what will be the difference. I am in confusion with these two approaches. When to use what. Pls clarify Lokesh. Usually singletons classes are present in form of constant files or configuration files. These classes mostly have a state (data) associated with it, which can not be changed once initialized. Math class (or similar classes) acts as singleton, but I prefer to call them “Utility classes”. You can actually make use of inheritence and extend parent class in case of Singleton and its not possible if we have final class with all static methods. Hello Lokesh, Thank you, Your article is much useful and answered many questions which i had. Thanks again. Regards, Anil Reddy Hello, I found that in case the constructor is declared to throw an exception, the solution Bill pugh can not be used. thanks, great work!! Hello Lokesh, Congratulations for your interesting and informative article. Please take a look at the Bill pugh solution, because the method BillPughSingletongetInstance is missing the return type which must be BillPughSingleton. Keep up the good work… My bad. Actually there should be a space between “BillPughSingleton” and “getInstance”. Typo error. I will fix it. Thanks for pointing out. heyy lokesh why do we need of the method “readResolve()” here? Everything is explained in post itself. Any specific query or concern? What about Clone ???????????????????????????????????? adding clone method which throws CloneNotSupportedException will be a good addition. really good work thank you very much Thanks lokesh..its nicely explained Hi, How would you handle a singleton where the constructor can throw an exception? To get around the threading issue, I have been using the following: private static ClassName inst = null; private static Object lock = new Object(); private ClassName() throws SomeException { do some operations which may throw exception… } public static ClassName getInstance() throws Exception { if (inst == null) synchronized (lock) if (inst == null) inst = new ClassName(); return inst; } I want to consider the Bill Pugh method, but without a reliable way of handling exceptions, it’s not really universal. Fair enough !! Hi, Do you really think in case of Eager Initialization example we need to have a synchronized method and even a null check is required? You are right. No need to make synchronized. I will update the post. Thanks for pointing out. Hi, Do u think in case of eager example we need to have a synchronized method and even this null check is required? Because instance would have got initialized at class load itself. A perfect tutorial for understanding singleton pattern. Thanks for sharing your thoughts. Nice post Lokesh but u have not overridden the clone method because one can create a cloned object which also violates singleton pattern. I doubt because i have not implemented Cloneable interface either. But agree, a clone methos which throws CloneNotSupportedException will be a good addition. this is the most complete singleton pattern implementation tutorial I have come across. I got inspired and wrote about it on my blog at Singleton code in Java. Do let me know if I missed anything. Thanks Hey Lokesh this is indeed a good articles however I would like to purpose some correction in that. 1.Eager initialization: The code example stated under this heading is actually a example of lazy initialization. Your static block initialization example can come under eager initialization. 2.In “double-checked locking” we do not make method as synchronized. Rest of the things that you did in that code example are perfect. The advantage of double checked locking is ; once the instance is created, there is no need to take lock on the singleton class thereafter. Hello there, Thanks for pointing out them. First was typo error and indeed was mistake. Regarding second, I checked the wiki page and you was correct. Still, I believe that making this method ‘synchronized’ is a good addition, and does not remove the necessity of double checking. Thanks!! The main aim of double check is to get rid of taking a lock over and over again once singleton object is created.And we all aware the acquiring and releasing the locks is costly affair. Thank you for this article, it was useful in writting my own post about singleton pattern in C#. Hi Lokesh, Thanks for your comment on my post 10 interview question on Java Singleton pattern. I see you have also addressed issues quite well. In my opinion Enum is most easier way to implement this. You may like to see my post Why Enum Singleton is better in Java. Thanks @Javin for your appreciation. Yes, if you are absolutely sure that whatever the condition is, your class will always be singleton, then enum should be preferred. But, if you have a single doubt in mind that later in some stage you might switch to normal mode, or switch to multiton (allow multiple instances), then there is no easy way out in enum. Also, enums does not support lazy loading. So again, one need to see what suites him. Hi Lokesh , nice post , i need some explanation for this private BillPughSingleton() { } . why you need this private constructor in 4th methof BillPughSingleton ?? Note:- In comment box, please put your code inside [java] ... [/java] OR [xml] ... [/xml] tags otherwise it may not appear as intended.
http://howtodoinjava.com/2012/10/22/singleton-design-pattern-in-java/
CC-MAIN-2014-52
refinedweb
4,500
57.06
Task Part 1: An Internet service provider has three different subscription packages for its customers: Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour. Package B: For $13.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour. Package C: For $19.95 per month unlimited access is provided. Write a program that calculates a customer's monthly bill. It should ask the user to enter the letter of the package the customer has purchased (A, B, or C) and the number of hours that were used. It should then display the total charges. Task Part 2: (experiencing problems in this part) Modify the program you wrote for Programming Challenge 13 (Task 1) so it also calculates and displays the amount of money (Package A customers would save if they purchased Packages B or C, and the amount of money Package B customers would save if they purchased Package C. If there would be no savings, no message should be printed. The problem that I am experiencing is that I will get a negative number if the price of the monthly bill is less than $19.95. e.g. I enter 'A' and '14'. Answers: Monthly bill: $17.95 Savings if you purchase Package B: $4.0 Savings if you purchase Package C: $-2.0 How can I fix this code and not receive the negative number? This is my code: package internetserviceproviderpart2; import javax.swing.JOptionPane; /** * * @author Home */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { String inputString; char packageLetter; int hoursUsed; int additionalHours = 0; double totalFee; double savingAB; double savingAC; double savingBC; inputString = JOptionPane.showInputDialog("Enter the letter of the " + "package you purchased (either A, B, or C.)"); inputString = inputString.toUpperCase(); packageLetter = inputString.charAt(0); inputString = JOptionPane.showInputDialog("Enter the number of hours " + "you used."); hoursUsed = Integer.parseInt(inputString); if (packageLetter=='A' && hoursUsed>10) { additionalHours = hoursUsed - 10; totalFee = 9.95 + (additionalHours * 2.00); savingAB = totalFee - 13.95; savingAC = totalFee - 19.95; JOptionPane.showMessageDialog(null,"Your monthly bill is $" + totalFee + "."); JOptionPane.showMessageDialog(null,"You would save $" + savingAB + " if you purchase Package B."); JOptionPane.showMessageDialog(null,"You would save $" + savingAC + " if you purchase Package C."); } else if (packageLetter=='A' && hoursUsed<=10) JOptionPane.showMessageDialog(null,"Your monthly bill is $9.95."); else if (packageLetter=='B' && hoursUsed>20) { additionalHours = hoursUsed - 20; totalFee = 13.95 + (additionalHours * 1.00); savingBC = totalFee -19.95; JOptionPane.showMessageDialog(null,"Your monthly bill is $" + totalFee + "."); JOptionPane.showMessageDialog(null,"You would save $" + savingBC + " if you purchase Package C."); } else if (packageLetter=='B' && hoursUsed<=20) JOptionPane.showMessageDialog(null,"Your monthly bill is $13.95."); else if (packageLetter=='C') JOptionPane.showMessageDialog(null,"Your monthly bill is $19.95."); else JOptionPane.showMessageDialog(null,"Enter either A, B, or C."); System.exit(0); } }
http://www.javaprogrammingforums.com/whats-wrong-my-code/5523-need-if-else-if-else-help-my-code.html
CC-MAIN-2013-48
refinedweb
474
54.08
Question 1 : You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?. Question 2 : Which of the following code fragments inserted, will allow to compile?Which of the following code fragments inserted, will allow to compile? public class Outer { public void someOuterMethod() { //Line 5 } public class Inner { } public static void main(String[] argv) { Outer ot = new Outer(); //Line 10 } } Option A compiles without problem. Option B gives error - non-static variable cannot be referenced from a static context. Option C package ot does not exist. Option D gives error - non-static variable cannot be referenced from a static context. Question 3 : which two code fragments will compile?which two code fragments will compile? interface Base { boolean m1 (); byte m2(short s); } (3) is correct because an abstract class doesn't have to implement any or all of its interface's methods. (4) is correct because the method is correctly implemented ((7 > 4) is a boolean). (1) is incorrect because interfaces don't implement anything. (2) is incorrect because classes don't extend interfaces. (5) is incorrect because interface methods are implicitly public, so the methods being implemented must be public. Question 4 : Which three form part of correct array declarations? 1. public int a [ ] 2. static int [ ] a 3. public [ ] int a 4. private int a [3] 5. private int [3] a [ ] 6. public final int [ ] a (1), (2) and (6) are valid array declarations. Option (3) is not a correct array declaration. The compiler complains with: illegal start of type. The brackets are in the wrong place. The following would work: public int[ ] a Option (4) is not a correct array declaration. The compiler complains with: ']' expected. A closing bracket is expected in place of the 3. The following works: private int a [] Option (5) is not a correct array declaration. The compiler complains with 2 errors: ']' expected. A closing bracket is expected in place of the 3 and Question 5 : What is the prototype of the default constructor?What is the prototype of the default constructor? public class Test { } Option A and B are wrong because they use the default access modifier and the access modifier for the class is public (remember, the default constructor has the same access modifier as the class). Option D is wrong. The void makes the compiler think that this is a method specification - in fact if it were a method specification the compiler would spit it out.
http://www.indiaparinam.com/java-question-answer-java-declarations-and-access-control
CC-MAIN-2019-22
refinedweb
419
59.6
XSLT defines 36 elements, which break down into three overlapping categories: Two root elements: xsl:stylesheet xsl:transform Twelve top-level elements, which Twenty-two instruction elements, which evaluate to match. In practice, these are normally URLs. Relative URIs are relative to the location of the stylesheet itself. Some attributes can contain. It's worth noting that XSLT is unusually forgiving compared to most other XML specifications. First of all, the stylesheet may contain top-level elements from any namespace except XSLT (although not from no namespace at all). Elements defined here may contain any attribute from any non-XSLT namespace. And even though many conditions are defined as errors, XSLT processors are always allowed to recover from them in a sensible way. For example, you're not allowed to put an xsl:attribute element inside an xsl:comment element, which would attempt to add an attribute to a comment. However, if you do that, the processor is allowed to simply ignore the offending xsl:attribute element when creating the comment. <xsl:apply-imports /> . <xsl:apply-templates <! -- (xsl:sort xsl:with-param)* -- > </xsl:apply-templates> The xsl:apply-templates instruction tells the processor to search for and apply the highest-priority template rule. <xsl:attribute <! -- template for the attribute value -- > </xsl:attribute> attributeprobably, but not necessarily , the one used in the name attribute. The contents of this element are a template whose instantiation only produces text nodes. The value of the attribute added to the result tree is determined by instantiating the template. <xsl:attribute-set <! -- xsl:attribute* -- > </xsl:attribute-set>. <xsl:call-template <! -- xsl:with-param* -- > </xsl:call-template>. <xsl:choose> <! -- (xsl:when+, xsl:otherwise?) -- > </xsl:choose> The xsl:choose element selects one (or none) of a sequence of alternatives. This element contains one or more xsl:when elements, each of which has a test condition. The contents of the first xsl:when child whose test condition is true are output. The xsl:choose element may have an optional xsl:otherwise element whose contents are output only if none of the test conditions in any of the xsl:when elements is true. If the xsl:choose does not have an xsl:otherwise child element, and none of the test conditions in any of the xsl:when child elements is true, then this element does not produce output. <xsl:comment> <! -- template -- > </xsl:comment> The xsl:comment instruction inserts a comment into the result tree. The content of xsl:comment is a template that will be instantiated to form the text of the comment inserted into the result tree. The result of instantiating this template should only be text nodes that do not contain the double hyphen ( -- ) or end with a hyphen. <xsl:copy <! -- template -- > </xsl:copy>. <xsl:copy-of, such as a number, then the expression is converted to its string-value, and the string is output. An XPath expression identifying the object to copy into the result tree. <xsl:decimal-format. If not specified, the default is a period. The character that separates groups of digits; for example, the comma that separates every three digits in English or the space in French. If this is not specified, the comma is the default.. <xsl:element <! -- template -- > </xsl:element>. <xsl:fallback> <! -- template -- > </xsl:fallback>. <xsl:for-each <! -- (xsl:sort*, template) -- > </xsl:for-each>. <xsl:if <! -- template -- > </xsl:if> . <xsl:import. <xsl:include The xsl:include top-level element copies the contents of the xsl:stylesheet or xsl:transform element found at the URI given by the href attribute. Unlike xsl:import , whether a template or other element. <xsl:key. <xsl:message <! -- template -- > </xsl:message> The xsl:message instruction sends a message to the XSLT processor. Which messages the processor understands and what it does with messages it understands XSLT specification does not define XML fragment , and various XSLT processors interpret it differently. It may be a result tree fragment or an XML fragment, as defined by the now moribund XML Fragment Interchange working draft. It may be something else. Clarification from the W3C is necessary but does not seem to be forthcoming. <xsl:namespace-alias The top-level xsl:namespace-alias element declares that one namespace URI in the stylesheet should be replaced by a different namespace URI in the result tree. Aliasing is particularly useful when transforming XSLT into XSLT using XSLT; consequently, it is not obvious which names belong to the input, which belong to the output, and which belong to the stylesheet. The prefix bound to the namespace used inside the stylesheet itself. May be set to #default to indicate that the nonprefixed default namespace should be used. The prefix bound to the namespace used in the result tree. May be set to #default to indicate that the nonprefixed default namespace should be used. <xsl:number, . . . This is the RFC 1766 language code describing the language in which the number should be formatted (e.g., en or fr. <xsl:otherwise> <! -- template -- > </xsl:otherwise> . <xsl:output . A name token that identifies the output method's version. In practice, this has no effect on the output. The encoding the serializer should use, such as ISO-8859-1 or UTF-16. If this attribute has the value yes , then no XML declaration is included. If it has the value no or is not present, then an XML declaration is included. The value of the standalone attribute in the XML declaration. Like that attribute, it must have the value yes or no . The public identifier used in the document type declaration. The system identifier used in the document type declaration. A whitespace-separated list of qualified element names in the result tree whose contents should be emitted using CDATA sections. If this attribute has the value yes , then the processor is allowed (but not required) to insert extra whitespace to attempt to "pretty-print" the output tree. The default is no . The output's MIME media type, such as text/html or application/xml . <xsl:param <! -- template -- > </xsl:param> defines a global variable that can be set from the outside environment when invoking the stylesheet. If an xsl:apply-templates or xsl:call-template passes in a parameter value using xsl:with-param when the template is invoked, the result of instantiating the template in the content.. <xsl:preserve-space feed).. It can also contain a namespace prefix followed by a colon and an asterisk to indicate that whitespace should be preserved in all elements in the given namespace. <xsl:processing-instruction <! -- template -- > </xsl:processing-instruction> ?> . <xsl:sort. The key to sort by. If select is omitted, then the sort key is set to the value of the current node. By default, sorting is purely alphabetic. However, alphabetic sorting leads to strange results with numbers. For instance, 10, 100, and 1,000 all sort before 2, 3, and 4. You can specify numeric sorting by setting data-type to number . Sorting is language dependent. Setting the lang attribute to an RFC 1766 language code changes the language. The default language is system dependent. The order by which strings are sorted, either descending or ascending . The default is ascending order. upper-first or lower-first to specify whether uppercase letters sort before lowercase letters or vice versa. The default depends on the language. <xsl:strip-space The top-level xsl:strip-space element specifies which elements in the source document have whitespace stripped from them before they are transformed. Whitespace stripping removes all text nodes that contain only whitespace (the space character, the tab character, the carriage return, and the line feed).. <xsl:stylesheet xmlns: <! -- (xsl:import*, top-level-elements) -- > </xsl:stylesheet> The xsl:stylesheet element is the root element for XSLT documents. A standard namespace declaration that maps the prefix xsl to the namespace URI . The prefix can be changed if necessary. Any XML name that's unique within this document's ID type attributes. A whitespace-separated list of namespace prefixes used by this document's extension elements. A whitespace-separated list of namespace prefixes whose declarations should not be copied into the output document. Currently, always the value 1.0 . However, XSLT 2.0 may be released in the lifetime of this edition with a concurrent updating of this number. Any xsl:import elements, followed by any other top-level elements in any order. <xsl:template <! -- (xsl:param*, template) -- > </xsl:template> The xsl:template top-level element is the key to all of XSLT. or a combination of several such location paths.. A name by which this template rule can be invoked from an xsl:call-template element, rather than by node matching. If the xsl:template element has a mode, then this template rule is matched only when the calling instruction's mode attribute matches this mode attribute's value. The template that should be instantiated when this element is matched or called by name. <xsl:text <! -- #PCDATA -- > </xsl:text> entity or character references such as < or < should instead be output as the literal characters themselves . Note that the xsl:text element's content in the stylesheet must still be well-formed, and any < or & characters must be written as < , & , or the equivalent character references. However, when the output document is serialized, these references are replaced by the actual represented characters rather than references that represent them. <xsl:transform xmlns: <! -- (xsl:import*, top-level-elements) -- > </xsl:transform>. <xsl:value-of The xsl:value-of element computes the string-value of an XPath expression and inserts it into the result tree. The string compute. <xsl:variable <! -- template -- > </xsl:variable> The xsl:variable element binds a name to a value of any type (string, number, node-set, etc.). This variable can then be dereferenced elsewhere using the form $ name in an expression. The word "variable" is a little misleading. Once the value of an xsl:variable is set, it cannot be changed. An xsl:variable is more like a named constant than a traditional variable.. <xsl:when <! -- template -- > </xsl:when>. <xsl:with-param <! -- template -- > </xsl:with-param>.
https://flylib.com/books/en/1.132.1.189/1/
CC-MAIN-2021-31
refinedweb
1,666
56.35
Hi, Some of my users are using one of my ImageJ macros with ImageJ 1.51d. They are finding that over time the memory is running out despite the images being closed. The images are quite big (approx. 500 mb) but otherwise just a normal macro. We never had this issue prior to recently upgrading to 1.51d. The macro uses the TransformJ Translate plugin but other than that nothing special. I've had tried cleaning the memory by clicking the toolbar or by running the macro command but the memory is still full until Fiji restart. Any ideas? Best,Dominic. Hi @dwaithe, are you running one macro which iterates over a huge number of images or is the execution of the macro manually started after a user loaded images individually? In any case: would you mind sharing the macro here on the forum so that the developers could actually trace the issue? Cheers,Robert You can monitor you Java application with Visual VM to inspect which part of the macro is responsible for the memory bug. E.g., make a heap dump of the running application. I guess that some image references are not dereferenced and could'nt be garbage collected by the VM. See: Hi,Thanks for your suggestions so far. Robert, the original script is pretty long so I have created a minimal script that recreates the same phenomenon: path = "/path/to/folder/";open(path+"170516-RNA-DNA-RaserFISH-MFL0h-aRNAg-pAr-pE647_01_001_R3D.dv");close();open(path+"170516-RNA-DNA-RaserFISH-MFL0h-aRNAg-pAr-pE647_01_002_R3D.dv");close();open(path+"170516-RNA-DNA-RaserFISH-MFL0h-aRNAg-pAr-pE647_01_003_R3D.dv");close();open(path+"170516-RNA-DNA-RaserFISH-MFL0h-aRNAg-pAr-pE647_01_004_R3D.dv");close(); Also thank you for the suggestion Bio7 I have used the VisualVM to profile the heap usage whilst running the above script.I have circled the times at which I ran the above script. You can see that the script quickly starts to fill the heap, despite every image being closed. Looks like a bug potentially when opening .dv files? We have a work-around which is just to close Fiji every now and then, but I think it important to bring to your attention. Please suggest better workaround or fix the bug in next update. Hi Dominic, I have the same issue at the moment. I have ~50 images with a size of 1GB each and run out of memory every 3-4 images. I spend a lot of time searching for a solution and you can try run("Collect Garbage"); This can solve the problem but it seems there is more than one "garbage collector" and some work better than others suggest using the -XX:+UseParNewGC but I haven't figured out how to implement this. Maybe this helps you. run("Collect Garbage"); -XX:+UseParNewGC Best,Joko Since no one else mentioned it yet, I just wanted to point out the dedicated Troubleshooting section of the web site, which goes over some ways to diagnose these sorts of issues: Thanks for posting this. I have already set my memory to 20GB and run the garbage collector without any success. I use Fiji on MacOS. Do you know where I can change the default garbage collector? Do you know where I can change the default garbage collector? While tuning the garbage collector is possible, it will not address the likely root cause of your problem, which is probably a memory leak. If you have technical aptitude, you could try debugging it using a profiler like JVisualVM as suggested by @Bio7. Regarding your macro: are you running in batch mode? And on which platform do you run? And which version of Java? There is a known memory leak in Java 8 on OS X when opening and closing lots of windows. I am running in batch mode (all windows are closed) and I have the same issue when I set batch mode = false.I have Java 8 and run OS X El Capitan Version 10.11.5I monitor the memory while I run the script with the built-in Memory monitor in Fiji and no memory gets cleared after closing the last image and every 2nd or 3rd image I reach more than 90% and the Macro stops Thanks for the additional information, and sorry for not reading the preceding messages in the thread carefully before. I tried to reproduce your issue (I also run Java 8 + El Capitan), and was able to do so using another format supported by Bio-Formats. At first glance, it looks like the ImagePlus objects (i.e.: ImageJ images) are indeed not being garbage collected. Something is holding references to the image planes. I am digging further in JVisualVM now to learn more. ImagePlus Here is what I've discovered so far: When opening an image using the Bio-Formats plugin (either directly via e.g. File ▶ Import ▶ Bio-Formats, or indirectly via File ▶ Open...), with default settings (Autoscale on, everything else off), memory is not returned to Java after the image window is closed. The problem only happens with Oracle Java (7 or 8; tested with 1.7.0_80, 1.8.0, 1.8.0_77 and 1.8.0_101), not Apple Java (6; tested with 1.6.0_65). It happens with both latest and older versions of Bio-Formats (tested with 5.1.0, 5.1.10 and 5.2.1). It happens with older versions of Fiji (Life-Line from 2014) as well as latest. The bug only manifests with images opened by Bio-Formats, not opened by ImageJ 1.x core—i.e., File ▶ Open... on a single file, as well as a sequence opened via File ▶ Import ▶ Image Sequence.... So... my current guess is that it's a bug in Oracle Java triggered somehow by the Bio-Formats code? @dgault @s.besson @melissa Is anyone on the Bio-Formats team able to reproduce this? My OS X is 10.11.5. My test dataset was a Prairie dataset ~126M in size, although I'd be surprised if this is format specific. @dwaithe Have you tried downgrading to an earlier version of ImageJ 1.x (Help ▶ Update ImageJ...) and seeing whether the issue still happens? This would be very useful to know. I can certainly reproduce the same behaviour you have described and have started attempting to root cause which object is not being garbage collected. I have opened a card on the Bio-Formats 5.2.x Trello board for this ongoing investigation - @dgault Thanks. A couple of additional comments: I did not try with plain ImageJ 1.x. If you cannot reproduce in plain ImageJ 1.x, it may be a bug relating to ImageJ2, likely the ImageJ Legacy layer. I did not isolate with certainty that this is a Bio-Formats-specific issue. Just that somehow, naively opening images with ImageJ's built-in functionality does not trigger the problem. It is possible there is some other non-Bio-Formats-specific incantation that suffers from this issue. I verified that the window frames are being disposed. After they are closed, you can still access them via Frame.getFrames(), with each disposed Frame returning false as expected for isDisplayable(). Frame.getFrames() Frame false isDisplayable() FWIW, here is a groovy script I was using inside Fiji to test things: import ij.gui.ImageWindow frames = java.awt.Frame.getFrames() for (f in frames) { println(f.getTitle()) c = f.getClass().getName() displayable = f.isDisplayable() ? "displayable" : "NOT-displayable" println("-> " + f.getClass().getName() + ", " + displayable) if (ImageWindow.class.isAssignableFrom(f.getClass())) { println("-> Killing it...") if (f.isVisible()) ((ImageWindow) f).close() // f.setVisible(false) // f.dispose() } } But probably the best route is to use a profiler to track down lingering hard references. @ctrueden : Thank you for the script and the updates.We have created a card to record your observations, and we have started testing the same in better detail, We look forward to tackling this issue at the earliest. Best,Balaji I just upgraded to macOS Sierra (i.e., 10.12) and it seems like—in my brief tests so far—this issue is gone now. Repeatedly opening and closing images opened via Bio-Formats now seems to free memory as expected. My users are using the Pet Ct viewer and the same problem of memory not being freed exists there. To demonstrate the problem I measured the memory use at start (total memory) at 2.6GB.Then I did a drag and drop of the folders one by one. Each time I told it to make a stack.I was careful not to open Pet Ct viewer, so as not to complicate the problem.Memory use went up to 3.3GB.Then I hit "X" on each of the studies and the memory use remained at 3.3GB. The problem the users are seeing is that over time there is a Java error saying it is out of memory, so Fiji crashes. If you say that bio-formats release memory, perhaps I need to port over my application to bio-formats? I use imagePlus objects all over the place and I don't know what to port them to. There are other ImageJ programs like Gaussian smooth that I use, and it isn't clear if would be able to continue to use them. The problem was the opposite: images opened using Bio-Formats somehow did not free memory when closed, when using OS X 10.11 (and possibly other earlier versions of OS X—I did not test that). My point above is that macOS Sierra (the new OS version 10.12) no longer seems to have this problem. Are your users using Macs? If so, you could have them try updating to macOS Sierra, although it is still very new so there might be other downsides to that technically. Off the top of my head I know of 2 of my users who are using Mac, but I don't know what version. I heard of the problem from a user of Windows and I can demonstrate that memory is not released on my Linux machine. So it seems that the problem is deeper than bio-formats. I had misunderstood that bio-formats solves the problem. If possible, we need to find out what is going on even with classic ImageJ. Likewise, at some point I'll need to port over my plugin to bio-formats. When is a good time to do this is still not clear to me. Maybe the Debugging memory leaks section of the wiki helps you? Why? I looked at the Debugging memory leaks, but in the drag and drop of studies I purposely chose NOT to use my plugin so as to have one fewer variable in the equation. My user on Windows is getting the out of memory exception, but he is obviously using my plugin. He looks at multiple studies at once which also weighs down the problem.He doesn't have a clear scenario of when it happens, but he does see memory usage increase and never decrease. With 12GB of memory on this machine it is a bit difficult to run out of memory but I definitely see memory use increase and never decrease. He sees the same perpetual increase, but he runs out of memory after looking at (and closing) many studies.The work around which I suggested for the moment is just restart Fiji after it crashes. Not very nice, but at least he can work. On bio-formats I understood it is the wave of the future and essentially everything should go over to it. I didn't start because I didn't want to make waves for my users.
http://forum.imagej.net/t/memory-not-clearing-over-time/2137
CC-MAIN-2017-26
refinedweb
1,955
65.42
It took me a while to realize the following, which was generated by VS after dragging and dropping the script file to a view file, does not work <script src="../../Scripts/jquery.foo.min.js" type="text/javascript"></script> Instead, the following works: <script type="text/javascript" src="<%: Url.Content("~/Scripts/jquery.foo.min.js") %>"></script> However, the former works perfectly for another view file. I am wondering if any expert could shed some light on this. My current hunch is the correct path without using helper Url.Content() depends on a page's URl not where the view file is located. View Complete Post Hello, I have a corrupt Flat File and I need to write a SSIS Script Component to Replace LF to CR LF in my flat file. Any idea how to do it? Thanks The below peice of code works fine when am executing it as a stand alone .net app. But when I copy paste the same code into a script task (SSIS) , The excel refreshing doesn't happen. public class RefreshPivotTables { public string DestinationFileName { get; set; } public string SourceTemplate { get; set; } public string ReprotName { get; set; } public RefreshPivotTables(string destinationFileName, string sourceTemplate, string reprotName) { this.DestinationFileName = destinationFileName; this.SourceTemplate = sourceTemplate; this.ReprotName = reprotName; } public void Refresh() &. We have a existing web based project in Asp.net and would like to use third party silver light control in the same application. We need a help how to include silverlight control and use .xaml to access. Please help Hall of Fame Twitter Terms of Service Privacy Policy Contact Us Archives Tell A Friend
http://www.dotnetspark.com/links/28002-clarification-on-how-to-include-script-file.aspx
CC-MAIN-2017-04
refinedweb
267
58.48
Red Hat Bugzilla – Full Text Bug Listing Spec URL: SRPM URL: Description: This package contains SunLib's implementation of transport-independent RPC (TI-RPC) documentation. This library forms a piece of the base of Open Network Computing (ONC), and is derived directly from the Solaris 2.3 source. This package also support RPC over IPv6 which will be needed for all the RPC applications to support IPv6 What's going to use it initially? rpcbind which will replace portmapper. I'm currently working on the rpcbind rpm now, but I need the libtirpc lib in place to move forward. Once these two rpms are in place, I can start moving forward on porting all the RPC applications (yp*,nfs*, etc) to the new library resulting in making them IPv6 aware... OK, I suppose. Would have really liked to have had this for feature freeze. :) Updated Spec and SRPM. Found a problem with last release. Spec URL: SRPM URL: WRT Bill's Comment #7, I totally agree... sooner whould have been better... So now if you would like be to wait until early FC7 for this code, just let me know... NEEDSWORK: - Use %{name}-%{version} in URL field as to not have to update it every time the version changes. - Remove Requires(postun) and (pre) on ldconfig, as %post -p picks that up automagically - Replace %makeinstall with make install DESTDIR=%{buildroot}. %makeinstall has been known to break packages in bad ways and its use is highly discouraged. - Don't package static libraries unless there is a VERY good reason to do so. - Don't list gssapi requirement specifically, rpm will figure that out on its own when building the package. > - Use %{name}-%{version} in URL field as to not have to update it every time the > version changes. Done. > - Remove Requires(postun) and (pre) on ldconfig, as %post -p picks that up > automagically Done. > - Replace %makeinstall with make install DESTDIR=%{buildroot}. %makeinstall > has been known to break packages in bad ways and its use is highly > discouraged. Done. This good to know... I thought %makeinstall was the approved way... I guess I'll need to make this change other packages as well... > - Don't package static libraries unless there is a VERY good reason to do so. So we no longer support static libraries in devel packages? I don't think that is a very good idea.. Being that this is a relatively small library and the RPC code is pretty legacy code... I really don't think excluding the static library is a good idea... > - Don't list gssapi requirement specifically, rpm will figure that out on its > own when building the package. So your saying to removed the "Requires: libgssapi" from the spec file? How will rpm know that this library needes libgssapi? I must be missing something... Spec file and RPM updated with first three requests... > I really don't think excluding the static library is a good idea... There really is no good reason to ship a static archive. You're not doing anybody a favor. People might inadvertendly link against it and then security or bug updates don't apply. Of you want to debug a system and use a specially annotated DSO which would not be picked up. Archives should be distributed only for _very_ good reasons. Small and "pretty legacy" code is none of them. I agree w/ Ulrich. As to the rpm requirement, When building a package, RPM will ldd the libraries to see what other libraries it is linked against and uses that to populate the Requires list. I tested your package myself by removing the explicit Requires: line, and the rpm that was produced DID have a requirement on the gssapi library. This is the preferred method of determining deps. Just curious.... what is an valid reason to include a static library? I personally can't think of any off the top of my head. Others have come up with reasons, I think maybe some stuff used in a boot environment where you don't want shared libs perhaps. Bah, mid-air collision. But I'll submit this anyway. There are precious few reasons: The thing just won't build a .so. It needs to be linked against something used at boot time or in rescue or single user mode. That's about all I can think of. I've seen that argument for things like numerical libraries where folks want to link and then run on a different system without having to install any additional libraries, but I don't recall whether that argument was persuasive. Just realised I'm talking about Extras here and this is a Core review, so perhaps the criteria are different. > - Don't package static libraries unless there is a VERY good reason to do so. Done. > - Don't list gssapi requirement specifically, rpm will figure that out on its > own when building the package. Done. Spec file and srpm have been updated. Whoops, just noticed that buildroot isn't quite right. You have: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) but the guidelines prefer: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) By using make install DESTDIR=%{buildroot} you no longer have to use --prefix=%{buildroot} as files install in the right place. %{_sysconfdir}/netconfig should probably be marked as a config file, perhaps even config(noreplace). 'netconfig' is a pretty generic term, does anything else use it or are you claiming that namespace? (: Proposed patch to fix things up: Also changes my example removal of static libs to use your preferred %{buildroot} rather than $RPM_BUILD_ROOT, for consistency sake. --- ./libtirpc.spec.jk 2006-08-15 18:03:45.000000000 -0400 +++ ./libtirpc.spec 2006-08-15 18:36:58.000000000 -0400 @@ -51,7 +51,7 @@ %build autoreconf -fisv -%configure --enable-gss --prefix=%{buildroot} +%configure --enable-gss make all %install @@ -59,7 +59,7 @@ mkdir -p %{buildroot}/etc make install DESTDIR=%{buildroot} # Don't package .a or .la files -rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la} +rm -f %{buildroot}%{_libdir}/*.{a,la} %post -p /sbin/ldconfig @@ -72,7 +72,7 @@ %defattr(-,root,root) %doc AUTHORS ChangeLog NEWS README %{_libdir}/libtirpc.so.* -%{_sysconfdir}/netconfig +%config(noreplace) %{_sysconfdir}/netconfig %files devel %defattr(0644,root,root,755) Made the following changes and updated the spec file and srpm. diff -r1.6 libtirpc.spec 9c9 < BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) --- > BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 54c54 < %configure --enable-gss --prefix=%{buildroot} --- > %configure --enable-gss 62c62 < rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la} --- > rm -f %{buildroot}%{_libdir}/*.{a,la} 75c75 < %{_sysconfdir}/netconfig --- > %config(noreplace)%{_sysconfdir}/netconfig Ok, approved. I'm supposing that this will be a dep of other things, so it doesn't need to be explicitly listed in comps, correct? Please close when you've built. Build task:
https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=202224
CC-MAIN-2017-09
refinedweb
1,130
66.44
If you're using the Raspberry Pi 400 Desktop - Full Computer Kit you'll already have an SD card with Rapsberry Pi OS on it. If you are using the Pi 400 Computer Only, you'll need to get an SD card and install Rapsberry Pi OS on it. Once your Pi is set up and running proceed with the directions below. Now, make sure you have Python 3 setup, as Python 2 is no longer used or supported. pip3, is the software package installer you'll use. Upgrade it to the latest version with this command from a terminal: sudo pip3 install --upgrade setuptools If above doesn't work try sudo apt-get install python3-pip Once that has finished you'll be returned to the prompt.. Python Installation of PCF8591 Library Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready! Once that's done, from your command line run the following command: sudo pip3 install adafruit-circuitpython-pcf8591 If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported! You can use the knobs and ADC on your Pi any way you like, but for the purposes of this guide, you should try it out with Sonic-Pi, the live coding music software. Head to this link and then follow the terminal installation instructions. They look something like this (the version may update after this guide was written, so follow the instructions on that linked page): sudo apt update sudo apt install ./sonic-pi_3.3.1_1_armhf.deb In order for the knobs to send messages to Sonic-Pi (or other synth software) you'll use OSC (Open Sound Control) which is a modern alternative to MIDI for inter-instrument communications. One great feature of OSC is its ability to send and receive messages among different programs on the same computer via UDP. Install the python-osc library by running the following commands from the terminal: pip3 install python-osc Here's a terrific example of sending OSC messages from a Python script and listening/receiving those messages in Sonic-Pi. I've excerpted sections of it here: live_loop :foo do use_real_time a, b, c = sync "/osc*/trigger/prophet" synth :prophet, note: a, cutoff: b, sustain: c end live_loop :foo do use_real_time a, b, c = sync "/osc*/trigger/prophet" synth :prophet, note: a, cutoff: b, sustain: c end In this example we described an OSC path "/osc*/trigger/prophet"which we're syncing on. This can be any valid OSC path (all letters and numbers are supported and the /is used like in a URL to break up the path to multiple words). The /oscprefix is added by Sonic Pi to all incoming OSC messages, so we need to send an OSC message with the path /trigger/prophetfor our syncto stop blocking and the prophet synth to be triggered. We can send OSC to Sonic Pi from any programming language that has an OSC library. For example, if we're sending OSC from Python we might do something like this: from pythonosc import osc_message_builder from pythonosc import udp_client sender = udp_client.SimpleUDPClient('127.0.0.1', 4560) sender.send_message('/trigger/prophet', [70, 100, 8]) from pythonosc import osc_message_builder from pythonosc import udp_client sender = udp_client.SimpleUDPClient('127.0.0.1', 4560) sender.send_message('/trigger/prophet', [70, 100, 8]) Later you'll create a Python script that reads the knob inputs, and then converts the values and sends OSC messages to be read by Sonic-Pi. Follow these steps to install the PiTFT in FBCP mode. This mode mirrors the HDMI output onto the PiTFT, and can be used stand-alone, no HDMI monitor required!
https://learn.adafruit.com/analog-knobs-on-raspberrypi-400-with-cyberdeck-hat/raspberry-pi-400-setup
CC-MAIN-2021-17
refinedweb
638
58.11
DARK SECRETS OF THE NEW AGE DARK SECRETS OF THE NEW AGE Satan’s Plan For a One World Religion TEXE MARRS CROSSWAY BOOKS □ WESTCHESTER, ILLINOIS A DIVISION OF GOOD NEWS PUBLISHERS Dark Secrets o f the N ew Age. Copyright Š 1987 by Texe Marrs. Published by Crossway Books, a division of Good News Publishers, Westchester, Illinois 60153. All rights reserved. N o part of this publication may be reproduced, stored in a retrieval system or transmitted in any form by any means, electronic, mechanical, photocopy, recording, or otherwise, without the prior permission of the publisher, except as provided by USA copyright law. Cover design: Britt Taylor Collins Eighth printing, 1988 Printed in the United States of America Library of Congress Catalog Card Num ber 86-72066 ISBN 0-89107-421-X T A B L E OF Contents Preface vii 1 The Plan 11 2 Mystery Babylon: Satan’s Church, Yesterday and Today 24 Toward a One World Religion and a Global Order 35 Conspiracy and Propaganda: Spreading the New Age Gospel 49 3 4 5 The New Age Antichrist and His Will to Power 56 6 How Will We Know the Antichrist? 66 7 Come, Lucifer 73 8 Messages from Demons: Communicating Satan’s Blueprint for Chaos 95 9 “It Said It Was Jesus”—the Leadership of the New Age Revealed 105 10 The New M aster Race 119 11 The Dark Secret: What Will Happen to the Christians? 136 12 New Age Zeal . . . New Age Aggression 152 13 A New Culture, a New Barbarism 166 14 The Unholy Bible of the New Age World Religion 177 15 Doctrines of Devils 189 16 Apostasy: The New Age Plan to Take Over the Christian Church 204 17 Cry for Our Children 229 18 Dress Rehearsals for the Main Event 248 19 What M ust Christians Do? 261 Notes 269 About the Author 287 PREFACE atan has a Plan for a One World Religion and a One World Government. How do we know this? It is revealed in Bible prophecy. If we examine G od’s Word closely and contrast its prophecies with the events transpiring around us, we come to a most astonishing conclusion: the last years of the twentieth century may well comprise one of the final chapters in the age-old battle between the powers of evil and God and His people. The Bible envisions a period of increasing rebellion against God culminating in the Great Tribulation, a frightening time of worldwide brutality and religious apostasy. During this period, the nations of earth will be transformed into a one world political system and religion. This will be accomplished according to The Plan of the dark forces that oppose God. In my book Rush to Armageddon I stated: S Powerful forces are swirling around mankind today—forces that are destined to bring about a profound change in both our physical and spiritual worlds. Man cannot avoid those forces, no more than he could avoid being brought forth into this world and having breath entered into his lungs. In this present book, I closely examine these powerful forces and, with G od’s help, expose their evil objectives. The Bible warned us about these forces. For example, Daniel, one of the Lord’s great prophets, foresaw that in the last days, Satan would install a world ruler. This ruler, Daniel said, would magnify himself above all while contemptuously disregarding the laws of God. In place of the true God, this evil ruler will honor “the God of forces” (Dan. 11:36-45). Even now, a man is perhaps being groomed to be this world ruler. I do not know when he will come forth, though the time must surely be drawing near, based on current events. However, after years of research into the objectives of the New Age Movement, I am convinced of one thing: this man of Satan, called the Beast with the number 666 in Revelation, will find already in place a popularly acclaimed One World Religion perfectly suited for his style of leadership. The Antichrist will therefore find great satisfaction in assuming the reigns of the New Age World Religion. If this statement shocks you, that is understandable. It is best for us to be very skeptical about claims that this or that group or church is the Satan-led, end-time religion prophesied in the Holy Bible. God wants us to be discerning. W hat’s more, having a scientific orientation and with my background as a career Air Force officer, I am not prone to hasty, ill-considered judgments or snap decisions, especially about important spiritual matters. This is why I decided to investigate for myself by thoroughly researching the New Age Movement, its roots, and its activities and goals. What I discovered staggers the imagination. The New Age Movement has undeniably taken on the definite form of a religion, complete with an agreed-upon body of doctrine, printed scripture, a pattern of worship and ritual, a functioning group of ministers and lay leaders, and an effective outreach program carried out by an active core of proselytizing believers. Furthermore, because of its astonishing success in attracting new followers, the New Age Church now has a large and growing member ship worldwide. Its avowed aim, however, is to become the only world religion. In the free marketplace of ideas, it is perfectly acceptable that a religion strive to convert others to its belief system. This is as true of the New Age World Religion as it is for Christianity. But the horrible truth about the New Age is that its leaders do not wish to freely compete with Christianity. They seek to destroy Christianity. New Age leaders know that only if they are able to undermine credibility in the Bible, discredit Jesus Christ, and weaken the example of Christian churches can they succeed in their ultimate objective: the ascension to power of a New Age Messiah (the Antichrist) and the establishment of a one world order. At the pinnacle of this one world order will be the religious system described in Revelation 17: MYSTERY, BABYLON THE GREAT, TH E M OTH ER OF HARLOTS AND ABOMINATIONS OF THE EARTH. To accomplish its insidious and perverse objectives, the leaders of this new religion have set forth a New Age Plan which they call The Divine Plan or simply The Plan, designed by none other than the master of deceit, Satan himself. You should know, if you are a Christian—a Biblical Christian who believes in the inspired Word of G od— that you are a primary target o f The Plan. In fact, the only thing that stands between Satan and the successful implementation of this horrible, lawless Plan for humanity is you and millions of other determined Christians throughout the world. This is why the subversion and conquest of Christianity is the number one priority for those involved in carrying out The Plan. Who Will Prevail? As we look at the New Age with our Bibles open and plainly understand its darker side, our minds grow numb. But finally we recognize this movement for what it truly is. A sense of mounting horror grips us as we understand that this is almost certainly the end-time harlot church prophesied in the Bible. Our hearts sag because it is evident The Plan has made startling progress toward fulfillment. The New Age World Religion has already become the fastest-growing religious movement on earth. In the parable of the wheat and the tares (Matt. 13:24-30), Jesus taught that evil would grow and grow, intermingling with the good until the time of the “harvest.” Evil will not gradually disappear before good, but will ever develop and ripen until its highest manifestation in the last days. When we survey the damage to souls being caused by New Age doctrines and the incredible popularity of these doctrines, it is difficult not to view this development with alarm. However, . . God hath not given us the spirit of fear; but of power, and of love, and of a sound mind” (2 Tim. 1:7). Basic to our “sound mind” is the knowledge that greater is He who is in us thafi he who is in the world (see 1 John 4:4). The rise to power oT an evil Antichrist and the move toward a dominant One World Religion is no surprise to G od’s people. His prophets told us everything that was to come. W hat is needed today is revjval-^a revival of the power of God on earth. Satan cannot withstand this, and his New Age World Religion shrinks before it. May each one of us be an instrument of this supernatural power. As one of G od’s great twentieth-century spiritual leaders, the late pastor Gresham Machen, wrote: God has brought His church through many perils, and the darkest hour has often preceded the dawn. So it may be in our day. The gospel may yet break Forth, sooner than we expect, to bring light and liberty to mankind. But that will be done by the . . . instrumentality, not of theological pacifists who avoid controversy, but of earnest contenders for the faith. God give us men in our time who will stand with Luther and say, “Here I stand. I cannot do otherwise, God help me. Amen.” Texe Marrs Austin, Texas ONE The Plan We w restle not aga in st flesh an d blood, but a gain st prin cipalities, a gain st pow ers, again st the rulers o f the darkn ess o f this world, aga in st sp iritu a l w ickedness in high places. (Eph. 6:12) A World Religion f o r the N ew Age . . . is needed to meet the needs o f th in king people . . . an d to u nify m ankind. (Lola Davis, Tbward a World Religion f o r the N ew Age) n a stunningly brief period of time, a new and powerful world religion has swept across America and the entire planet. Popularly called the New Age Movement by its own leaders, this new religion is rapidly and dramatically reshaping man’s views of God and the universe. Claiming to represent a radical new global culture, the New Age World Religion denies the existence of a personal God who loves His own, while it exalts human potential and scientific progress. Its leaders point out that they are forerunners of the New Age Messiah, a great superhuman world teacher and leader who is soon to come. He will, they have declared, establish a glorious Kingdom of man on earth in which all men will live in peace, harmony, and unity. Possessing unparalleled wisdom and knowledge, and wielding marvelous psychic abilities, all the powers of the universe will be at his command. The Fantastic Drawing Power o f the New Age The New Age World Religion holds great appeal for modern man. New Age author and researcher Marilyn Ferguson, publisher of Brain/M ind Bulletin, says that New Age believe־s come from all levels of income and education. Among them she lists “schoolteachers and office workers, famous scientists, government officials and lawmakers, artists and millionaires, taxi drivers and celebrities, leaders in medicine, education, law, and psychology.” She also says there are New Age advocates in corporations, universities, public schools, and even on the White Hou^e staff.1 As Ferguson states, the New Age World Religion is strongly supported by influential leaders from every realm of our culture. These include such personages as singer John Denver, former astronaut Edgar Mitchell, former University of N otre Dame head Theodore Hesburgh, former chancellor of the Federal Republic of Germany Willy Brandt, science fiction writer Isaac Asimov, physicist Fritjof Capra, Megatrends author John Naisbitt, and actress Shirley MacLaine. Just as Hitler was able to inspire both the intellectual elite and the masses, the spirit of the New Age has taken in millions of men and women from all economic and social categories and from all walks of life, even supposed ministers of the Christian faith. Inclusive, it welcomes those of every political persuasion, liberal or conservative, and those from practically every ethnic group. W hat’s more, it extends an invitation to those in all religions, holding itself up as the world’s one great religious arbiter: a single beacon of light in which all religions can experience unity. The clarion call of the New Age to other religions is: “Come, let us be one.” The growth of the New Age World Religion is truly phenomenal and reveals how close we are to the last days. Only a decade ago, many viewed the New Age Movement as an assemblage of assorted nuts and weird, hippie-like personalities. In the years since, the New Age has matured into a monstrously enlarged religion and social movement that threatens to swallow up all other religions, philosophies, and social systems. John Randolph Price, head of two major New Age groups— the Quartus Foundation for Spiritual Research and the Planetary Commission for Global Healing—claims that “more than half-a- billion (New Age) believers are on the planet at this time working in various religious groups.” Boastfully he adds, “New thought [New Age] concepts are spreading more rapidly than any other spiritual teaching.”2 From Witches to Humanists and Scientists The reasons for such growth are obvious. Until now, most cults, Mystery Religions, and splinter churches attempted to be exclusive and open only to a select few. But the New Age World Religion is unlike any other apostate church or pagan cult the Christian world has confronted since the days of the early Church. The New Age is a universal, open-arms religion that excludes from its unified in a common purpose: the glorification of man. While pagans and occultists openly declare themselves to be New Agers, the religion is also broad-based enough to include those in the most respectable professions. As I mentioned in Rush to Armageddon, the New Age doctrine combines the worst of modern psychology, so-called “progressive education,” medicine, science, and economics in a dangerous and new formulation perfectly compatible with the abominations of paganism and occultism. New Age professionals claim that this is a “High Religion” more attuned to the needs of “thinking” people than Christianity—which they deem outmoded and unsophisticated. They are drawn to the New Age belief that man is himself an evolving god and that the greatest love of all is self-love. The essence of New Age religious doctrine is that man is neither sinful nor evil, and that Jesus’ sacrifice on the cross was meaningless and futile. Man did not need a Savior to atone for sin, says the New Age, because man has for millennia been inevitably evolving toward perfection and godhood. Predictably, a religious philosophy that deifies man and is totally void of absolute moral restraints is extremely attractive to those who do not know the Lord Jesus Christ as their personal Savior. In a world rampant with sin and unethical conduct, a world devoid of the agape love that is in Christ Jesus, the New Age sadly has become a narcissistic religion that readily finds converts. Understanding the New Age Vocabulary Being the earthly emissaries of another gospel and another Christ, leaders of the New Age are expert in the application of confusing and deceitful terminology. When Satan’s representatives use such familiar Christian terms as God, Christ, Messiah, the Second Coming, born again, salvation, angel, heaven and hell, and the Kingdom of God, their meaning is radically different than that given in the Word of God. In addition, the New Ager often uses terms, phrases, and euphemisms totally unfamiliar to all but persons who have studied esoteric doctrine. Again, the intent is to cloud and obscure the true meaning from the uninitiated. Below are several Christian terms that the New Age has twisted and perverted, along with a few terms unique to the New Age lexicon. I have taken the liberty of revealing the hidden New Age meaning of each. God: An impersonal energy force, immanent in all things. To the New Age, “God” can be referred to either as she or he, m other or father, god or goddess. M ost New Age teachers hold that M other Earth, the sun, the moon, and the stars—indeed all of nature—can be worshiped as “G od.” Christ: A reincarnated avatar, Messiah, or messenger sent from the “hierarchy” (see Angels below) to give the living on earth spiritually advanced revelation. The New Age contends that Buddha, M ohammed, Confucius, Jesus, and many others were “Christs,” but one greater than all of them will soon come to usher in the New Age. To the Christian, this coming New Age “Christ” is, in fact, the Antichrist. Angels: M ore frequently called Ascended Masters, Masters of Wisdom, Ancient Masters, spirit guides, inner guides, spirit counselors, one’s Higher Self, the Self, Superbeings, aeons, muses, or walk-ins.” Collectively called the “hierarchy.” Whichever term is used, the discerning Christian will recognize these shadowy entities not as “angels,” but as demons. Bom Again (Rebirth): Personal or planetary transformation and healing. The point at which a New Age believer “lets go” and allows his Higher Self or Inner Guide (translated: demon) to guide and direct his life. Some New Agers describe this as Kundalini, a Hindu term meaning “serpent power,” a moment of instant rebirth when the recipient is said to be transformed by a flash of light, receiving the benefit of higher consciousness as well as greater spiritual awareness and wisdom. Such a rebirth is said to convey “Christ consciousness” on the individual. The Second Coming: The New Age assigns two definitions to this phrase, each of which subverts the true meaning of the Second Coming of Jesus prophesied in the Bible. First, it is claimed that at the Second Coming a New Age believer achieves “Christ consciousness,” an exalted, higher state in which he is spiritually transformed into a divine being. This phrase also can mean the appearance on earth of the New Age Mesisah, or “Christ,” and his hierarchy of demons from the spirit world. Heaven/ Kingdom o f God: The terms heaven and Kingdom of God are often indistinguishable to the New Ager. Each refers to a spiritually cleansed and purified earth in which mankind has achieved “Christ consciousness” and has become akin to godkind. one monolithic government. Hell: New Agers deny the existence of a hell and a judgment. They also deny that sin and evil exist. God is alleged to be beyond good and evil, neither of which is a relevant term to the New Age. Understanding the special definitions assigned Christian words and phrases by New Age leaders, we see the subtle deceit and confusion they employ. With this in mind, let’s examine Satan’s Plan for our world. The Plan Exposed When we analyze The Plan for the New Age—as publicly expressed by its own leadership—we cannot avoid the horrible conclusion that this apostate religion is demonic. The astonishing truth is that the New Age World Religion fits all the criteria of the Babylonian harlot church of the latter days. Revelation 17 reveals this as a Satanic religious system that just prior to the Second Coming of our Lord Jesus shall rule “peoples, and multitudes, and nations, and tongues” and shall be full of “abominations and filthiness.” Led by the Beast who ascends “out of the bottomless pit,” it will be, at its core, the mirror image of the Mystery Religion established by the founders of ancient Babylon. To bring this prophesied anti-God religious system to reality in the last days, Satan has concocted a thirteen-point Master Plan, called simply The Plan by New Age leaders. Here is that chilling plan for world domination: Point #1 The principal aim o f The Plan is to establish a One World, N ew Age Religion and a one world political and social order. Point #2 The N ew Age World Religion will be a revival o f the idolatrous religion o f ancient Babylon in which mystery cults, sorcery and occultism, and immorality flourished. Point #3 The Plan is to come to fullness when the N ew Age Messiah, the Antichrist with the number 666, comes in the flesh to lead the unified N ew Age World Religion and oversee the new one world order. Point #4 Spirit guides (demons) will help man inaugurate the N ew Age and will pave the way for the Antichrist, the N ew Age man-god, to be acclaimed by humanity as the Great World Teacher. Point #5 ״World Peace!,” “Love!” and “Unity!” will be the rallying cries o f the N ew Age World Religion. Point #6 N ew Age teachings are to be taught and propagated in every sphere o f society around the globe. Point #7 N ew Age leaders and believers will spread the apostasy that Jesus is neither God nor the Christ. Point #8 Christianity and all other religions are to become integral parts o f the N ew Age World Religion. Point #9 Christian principles m ust be discredited and abandoned. Point #10 Children will be spiritually seduced and indoctrinated and the classroom used to promote N ew Age dogma. Point #11 Flattery will be employed to entice the world into believing that man is a divine god. Point #12 Science and the N ew Age World Religion will become one. Point #13 Christians who resist The Plan will be dealt with. I f necessary, they will be exterminated and the world “purified .” The Plan has such tremendous consequences for mankind and for Christianity that we cannot neglect to take stock of what is going on before our very eyes. Every Christian man and woman must face up to the harsh reality that there is, in fact, a New Age Plan for a One World Religion and a One World Government. The Main Event New Age leaders maintain that we are on the threshold of a New Order, that this is the Great Awakening—the dawning of the New Age. And all agree that The Plan will bring everything to pass. Vera Alder writes: There is actually a Plan and a Purpose behind all creation. . . . World Unity is the goal towards which evolution is moving. The World Plan includes: A World Organization . . . A World Economy. . . A World Religion.3 John Randolph Price has said that the Plan’s centerpiece— the Main Event as he calls it—will be the coming of the New Age “Christ” and the building of the Kingdom on earth, to be accomplished by a new race of god-men: The Gathering is taking place. (New Age believers) in all religions are uniting again—this time in a New Commission to reveal the Light of the World . . . and begin the Aquarian Age of Spirituality on Planet Earth. . . .4 The revolution has begun . . . the pace is quickening. Throughout the world, men and women are joining in the uprising (and rising up) and are coming forward to be counted as part of a new race that will someday rule the universe.5 Now we can co-create the future according to the Divine Plan.6 According to Price, the Plan includes “the elimination of fear, the dissolving of false beliefs, and the erasing of karmic debts in each individual soul.” Price says that sin need not disqualify you: “There is no such thing as a ‘lost soul’— for every soul is a page in the M aster Plan.”7 Μ. E. Haselhurst, writing for the Lucis Trust, emphasizes that The Plan is positive and “concerned with rebuilding mankind.” To those who doubt The Plan exists, he declares: Humanity needs to realize that there IS a Plan and to recognize its influence in unfolding world events, even when these appear as hindering factors, operating by means of destruction.8 W hat does Haselhurst mean when he speaks of “rebuilding mankind” and hints of “hindering factors, operating by means of destruction”? As we’ll see in later chapters, New Age spokesmen teach that the earth must soon undergo chaos through a “purification process,” and Christians are at the top of the New Age list of those to be “purified.” The concept of purification was perhaps first elaborated by Meishu Sama, a New Age pioneer from Japan. Sama reportedly meandered from atheism to Shintoism into the New Age philosophy. In 1931, at the age of forty-five, he was given a “revelation” that disclosed to him “G od’s divine plan for the New Age.” He supposedly learned that humanity is to go through a great transitional period, turning from the old age of darkness to the New Age of light. During this transitional period, those with “negative vibrations” will be removed from the earth in an earthshaking purification process.9 This removal from the earth of those who rebel against the coming New Age World Order will evidently be supervised by a “Messiah” whom many in the New Age believe to be the Lord Maitreya: What is The Plan? It includes the installation of a new world government and new world religion under Maitreya.10 David Spangler claims he has communicated a number of times with this New Age Messiah. In his communications with Spangler, this spirit calls himself “John” or “Limitless Love and Truth.” This demon spirit has indeed verified that a Plan is being rapidly implemented, declaring: “I . . . present to you, therefore, the revelation of man’s destiny, for behold! I have placed my seal upon this planet.”11 Spangler’s demon guide also contends that The Plan is concerned with rebuilding mankind after a cleansing of the earth through the eradication of negative forces. This is necessary, claims the demonic spirit, to bring in a joyous new heaven and a new earth: This is the message of Revelation: we are now the builders of a New Age. We are called upon to embark on a creative project . . . in order to reveal the new heaven and build the New earth.12 One New Age organization that has publicly stated its endorsement of The Plan is the New Group of World Servers, a group intensely dedicated to a One World Government and a One World Religion. The New Group of World Servers says of its members: “They believe in an inner world government and an emerging evolutionary plan. ״The group’s official statement of purpose includes these four objectives: 1. Bring about world peace, guide world destiny and usher in the New Age. 2. Form the vanguard for the Reappearance of the Christ and his Great Disciples (the Masters of Wisdom). 3. Recognize and change those aspects of religion and government which delay the full manifestation of planetary unity and love. 4. Provide a center of light within humanity and hold the vision of the Divine Plan before mankind.13 Barry McWaters, founder and co-director of the Institute for the Study of Conscious Evolution, attributes the goal of evolution to the intelligence that created The Plan. McWaters, who terms this intelligence (actually Satan) the “Higher Will,” provides this quote from the book The Rainbow Bridge: Evolution is . . . the response to the call of Logos, of God. It is the purpose behind the Plan. It is God’s drawing of creation back to himself.14 According to McWaters, man is evolving toward union with the universe, as planned by the “Higher Will,” becoming a little god serving a greater god: the planet earth, or GAIA.15 New Age leaders have begun to publicize previously hidden aspects of The Plan. Alice Bailey has said that her “hidden Masters” told her that beginning in 1975 the time would be ripe for open propagation of The Plan. This same, demonic message may have been telepathically given to other New Age leaders as well, for a flood of information has poured forth about The Plan. Still, there are apparently some elements of The Plan that are disclosed only to an inner circle. George Christie, formerly a communications executive and now with the internationalist group The International Center for Integrative Studies (ICS), has intimated that some aspects of The Plan should be kept from the public. Asked about the work of the ICS at a meeting of the Lucis Trust, Christie defensively remarked: “Now, we don’t publish it— it’s not in our literature, you’re not going to find it there— it’s not right out there, you’re not going to find it!” When a participant inquired about The Plan, Christie grew even more guarded, offering only the cryptic comment: “N ow when you speak of The Plan, capital P, I, of course, probably think the same thing as most of you do here.”16 When Will the Plan Be Realized? New Age leaders have said that The Plan is progressing extremely well. The final stage— the materialization of a heaven on earth presided over by their “Christ”—is said to be on the immediate horizon. Some project the year 2000 as the key date for the appearance of the “Christ” and his hierarchy. Others believe that this cardinal event is imminent and may occur at any time. In the interim, they continue to work The Plan, educate believers, and bring into the fold thousands of new converts. They also work to spread insidious, often subtle propaganda throughout the media praising the New Age World Religion and its objectives. The way is being prepared for the Antichrist. Lola Davis speaks of these preparations in her pivotal book Toward a World Religion for the N ew Age: The good news . . . is that there is already much activity toward required actions and conditions and that an increasing number of people are either consciously or unconsciously preparing mankind for a World Religion that’s compatible with the New Age.17 Davis explains that The Plan cannot be fully realized until the New Age “Christ” or “Messiah” comes. “The leadership of the Messiah is the catalyst needed to materialize the New Age Kingdom.” After his arrival the New Age Messiah will: . . . help mankind learn to cooperate consciously with God’s plan for the peace and well-being of the world . . . we will have, before the total program is in place, the guidance of the Avatar or Messiah.18 John Randolph Price echoes Davis, confidently proclaiming: This New Age will be. A new Heaven on Earth will be. Preparations are being made now, and out of chaos will come the beginning of peace on earth, a New Order for Mankind.19 An effective leader, Price rallies his faithful around the call to preach the New Age gospel to the world so The Plan will more quickly be realized: For you to be an effective member of the Planetary Commission, you should understand your role in the implementation of the Divine Plan. Yes, the salvation of the world does depend on you.20 Terry Cole-Whittaker, a flamboyant New Age minister from California whose television ministry and best-selling books brought her international fame and success, intimated recently in an interview with Magical Blend magazine that the world is very close to the day when the New Age will suddenly arrive in all its splendor: “I feel that we are right on the edge and we are going to ‘pop’ into a new dimension. Everybody senses it.”21 The Real Plan The God of the Bible also has a Plan for Mankind. I like to call it The Real Plan. John wonderfully summarized this Divine Plan with these momentous words: For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. (John 3:16) G od’s Plan was that His crucified Son, Jesus, would rise from the dead, ascend to heaven, and be our M ediator and our Savior: For there is one God, and one mediator between God and men, the man Christ Jesus; who gave himself a ransom for all, to be testified in due time. (1 Tim. 2:5, 6) The Real Plan—designed by the only God there is—will be completed only when Jesus Christ returns to earth with a shout, descending in glory from out of the clouds. He will judge the living and the dead and reign as Lord of Lords and King of Kings forever and ever (see 1 Thess. 4:13; Rev. 19:11-21; 21; 22). Then and only then—after the Second Coming of Jesus Christ—will peace and harmony envelop the globe. The best news about G od’s Real Plan is that salvation through Jesus Christ is intended for all. Unfortunately, the vast majority rebel against God and His Plan, falling victim to the Great Lie. That lie is incorporated in another Plan, drafted by the New Age Movement under direct command from Satan. The New Age Plan of Lucifer is in marked contrast to that of G od’s. It calls for another gospel and another “Christ.” It falsely promises a reprobate humanity a quantum leap in consciousness that will result in man’s becoming a god. Satan’s Plan seductively offers prosperity and peace to a world hungry for material goods and fearful of nuclear destruction. The deceptive Plan of Satan is finding great favor in the world today. New Age leaders tell us that it is destined to succeed. The Bible prophesied that this evil Plan would, for a time, win out (Dan. 11:24). But in the end Satan and all those who become embroiled in his dark Plan will end tragically, going down to resounding defeat. Until the day when Christ returns and Satan’s Plan is defeated, the world will experience a terrible period of untold misery and horror. Satan’s Antichrist, the Beast with the number 666, will establish his malignant reign over all nations and peoples, and Christians will be severely persecuted for their beliefs. The prophesied One World Religion, the global church of Satan, will demand—and get—obedience from everyone on earth except the people who make up the Church of the living God. TWO Mystery Babylon: Satan’s Church, Yesterday and Today A nd upon her foreh ead w a s a nam e w ritten , MYSTERY, BABYLON THE GREAT, THE MOTHER OF HARLOTS AND ABOMINATIONS OF THE EARTH. A n d I s a w the w om an drunken w ith the blood o f the sa in ts, an d w ith the blood o f the m a rty rs o f Jesus. (Rev. 17:5, G) C h ristian ity cam e fa c e to fa c e w ith the Babylonian pagan ism in its various fo r m s th at had been established in the Rom an Empire. . . . Much persecution resulted. M an y Christians were fa lse ly accused, thrown to the lions, burned a t the stake, an d in other w a ys tortured an d m artyred. . . . Over the centuries God has called H is people out o f the bondage o f Babylon. Still to d a y His voice is saying, “Come out o f her, m y people, th a t ye be not p a rta k ers o f her sins!” (Ralph Woodrow, Babylon M ystery Religion) he Scriptures reveal that from the time Satan rebelled and was banished to earth, two churches have existed on the planet. G od’s true Church is described as the chaste bride of Christ, a pure woman without blemish, redeemed by the sacrifice of G od’s Son, Jesus (Eph. 5:27; Rev. 19:7, 8). The opposing world church is likened to a defiled woman, a drunken whore. She has on her forehead the revealing title, MYSTERY, BABYLON TH E GREAT, THE M OTHER OF HARLOTS AND ABOMINATIONS OF THE EARTH. In her hand is a golden cup full of the filthiness of her fornications. This is the church of Satan. God has determined that His Church be preserved until the Second Coming of His Son, Jesus, at which time Satan and his followers will be destroyed. But Satan, knowing he has only a short time until his fiery judgment, seeks all the temporal pleasures that counterfeit godhood can bestow on him. So he is determined that the evil Mystery Religion he first set up in Babylon now grow and expand. More than seventy years ago, Anglican Bishop Alexander Hislop observed that Satan has worked hard over the centuries on behalf of the Babylonian Mystery Religion that serves as his church: (Satan’s false goddess) did not wane. It took a higher flight and seated itself on the throne of Imperial Rome.1 Hislop went on to explain how the Babylonian Mystery Religion continually rose above all attempts to put it down. The early Roman Catholic Church, for example, incorporated many of its elements into Catholic doctrine and worship. Mystery Babylon lived on! As we survey the world around us today, we find that Mystery Babylon has again reared her ugly head. She has healed her wound and now invites all the world to partake of her drunkenness and her fornication. Shamelessly, she claims to be the one and only true Church. She calls herself the New Age World Religion, but this modern-day scarlet woman’s real name is MYSTERY, BABYLON, THE M OTHER OF HARLOTS AND ABOMINATIONS OF THE EARTH. M odem Babylon The remarkable parallels between the Mystery Religion and cults of Babylon and the New Age World Religion provide definitive proof that these two anti-God religious systems are in fact one and the same. Here is just a partial list of the religious practices and rituals and the doctrinal beliefs mutually embraced by the Babylon of yesterday and today: man-god doctrine karma self-love reincarnation numerology psychic mind powers levitation astral travel hypnotism shamanism nature/earth worship magic words (mantras) decrees goddess worship palmistry fire worship occult visualization sexual licentiousness necromancy astrology evolution doctrine divination drug abuse alcohol abuse occult meditation occult symbolism Mystery Teachings and initiation altered states of consciousness t These perverse doctrines and practices, begun by the mighty Babylonian King Nimrod and hi.c evil queen Semiramis, were in much evidence in the days of Abraham.· The sensuously beautiful Semiramis grew to be worshiped as M other Goddess, the central figure in a Satanic trinity composed of the father (Nimrod), the m other (Semiramis), and their son (also named Nimrod).2 In the Babylonian religion, Nimrod and Semiramis were thought to be the first of the man-gods, spiritually powerful reincarnated souls whose superwills catapulted them to exalted status as deities. Similarly, in today’s New Age doctrine, man is depicted as evolving toward divinity through successive reincarnations and psychic willpower. Semiramis was a supremely wicked woman. Declaring herself the Queen of Heaven, she demanded blood sacrifices and instituted temple prostitution. Following her death, word of her mystical exploits spread and her dark fame grew The Babylonian Empire was able to dominate much of the world culturally, economically, and militarily. As a result, the Babylonian religious system also spread. Soon Semiramis was worshiped throughout the known world: as Ishtar and Astarte in Babylon, as Asherah and Ashteroth in Israel and Canaan, as Diana and Artemis in Ephesus and Asia Minor, as Cybele in Roman, Isis in Egypt, GAIA in Greece, and Kali in India. Her husband and son were also worshiped as gods, again under a variety of names. In Israel, Nimrod was venerated as Baal; in Egypt he was called Osiris and his son Horus. The perverted Babylonian Mystery Religion, mocking the Holy Trinity, taught that the father-mother-son aspects of the godhead were separate deities but also were united as one. Therefore, in Egypt Ra the Sun God was worshiped as a combined, male and female, androgynous (unisex) god. This has significant implications for today’s New Age World Religion. For example, there is now a modern-day revival of the worship of the M other Goddess, especially by feminist New Agers. This explains why, although the Bible clearly prophesies that the Antichrist will be a man, many in the New Age have actually begun to worship the M other Goddess, whom they claim to have “reawakened” from her long sleep during the past two millennia of Christendom. Some New Age feminists go so far as to claim that their coming “Christ” will be the reincarnated goddess who physically reigned during the Babylonian era. New Age proponents of witchcraft are especially active in the revival of the Babylonian Goddess Mystery Religion. Miriam Starhawk, a prominent witch, is president of the Covenant of the Goddess, a union of New Age, pagan, and goddess traditions officially recognized as a church in California. Starhawk and other witches of the official Church of WICCA (the “Wise Ones”) have been invited by feminist organizations and even by Catholic priests and nuns to present their teachings. Starhawk in a recent interview said of the growing belief by the New Age in the goddess: Mother Goddess is reawakening and we can begin to recover our primal birthright, the sheer intoxicating joy of being alive. We can open our eyes and see that there is nothing to be saved from . . . no God outside the world to be feared and obeyed.3 Worship of the M other Goddess is also prevalent in such churches as Unity and Unitarian. The Unity Church teaches, for example, that: “God is. Man is. We are now in the presence of that eternal Is-ness—Osiris and Isis are now our Father-Mother as fully as they were of old Egypt.”4 A number of prominent feminist leaders today encourage women to abandon Christianity and Judaism in favor of the worship of Isis or another goddess from Babylonian origination. One of the tarot cards, “The High Priestess,” depicts Isis. Feminist writer Kathleen Alexander-Berghorn illuminates us on the current campaign to revive the ancient goddess religion for modern-day women: Today women are rediscovering Isis. . . . The reawakening of Isis as a source of inspiration for contemporary women is exemplified by the healing ministry of Selena Fox, co-founder and High Priestess of Circle Sanctuary near Madison, Wisconsin. Every month at the New Moon, Selena holds a Spiritual Healing Circle centered around an Isis Healing Altar. . . . Each of us can personally experience the healing presence of the Goddess within us. All women are Isis and Isis is all women.5 Lucifer and the Babylonian/New Age Sun God As a child, I marveled when I read that some primitive peoples actually worshiped the moon, the sun, the stars, and the earth as gods. Today I marvel that many in the New Age have revived this same primitive worship. Added is the concept that Lucifer was sent from the Sun God to bring man the truths of the New Age. The symbol of Unity Village, a New Age community in Missouri with a worldwide ministry, is a Babylonian temple with the sun hovering above it. This is appropriate because in the Mystery cults the Babylonian deities were popularized as the Sun God. Today the New Age holds the sun to be a divine, living being, often called the Solar Father. Lucifer is claimed by the New Age to be the Solar Logos (Word), a god spirit appointed by the Solar Father to usher in the New Age through the Luciferic Initiation of humanity. We will examine this twisted, Luciferian doctrine of the New Age more thoroughly in a later chapter. Satan’s Final Act: The Revival o f the Babylonian Mystery Religion The Bible tells us there will be massive apostasy during the last church age. The vast majority of people will fall prey to the doctrines of demons. False prophets and false “Christs” will seduce people’s minds and initiate them into the Mystery of Iniquity (2 Thess. 2:7). Babylon will be revived as a worldwide religious and political system headed by the Antichrist. Then the G reat Tribulation period will occur, a time of universal bloodshed and persecution. Are we at the threshold of this brutal period of bloodshed and turmoil? Are we soon to see a One World Religion and a One World Government headed by a Satanically inspired Antichrist? Literally thousands of hours of research and prayer convince me that the answer can only be in the affirmative. I am not alone in this conclusion. Hal Lindsey recently told listeners of the Trinity Broadcasting Network (TBN), “We now have a movement that is unparalleled in history called the New Age. . . . This movement is preparing the way for the Antichrist—rapidly. . . . The religious deception is here.”6 Paul Crouch, president of TBN, remarked, “The octopus tentacles of the New Age movement go directly to the great deceiver himself, the Devil.”7 Other Christian leaders have expressed much the same sentiments. Pat Robertson and his “700 Club” have discussed the New Age movement. Constance Cumbey stated in her bestselling Hidden Dangers o f the Rainbow that the New Age fulfills all the prophetic requirements of the Babylonian Harlot Church of the last days. Dave H unt wrote of this modern-day descendant of Babylon’s Mystery Religion in his powerful Peace, Prosperity and the Coming Holocaust. Evangelists Jimmy Swaggart and David Wilkerson have expressed their intense concern. The New Age could well be the last age. Babylon has sprung back to life in the form of the New Age Movement. Satan’s day is at hand. The Prince of Darkness is apparently ready to unveil his bloody Plan. In doing so, mankind will be hurled with magnum force into a boiling caldron as the final chapter ensues in the battle between the forces of evil and God and His people. The Spiritual Warfare Raging Tbday If you are a Christian, you are on the front line of battle. And there’s no way out. You’ll either have to see this war through— and come out on the other end victorious—or through your inaction you will become an accomplice in Satan’s Plan. The fact is, once you surrendered your life to Jesus Christ, Satan declared war on you. N ow you are counted by him as a sheep to slaughter (see Psa. 44:22). The leaders of the New Age World Religion are Satan’s generals and admirals. In concert with their demon advisors, these men and women have already drawn up their battle plan. They have also identified the enemy. “The radical Christian Right is working hard to destroy the New Age movement,” reports an alarmed Dick Sutphen, author of many best-selling New Age books and tapes. Sutphen says that Christian “forces of ignorance and intolerance” must be defeated. He states that Christians are now trying to censor books in schoolrooms and dictate what magazines convenience stores can sell. Sutphen singles out Christian authors Robert Morey and Constance Cumbey, as well as Christian ministers and evangelists Charles Stanley (former head of the Southern Baptist Convention), Jerry Falwell, James Robison, Tim LaHaye, Jimmy Swaggart, Pat Robertson, “and others of their ilk,” branding these men as “zealots.”8 To combat what he calls the “Fundamental Fascism” of these and other Christians, Sutphen and his associates have founded an adversary group named New Age Activists. He describes this group as follows: New Age Activists is a spiritual action group of Reincarnationists, Inc., a nonprofit (nontaxable) educational organization structured to promote peaceful planetary transformation by sharing awareness of metaphysical principles, alerting others of the (Christian) efforts to block our dreams, and networking New Agers for support programs.9 Sutphen and his New Age Activists evidently will use any and all means at their disposal in their war against Christianity. Sutphen himself has stated that “New Agers are best at infiltrat ing society,” hinting that much of his organization’s aggressive behavior may be concealed behind the scenes.10 Christians must therefore expect determined New Age opposition. William Irwin Thompson, founder of the New Age’s Lindisfarne Association, which now operates out of the Cathedral of St. John the Divine in New York City, has emphatically stated, “There is no escaping it, religious warfare will continue.”11 The Quartus Foundation’s John Randolph Price speaks of this conflict in stark military terms, calling it an “offensive” and announcing that the “true believers . . . are now stepping forth from every religion on earth and are now moving into the staging area.”12 The demon spirit Djwhal Khul, whom Alice Bailey calls “the Tibetan,” is quoted as saying that every problem in society “is essentially a religious problem, and behind all strife . . . is to be found the religious element.” But, says this demon spirit defiantly, “Nothing in heaven or hell, on earth or elsewhere, can prevent the progress of the (New Age) man who has awakened to . . . the clarion call of his own soul.”13 We are experiencing outbreaks of spiritual hostilities in our schools, within the media and entertainment industries, and even within our churches. The business world is not immune from the New Age onslaught either. Incredible though it may seem, the N ew York Times reported on September 28, 1986 that the previous July, “Representatives of some of the nation’s largest corporations, including IBM, AT&T, and General M otors, met in New Mexico to discuss how metaphysics, the occult, and Hindu mysticism might help executives compete in the world marketplace.”14 At Stanford University’s renowned Graduate School of Business, a seminar called “Creativity in Business” includes such topics as chanting, meditation, the use of tarot cards, and the “New Age Capitalist.” Meanwhile, a recent survey of five hundred corporate presidents and company owners revealed that half had sponsored some type of New Age “consciousness raising technique” for their employees.15 Our nation’s military also seems to have become susceptible to New Age influence. In the early 1980s, officers at the Army War College, some of whom were graduates of EST and the radical Students for a Democratic Society, conducted a study aimed at creating a “New Age Army.” The study recommended meditation for soldiers and training in psychic skills and in magic.16 Carl A. Raschke, professor of religious studies at the University of Denver, describes the New Age as “the most powerful social force in the country today.” He adds: I think it is as much a political movement as a religious movement and it’s spreading into business management theory and a lot of other areas. If you look at it carefully you see it represents a complete rejection of Judeo-Christian and bedrock American values.17 Onward New Age Soldiers? As we’ll discover in the chapters that follow, the early stages of spiritual warfare have been successfully won by the New Age. Now comes the decisive, more ominous stage: the determined effort by the New Age to subvert and take over the Christian churches and to seize complete social and political power. The foundation is now being laid for the Antichrist’s reign of terror. It is ironic that at this very moment, when so many liberal Christian churchmen seek to remove older songs of worship like “Onward Christian Soldiers” from our hymnals, claiming them to be militaristic, a slow but steady drumbeat of violence has begun within the New Age movement. This seething undercurrent of violence threatens to openly explode into savage acts once Satan unleashes against mankind all his powers through the Antichrist. A shrewd dictator convinces his subjects that a certain group is a threat to their welfare. This is how Nero and Caligula were able to marshal public rage against the early Christians; this was the ruse Hitler used to inflame the German people against the Jews. N ow there are early signs that this same tactic may be employed by the New Age masters. In the influential publication Life Times: Forum for a N ew Age, publisher and editor-in-chief Jack Underhill recently called for “The Second American Revolution,” which he likened to “The New Crusades.” “There is a New American Revolution brewing today,” Underhill writes, “and the outcome of it will decide the fate of the world in the next decade.” This modernday conflict can, he says, result in “a higher nobility, a more pure idealism.”18 According to Underhill, the fate of the planet and the human race hinges on the outcome of this new revolution. He calls the struggle for New Age spiritual supremacy “the biggest war of all times” and announces that only full victory can bring “freedom to create our own reality.” Underhill also advises New Age discipies on how they can achieve this total victory over “the enemy”: We start the revolution within each of us and work out from there, getting groups of similar minded rebels together and drafting campaigns to make the enemy surrender.19 Like a general giving an inspirational pitch to his troops, Underhill continues with these combative and dramatic words: In this New Age we are our own commanders and infantry, truly special forces of a sort that has never been seen at war before. . . . Charge on to the only true victory there is, that of spiritual liberation. . . . Like the colonists of this country who began this struggle for liberation, we owe it to ourselves to complete it. The fate of the world depends on us.20 The New Age is dead serious about what it sees as a special mission for mankind: the conquest of the world for their “Christ,” the Lord Maitreya. Satan has ignited in his New Age followers a desperate urge to become gods, and he and his demons accuse Christians and Jews of being impediments and stumbling blocks to man’s godhood. Either the Christians and Jews will convert to the New Age faith . . . or they will have to go! A Declaration o f Spiritual War Underhill flatly states this is war. John White has said that survival is at stake, and John Randolph Price talks about a spiritual offensive and about breaking up the dark pockets of resistance. Price tells New Agers who are worried that they may not get to be gods, “The salvation of the world does depend on you!”21 The leaders of the New Age are fully aware that even though many Christian clergy and laymen can be tricked into believing in The Plan, a small core of Biblical Christians will never acquiesce to the New Age Kingdom. These stubborn believers in Jesus and a personal God are the “enemy” of whom Underhill wrote. These are the “dark pockets” of resistance that Price says must be smashed. How can these enemies of the New Age best be dealt with? Let’s see what Peter Lemesurier, premier New Age thinker, speaker, and best-selling author, proposes to do about these stubborn Christians as well as the Jews reluctant to support The Plan. Referring to the New Age Plan to install Satan’s man (the Antichrist) on the world throne, Lemesurier scathingly notes that “there are multitudes of Christians, long dazzled by a rabidly other-worldly messanic image, who will . . . be affronted at the suggestion that a mere man could ever fulfill that awesome role.”23 Lemesurier says that these troublesome Christians will undoubtedly believe the New Age “Christ,” whom he calls the “New David,” to be the Antichrist. Christians who know their Bible will indeed recognize the New Age “Christ” as an impostor and they’ll refuse to worship him as God. Lemesurier suggests that New Agers will battle the resisters under the banner of their impostor Messiah. “It is for the soul of man that the New David will have to fight,” he writes. The supporters of this New David must be willing to die, if necessary, to insure the success of their New Age Kingdom. It is the New David who will prevail, Lemesurier confidently asserts. “The masked forces of the Old Age,” he says, “will be unable to check (the) headlong rush” of the New Age.24 T H R E E Toward a One World Religion and a Global Order And the kin g shall do according to his will. . . . N either shall he regard the God o f his fa th e rs. . . . But in his esta te sh all he honor the God o f forces. . . . Thus shall he do in the m ost strongholds w ith a strange god, whom he sh all acknowledge an d increase w ith glory: an d he shall cause them to rule over many. . . . (Dan. 11:36-39) Religions should — Accelerate their ecum enism and create com m on world religious in stitu tion s which would bring the resources an d in spirators o f the religions to bear upon the solution o f w orld problem s. — D isp la y the UN (United N ations) f la g in all their houses o f worship. — Pray an d organize world prayers. . . . (Robert Mueller, The N ew Genesis) here can be no doubt whatsoever that one world religious and political leadership is the greedy, all-consuming goal of the New Age. N ot a day goes by that New Age leaders somewhere in the world do not impress upon their followers the prediction that a new world order is coming—and soon. Dozens of books have been written, hundreds of magazine articles published, and literally thousands of speeches presented detailing The Plan for this new world order. One of the most revealing and thorough books is Toward a Human World Order, by Gerald and Patricia Mische.1 The Misches were one of five original co-sponsors of Planetary Initiative for the World We Choose, a group dedicated to world unity and a centralized government. Their book is a detailed account of how a New World Order can be instituted, complete with an economic system embodying a “whole earth personal identity system,” as well as a plan for a New World Religion. The most amazing thing about this book is that it was published by an ostensibly Christian publisher, Paulist Press, a Catholic-operated press. The Tara Center, a New Age group led by Benjamin Creme, on April 25,1982, ran a full-page ad in twenty major newspapers around the globe, including dailies in New York City, Washington, D.C. London, and Paris. The ad boldly proclaimed that the New Age Messiah, identified as the Lord Maitreya, was now alive and ready to assume his rightful place on the throne of world power. The ad bluntly admitted that this goal was at the very essence of The Plan: What is The Plan? It includes the installation of a new world government and new world religion under Maitreya. Nearly five years later, on January 12, 1987, the Tara Center published a similar full-page ad in USAToday, trumpeting the lie that “THE CHRIST IS IN THE WORLD.” The ad described the Lord Maitreya as “A great World Teacher for people of every religion and no religion.” Christians who have studied Scripture can easily identify Lord Maitreya, the New Age Messiah. He is none other than the Antichrist, the Beast with the number 666. However, the Bible tells us that in the end the Antichrist will not prevail. Instead, Jesus will return (the Second Coming) in full glory and power to destroy the Satanic world ruler and to establish His own One World Government and One World Religion: And I heard a great voice out of heaven saying, Behold, the tabernacle of God is with men, and he will dwell with them, and they shall be his people, and God himself shall be with them, and be their God. (Rev. 21:3) , At the Second Coming Will Men Become Gods? Satan’s intention is to discredit G od’s Holy Word by reinterpreting— that is, by perverting—the Scriptures that point to the certainty of Jesus’ return. This is why many New Age leaders are spreading the false doctrine that the Second Coming does not mean the return of Jesus but instead refers to the realization by modern man that he, man himself, is “Christ,” the one and only supreme deity. David Spangler, with the Lucis Trust (“Lucis” is the Greek word for Lucifer) and director of the occultic Findhorn Community in Scotland, has flatly stated that “The Second Coming has already occurred. . . . N ow is the time to begin building the new earth.”2 John Randolph Price echoes the words of Spangler. He says that the Second Coming refers not to the return of Jesus, but to the awareness by an individual that he is a god, a supermind. A superminded person, Price says, achieves the higher state of “Christ Consciousness” that results from the awareness of one’s own divinity. This for him is the Second Coming.3 New Agers maintain that Jesus is not returning; therefore, it is up to man to transform the earth—to bring in the Kingdom. According to Price, “We can can let the kingdom come . . . which means that this world can be transformed into a heaven— right now— in the 1980s and 90s.”4 Lola Davis says that the coming New Age World Religion will be made possible because, through education, spiritual man “will have developed god-like qualities and sufficient knowledge and wisdom to cooperate with God (the universal energy force) in materializing the Kingdom of God on earth.”5 Organizing the New World Order Davis believes, as do many other New Agers, that the United Nations is an excellent first step for the coming New Age World Government. “Perhaps one way to prepare the people of the world for a World Religion,” she remarks, “would be to encourage their participation in this admirable organization that is leading the way toward One World.”6 Religious practices in most United Nations member coun tries are either pagan or sharnanistic, or else the peoples are of the Islamic, Buddhist, or Hindu faiths. Many of the member nations have M arxist/Socialist governments vigorously opposed to Christian belief. One United Nations organization, UNESCO (United Nations Educational and Social Organization), is so openly hostile to democracy and the West that the United States Congress has refused to fund it anymore. It is understandable then that the United Nations would be instrumental in the New Age push toward a New World Order. In O ctober 1975 a convocation of spiritual leaders read this statement to the United Nations Assembly: The crises of our time are challenging the world religions to release a new spiritual force transcending religious, cultural, and national boundaries into a new consciousness of the oneness of the human community and so putting into effect a spiritual dynamic toward the solutions of the world’s problems. . . . We affirm a new spirituality divested of isolarity and directed toward planetary consciousness.7 “New consciousness,” “oneness,” “human community,” “spiritual dynamic,” “new spirituality,” “planetary consciousness”—these are all buzzwords of the New Age. Noticeably absent from the statement are references to a personal God who loves us or to Jesus Christ, His Son. N or did these world spiritual leaders make mention of such meaningful Biblical terms as sin, redemption, salvation, and prayer. Evidently these men preach “another gospel,” a New Age gospel. The anti-Christian nature of the United Nations is exemplified by the attitude of its assistant secretary general, Robert Mueller, to whom all thirty-two directorates of this international body report. Mueller has advocated a One World Religion using the UN as a model. He has also proposed that the UN flag be displayed in every church throughout the world and that a universal Bible be written and published. Mueller is also a promoter of a one world economic and political order.8 The One World Government planned by the New Age will be completely merged with the One World Religion. There will be no separation of church and state. LaVedi Lafferty and Bud Hollowell, leaders of the Collegians International Church, which they describe as a “Church Universal of the New Age” dedicated to revealing the “ancient mysteries” (the anti-God Babylonian religious system) to initiates, make this point clear. They say that “The New Age, in its full meaning, will be attained as humanity individually and collectively moves past self-centered awareness to self-realization of human and universal oneness.”9 Lafferty and Hollowell assert that present religious systems fail to promote universal harmony because they are negative and ignorant. The New Age World Religion, on the other hand, is positive and endowed with knowledge and wisdom. “The formation of New Age religion,” they conclude, “is necessary to fill the void left by the inability of old religious forms to meet modern spiritual needs.” For example, they note that the New Age Religion allows believers to discard “ignorant” notions of an external God and to accept such “wise” Eastern doctrines as that of the Law of Rebirth (reincarnation) and that of “Christ” as a State o f Consciousness residing in many spiritually advanced men and not simply Jesus alone.10 It’s plain to see that the “new” religion espoused by the Colleagians International Church is simply a warmed-over version of the old Babylonian religious system which demonically led to the occultic Hindu and Buddhist religions. The new world order will exalt the lie that all paths lead to “the one,” and that “one” is the New Age. Even agnostic science will supposedly find a place in the pantheon of the New Age. Jonathan Stone has made this fake claim of universality for the coming “World Order:” I feel that there is coming a World Order in which science will merge with monistic philosophy and all the world will be swept up in a new consciousness. The one distinguishing feature in the World Order will be the credo: “All is one.”11 Clearly, The Plan is to create a world order in which not only churches and religions but all of society will be controlled by Lord Maitreya—the Antichrist—and his demonic spirit guides. Benjamin Creme and his group, Tara Center, have proclaimed that Maitreya will establish both a world religion and a world Socialist government that will bring peace to the planet and finally solve our economic and hunger problems.12 Jean Houston, past president of the New Age-oriented Association for Humanistic Psychology and a firm believer in evolutionary transformation, has said: 1 predict that in our lifetime we will see the rise of essentially a New World Religion. . . . I believe a new spiritual system will emerge. . . .13 According to The Plan, cosmetic changes to present government systems just won’t do. A wholescale change is necessary to purify and spiritualize the political process. Marilyn Ferguson insists that “the political system needs to be transformed, not reformed. We need something else, not just something more.”14 Such a transformation will mean no national boundaries and borders, no division among governments, and the end of patriotism and nationalism. The New Age sees the world as an interconnected global village, or as Lewis Mumford phrases it, “a World Culture.” Mumford enthusiastically lauds this New World Culture: The destiny of mankind, after its long preparatory period . . . is at last to become one. . . . This unity is on the point of being expressed in a world government that will unite nations and regions.15 The New World Culture will be achieved, William Irwin Thompson says, through “planetization”— the implementation of a political regime brought about by a growing world consciousness of unity.16 M ark Satin prophetically remarks: “Planetary events are, in a sense, conspiring to inspire us to recognize our oneness and interdependence.”17 Satin finds this conspiracy a favorable development that should lead to a “planetary guidance system,” a leadership structure that can levy a planetary tax on the rich so that the economic resources of the wealthy nations can be redistributed to the poorer ones.18 Similar to Satin’s proposal for a planetary guidance system is Donald Keys’s call for a “planetary management system” which will, he theorizes, advance us toward “Omega,” a sort of Kingdom on Earth in which all consciousness (man’s thoughts) and culture will be unified.19 Keys is founder of Planetary Citizens, a New Age group seeking to transform the world’s political systems. A former United Nations worker, Keys has enlisted the likes of David Spangler, Edgar Mitchell, Norm an Cousins, and Isaac Asimov in his group’s quest for a centralized one world system. Another New Age organization whose goal is the establishment of a one world system is World Goodwill. Headquartered on United Nations Plaza, this group pushes The Plan for a one world governmental and religious system espoused by Alice Bailey. In The Extemalization o f the Hierarchy and other works, Bailey has spread the teachings of her mentor-spirit—“the Tibetan,” Djwhal Khul. “The Tibetan apparently has an open line to Satan because everything he has taught Bailey about The Plan is in perfect accord with the Satanic “revelations” received telepathically from demon spirits by many other New Agers.20 Lola Davis, in her book Toward a World Religion for the N ew Age, gives a glowing “appreciation” to Djwhal Khul and Alice Bailey for all “the thought and planning” they have done toward a world religion for the New Age.21 Britisher Benjamin Creme of the occultic Tara Center in London is also a follower of the Tibetan and Alice Bailey. The Coming New Age “Christ״: Lord Maitreya According to Bailey, “the Tibetan” predicts a New World Order to be brought about when the “Christ” (not Jesus, but Maitreya) appears on the world scene. This “Christ” or world leader is expected to establish a New World Religion to supplant the “false teachings” of traditional Christianity.22 World Goodwill offers for individual use The Great Invocation, a printed meditation which pleads for Maitreya to come swiftly so a new world can be built, man can recognize his divinity, and global peace and tranquillity can come to pass. Evidently Maitreya is to lead us into a new astrological era: the Age of Aquarius. Reverend M atthew Fox, a Catholic Do minican priest whose endorsement of paganism and nature worship has shocked many of the Catholic faithful, says we are ‘ on the verge of breaking into a new spiritual age.” It is imperative, Fox warns, that we “beware of the Gods of the past”—apparently a reference to the Holy Trinity: Father, Son, and Holy Spirit. Fox says we must not look back at the fading age, but instead should embrace the New Age. “To look back piningly,” he cautions, “is to commit idolatry.”23 Like other New Agers, Fox insists that the “Kingdom/ Queendom of God has begun,” but that it is up to man to finish this Great Work. In his Manifesto for a Global Civilization, Fox avows that: Our era lures us to create the first global civilization on earth. We are that generation that begins the creative transformation out of the whole world into a single community out of the diverse peoples of the planet.24 For Fox, what Christianity should be all about involves everything from the perversion of homosexuality to witchcraft to the worship of both the planet earth and the reawakened ancient goddess. To those who might protest that these activities are clearly abominations before God, Fox snaps back that “the Holy Spirit will not be locked into any one form of religious faith.25 New Age advocate Robert Mueller, assistant secretary general of the United Nations, is also highly respected within the U.S. Catholic community as a Christian educator. Yet he has said, “I am not so fanatical as not to respect other faiths. I would never fight with another religion about the superiority of mine.”26 Asked “W hat is the best religion?” Mueller replies, “You have about five thousand religions on the planet. You’d be dead before you studied them all to decide which is the best.”27 Uniting the World’s Religions Mueller is pushing for “a convergence of the different religions” on earth, believing that mankind should and will discover the “cosmic and divine laws” that unite all religions. He even claims that this is what Christ would want us to do: “Worldwide spiri tual ecumenism, expressed in new forms of religious cooperation and institutions would probably be closest to the heart of the resurrection of Christ.”28 It is preposterous that Jesus would find heathen and pagan religions such as witchcraft, Buddhism, and Hinduism close to His heart. But observe that Mueller never says that Jesus is the Christ to whom he is referring. M ost New Agers believe that the “Christ” is not a man but an office or a spiritual state o f higher consciousness. The New Age claims that Buddha, Jesus, Lao Tse, and other enlightened teachers were all the same reincarnated person. Mueller mentions the “resurrected Christ,” but to Mueller resurrection is not exclusive to Jesus— it is simply a synonym for reincarnation: We will be resurrected materially in other life forms on this planet and ultimately into atoms of other stars, but most of all we will continue to live by the contributions we have made to humanity’s improvement through our deeds, thoughts, love, and reverence for life during our own incarnations.29 Mueller believes that merging all religions into one and establishing a One World Government will fulfill all man’s dreams and hopes. Furthermore, it will complete the evolutionary plan designed to lift man to divine status: It was now very clear to me: there was a pattern in all this; it was a response to a prodigious evolutionary march by the human species toward total consciousness, an attempt by man to become the all-understanding, all-enlightened master of his planet and his being. Something gigantic was going on. . . .30 In rapturous tones, Mueller describes this evolutionary march toward a One World Order as “glorious and beautiful like Aphrodite emerging from the sea.”31 W hat a revealing choice of words! Aphrodite is ancient Greece’s version of Babylon’s M other Goddess, the very personality who polluted the world with Satanism and who is depicted in Revelation 17:1 as “the great whore that sitteth upon many waters,” and in Revelation 13:1 as a beast rising up out o f the sea. This all makes sense when we note Mueller’s belief in the evolving godhood of man and the unity of all religions. He has stated, for example, that “Unity in diversity is one of the basic laws of the universe, as it is the law for a garden.”32 Evidently his analogy refers to the result that sprang out of the Garden of Eden after Eve was seduced by Satan into disobeying God. He writes that the story of the Tree of Knowledge vividly describes that all of us, “having decided to become like God . . . have become Masters in deciding between good and bad.” Mueller says that “this gives Catholic, Christian and all Christian educators a marvelous opportunity to teach a new morality and ethics.”33 Christians who know their Bible know that Adam and Eve did not “become like God” by their act of disobedence in the Garden of Eden, but became servants of the evil ruler of this temporal world, Satan. The Bible reveals that we are not “Masters in deciding between good and bad,” but are to rely on the Holy Spirit in discerning the difference between right and wrong. Mueller’s New Age ideas do indeed represent a “new morality and ethics,” but any Christian educator who irresponsibly teaches such warped, un-Biblical doctrine will have to answer to God. Where did Robert Mueller acquire these un-Biblical ideas? He has admitted that the demon spirit, “the Tibetan,” has advised him on a core curriculm for the New Age, to be used in public and private schools to teach children “Global Education.” Furthermore, Mueller confesses that his “M aster” was U Thant, the Burmese Buddhist and one world propagandist who was Mueller’s superior as secretary general of the United Nations Assembly. Mueller explains his personal conversion to the New Age this way: 1 have never been a deeply religious person. I was raised in a good Catholic family, but for long in my life, I had never met anyone who inspired me to become a really spiritual person. . . . At the age of 46, I became director of SecretaryGeneral U. Thant’s office. Here, for the first time in my life, I met a person who inspired me, a man who was deeply religious. . . . He was one of the most marvelous human beings I ever met in my life. . . . I studied Buddhism to know him better. We became great friends. . . . Here, in the middle of my life, was the Master, the one who inspired me, someone I could imitate like a father. . . . From the moment I became interested in the spiritual dimension of life, everything started to change. . . . I studied the mystics. . . . I was invited to participate in an East-West monastic encounter.34 Robert Mueller has become an unknowing captive of the Great Deception and now seeks to bring other lost souls into delusion and captivity. Sadly, Mueller concludes his testimony with these words: “I would like the whole world to benefit from my experience and to derive the same enlightenment, happiness, serenity and hope in the future as I derived from my contact with U. Thant.”35 All Paths Lead to God (Except Those That Profess a Belief in God) According to the New Age theology, any and all religious practices and beliefs are fully acceptable, no matter how bizarre or incredible. What the New Age does aggressively object to, however, is the suggestion that any one religion, faith, or set of moral and ethical rules is the way This seems at first glance tolerant; but in practice, it is diabolically clever and disingenuous. It portrays the Christian who professes belief in Jesus Christ as the way of salvation as intolerant and biased. The same is true for the Jew who refuses to accord witchcraft manuals equal standing with the books of the Old Testament. An alleged doctrine of universality turns out to be a wicked strategy to extinguish the world’s only major religions that believe in a loving, personal God: Christianity and Judaism—the same religions that historically have opposed the ancient Babylonian religious system now being revived for the New Age. After centuries of hatred for those who believe in a personal God, Satan hopes to get his revenge through New Age One World Religion. With which of the great religions of the world does the New Age find itself most in accord? Hinduism and Buddhism. Robert Mueller, though Catholic, has kind words for Hinduism and Buddhism. Embracing the Hindu (and New Age) doctrine of successive reincarnations, as opposed to the Christian (and Catholic) doctrine of death and judgment, Mueller states: O God, I know that I come from you, that I am part of you, that I will return to you, and that there will be no end to my rebirth in the eternal stream of your splendid creation.36 In his book The N ew Genesis, Mueller eloquently calls for the New Age to be ushered in by the year 2000 and the formation of a New Order which he euphorically calls “A Bimillennium Celebration of Life, the advent of an Era of Peace, a Golden Age, and the First Millennium of World Harmony and Human Happiness.” “Yes,” he writes, “we must join our Hindu brethren and call henceforth our planet ‘Brahma’ or the Planet of God.”37 With its many idolatrous temples, thousands of gods, belief that man is himself a deity, practices of a caste system, belief in karma and reincarnation, and almost every other abominable act and doctrine, the Hindu religion is in most respects a mirror image of the Babylonian religious system. The sensual M other Kali, the Hindu creator of the universe as well as its destroyer, is counterpart to the Goddess of Babylon, Semiramis, who with her mate-god Nimrod, the “mighty warrior,” built the Tower of Babel that so angered God. Gurus from India, where Hinduism flourishes, have been coming to America for several decades now. The tumultuous sixties saw a heightened interest among drug freaks, hippies, and rebellious youth in the ungodly religious philosophies of the gurus. N ow in their forties, many still possess the Satanic desires and lies they embraced in their youth. To these millions of confused Americans, the planned New Age World Order is synonymous with the Kingdom of Heaven on earth. Many who in the sixties sought to integrate Hindu religion with Western culture founded hundreds of New Age organizations. They have become Western-style gurus. They wear tailored suits and drive expensive foreign automobiles, but the religious philosophies they teach are no different than those of Maharaj Ji, Maharishi Mahesh Yogi, and Baghwan Rajneesh. This weird blend of Eastern and Western philosophies is what gives the New Age World Religion its seductive appeal. New Agers now tell those they seek to recruit that they can incorporate the “best” of Eastern mysticism with traditional Western values and even Judeo-Christian tradition. The Preaching o f Another Gospel Paul warned the Church against those who preach “another gospel.” There is no way the Hindu and Christian faiths can be reconciled. Whereas the former preaches a gospel of occultic, idolatrous practices, man-gods and worship of devils, the latter—Christianity—points to the exclusive Lordship of the King of Kings, Jesus Christ, and instructs us to keep our eyes fixed only on Him. One sees in twentieth-century India the damage Hinduism can wreak on a nation. The poverty-stricken and diseased Indian masses disprove the New Age lie that this religion can bring prosperity and health. The horrendous caste system of India shows the harm that can befall people who trust in the false doctrines of karma and reincarnation. Yet, millions of New Age believers in America and the West insist that Hinduism is a scientific religion able to meet all of man’s spiritual and material needs. The Maharishi Mahesh Yogi, who brought Transcendental Meditation (TM) to America, teaches his followers here and in Europe that the New Age began in 1975 when he inaugurated an “Age of Enlightenment.” He also has organized a New World Government with himself as overseer. Assisting Maharishi when his World Government assumes full power sometime in the future will be “Governors of the Age of Enlightenment.”38 To the solid Christian, it seems ludicrous that anyone would support a graying guru with long unkempt hair and flowing robes who sits in a lotuslike stance preaching that he is head of a new world political and religious system. Yet, hundreds of thousands have already been initiated into his TM program, which is titled, “Enlightenment and the Siddhis, a New Breakthrough in Human Potential.” Maharishi promises his initiates unparalleled, godlike powers such as the ability to communicate with the dead, to levitate and even fly through the air, to walk through walls, to discern the future, and to visit the past in spirit. Maharishi has said that through advanced meditation, man enters a new state of consciousness. In this enlightened state, superhuman powers—the “Siddis”— become possible: Enlightenment and its expression in the Siddhis will produce an ideal man. . . . A few enlightened individuals in all areas of society will surely lead to an ideal society. . . and an ideal world.39 Maharishi Mahesh Yogi is only one of a long string of latterday, New Age Messiahs who have appeared recently on the world scene offering enlightenment and godhood to gullible New Age seekers. Jesus Himself prophesied that many would come claiming to be Christ: “For there shall arise false Christs, and false prophets, and shall show great signs and wonders; insomuch that, if it were possible, they shall deceive the very elect” (Matt. 24:24). Yogi and many other New Age Messiahs are forerunners of a more powerful, more malignant leader—the Antichrist—possibly now waiting in the wings. The Antichrist sees the adoration and veneration that millions around the world now give to the many so-called New Age Messiahs and teachers who are his pale imitations. How much more will these legions of believers worship and venerate him, for he will be filled with the power of Satan and will come as a miracle worker and an angel of light. We see in the work of men like Yogi only a foretaste of what lies ahead for mankind. F OU R Conspiracy and Propaganda: Spreading the New Age Gospel A ssociate yourselves, O ye people, an d ye shall be broken in pieces. . . . 7hke counsel together, and it sh all com e to nought; speak the w ord , an d it sh all not stan d: f o r God is w ith us. . . . (Isa. 8:9, 10) Say ye n ot, a confederacy. . . . (Isa. 8:12) The open con spiracy m u st begin a s a m ovem ent o f explanation an d propaganda. , (H. G. Wells) he New Age World Religion has experienced stupendous success in getting its message before the public. Its success is fostered by extraordinarily cunning propaganda and the astounishing power that lies in the phenomenon called networking. Seeding Lies: The Usefulness o f Propaganda New Age theorists believe that their Plan can succeed only if they reach the public with enough propaganda. H. G. Wells, whose book The Open Conspiracy is much admired by today’s New Age elite, stated, “The open conspiracy must begin as a movement of explanation and propaganda.”1 Alice Bailey, head of the Lucis Trust, has told her followers, “It must be remembered that the forerunner of all movements which appear upon the physical plane is an educational propaganda.”2 The New Age has taken this advice to heart and has made important inroads in Western culture because of its masterful use of propaganda. Every would-be world dictator, from Napoleon to Hitler to Stalin, has sought to use the written word to promote lies. Today, with television, movies, computer networks, and an array of high-tech media possibilities, the ability of a determined minority or a world dictator to delude a gullible public is simply phenomenal. The New Age has in its fold many articulate public relationsoriented spokesmen who flood the airwaves with broadcasts that subtly reflect New Age doctrine. Even many kids5television programs are impacted. Saturday morning cartoon shows are almost predominantly New Age-oriented with definite overtones of sorcery, witchcraft, and Satanism. The printed media is flooded with New Age propaganda as New Age authors find it easy to have their views printed in the most elite magazines and their books published by the top publishers in the United States and Europe. Movies with occult and other New Age themes are being heavily promoted. New Age propaganda pictures Christian fundamentalists as bigots unsympathetic to world problems such as hunger and militarism. Meanwhile, New Age spokesmen are permitted to showcase their groups and leaders as broad-minded, humanitarian, and caring. New Age groups such as the Hunger Project, which has taken in millions and millions of dollars in donations, are commended; yet many of these groups have never spent even one cent on food for the needy! The Hunger Project, for exampie, admits that all of its money goes for a massive public relations campaign designed to promote “consciousness,” a New Age doctrine.3 Many persons are drawn to the New Age movement because of its extremely effective public relations campaign about correcting social injustices and ending world hunger. New Age leaders would have the West redistribute its income to the Third World and set up a one world, Socialistic government to oversee this redistribution. While Western governments and many compassionate Christian organizations are actively working to help hundreds of thousands in desperately starving countries, New Age leaders do little but criticize the United States and other Western governments and call for a “World Consciousness” of love for the hungry and needy. Toward One-Worldism Many New Age groups promoting one-worldism are active in propagandizing The Plan. Most define themselves as “educational” and therefore receive tax-exempt status and obtain government grants to prepare humanity for a One World Order. Planetary Citizens, a networking group founded in 1974 by United Nations executive Robert Mueller, well-known a u th o r/ editor Norman Cousins, and New Age peace activist Donald Keys, is one such organization. Planetary Citizens’ intention is to encourage all the citizens of the globe to force their nations into a One World Government and Planetary Consciousness by the year 2000. As Keys explains: The first objective of Planetary Citizens is to help people around the world cross the threshold of consciousness from a limited, local perspective to the inclusive and global view required in a planetary era.4 Such organizations as the Club of Rome, the Lucis Trust, and World Goodwill are also busy proselytizing throughout the world to drum up support for the New age blueprint. Officials of the liberal-oriented Club of Rome, expressing support for a one world system, have stated: Mankind cannot afford to wait for change to occur spontaneously and fortuitously. . . . Man must initiate . . . changes. . . . (The) crises confronting mankind now and in the immediate future can be successfully met provided there is genuine international cooperation in the creation of a Master Plan for world “organic growth.”5 These same Club of Rome officials stress that “there is no other viable alternative to the future survival of civilization than a new global community under a common leadership.”6 Networking the New Age The New Age is composed of a wide assortment of loosely interlinked groups. The strength of the movement comes from its masterful ability to network to achieve common goals and objectives. Marilyn Ferguson, author of what many New Agers consider their manual for action, describes this networking activity as an “open conspiracy.” Borrowing an astrological term, she calls the movement the “Aquarian Conspiracy.” She proudly trumpets that the Aquarian conspiracy “has triggered the most rapid cultural realignment in history,” and tells us that the movement is nothing less than a “new mind—the ascendance of a startling world view.”7 Ferguson’s New Age manifesto was published in 1980 under the title, The Aquarian Conspiracy: Personal and Social Transformation in the 1980s. In the intervening years, the New Age religious movement has continued its phenomenal growth spiral. Literally thousands of organizations are now integral parts of the New Age Movement. Many of these groups are openly proselytizing for new members and are even advertising their meetings and other activities in the media. Other New Age groups remain secretive, conducting their operations behind closed doors and strictly limiting access or knowledge of their activities to only those who have been properly initiated and found trustworthy enough to become active participants. Ardent New Agers recognize that their plans to subvert and destroy Biblical Christianity and replace it with a world church based on supposed scientific laws and Eastern mysticism can best be achieved by a large number of separate organizations. Many of these can best be described as cults. Some but not all New Age organizations call themselves “churches.” New Age groups, sensing a rising tide of Christian opposition, now prefer such euphemisms as the Human Potential Movement, New Thought, Consciousness Movement, Holistic Movement, Whole Earth, East/W est, Unity, and so forth. Whatever their label and whether they are formal or informal, a group or a church, a cult or a denomination, the New Age believers have much in common. Some derive great satisfaction in identifying their movement as a conspiracy. But is the New Age a conspiracy? Certainly the New Age leaders know and collude with one another, and they parrot almost identical doctrines. Moreover, they possess a common hostility toward Christian belief that Jesus Christ died on the cross for our sins. The Unity Behind the Multiheaded New Age Monster A multiheaded, invincible, conspiratorial network is the goal of the New Age. It is amazing how supposedly independent New Age groups can quickly coalesce. As John G. Bennet explains the New Age strategy: The part of wisdom is to establish, here and there, centers in which right relationship can exist by the power of a common understanding of what is ultimately important. From such centers there can spread throughout the world—perhaps more quickly than you can imagine possible—the seeds of a new world.8 LaVedi Lafferty and Bud Hollowell suggest that New Age networking is made possible by the hidden work of invisible spirit “Masters.” In other words, Satan’s demons are operating like a mental television network, planting messages in the minds of New Agers. The disembodied Masters are said to be able to communicate much more freely with the living today because our “psychic receptivity” and “collective consciousness” is much higher. Lafferty and Hollowell say that New Age groups around the globe function as central psychic receiving stations: Light centers have developed into a worldwide network that purposely link-up telepathically in meditation to serve as “superconscious” receiving, anchoring and sending stations. Many such groups exist. We have even “seen” their “lights” twinkling across Russia. Some are known this way, intuitively, but many are now consciously aware of each other and are in direct contact.9 An important focus for this link-up has been the Unity-in-Diversity Council in Los Angeles, which publishes an annual directory of member and supporting organizations and sponsors an annual conference where group representatives from around the world gather to meet, conduct workshops, and exchange information. Also, the Spiritual Com munity Guide is published by a Berkeley, California New Age organization. In Scotland the Findhorn Communications Center keeps a computerized referral list of New Age-oriented individuals, groups, and communities. Also, the United Nations, under the guidance of its resident New Age leader Robert Mueller, has sponsored the publication of an international guide called simply Networks. In Menlo Park, California, the Spiritual Emergency Network (SEN) was started by Stan and Christina Grof “in response to a great international demand for a new understanding of ‘unusual’ states of consciousness.” N ow SEN’s network, located at the California Institute of Transpersonal Psychology, reportedly encompasses ten thousand individuals and organizations, and its resource file includes fifteen hundred active New Age leaders.10 Clearly, when the call comes from their M aster (Satan), the entire panopoly of New Age organizations can spring into action. There is definitely a conspiracy However, these groups and their masters retain separate identities for now, to ward off attack from outsiders (Christians) by offering dispersed targets. The strategy was explained by Donald Keys, consultant to the United Nations and cofounder of Planetary Citizens. In his book Earth at Omega, which he dedicates to Max Heindel, the famous Rosicrucian, to “The Tibetan,” and to Ascended Master El Morya, Keys reveals: We mentioned earlier how the dominant straight “society” has apparently not recognized the strength and pervasiveness of the new consciouness.11 Christians opposed to New Age philosophies should not concern themselves with whether a conspiracy exists. More profitable would be firm opposition to all New Age beliefs and activities, recognizing Satan is behind them all. It may be true that there is no one organizational chart that places all New Age groups under a particular hierarchy or any document that unites them all. However, considering the charac teristics common to New Agers, it is difficult to deny that most of the groups alleged to be autonomous are, in fact, integral components of the entire apparatus. Furthermore, all who are active in promoting the New Age World Religion are, in fact, answering the call of Satan. “By their fruits ye shall know them.â€? FI VE The New Age Antichrist and His Will to Power A n d in the la tter tim e . . . when the transgressors are com e to the fu ll, a kin g o f f e r e e countenance, an d u nderstan ding d a rk sentences, shall sta n d up. A nd his pow er shall be m ig h ty but not by his own power: and he shall d estro y w on derfu lly an d shall prosper, an d practice, an d shall d estro y the m igh ty an d the holy people. A nd through his policy also he sh all cause craft to prosper in his hand; an d he shall m a g n ify h im se lf in his heart, an d by peace sh all destro y m any: he shall also sta n d up a gain st the Prince o f princes; but he shall be broken. . . . (Dan. 8:23-25) The new M essiah should h im se lf believe in his id en tity an d m ission su fficien tly to inspire others w ith th at sa m e belief—ju s t a s Jesus an d John the B a p tist before him . . . the leader m u st have the courage to step f o rw a rd an d p la y out his role to the fu ll i f the g reater prophetic plan is to go fo rw a rd . (Peter Lemesurier, The Arm ageddon Script) he most significant tenet of the New Age World Religion is its teaching that the planet earth is on the threshold of a cardinal event in its history: the arrival of a “Messiah” or “Christ.” The New Age believes that its “Messiah,” also called the Great World Teacher, will lead a One World Government and a One World Religion. Light-years ahead of anyone else on earth, he will teach marvelous new revelations and bring peace and prosperity. He will come as a savior, arriving just as the world is sliding into chaos and destruction to lead man into a bright, shining, glorious New Age. If this description of the New Age “Christ” sounds to you suspiciously like that of the real Messiah, Jesus Christ, found in the Holy Bible, your suspicion is confirmed. The New Age “Christ” is a blasphemous imitation of the true Christ of the Bible. But Satan’s use of a fake Messiah does not surprise those of us who know G od’s Word. Isaiah revealed the evil one’s traitorous goal: “I will be like the M ost High.” The Plan of Satan, now being meticulously executed by his New Age followers, is to mimic the prophesied return of Jesus Christ. This will be Satan’s boldest trick ever. His fake “Messiah” will imitate the real Christ by performing miracles. His charismatic charm and perceived spiritual wisdom will so enchant world leaders and the masses that they will hail this “Christ” as the greatest and most advanced man to have ever lived. Eventually almost every man, woman, and child in the world will worship him as God. New Age literature abounds with predictions about the imminent appearance of this false “Christ.” The Aquarian Gospel o f Jesus Christ, a fake Biblical text given in a Satanic vision to an Ohio man, Levi Dowling, and now frequently quoted as truth by New Agers, prophesies: But in the ages to come, man will attain to greater heights. And then, at last, a mighty Master Soul will come to earth to light the way up to the throne of perfect man.1 Lola Davis identifies the New Age “Christ” as “the One for whom all religions wait, called Lord Maitreya by some in the East, Krishna, Messiah, Bodhisattva, Christ, Immam M ahdi.” She promises, he “will bring new revelations and further guidance for establishing the World Religion.”2 Currently, Davis explains,.”3 Davis says that the Mystery Schools and the Ageless Wisdom teach that: The Hierarchy is composed of souls of several levels of advancement, degrees of initiations. This group is directed by the One called Lord Maitreya in the East and Christ in the West. All of its members have lived many lives on earth, and just like us, have learned from them.4 According to Davis, until this great avatar or leader returns to earth, it is m ans responsibility to “create a new global society that will welcome a World Religion for the New Age.” Furthermore, she suggests . . . that we assist his earthly and heavenly helpers prepare humanity to recognize and receive him joyously and appropriately whether he be called Lord Maitreya, Buddha, Messiah, Christ or Imam Mahdi.5 Alice Bailey, head of both the Arcane School and the Lucis Trust, has written a number of books which detail The Plan. She leaves little doubt that the New One World Order will be realized only with “the reappearance of the Christ.” Bailey’s The Externalization o f the Hierarchy predicts that the New Age will be in full bloom soon after a global crisis occurs and in desperation the world turns to the “Christ” for leadership. This New Age “Christ” will affirm the essential divine nature of humanity, says Bailey, and a New World Religion will come about, led by the “Christ” and his spiritual hierarchy manifest on earth. Christianity will be eclipsed by the new religion.6 T he N e w A g e C h rist: A R e in c a r n a te d H in d u A v a ta r ? The New Age holds that the term Christ can be applied to any person who reaches an elevated state of consciousness and thereby achieves divine status. It is said that we are all simply Christsin-the־making. Nevertheless, historically only a few souls have found enough favor with the spiritual hierarchy of reincarnated ancient Masters to be chosen to return to earth as an avatar. The concept of the avatar is derived from the Hindu religion, which teaches that avatars are reincarnations-in-the-flesh of the god Vishnu, messengers sent to the living from the “gods.” (There are at least thirty-three hundred Hindu gods—some authorities on Eastern religions say there are over a million!) This corresponds to the New Age belief in the hierarchy of reincarnated ancient Masters. New Agers claim that Gandhi, M ohammed, Buddha, and Jesus were avatars and that each was therefore a “Christ.” Some avatars are more enlightened than others. In the New Age scheme of things Jesus is not the Son of God, but just another enlightened, reincarnated spirit. New Age disciples claim that in the near future we can expect an avatar to come who is far greater than either Jesus, Buddha, Krishna, M ohammed, or Gandhi. Rather than just another “Christ,” this is to be the “Christ.” He will be god realized, god incarnate. Lord Maitreya, avatar and world teacher, is now claimed to be living in London, preparing himself for his eventual reign at the world’s helm. According to the Tara Center, Lord Maitreya is the one Christians call Christ and whom the Jews term Messiah, the Buddhists the Fifth Buddha, and the Hindus Krishna. “These are all names for one individual. His presence in the world guarantees there will be no third world war.”7 “Lord Maitreya” is identified by most New Age groups as their coming “Christ.” However, to deflect criticism, many refrain from naming him. Instead, such general titles as “the enlightened one to come,” the “Cosmic Christ,” the “Universal One,” or the “New Age World Teacher” are used. The Unity-in-Diversity Council is one large New Age organization that is proud to identify Lord Maitreya as the spiritual leader on whom the world awaits. Unity-in-Diversity has described its major goal as follows: To establish a church based upon universal premises . . . for those who wish to follow a universal path (often called the “Maitreyan path,” the Maitreya being the enlightened one yet to come).8 There is a long list of New Age groups and leaders who have endorsed Maitreya as their Messiah. Elizabeth Clare Prophet, head of the Church Universal and Triumphant, is one. Another group is the Collegians International Church. This thoroughly New Age church claims that Jesus and Maitreya were one and the same: At Collegians we acknowledge the World Teacher who appeared as Jesus the Christ, also known variously as the Lord Maitreya and the Bodhisattva, as well as other appearances of the Christ through such personalities as Melchizedek, Khrishna, and Mithra.9 The Lord Maitreya has also become “The 21st century Jesus” for many New Agers who futilely try to remain Christians, calling themselves “Cosmic Christians” or “Aquarian Christians” and claiming that hidden in the Bible are the Mystery Teachings of the New Age. A pathetic example is given by Elissa Lindsey McClain, a woman who for twenty-nine years was intimately involved in the New Age. After becoming a Christian in 1978, she wanted to represent her new M aster with a picture or a figurine. So she went to her local cosmic (translated, “New Age”) bookstore and asked for a picture of Christ. I was handed an artistic rendition of a man with long hair but the caption read “Lord Maitreya.” “Excuse me, but this isn’t Jesus Christ,” I complained to the owner. “This is Maitreya.” “Yes, but you see, Maitreya is the Christ of the Aquarian Age. Jesus was the Christ for the Piscean Age,” the shopowner answered, smiling sweetly.10 Though a new Christian, McClain knew the difference between Maitreya and the real Christ, and so refused the picture of Maitreya. Thousands of others, however, vainly worship Maitreya, believing that he is merely the most recent—and most advanced—reincarnation of the Christ. Any Christian with even a rudimentary knowledge of the Bible will recognize this Lord Maitreya for who and what he really is: a deceiver and a servant of the Devil. The Bible warns us of the false “Christs” to come and gives us tests for judging the truth. One test is that anyone who comes as other than Jesus cannot be the Christ, but is instead of Antichrist. First Corinthians 8:6 tells us “there is but one God, the Father. . . and one Lord Jesus Christ.” The disciple John labeled as a liar he “that denieth that Jesus is the Christ. He is antichrist, that denieth the Father and the Son” (1 John 2:22). And in Philippians 2:5-11 we see that Jesus is given a name which is above every other name. Accordingly, “at the name of Jesus every knee should bow, of things in heaven . . . and things under the earth.” The Christian is advised to stay away from and oppose corrupting doctrines of false Christs: “Believe not every spirit, but try the spirits whether they are of G od” (1 John 4:1). Is th e N e w A g e “C h r is t” th e A n tic h r is t? Whether he comes as the Lord Maitreya, as the reincarnated Buddha, Immam Mahdi of Islam, or as another “divine being,” the question Christians surely must ask about the coming New Age “Christ” is, Is he the Antichrist prophesied in Revelation 13, in the Book of Daniel, and elsewhere in the Bible? My own answer is, Yes, the man for whom the New Age waits will almost certainly be the Antichrist. Do not, however, expect a devoted New Ager to admit that his “Christ” is the Antichrist. That would be considered negative thinking, even impossible, for many in the New Age Religion deny that any one man will come as the Antichrist. They do not foresee the coming of evil into the world, but only of good. New Age prophets consistently paint a bright, shining picture of the glorious future that shortly awaits mankind. Elissa Lindsey McClain reports that as a New Ager she was taught, “There is no such thing as the devil or a fallen angel leading the forces of evil. Man alone is responsible for the present discord in the world.”11 Evidently the New Age teachers who propound this “new gospel” are either unfamiliar with or purposely reject Scripture, because the reality of Satan is a frequently stated Biblical truth. New Age teachers are quick to twist G od’s Word when doing so serves their purpose. For a prime example, read what John Randolph Price had to say when he was asked, “How do you define the Antichrist?” Answer: “Any individual or group who denies the divinity of man as exemplified by Jesus Christ; i.e., to be in opposition to ‘Christ in you’—the indwelling Christ or Higher Self of each individual.”12 Price’s warped view that the Antichrist is any person or group who denies that man is a god is a diabolical twist of Biblical truth. Jesus did not come to exemplify man as a divine being. He came as the one and only living Christ, the Son of God, to offer salvation and the redemption of sins. The Bible unequivocally states that the Antichrist is he who denies that Jesus came in the flesh. (1 John 4:2, 3) The horrendous conclusion of Price’s Satan-inspired teaching is to label all Bible-believing Christians as being of Antichrist, because no true Christian would ever confess that man is a deity. This is a clever but despicable ruse by Satan to undermine the Scriptures and threaten Christian believers by labeling them as the Antichrist. Another popular New Age misconception is that the Antichrist is all those persons and groups who represent the material world, whereas all those who adopt the New Age consciousness and lifestyle are of the spiritual realm. LaVedi Lafferty and Bud Hollowell appear to accept this concept of the Antichrist as being those who are of lesser, material essence. The Battle of Armageddon is not a war fought with weapons, it is a battle of Consciousness—Christ (Cosmic) Consciousness against the Antichrist (earth/material illusions). These two polarities will produce the third, the “Kingdom.”13 The teaching of Lafferty and Hollowell suggests that once the New Age Religion and One World Order come into existence, Christians may face very hard times. Lafferty and Hollowell give one indication of that dangerous and precarious future era of persecution and trial when they remark that a “new world” is coming and ominously proclaim: This is a time of opportunity for those who will take it. For others, if earth is unsuitable for them, they will go on to other worlds. The Yogic Kingdom will be coming to pass for this planet.14 Christian fundamentalists—those who insist on believing in Jesus Christ—are certainly “unsuitable” for the “Yogic Kingdom.” Therefore it is undoubtedly Christian fundamentalists who “will go on to other worlds.” If we recall that the New Age preaches that at death we are reincarnated into other worlds— that is, other planes of existence—we begin to understand just what is being suggested by the New Age as the eventual fate of Christians and other “materialist” unbelievers. T he A n tic h r is t Is a M a n a n d H is N u m b e r Is 6 6 6 The Bible convincingly foretells the coming rise to world power of the Antichrist. Scripture reveals that this false Messiah will come just before the return of Jesus. He is identified in the Book of Revelation as a man with the number 666 and is horrifyingly described as “the beast.” Revelation also informs us that he was given power “to make war . . . to overcome . . . power was given him over all kindreds, and tongues, and nations. All that dwell upon the earth shall worship him” (13:5-8). The Beast, the man with the number 666, will be so consumed by the spirit of Satan and his demons that he will become Satan personified on earth. The Antichrist “spirit” has been on earth for aeons. It was Satan’s link with possessed men who actively opposed the teachings of the early Christian Church (see 1 John 2:18-23; 4:1-4). Now, in the last days, this spirit of Antichrist will totally possess the soul of the living man of evil and darkness whom Satan has chosen. The Antichrist, or Beast, is to be given tremendous powers by Satan, “the dragon” (Rev. 12:9), and is to be admired by the masses for his supernatural power and his apparently unconquerable spirit: And they worshipped the dragon which gave power unto the beast: and they worshipped the beast, saying, Who is like unto the beast? who is able to make war with him? (Rev. 13:4) T h e B la s p h e m y o f th e A n t ic h r is t This man, the Antichrist, will have temporal power over Christians who dwell on earth until Jesus returns, when he and his followers will be destroyed. Until that momentous event, however, the Antichrist will wax stronger and stronger. The Bible tells us that he will dare to speak blasphemies, or lies and falsehoods about God. He will also blaspheme the heavenly host (Christians who have died) who reside in heaven with God (Rev. 13:5, 6). Already we see this blasphemy. New Age teachers have been inspired by the spirit of Antichrist to declare that there is no personal God in heaven who loves and cares for man, no God whom man should fear and obey. They have blasphemed G od’s Son by spreading lies that Jesus was not who He and His discipies claimed, and that He will not return to earth again as the Messiah. The spirit of Antichrist also is busy attacking the heavenly host—those saints who have died in Christ. This vile attack is clearly seen in the growing practice of “channeling,” or communication with demon spirits. With regularity, New Agers report that the spirit of “Jesus,” “Jonah,” “Isaiah,” “Paul,” “John,” “Abraham,” or another Biblical saint has come to them while they were meditating. Christians know that these spirits masquerading as Christ or as dead saints are demons. The Bible condemns communication with the dead as sorcery (see Deut. 18:9-12 and Isa. 8:19); and Jesus, in the story of Lazarus, told us that the dead cannot contact the living. Satan is deceiving millions by having his demons pretend they are long-dead saints or wise men who wish to help those now living to know “the truth.â€? The truth these demons impart in invariably the same: namely, that an external God does not exist and that man is himself a god. The New Age believes these lies and perverts the gospel by attributing them to Jesus and the saints who have been channeled, or contacted, by New Age mediums. This is the spirit of Antichrist working in the world today (see 1 John 4:1-3). It is blasphemy. S I X How Will We Know the Antichrist? A nd then sh all th a t Wicked be revealed, w hom the Lord shall consum e w ith the sp irit o f his m outh, an d shall destro y w ith the brightness o f his coming: even him , whose com ing is a fle r the w orking o f Satan w ith all pow er an d signs an d lying wonders. (2 Thess. 2:8, 9) Drugs . . . A.I.D.S. . . . p o ve rty . . . ra m p a n t crim e . . . m a ss s ta n ’ation . . . nuclear threat . . . terrorism . . . Is there a solution? In an sw er to our urgent need . . . THE CHRIST IS IN THE WORLD. A great World Teacher f o r people o f every religion an d no religion. A p ractical m an w ith solutions to our problem s. He loves ALL h u m a n ity . . . Christ is here, m y frien d s. Your Brother w a lk s am on g you. (Tara Center, full-page ad in USA Tbday, January 12, 1987) hen we turn to God’s own Scriptures, the Bible, for insight, we find seven signs or marks to help us recognize the Antichrist: 1) He will come disguised as an angel of light. 2) He will exalt himself and magnify himself above every god. 3) He will come as a man of peace. 4) He will corrupt men and gain their allegiance through deceit and flatteries. 5) He will be given supernatural strength to show signs and perform wonders. 6) His rise to power will result from his exercise of will. 7) He will be a destroyer, a slayer. ββ It comes as no surprise that New Age leaders paint a vivid picture of their coming “Christ” or “Messiah” that exactly corresponds to these seven identifying marks of the Antichrist. Let’s investigate this astonishing correspondence. H e W ill C om e D is g u is e d A s a n A n g e l o f L ig h t Those who expect to easily recognize the Antichrist because of his wicked countenance and thus avoid his snares will be sorely disappointed. Satan comes to us in human form, not as a devil but as an angel of light (2 Cor. 11:14). New Agers report many experiences of communicating during deep meditation or trance with a spirit being shrouded in light, a being who brought them inner peace and a sense of rebirth and transformation. But this same being is said to encourage them to reject the religion of their fathers; he tells them the Bible is tainted throughout with error. The “angel of light” denies that Jesus is the Christ and guides the individual toward such practices as astrology, spiritism, black magic, witchcraft, homosexuality, and free sex. H e W ill E x a lt H i m s e l f a n d M a g n ify H i m s e l f A b o v e E v e ry G od The New Age Religion holds that man is an evolving god and that Jesus Christ is not man’s master. Man is encouraged to worship other gods and to follow whatever path he chooses. He may worship the many Hindu deities, Buddha, pagan gods, the M other Goddess, or incredibly, even Lucifer. But, in fact, these many gods are considered nothing more than forerunners of man’s own inevitable ascension to godhood. This unholy doctrine is tailor-made for the Antichrist, who is described in the Bible as a man who will exalt himself above every other man and will portray himself as more worthy of worship than any other god. The Antichrist will say, “Worship me because I come to initiate you into the Mysteries of the Ages, after which you will be your own god.” Only after their initiation will men learn the awful truth: they will not be gods but slaves to Satan. H e W ill C o m e A s a M a n o f Peace Daniel prophesied that “by peace” the Antichrist will “destroy many.” The Antichrist will imitate Christ Jesus, whom the prophet Isaiah heralded as the “Prince of Peace” (Isa. 9:6). The New Age boasts that its “Christ” will ensure there will be no third world war. In an age when man stands at the very precipice of widespread nuclear destruction, with missiles, atomic weapons, and other tools of death proliferating, this idle promise will surely be welcomed by all peoples. If we wish to catch a revealing glimpse of how the Antichrist might use man’s fear of nuclear destruction to seize world power, we need only turn to an astonishing book, The Armageddon Script by New Age authority Peter Lemesurier. Lemesurier proposes that the New Age use the Jewish and Christian belief in Biblical prophecy to catapult their chosen man-god to prominence. “Basically, it could be said that the prophecies . . . make up a kit of parts for constructing humanity’s house of the future.”1 Lemesurier’s scheme is that as soon as world chaos strikes sometime in the future, the New Age “Christ” immediately will proceed to Jerusalem so he can fulfill the prophetic scenario. This is Phase One of The Plan, which runs as follows: (a) The restored Messiah must reappear on Jerusalem’s Mount of Olives at the time of a great earthquake. (b) He must enter Jerusalem from the east, escorted by a procession of rejoicing followers dressed in shining white. (created by man-made special effects such as in the movies).2 Lemesurier supposes that the world, seeing these things come to pass exactly as prophesied, will hail the New Age “Christ” as the Savior or Messiah of whom the Bible spoke. As events go from bad to worse, it is more than likely that anxious, weary groupings and nations, only too glad to place all their burdens and responsibilities on other people’s shoulders, will increasingly tend to offer the New David temporal power and even military command. The temptation for him to accept and play the dictator will be considerable. He may even be turned into a god, much as subsequently happened to Jesus himself.3 Until the time is ripe for this plot to unfold, Lemesurier suggests that the New Age “Christ”-to־be ready himself for the momentous task ahead: In the meantime the new world-leader must prepare himself for his role. He must study the scriptures and the Dead Sea Scrolls, immerse himself in current Jewish messianic expectations, thoroughly survey the general locality and familiarize himself with all the major prophecies and the best in New Age religious thought. In short, he must create in his own mind a crystal-clear idea of the vision which he has to fulfill. For only in this way can that vision be guaranteed to come into manifestation.4 Jesus warned us that if it were possible, the very elect would be deceived. Lemesurier’s proposed conspiracy to propel the Antichrist to power fulfills this prediction. H e S h a ll C o rru p t M a n a n d G a in H is A lle g ia n c e T h ro u g h D eceit a n d F la tte rie s The Biblical prophecies tell us that the latter-days ruler of mankind will oppose those who have given their lives to God. At the same time, he will win over the unbelieving masses through deception and flattery. And such as do wickedly against the covenant shall he corrupt by flatteries. . . . (Dan. 11:32) And for this cause God shall send them strong delusion, that they should believe the lie. (2 Thess. 2:11) There is no greater flattery than to convince a person he is an evolving god. This will be the smooth, seductive lie of the New Age “Christ.” A second lie will be that man is neither bad nor sinful, but is instead naturally full of goodness and perfection. He will tell mankind that all they need to do is to believe in themselves, to awaken their “Christ consciousness,” and to build their own self-esteem. You must love yourself, the New Age “Christ” will teach, if you hope to become God. H e W ill Be G iven S u p e r n a tu r a l S tr e n g th to S h o w S ig n s a n d P e r fo r m W o n d ers The Antichrist will perform supernatural feats, counterfeiting the gifts of the Spirit of the Lord (Dan. 11:28; M att. 24:24). By these, the Antichrist will deceive the people of earth. And he doeth great wonders . . . and deceiveth them that dwell on the earth by the means of those miracles. . . . (Rev. 13:13, 14) The New Age Messiah is reputed to possess miraculous spiritual gifts of a magical nature. For example, Benjamin Creme has said that the Lord Maitreya, the “Christ” of the New Age, will proclaim his arrival by suddenly appearing on all television sets around the globe and speaking telepathically to a world audience.5 Other New Age leaders have described their “Christ” as one who will end world hunger, perform fantastic acts of healing, and display other marvelous powers of the mind. H is R is e to P o w er W ill R e s u lt f r o m th e E x e r c is e b y th e A n t ic h r is t o f S u p e r h u m a n W ill In the New Age scheme of things, human will is all-important. The Masters of Wisdom—the discarnate spirits in the other dimensions—are said to focus all their attention on serving the One Will.6 George Bernard Shaw, who professed a vile hatred for God and Christianity, wrote of a “will” incarnated in man that shall “finally mould chaos itself into a race of gods.”7 According to New Age teachers, the more a person evolves and becomes the god he is intended to be, the greater will he has to freely exercise. The New Age Messiah shall therefore be endowed with unparalleled will, as evidenced by his superhuman mind powers. The Bible alludes to the superior will of Antichrist. Daniel forewarned that he “shall do according to his will” (11:36), suggesting that he will freely exercise control over other men. New Age doctrine associates higher consciousness, will, and power. Supreme power results when a man of higher consciousness is able to command whatever he desires and it is done. The New Age “Christ” is expected to be such a man. His will and that of the universe are to be one, giving him unequaled ability to actually create material reality with thought power. In his sinister book The Meaning o f Christ for Our Age, New Ager F. Aster Barnwell writes that the baser human has will, but gods have a more powerful will, which Barnwell terms Free Will. He recalls that in the Garden of Eden, Eve allowed the serpent to tempt her into eating of the Tree of Knowledge of Good and Evil. She and Adam were then banished from the Garden because God feared they would next eat of the Tree of Life and thus live forever as gods.8 But according to Barnwell, the mistake Eve made was in not eating of the Tree of Life first. Had she done so, he remarks, she would have become a goddess, or a “Christ,” with Free Will. The goddess Eve could then have eaten of the Tree of Knowledge of Good and Evil without fear of G od’s wrath. Barnwell equates Free Will with god-consciousness, explaining that god-consciousness is achieved when an individual releases pent-up psychic energy forces inside, so he can affect the world for good. He refers to this psychic energy force by the Hindu term “Kundalini,” or “Serpent Power.” Such a person does not need an external god, for he has himself become a god.9 Thus, we are being set up for the teaching that the New Age “Christ” possesses a superior morality and will: Serpent Power. Whatever he wills, is good. A desire to impose his will on others motivated Adolf Hitler to power. Like today’s New Age Messiah, the Nazi monster envisioned an empire founded on will. Hitler himself said of his messianic goal: “National Socialism is more than a religion; it is the will to create supermen.”10 The supreme exercise of will is also the goal of all Satanists. The late Aleister Crowley, the British Satanist and Black Magician so admired by many of today’s New Agers, wrote that “Magick is the science or art of causing change to occur in conformity with will.”11 “Thy will be done” is the only proper prayer for the Christian. But those outside G od’s grace seek to fulfill their own wills. The New Age “Christ,” Satan in the flesh, will be a man whose mind is consumed with the desire to render all other men subject to his own evil will. H e W ill B e a D e stro y e r, a S la y e r The Antichrist will take captive and destroy men’s souls. But he will also prove to be a bloody world ruler who without hesitation stamps out opposition. Christians who refuse to join the New Age World Religion and to take the mark of the Beast will fall under the wrath of the Antichrist and will experience his brute power. This, then, will be one more way the people of God will be able to identify the Antichrist. His destroyer mentality will be apparent even though his mouth speaks o f peace, love, and nonviolence. If he preaches another gospel and claims himself to be another “Christ,” Christians will know that he is not sent by God. Eventually, to their amazement, the New Age masses will discover that they too are subject to the vicious caprice of the man whom they first heralded as savior and lord. They will learn the bitter truth that their “Christ” is not the Christ at all, but Satan. Their worst nightmares will be realized as they look upon the countenance of Lucifer. S E V E N Come, Lucifer I s a w Lucifer fall like lightning from heaven. (Luke 10:18, NIV) Lucifer w a s a created being, ju s t a s the angels. His big m ista k e w a s in his conceit to ex a lt h im se lf above God. Satan . . . is the organ izer o f Babylon, a term used f o r blasphem ous religions. (Elissa Lindsey McClain, Rest fr o m the Quest) Lucifer com es to give us the fin a l . . . Luciferic in itiation . . . it is an in vitation into the N ew Age. (David Spangler, Reflections o f the Christ) n exalting himself above all gods, including the God of Gods, Antichrist will reveal himself as Lucifer, or Satan, himself. In Isaiah 14:14 Lucifer boastfully pronounces, “I will ascend above the heights of clouds; I will be like the M ost High.” The most frightening aspect of the New Age World Religion is the adulation given to Lucifer, who has even been described as “God of Light and God of G ood.”1 David Spangler, one of the most admired New Age teachers, has said that Lucifer is “in a sense the angel of man’s inner evolution.” Spangler not only has taught that Lucifer is “an agent of G od’s love,”2 but in a shockingly blatant perversion of truth he has declared: I Christ is the same force as Lucifer. . . . Lucifer prepares man for the experience of Christhood. . . . Lucifer works within each of us to bring us to wholeness as we move into the New Age.”3 T he L u c ife r ia n I n itia tio n When Spangler talks of Lucifer bringing us to “wholeness,” he evidently refers to new converts being initiated into the Mysteries of the New Age World Religion. Spangler explains: The light that reveals to us the path to Christ comes from Lucifer . . . the great initiator. . . . Lucifer comes to give us the final . . . Luciferic initiation . . . that many people in the days ahead will be facing, for it is an invitation into the New Age.4 Spangler is not alone in teaching that Lucifer is the Christspirit who will initiate man into the New Age. Eklal Kueshana, a leader in a mystical organization called The Stelle Group, caused stir and excitement in New Age circles almost twenty-five years ago when he published his best-selling The Ultimate Frontier. In this revealing book Kueshana says that Lucifer is the head of a secret Brotherhood of Spirits, the highest order to which man can elevate himself. According to Kueshana, the Brotherhood is named after Lucifer “because the great Angel Lucifer had been responsible for the abolishment of Eden in order that men could begin on the road to spiritual advancement.”5 In his book Kueshana makes the claim that through the ages only the spiritually advanced have been invited into the Luciferian Brotherhood. Benjamin Franklin and George Washington were, but Jesus, Moses, and John the Baptist didn’t make the grade. Apparently, by his own account, Kueshana is more spiritual than Jesus since, in his book, he reveals that he (under the pseudonym “Richard”) has been initiated into this elite Brotherhood. Kueshana says that as part of his initiation, he was given a permanent mark on the lower part of his body. Revelation 13:16 prophesies that the Beast (Antichrist) will cause all “to receive a mark in their right hand, or in their foreheads.” For now, those initiated into the Luciferian Brotherhood may be receiving this mark elsewhere on the body to prevent widespread alarm by Christians. But once the New Age is fully ushered in and the Antichrist ascends to power, this same mark will be required on one’s right hand or forehead. Facts bear out that what Kueshana says in his book is sub stantially what other New Age leaders are teaching. Elissa McClain, for instance, has said that Kueshana’s writings were taught by a study group at her Unity Church.6 Furthermore, Kueshana’s The Ultimate Frontier also identifies the Luciferian Brotherhood as the Great White Brotherhood. Lola Davis explains that the Great White Brotherhood is known variously as “the Great White Lodge, the Masters of Wisdom, the Hierarchy, and the Angels around the throne.”7 Its spirit head, Davis says, is Lord Maitreya. Elizabeth Clare Prophet, head of the Church Universal and Triumphant, also refers to her spiritual hierarchy as the Great White Brotherhood. What we discover, then, is a consistent account among New Age authorities that Lucifer (Satan) is God and that Lord Maitreya is “Christ.” Though the names for these two entities are often changed—Lucifer variously called Sat Nam, Sant Mat, Tanat, SatGuru, and Sanat— they remain the same beings. Discerning Christians can easily identify these two supremely evil entities as none other than Satan and his Antichrist. The astonishing, revolting truth is that thousands of New Age believers are being duped into believing that these two occult creatures are “G od” and “Christ.” Accordingly, they are submitting themselves to the most unspeakable horror: soul initiation into the ranks of the Beast. L ucifer, th e B r ig h t a n d M o r n in g S ta r The Lucis Trust is apparently named in Lucifer’s honor, lucis being a Latin word for Lucifer. Headed by Alice Bailey, the publishing arm of the Lucis Trust was at first called the Lucifer Publishing Company, a continuation from the magazine Lucifer, published by Theosophy leader H. P. Blavatsky. The Lucis Trust explains that Lucis is the genitive case of the Latin word lux, which they choose to translate as “of light.” The earlier term Lucifer, they contend, means “bringer of light” or the “morning star.”8 While the Lucis Trust attempts to sidestep its use of the term Lucifer, other New Age groups openly admit that Lucifer is to be emulated. The Association for Research and Enlightenment (ARE), a Virginia Beach, Virginia, group that is the repository for the papers of late psychic Edgar Cayce, publishes reli gious education material for children and adults that praises Lucifer. In this material, ARE scoffs at Christians who believe in an evil power. Like the Lucis Trust, ARE claims that the word “Lucifer” means “light-bringer” in Latin and “morning star” in Hebrew. But ARE goes on to make the blasphemous statement that “Lucifer is that spiritual portion of ourselves that is perfeet.”9 If we have Lucifer in our souls, says the ARE material, we have God within. That ARE and other New Age groups actually praise Lucifer, exalting him as the “bright and the morning star,” is shocking. These are descriptive terms that are reserved exclusively for Jesus Christ. ARE also maintains that the term Lucifer, in English, stands for the planet Venus.10 A common doctrine of the New Age is that Lucifer was wrongly banished to earth from Venus after his heavenly struggle with an unfair, jealous God. It is significant that the Satanic sign for Venus is a Satanic circle superimposed on top of a cross. This is also the symbol of the ankh, prominently displayed in ancient Egyptian temples. In Austin, Texas, a woman at a Quaker fellowship related a vision she had in which she saw a star fall from Venus to earth like lightning. The star, she was told in the vision, represents a goddess whom she and the other Quakers must worship. As a result, a number of the Quakers believed her, and they have now formed a special group within their fellowship that meets frequently to meditate and worship this star goddess. In their ignoranee, these people have become worshipers of Lucifer, whom both Jesus and Isaiah described as lightning fallen from heaven (see Luke 10:18 and Isa. 14:12-14). The Babylonian parallel is clear, too, for the goddess Venus was a Roman version of the great whore and harlot, the M other Goddess of Babylon.11 The M other Goddess represents the end-time Satanic religious system discussed in Revelation 17. Also observe that in Babylon, the Goddess was also known as Astarte or Ishtar (“Star”).12 Is L u c ife r M a n ’s S a v io r? Many New Agers commend Lucifer because by tempting Eve he enabled man to evolve toward enlightened knowledge and godhood. Lucifer is thus credited as man’s savior, a clear blasphemy of the truth as revealed in G od’s Word. These heretical New Age teachers refer to the writings of fourteenth-century Gnostic groups, called Luciferians, who worshiped Lucifer and believed him to be the brother of God. The Gnostics taught that Lucifer was wrongly cast down from heaven and would someday be vindicated. Meister Eckhart von Hochheim, a Catholic priest of the fourteenth century, was a leader in this heresy and was roundly condemned by a papal bull. Eckhart proposed that “Lucifer, the angel . . . had perfectly pure intellect and to this day knows much.”13 It is no coincidence that M atthew Fox, the present-day heretic priest deeply involved in nature and goddess worship and other New Age atrocities, says that Eckhart’s writings have deeply influenced him. Fox has remarked that Meister Eckhart is one of the two “greatest mystics the West has produced.”14 Fox has even maintained that he regularly receives spiritual insight direct from the dead, fourteenth-century priest: I get more support from Eckhart than I do from most living Dominicans. I don’t believe in the communion of saints. I know it. When I first fell in love with Eckhart, I was reading a book by the Hindu, Coomaraswami, on art and spirituality. I started his chapter on Eckhart and found whole sentences in Eckhart that I had written without having read him. It just blew my mind. . . . I think being receptive to these people is the key. . . . Evidently, as Fox reveals, “being receptive” to these dead heretics—or, rather, to the demon spirits who emulate them— is “the key” for many of today’s New Age leaders. Because of their rejection of Jesus Christ, Fox and others are easily deluded, just as was prophesied in the Bible: And for this cause God shall send them strong delusion, that they should believe a lie. (2 Thess. 2:11) Millions are now under the delusion that Jesus is not coming again because He was not the Christ. They are therefore being made susceptible to the false teaching that Maitreya, or Lucifer himself, is the Christ. God is giving these people over to a reprobate mind. Elissa Lindsey McClain, in her book Rest from the Quest, provides an ilustration of how the New Age is attempting to improve Lucifer’s image. She tells of a friend—whom she thought of at the time as very advanced spiritually—who explained to her the “truth” about Lucifer. Sunny. . . had an explanation of Lucifer, the fallen angel. He had merely turned from the “light” and instead of hating him, we should reach out to him with love and compassion. Lucifer was just a mirror image of God’s angels and mankind needed to restore him to wholeness. . . . Why couldn’t (Christian) fundamentalists see that? In Hidden Dangers o f the Rainbow Constance Cumbey relates the story of a well-educated New Age woman who became angry when Cumbey brought up the subject of Lucifer and the Antichrist. After the woman related her belief that Jesus and the Christ are two distinct entities, Cumbey referred her to 1 John 2:22, which declares that particular teaching to be a mark of the spirit of Antichrist. Angered, the New Age believer asserted that the Bible “should not be allowed . . . the Antichrist is not the negative thing the Bible makes him out to be!”16 Hal Lindsey says that Satan is alive and well on planet earth.17 The New Age says “Amen” and goes on to pronounce that the Satan who lives is destined to be man’s savior. C an S a ta n Be R e s to r e d to W h o le n e ss? Elissa McClain’s friend, Sunny, told her that mankind needs to restore Lucifer to “wholeness.” Richard Spangler has said that Lucifer comes to restore mankind to “wholeness.” So we see a fiery circle of logic in which Satan and his followers are to love one another and restore one another to wholeness. This is a mind-jarring doctrine because any rational person who reads his daily newspaper can see that Lucifer is still hard at work tumultuously despoiling G od’s creation and inciting evil of every kind. Rapes, murders, child abuse, robbery, adulterous affairs, and other incalculable horrors are commonplace. Is this the “wholeness” preached by the New Age? Is this evidence of Lucifer’s rehabilitation? It is preposterous to equate Lucifer with light. This is a sick doctrine straight from Hades. Satan began to spread this apostasy some one thousand years before Jesus’ birth. In Babylonia and Persia, from about 1400 to 400 B.C., the religious cult of Mithraism thrived, teaching that in the last days the Devil and God would be reconciled. Mithraism taught reincarnation and the progression of the soul through stages, just as the New Age does today. The god Mithras later was worshiped as Sol Invictus, the Roman Sun God, because he was said to be the “light giver.” This cult was brought to Rome by the Roman legions and was touted as a Mystery Religion. Mithraism was a strong rival to Christianity in the second and third centuries a .d .18 The idea of Lucifer and God being reconciled was also found in the Gnostic heresies of the second century. Various Gnostic-oriented Mystery Religions and Satanic worship cults perpetuated this lie throughout the centuries that followed. Recently in Canada, the United States, Germany, and England, the Process Church, a Satanic cult, gained some measure of support by promoting this un-Biblical doctrine. The Processeans, as they are called, believe in three gods: Jehovah, Lucifer, and Satan. Lucifer is known as the peace-loving god of joyful living and is a role model for man, whereas Jehovah is a strict, self-righteous god who seeks vengeance and demands obedience.19 The Processeans point to Jesus’ commandment, “Love thine enemies” as proof that Jesus will eventually forgive Satan. Though it does not claim to be a formal part of the New Age Movement, the doctrine of the Process Church is decidedly New Age. In its worship services two silver chalices are used— one for Christ and one for Satan. A Satanic bible is used which combines authentic verses from the Bible with un-Scriptural statements and sayings. Its members claim that the end of this age is at hand and that the year 2000 will see the final reconciliation of Satan and Jehovah. This prediction closely parallels similar predictions by New Age prophets. S a ta n a s S a n a t For those who can’t quite stomach Lucifer as the “Christ,” the New Age offers a being called Sanat Kumara. “Sanat” is obvious ly a thinly veiled reference to Satan; nevertheless, New Age teachers evidently believe that the new spelling will alleviate the concerns of those not yet ready to confess Satan as their Lord and Messiah. The Church Universal and Triumphant teaches that The Great White Brotherhood of ascended M aster spirits wants us to know that it was Sanat Kumura who came to earth to lead man into divinity: Long ago the Ancient of Days came to Earth from Venus . . . that you and I might . . . one day know the self as God. His name was Sanat Kumura. . . .20 According to some New Age “scriptures,” Sanat Kumura was banished from Venus to earth many millennia ago after a war in the heavens. This is the same tale offered about Lucifer’s fall to earth from Venus by many New Age groups. Other New Age groups hold that Sanat will be a Messiah who will totally transform the earth into a heavenly dimension through a “purification process” in which all negative influences— for example, Christians—are removed. One group, headquartered at the foot of M t. Shasta in California, calls itself the Association of Sananda and Sanat Kumara. This group contends that Sanat, not the God of the Bible, will make all things new: For them which shall remain . . . shall be made whole, and they shall be as new. The Earth shall be purified and it shall give forth a new life from the place which is appointed her within the firmaments.21 The implication is that those who do not live the New Age religious philosophy will not be included in the coming kingdom of Sanat. W hat we find, then, is that the New Age seeks to distort the Biblical teaching that Jesus will return to establish on earth the true Kingdom of God. According to New Age deception, Sanat (Satan) is to be ruler of a counterfeit Kingdom where Christians shall be decidedly unwelcome. W hether he comes as Sanat Kumara or Maitreya or bears another name, the New Age Antichrist will come proclaiming himself to be Lord of Lords and God of all Gods, the same titles held by Jesus Christ. He will also come heralded as the Word (Logos) who became flesh and dwelt among men. Is S a n a t th e W ord (Logos)? John described Jesus as the Word, the eternal Creator: In the beginning was the Word ) John is telling us that Jesus is the Word, or Logos, and the Word was with God from the beginning, and was God. Jesus Himself stated, “I and the Father are one” (John 10:30). But since the early days of Babylon, the human custodians of Satan’s Plan have attempted to deify their “Word,” which is Satan. Contemporary New Agers seek to strip Jesus of His divinity, asserting that He is inferior to Sanat Kumara. Benjamin Creme writes that Sanat is the Logos of our planet and therefore is our Savior and our God:.22 What Creme is saying is that Lord Maitreya, who Creme has on many occasions identified as the “Christ,” is the underling of a greater master, Sanat. Once a person has been initiated by Christ Maitreya (the first and second Initiation) he becomes eligible for the later (third) Initiation by God: Sanat (Satan). In effect, people who first worship and obey the Antichrist will fall under the greater control of his master, the Devil. Creme is right in at least two respects. Those who take what is called “the third Initiation” will indeed see god. Through this Luciferic Initiation, they will see their god: Satan, Sanat Kumara. But this won’t be the God of the Bible, the mighty Spirit who created heaven and earth. W hat’s more, just as Creme wrote, Sanat Kumara is the “Lord of the World,” until Jesus’ triumphant return in all power and glory to set up His millennial reign on earth. Until Jesus’ return, Satan, also called Sanat, will be lord of the world and the false logos, or word, of planet earth. Thus Alice Bailey refers to Sanat Kumara as the “Planetary Logos”: The first or will energy is, as you know, focused in Sanat Kumara, the Ancient of Days (as He is called in the Christian Bible), the Lord of Shamballa, who is the embodiment of the Personality of the Planetary Logos.23 Bailey ascribes to Sanat the aspect of eternal being (the “Ancient of Days”). This is unquestionably blasphemy because this expression was used exclusively by the Old Testament prophets to describe Jehovah as a being of sovereignty, eternal nature, and unparalleled majesty. This powerful phrase of veneration should not be usurped by Satan and his minions. D id S a ta n C reate th e M in d o f M a n T h ro u g h E v o lu tio n ? The New Age also willingly commits blasphemy by claiming that Satan, through the process of evolution, created the mind of man. Creme spreads this apostasy: Eighteen-and-a-half million years ago, in Middle Lemurian times, early animal-man had reached a relatively high stage.24 Sanat, then, is alleged to be instrumental in moving man from being a brute of a caveman to a conscious soul on the verge of godhood. Still, man is declared not ready to be the captain of his own destiny, the master of his fate. This is where Sanat, the lord of man and his world, comes in. His is the Master Mind, and man must remain subservient to him. Their lowliness as compared to their Satanic master, Sanat, is made clear to New Age quest-seekers in a number of ways. The Unity Church of Dallas holds seminars entitled, “The Master Mind Principle.” Participants are told they must take “seven steps into the Master Mind Consciousness.” The most momentous is this step: I make a decision to place myself completely under the influence and direction of the Master Mind. I ask the Master Mind to take complete charge of my life. . . .2s It is frightening to realize that across America and our planet at this very moment men, women, and children—precious souls for whom Jesus shed His blood—are taking oaths totally committing themselves to Satan, the M aster Mind of Shamballa (hell). It is even more chilling to learn that a number of deluded New Agers are now invoking this M aster Mind to come soon to earth in the flesh to set up his Kingdom. Some actually meditate with their minds centered on the cryptic phrases, “Come, Lucifer” or “Come, 666.” Surely, not since the days of Noah and of Lot has man become so reprobate and so insanely susceptible to Satanic confusion. W h ere D o es S a ta n L ive? Benjamin Creme, Alice Bailey, and other New Age spokespersons say that their Sanat, their Lord Maitreya, and the hierarchy of spirits reside in a place called Shamballa. We know it from the Bible as hell. The New Age sees fit to rename this unholy center of darkness in order to deceive the unsuspecting. One fast-growing New Age church, Urantia, refers to a place named “Satania.” Urantia has chapters forming all over the United States. This Satanic New Age organization has its own bible, The Urantia Book,26 a 2,097-page behemoth supposedly given by divine inspiration. In this book, disciples learn that they can invite “Thought Adjusters” (demons) to dwell within. These Thought Adjusters allow the individual’s Higher Self to experience “the presence of G od.”27 Men should be thankful, says The Urantia Book, “that the Thought Adjusters condescend to offer themselves for actual existence in the minds of material creatures.” Lowly humans are indeed blessed that the higher spirit beings are ready “to consummate a probationary union with the animal-origin beings of earth.”28 Urantia teaches that the indwelling of these spirits should cast out fear and uncertainty. When such negative thoughts enter a person’s mind, they should immediately look to “Satania” for relief: When the clouds gather overhead, your faith should accept the fact of the presence of the indwelling Adjusters. . . . Look beyond the mists of mortal uncertainty into the clear shining of the sun of eternal righteousness on the beckoning heights of the mansion worlds of Satania.29 Urantia students obviously believe Satania to be heaven and the Thought Adjusters to be angelic presences. I have no doubt that many who study the Urantia Book truly believe they are doing right. Tragically, the power of Satan has so engulfed the minds of these men and women that they can no longer discern the truth. Satan’s power is so strong an influence on the minds of New Agers that even when Satania is described for them in some detail, they still cannot avoid being deceived. A good example of this was a recent article in a prominent New Age magazine which was attributed to a channeled (demon) spirit named Kwan Yin. Speaking through his human counterpart, a woman named Pam Davis, this demon spirit “told” readers that there are multitudes of spirit beings such as himself who wish to communicate with living human beings. “These (spirit) beings reach out to you. . . . They come to be in service . . . they place upon your brain mechanism beautiful thoughts.”30 From where do these beings communicate to those on earth? Yin answers:.31 Who controls these beings? Yin tells us that there is a greater being, a M aster of all spirits, who has “come from such a great distance in space to be now upon the Earth.”32 He further states that this great “One” is now in a physical body, even though he has never lived one lifetime upon earth. Yin relates that this godbeing is able to absorb all that happens on earth and to communicate by thought directly with humans. Neither Yin nor his human channeler, Pam Davis, provide the name of this great “One” who is said to have a “beneficial effect upon Earth, now when there is such need.” Regardless, Christians will quite easily recognize both this entity and the spirits from the inner realms of the earth whom he directs. He is, indeed, the master of the place known as Satania. L ucifer, th e H in d u G od The New Age view of Lucifer’s true identity becomes more clear when we investigate the story of the Hindu god Shiva, and the Hindu goddess M other Kali. Anton LaVey, the internationally know Satanist priest and author of The Satanic Bible, mentions the name “Shiva” as a synonym for Satan or Lucifer.33 M other Kali, a goddess with a cruel side, is known as both the creator, or life-giver, and the destroyer. She is depicted as smeared with blood, wearing a garland of human heads, and chewing raw flesh.34 Dressed in red or scarlet (note the parallel with the mother of harlots described in Revelation 17), she demands blood sacrifice, just as does Satan or Lucifer. Kali is also known as the goddess of becoming, of evolution, bringing to mind David Spangler’s description of Lucifer as the “angel of man’s inner evolution.”35 Shiva, Kali’s “soul-twin” and husband, was similarly bloodthirsty. Through sexual intercourse with Kali (Tantric Yoga), Shiva and Kali became one through sexual union; therefore, in calling on Shiva, Hindus also call on Kali. Shiva is known as the Lord of Dance, the guardian of the process of reincarnation. Those New Agers and Hindus who today practice Tantric Yoga maintain that through sexual union, they link up with the energy of the universe. In their ecstasy, some enjoy sex while exclaiming, “Shivaham”: “I am Shiva.” Shiva is also believed to be the force that controls the rhythm of the universe. Fritjof Capra, a New Age physicist who lectures at the University of California, writes that while sitting on the beach contemplating the similarities between the new physics and Eastern mysticism, a “beautiful” vision came to him in which:.36 Interestingly, Capra admits that his book The Tao o f Physics, in which he relates this vision of the Dance of Shiva, was possibly written with some type of other-worldly spirit assistance: Sometimes while writing The Tao o f Physics, I even felt that it was being written through me, rather than by me. The subsequent events have confirmed these feelings.37 As Christians, we see that these false gods are a bizarre blend of evil and good. But to the Hindu and to the New Ager, Shiva and Kali are good only Evil is said not to exist— it is maya (illusion). The Law of Karma and the process of reincarnation portray eternity as a wheel, or a succession of cycles. Life-giving and creation reside on one side of the wheel, death and destruction on the other. Neither is intrinsically “bad.” Swami Vivekananda, a Hindu guru widely thought of in America, taught that because the M other Goddess Kali is all, all is one, and all is cyclical, God is both good and evil: Who can say that God does not manifest Himself as Evil as well as Good? But only the Hindu dares to worship him in the evil. . . . How few have dared to worship death, or Kali! Let us worship death!38 Likewise, Lucifer is said to be neither evil nor good. He simply is. Formerly a destroyer, Lucifer now becomes a god— perhaps the God—chosen to shepherd mankind into the brighteness of a New Age. He is the Shiva and Kali of the New Age. The Word of God certainly does not agree with the New Age glorification of Lucifer. Far from it. Isaiah, inspired by God, spoke of Lucifer’s traitorous thoughts and his unnatural craving for power. Isaiah also pronounced G od’s judgment on Lucifer’s wrongful rebellion and his eventual end) C all N o t E vil G ood The Bible warns: “Woe unto them that call evil good, and good evil” (Isa. 5:20). God has no relationship with evil or with dark ness. “Let no man say when he is tempted, I am tempted of God: for God cannot be tempted with evil, neither tempteth he any man” (Jas. 1:13). Attributing both good and evil to God is an occuitic and Satanist tactic to mock God. For example, below is a common prayer repeated at Satanic rituals during the Middle Ages and still in use today. (Observe that it is the Lord “Adonay” who is being implored by the Satan worshipers.)40 Prayer Lord God, Adonay, who has formed man out of nothing to Thine own image and likeness . . . deign, I pray Thee, to bless and sanctify this water, that it may be healthful to my body and soul. . . . O Lord God, Almighty and Ineffable, who didst lead Thy people from the land of Egypt, and didst cause them to pass dry-shod over the Red Sea. Grant that I may be cleansed by this water from all my sins. . . .41 In this dark Satanic prayer Lucifer, in the form of “Adonay,” is actually credited for having rescued the Israeli people from the clutches of Pharaoh. The Satan worshiper reciting this prayer is also addressing Lucifer as “Lord G od,” requesting Lucifer to cleanse his sins. This awful, blasphemous prayer attributes to Lucifer divine power to forgive sins, which is solely the prerogative of the God of the Bible. In other prayers of contemporary Satanists, witches, and pagans, Lucifer is referred to by such divine names as God, Messiah, Immanuel, Lord of Hosts, and the Lord. Predictably, dedicated occultists report that Satan answers to G od’s names, even assuming a divine appearance when he wishes. The religions of the ancient Babylonians and Persians taught that God and Satan were twin brothers, an idea later adopted by Gnostic traditions, but easily recognized by the early Christian Church as inspired by Satan and so rejected outright. Today New Agers seek to revive this age-old lie by transforming Lucifer into Christ, perversely twisting logic and Scripture. The New Age truly calls black white, darkness light, and evil good. It is no wonder that our Bible brands Satan as the father of lies and that it cautions us against false apostles who transform themselves into the apostles of Christ (2 Cor. 11:13). The G rea t In v o c a tio n : C a llin g on S a ta n Satanists who wish to call on Lucifer summon him through invocation (prayer meditation or incantation). New Age scientific lingo presents this as linking up with the “collective unconscious” of the universe. The term “collective unconscious” was invented by occult German psychologist Carl Jung. It is in reality the Satanic realm which can be contacted by human effort. Many in the New Age propose that man not passively wait on the New Age “Christ” (Lucifer) but, instead, fervently invoke him to come now. It is believed that if a critical mass of people throughout the world join in invoking the “Christ,” the massive energy force thus created will somehow inspire him to action. Alice Bailey’s spirit guide, the Tibetan Master Djwhal Khul, has conveniently provided a vehicle for summoning the Christ: The Great Invocation.42 It is now being used by hundreds of thousands in their meditation. Unfortunately, even a number of Christians are unknowingly reciting it under the false impression that they are hastening the arrival of peace and joy to our planet. To illustrate the Satanic nature of The Great Invocation, here are a few brief stanzas, followed by a Christian interpretation of their hidden meaning: Let the Lords of Liberation issue forth Let the Rider from the Secret Place come forth And coming, save. Come forth, O Mighty One. Let Light and Love and Power and Death Fulfill the purpose of the Coming One. From the centre. When we understand New Age doctrines and analyze those doctrines in light of the Bible, we can readily explain this invocation: ״Let the Lords o f Liberation issue forth ״: Let the gates of hell be opened and the demons issue forth (see Rev. 6:8; 9:1-11). ״Let the Rider from the Secret Place come forth”: Let Satan be loosed from the pit to take peace from the earth, to kill and slaughter, and to gather unsaved souls43 (see Rev. 6:3-17; 9:11). “Let Light and Love and Power and Death fulfill the purpose o f the Coming One”: Let Satan’s ploys of “light” and “love” deceive so he can go forth with power to destroy souls. “From the centre where the Will o f God is known”: From Shamballa, the mystical, invisible kingdom where the New Age “Christ” and demons reside (i.e., hell), where the will of Satan is known. “The purpose which the Masters know and serve״: The Plan of Satan to ascend unto the heavens and become God, which his demons know and serve. “Let the Plan o f Love and Light work o u f: Let Satan’s Plan to rule the universe and have man worship him as God prevail. “And may it (The Plan) seal the door where evil dwells”: And may Satan’s Plan succeed in extinguishing all traces of God and eliminating those who know His Word. T h e M a n y D is g u is e s o f S a ta n As the shadowy wording of The Great Invocation illustrates, Satan’s Plan is to win victory over God by treachery, dishonesty, and deception. Satan excels in masks and disguises. He is a pretender to the throne, the world’s most skilled actor. In taking on the part of God, Satan will play his greatest role. It is, moreover, a part that he has already carefully rehearsed. One such rehearsal is documented in Revelation: The Birth o f a N ew Age. There David Spangler prints word for word a spirit transmission received direct from the pit of hell. Yet Spangler insists that this is the voice of “Christ, the Savior.” In his message, Satan first announces that he is to be addressed by the name “Limitless Love and Truth,” then goes on to pronounce that he is in fact both God and Christ, and yet more! Am I God? Am I a Christ? Am I a Being come to you from the dwelling places of the infinite? I am all these things, yet more. I am revelation. I am the Presence which has been before the foundations of the Earth. . . .44 Just as Isaiah prophesied, Satan continues today to boastfully and arrogantly proclaim to his followers—who in these times are called the “New Age”—that “I will ascend into heaven, I will exalt my throne above the stars of G od.” T he M a rv e lo u s D o c tr in e s o f th e A n tic h r is t Spangler suggests to readers that they should not be startled that “Limitless Love and Truth” says he is God, Christ, and yet more. Spangler explains that this “exalted” spirit is saying, in essence: I am all these recognizable thought forms which you have formed of God and of Christ and of great Beings, but I am also more. I am aspects o f Divinity o f God which you have not yet learned to recognize but which will be revealed to you in this New Age.45 In other words, Satan is readying his followers for the time when he will reveal marvelous things beyond those which they have previously been taught. This can only mean that following the dawning of the New Age, after the Antichrist assumes world power, he will teach the people of earth unholy doctrines defiling God which they had not been taught by Biblical Christian churches. This will bring to frightening fulfillment the prophecy of Daniel: And the king (the Antichrist) shall do according to his will; and he shall exalt himself, and magnify himself above every god and shall speak marvelous things against the God of gods. . . . Neither shall he regard the God of his fathers. . . . But in his estate shall he honor the God of forces: and a god whom his fathers knew not shall he honor. . . . (Dan. 11:3638) Lola Davis has said that the One World Religion will need new revelations and that “the most important source will come in the future in the person of the Avatar (Messiah) promised to all religions.”46 Evidently these revelations of the New Age Messiah will be to the effect that God is within everything, that the impersonal God is made up solely of energy patterns (a universal force), that reincarnated spirit Masters—forces from beyond— exist in an invisible realm accessible to the human mind, and that man’s soul is an energy force system of seven centers or chakras. All of these concepts are of Hindu origin and are promoted in all Mystery Teachings. Thus we can see that Davis is presaging a soon-coming era in which the Antichrist will initiate the world into the New Age by indoctrinating humanity with strange and “marvelous” new doctrines. Such doctrines will include the beliefs that God is nothing more than an impersonal energy force and that the real guardians of mankind are those forces that exist in the spirit world. This doctrine could well be the worship of the “God of forces” prophesied by Daniel. In S ervice o f S a ta n David Spangler’s many books, in which he willingly glorifies Lucifer while distorting the Word of God, provide convincing proof that he is serving a different master than the Great “I Am” of the Bible. Spangler apparently recognizes that the New Age “Christ” operates from the very depths of hell, from the inner realms of the earth: The New Age is here now and the Christ is functioning within the inner realms of the earth, both in his ascended state from the depths of his past ministry and in his greater state of Aquarian Revelation.47 Spangler furnishes us another insight by confiding that the spirit named “Limitless Love and Truth” can be best described as the “Deva of the New Age.”48 In the Hindu religion Deva is the great virgin M other Goddess, “the way leading to the Gods,” who reveals to initiates the teachings of Krishna and Shiva, two of the three gods of the Hindu trinity. Deva is simply another name for the Hindu Goddess M other Kali and for Diana, goddess of the Ephesians, whom Paul talked about. In identifying his false “Christ” as the Deva of the New Age, Spangler is revealing that this evil entity is the one destined to lead mankind to the false gods of the Hindu religion: gods that sprang from the occult Mystery Teachings, the sorcery and perversion of ancient Babylon. It is exactly this Babylonian religious system that the Book of Revelation condemns and identifies as that to be led by Antichrist in the last days—a world religion full of abominations and drunk with the blood of the saints (Rev. 17). Spangler is not alone in his portrayal of the coming “Christ” as a deity of the Hindu religion. N ote, for example, the writings of the Theosophists, a Mystery Religion group with links to Hinduism that has for decades provided the doctrinal core of New Age teaching. H. P. Blavatsky, the founder of Theosophy, identified the Maitreya “Christ”— the New Age Messiah—to be the same figure as Hermes (also known as Cush, the father of the idolatrous Babylonian ruler-god Nimrod). Blavatsky went on to trace the lifeline of this Satanic “Christ,” showing that the coming New Age world ruler is none other than the “serpent” himself, the dragon: He is called the “Dragon of Wisdom” . . . as all the Logoi of all the ancient religious systems are connected with, and symbolized by serpents. In Old Egypt, the god Nahbkoon . . . was represented as a serpent on human legs . . . the serpent being an emblem of Christ with the Templars also (see the Templar degree in Masonry). This symbol is identical with one which . . . was called “the first of the celestial gods,” the god Hermes, or Mercury with the Greeks, to which God Hermes Trismegistos attributes the invention of and the first initiation of men into magic. . . .49 The description of the New Age “Christ” by Blavatsky accurately portrays him as a dragon serpent, recognized as the prevailing god-spirit and logos in all ancient and ungodly religious systems. He is further traced as the “god” who invented and then initiated man into “magic” (w׳itchcraft and sorcery). Serpent, dragon, inventor of sorcery: this most definitely is Satan. Revelation 12:9 informs us: “And the great dragon was cast out, that old serpent, called the Devil, and Satan, which deceiveth the whole world: he was cast out into the earth, and his angels were cast out with him.” New Agers readily admit their “Christ” is the serpent or dragon. He is Maitreya or Sanat, the reincarnation of Lucifer and the inventor of sorcery and witchcraft. But, they quickly add, he most certainly is not Satan, who is alleged to exist only in the warped minds of fundamentalist Christians. Bible-believing Christians are far too wise to believe the Great Lie. The Holy Spirit directs them to this all-important determining factor: anyone or any doctrine that denies that Jesus is the Christ is of the Antichrist. This Bible truth is simple, clear, conclusive. E I G H T Messages From Demons: Communicating Satan’s Blueprint for Chaos Put on the whole a rm o r o f God, th at ye m a y be able to sta n d again st the w iles o f the devil. For we w restle not again st flesh an d blood, but again st prin cipalities, again st pow ers, again st the rulers o f the darkn ess o f this world, a gain st sp iritu a l w ickedness in high places. (Eph. 6:11, 12) People were crying. A f e w o f them were a t m y feet. Some were sa yin g R am tha w as the “one” people had been w a itin g f o r . . . the g reat M aster o f the Age and herald o f truth. . . . (J. Z. Knight, channeler o f Ramtha) he seven hundred people packed into the Seattle auditorium have paid $400 each to hear Ramtha. They sit in excited expectation, their pulses pounding, their eyes rapturously cast upon the stage. Then Ramtha comes forth. He speaks marvelous words, exhorting the audience to know that each one of them is God and that nothing they do is evil, because there is no good and evil in human nature. He scorns the teachings of Jesus, cynically proclaiming that because each person is God, they do not need anyone else to teach them. Ramtha also reveals that “in the seed of Lucifer lies God and divineness.”1 Hearing Ramtha’s reasonant magical voice with all its “wisdom and knowledge” creates a sensation among the crowd. Some shout or begin to jerk their bodies. Others break out in uncontrollable laughter and tears of joy. “Surely,” one woman exuberantly exclaims, “Ramtha is the Voice of Truth speaking to this last-days generation. The New Age is here and we are now God!” Hearing this, a man nearby says simply, “I love Ramtha, I love myself, I love everyone.” Who is Ramtha, and why do people react so wondrously to his message? Ramtha is a demon—more generously described by his growing legion of followers as a “spirit entity.” Invisible, he speaks in a husky male voice through J. Z. Knight, a Seattle, Washington housewife who claims that Ramtha last lived on earth thirty-five thousand years ago. She further says that he was the great Ram, “the G od” of the ancient Hindus. “I did not die; I ascended,” Ramtha tells J. Z. Knight, “for I learned to harness the power of my mind and to take my body with me into an unseen dimension of life.” Ramtha says that before his “ascension,” he was the world’s first conqueror, a fierce lord who triumphantly led a sweeping horde of barbarians over a vast realm of territory, from the fabled Atlantis through Asia M inor to what is now India. A thirty-five-thousand-year-old discarnate spirit speaking through a modern-day housewife, spouting blasphemies and lies, seems totally weird to many Christians. Yet, to most New Age believers, Ramtha and many other such spirits are not at all bizarre. They are “p ro o f’ of the existence of an invisible world inhabited by millions of spirits either awaiting reincarnation into a human body or existing in spirit indefinitely as part of a hierarchy led by the “Christ.” It is this “Christ” and his hierarchical cohorts in spirit who plan soon to materialize on earth and usher in the New Age Kingdom of peace, unity and prosperity. A r e T h ese S p ir its R e a l? I have carefully studied and researched this occult phenomenon of spirits spreading the New Age gospel. I am totally convinced that such spirits exist and increasingly are speaking to those they perceive to be “ready” for their Satanic message. Yes, there are human fakers running around who claim to be the mouthpiece of the spirits. But there is also little doubt that throughout the world today, literally millions of New Age believers are regularly communicating with demons. Many are doing so independently of one another, and often unknown to each other; yet the messages they receive are the SATAN'S BLUEPRINT FOR CHAOS □ 97 same. This defies the mathematical laws of probability and confirms that the same source is communicating with them. There are only two sources of power that can intelligently operate in thousands of sites around the globe, simultaneously communieating directly with hundreds or even thousands of people: God and Satan. And since the messages consistently deny the very existence of God and His Son and denigrate His Holy Word, we know with certainty that it is the Devil with whom these people commune. T he R e a lity o f S a ta n a n d H is D e m o n s It is astonishing that a number of Christian ministers today disclaim the reality of evil spirits or even that there is a Satan who leads his own force of dark angels. This is to deny the very Word of God. The Bible says that Jesus Christ’s mission to earth was for the express purpose of destroying the works of the Devil (1 John 3:8), and that at G od’s appointed time the Devil, his demons, and his human followers will indeed be condemned (Rev. 20:1015). However, until that time Satan will exercise much authority on earth, and only the power available to believers in Jesus shall be sufficient to withstand him (Eph. 6:11, 12). A full one-fourth of Jesus’ ministry as recorded in the Gospels has to do with His casting out demons and evil spirits. He was able to discern between mere physical illness and a person possessed by demonic spirits. In M atthew 4:24, 8:16, 10:1, 8, Luke 9:1, 2 and Mark 1:32 we find clear examples. For instance, in Matthew 8:16, it is recorded: When the even was come, they brought unto him many that were possessed with devils: and he cast out the spirits with his word, and healed all that were sick. Also, note in M atthew 10:1 that Jesus gave His disciples power to cast out evil spirits. Incredibly, the New Age teaches that these spirits are benign—“wise ones” sent to guide and rule mankind. On one hand, Satan has ingeniously convinced millions of people that they must trust, communicate with, and obey his many lying demon spirits. On the other hand, he has shrewdly whispered in the ear of unsuspecting Christians that they must not believe that spirits from beyond really exist! As Kurt Koch, a German evangelist who has spent forty-five years studying the occult, has said: We . . . know from the prophetic parts of the Bible that in the last days Satan will try to obscure men’s powers of judgment. He will try to confuse the mind, destroy people’s sense of truth, and create uncontrollable intellectual chaos. This is the great strategy of the world below, which forms and controls the spirit of the age.2 Satan’s strategy is working brilliantly. Some Christian ministers and congregations laughingly deny the reality of a Devil and his demons; meanwhile, across the world large numbers of New Age ministers and their followers talk to and obey the very same Devil and his demons. M is s io n : To W a r A g a in s t th e W ord o f G od Demonic spirits who appear as invited guests of human contacts wage war against the Word of God. The Bible instructs Christians to test the spirits to determine whether they are of God or Satan (1 John 4:1-3). We are also told that light and darkness cannot coexist (2 Cor. 6:14). Using these Biblical guidelines, we can know that the clever spirits who are now deceiving New Age believers are of Satan, because they continually spread false doctrines that go against the Scripture. In examining the utterances of these demons of the New Age, we find that among their many lies they consistently teach eight spiritual falsehoods. 1) A personal God does not exist. 2) Jesus is not the only begotten Son of God and is not the only Christ. 3) Jesus did not die for our sins. 4) There are no such things as sin and evil. 5) There is no Trinity of Father-Son-Holy Spirit. 6) The Bible is filled with errors. 7) There is no heaven and no hell. 8) Every man is God, and one’s godhood can be realized through the attainment of a higher consciousness. Satan is using demons to promote the New Age gospel, to defame Jesus Christ, and to discredit the Bible. He intends to soften up humanity for the arrival of the Antichrist, whom millions will believe is Christ because of the propaganda now being spread by these lying spirits. Elements of The Plan of Satan to bring in a New Age One World Religion and a one world political and social order are carefully woven into virtually every utterance of these demons. T he C o n s p ir a to r ia l L in k : S a t a n ’s Im p u ls e I am often asked: Is the New Age Movement a conspiracy? My answer is that while the New Age may not be a secretive human conspiracy in the classic sense of that term, it is nevertheless a conspiracy, one of global dimensions. The most frightening feature of this end-time religious network is that though many of its leaders seemingly work and act independently, all are seized by the very same Satanic impulse. This is why they promote strikingly identical doctrines and philosophies so hostile to Christianity. Every New Age believer is a victim of a demonic conspiracy to promote Satan’s Plan to rule humanity and overcome God. The conspiratorial impulse is the throbbing vibration, or heartbeat, that universally grips the minds and souls of the New Age believer. It is the spirit of the Antichrist, the philosphy of seducing demons who work every minute of the day to drive The Plan to ultimate success. Vera Alder wrote that the “blueprint” or “ideal world plan” for the coming new world government has long been in existence. It has been lying in wait “until such time as the human intelligence (was) capable of contacting it.”3 Evidently, that time has arrived. Alder noted that throughout the world people are awakening and arising. “This phenomenon,” she said, “takes on somewhat the same form and quality in all parts of the globe.” Thus it would seem to show that there is a powerful inner influence at work, a mighty impulse pulsing throughout humanity. . . .4 In The Eternal Dance, a hook project of The Collegians International Church, the authors also speak of “the impulse” to which humanity is responding. It is this impulse, they claim, that is the root cause for the “worldwide mushrooming of interest in spiritual growth, Eastern religions in the West, and an incredible number of New Age communities of all types.”5 They define this impulse as man’s desire to return to the primal energy source that created him. David Spangler calls this the “Christ impulse,” adding: Throughout the world a great sifting is taking place, not between those who are “saved” and those who are “lost,” for these are meaningless terms . . . but (as to) allowing consciousness to . . . be reached by the Christ impulse that seeks to lift all mankind into the New Age. . . .6 A number of New Age leaders use the term intuition to describe a person’s tuning his mind in to this universal (Satanic) impulse. This is much the same way a person tunes his radio into the broadcast of a particular station. Thus, an unidentified “advanced soul” tells John Randolph Price that: Through the silent, hidden work of the Masters, men and women throughout the world are beginning to intuitively understand the Truth . . . and it is only a matter of time before the Dawning (of the New Age).7 As Price explains it, the Masters (i.e., demon spirits) “are releasing powerful waves of thought energy into the universal consciousness for the benefit and upliftment of each individual. To those who are receptive, their message is: ‘Rise up out of the tomb of mortality and take your place among the enlightened of this world. Look up and see the unreality of sickness and poverty. Step out into the kingdom of wholeness and abundance, peace and joy. The time is near for the New Age to begin.’ ”8 Price would have us believe that the Masters are helping to seed the world with “Superbeings”—the first of a new species of mankind. “They are the Leaders, the Teachers, and their work is being accomplished through the great medium of mind.”9 To become a Superbeing ourselves, we are supposed to develop our intuition. In fact, Lola Davis flatly states that we must “accept as truth for ourselves only that which is consistent with our intuition.”10 Intuition is defined by Davis as the practice of receiving “impressions from our own souls and guidance and knowledge from the Divine and His helpers in the Hierarchy of advanced souls.”11 She adds that “A powerful tool for developing spiritual intuition is meditation.” Through meditation, Davis says, man can seek guidance from “the One called Lord Maitreya.”12 T he D e m o n ic S e a rch f o r S u ita b le H u m a n S u b jec ts Elena, one of the Superbeings Price says he has communicated with, has told him that the Masters are working to save mankind from self-destruction. They do so by selecting “suitable subjects” for New Age conversion so those selected can help establish the New Age order. Elena speaks favorably of these demons from hell, praising them for spreading the New Age gospel that man is God. I prefer to think of them as angels of light—whether from earth or other worlds. They search, select and guide those men and women who may be suitable subjects. . . . A Master may then instruct, or plant the seed of a new concept . . . and the Word is spread, taking hold and growing in the mind of others, until there is a wave of collective thinking sufficiently powerful to change events and shape the future.13 Why, if we are gods, can’t we just develop our own truthf׳ Elena conveniently explains that “the search for the Inner Kingdom may be stimulated from thoughts communicated by the Master Consciousness of another Soul. . . . All Truth must come from the Spirit of Truth within, but many souls are active in assisting mankind. . . .”14 In other words, we need these demon spirits to assist us in our quest for perfection as gods because they are today wiser than we. Man needs their spiritual guidance to “awaken” to his full divine potential. It would appear that a prime tactic of the demons now contacting so many “suitable subjects” is to convince them that The Plan comes from their own consciousness. The world’s collective consciousness (called “mind-at-large”) and the individual’s consciousness are allegedly one and the same. The N ew Age victim is led to believe that The Plan is his own creation. Willis W. Harman, a professor at Stanford University and one of the founders of the New Age-oriented Association for Humanistic Psychology, explains this concept as follows: Mind exists in co-extensive unity with the world. . . . There seems no reason to doubt that my creative/intuitive mind might “have in mind” a “plan.” . . . This idea of a “plan” coming from beyond consciousness seems implausible. . . ^ Yet there is impressive testimony. . . in a vast literature on mysticism and religious experience.15 Harm on’s idea is that by following this “plan,” man will eventually be elevated to become a new species, H om o Noeticus, replacing H om o Sapiens. So convinced is Harman that The Plan will succeed in making man God that he has founded and is now president of a group called the Institute of Noetic Sciences. Satan’s deceitful scheme is working beautifully. His evil demon “John” revealed his intent when he implored the world through David Spangler to: Live my life. Be what I am. Let us co-create together the world that comes from our beingness. . . . Let these words go forth. I am with all men. Their destiny is mine. Their life is mine. Their yearnings are for me.16 S a t a n ’s C o n s p ir a c y U n m a s k e d The New Age person who opens his mind to Satan’s impulse truly invites darkness to enter his heart. He becomes one, not SATAN'S BLUEPRINT FOR CHAOS □ 103 with God, but with Satan’s worldwide spiritual conspiracy. God invites man into the majesty of His light, and the Bible promises us that He is always faithful and will open Himself to us when we call on Him with righteous motives. The only mediator between man and God is His Son, Jesus Christ. Satan is deceiving man when he claims that to acquire wisdom in solving life’s problems we must seek out the disembodied spirit of a dead person and put our own souls under his other-worldly direction. This is the same lie that Satan told pagan man in Babylon and throughout the ancient world. The man-god Nimrod (and his namesakes M ithra, Janus, Osiris, etc.) was held up as man’s mediator with the gods while the Queen of Heaven, Semiramis (and her many M other Goddess representatives) was purported to be the mediatrix. Now, millennia later, man is once again told he cannot go direct to the Almighty. He must use intermediaries because, the lie goes, God is an impersonal God—some type of cosmic energy force. And how, the demons of Satan scornfully ask, can man talk to an energy force? Satan’s soul-destroying doctrine is exemplified by such New Age organizations as Eckankar, Quartus, and Transcendental Meditation. Each teaches their initiates to communicate with the spirit world because it is impossible to reach the ears of God. For example, the Satanic foundations of Eckankar are apparent in that organization’s doctrine that man can only reach an advanced spiritual state by communicating with “spiritual travelers” and “other highly developed persons in the other worlds.”17 Here’s how Eckankar, an organization that believes in astral (outof-body) experiences as the key to man’s achieving Christ Consciousness, describes these spiritual travelers: . . . these travelers . . . are what we know as the supermen of the universes . . . a traveler . . . is equivalent to a saint, an agent of God, or what we might call a Sat Guru; and he is exactly what the term implies here. Sat means true and guru is light-giver. . . . Furthermore . . . his teachings . . . lead to the most complete religious experience, and the most happy.18 That Eckankar is secretly and subversively promoting Satan and his Antichrist spirit becomes clear when this group teaches that there is a shadowy etheric world lying beyond man’s con sciousness and headed by a being called Mahanta. M ahanta, says Eckankar, “means spiritual leader, or Godman.”19 Initiates are taught that this god-man can be reached through meditation by chanting his name. He or a spiritual traveler will then escort you in soul travel, instructing you in the Mysteries and the sacred writings. Eckankar further tells the initiate that we can only reach the divine by going through M ahanta and the spirits who assist him. Satan intends to build his world empire and bring his Plan to reality by winning over the hearts and minds of men one by one. The conspiracy of which he is chief operates worldwide. Its international agents—demon servants of the Devil—move about looking for lost souls vulnerable to manipulation. In the following chapter we will study further how these hellish agents accomplish their mission, and we will see the human tragedy that is occurring as New Age men and women willingly invite Satan and his demons into their very souls. N I NE “It Said It Was Jesus”— The Leadership of the New Age Revealed Then saith Jesus unto him , Get thee hence, Satan: f o r it is w ritten, Thou sh a lt w orship the Lord th y God, an d him only sh a lt thou serve. (Matt. 4:10) We w an t to ta lk to you o f love. We w an t to blend w ith you— we w an t to blend our energy w ith yours so we can touch each other— so we can w ork together. (Lazaris, a demon spirit) ew Age believers who communicate with Satan’s demons see these spirit entities as their helpers—as “good.” Therefore, these demonic beings are variously called light bearers, spirits o f light, spirit guides, inner guides, psychic guides, imaginary guides, spirit counselors, psychic advisors, inner teachers. Some New Agers call these entities their Self, their Higher Self, or their Inner Child. In reference to the dominant New Age belief that the spirits are spiritually advanced souls from the invisible world, they are also called Masters, Ancient Masters, or Ascended Masters. In recognition of their supposedly superior spiritual wisdom, they often are referred to as the Masters o f Wisdom or as the Wise Ones. Frequently the demons are assigned the names of deceased humans. M ost popular are Biblical and historical personages. Jane Roberts has published a number of books which purport to reveal messages from “Seth,” a person mentioned in the Old Testament. The spirit that spoke through a human medium to actress Shirley Maclaine claimed to be “John,” as did the demon whose message David Spangler published. Elizabeth Clare Prophet says she is able to speak with such curious characters as Confucius and a medieval mystic, Saint Germain. She also confesses to being visited by her late husband, now known in spirit as “Lanello,” and a spirit that identifies himself as “Jesus.” 1As w ell soon discuss, the demons who claim to be “Jesus” are many, and they are doing incalculable harm . “Michael the Archangel” also seems today to be speaking to many New Agers. “Moses,” “Jeremiah,” “Peter,” “Paul,” and other long-dead prophets and saints are frequently heard from, as are an assemblage of Babylonian kings and queens and Egyptian pharaohs and priestesses. Jose Silva, founder of the Silva Mind Control System, a worldwide seminar training program reportedly completed by over six million persons, teaches students to link up with spirit guides that will teach them to live life more abundantly. Graduates report they are able to communicate with spirits who identify themselves as “George Washington,” “Abraham Lincoln,” “Shakespeare,” or another famous wise man from the past. Some of the spirits claim to be religious teachers such as “Buddha,” “M ohammed,” and “Lao Tse.”2 A most cruel device used by Satan is to have a demon come forth to identify himself as a dead husband, wife, father, mother, or other loved one. To a hurting relative who wants so desperately to believe, such a visitation can exert a profound influence. M e th o d s o f D e m o n C o n ta c t New Age believers are making contact with demons through a variety of methods, all of which put the person’s mind in an altered state o f consciousness. Visualization, meditation, music and color therapy, incense, gemology, sexual ritual, drug ingestion, Yoga, automatic writing, and the channeling of spirits by mediums or channelers are used to promote The Plan and wage war on G od’s Word and His Church. T he D e m o n ’s Pen Automatic writing occurs when a Satanic spirit totally controls and guides an individual in writing a message. Entire books have been communicated in this way, and some have become the bibles of the New Age. The late Helen Schucman, an atheistic psychologist, was responsible for the abomination A Course in Miracles.3 The course, consisting of a text, a workbook for students, and a manual for teachers, comes to about twelve hundred pages— every word of which Schucman said was transmitted to her through automatic writing. In Science o f M ind magazine, Judith Skutch, president of the Foundation for Inner Peace, which publishes A Course in Miracles, discussed with New Age writer John White how this course came into being and why it has become so popular.4 Skutch said that A Course in Miracles “tells us that . . . God did not make this world—we did.” It also teaches that people do not need to atone for anything they’ve done wrong that is sinful or evil. Also included, according to Skutch, are the following doctrines: “Forgiveness is not something we ask from God but rather something we extend to others, to the world . . . we extend forgiveness to others and to the world as if we are God.” .” “Jesus was an historical person, but the Christ is an eternal transpersonal condition.” “Miracles are natural. When they do not occur, something has gone wrong.” “Seek not to change the world but change instead the way you see it.”5 How did Helen Schucman, then an associate professor of psychology at Columbia University, come by A Course in Miracles? Judith Skutch tells the story: Helen believed it was Jesus speaking to her as an inner voice. . . . I asked her if there was a specific entity dictating to her, and if so, who. Imagine me, a little Jewish girl from Brooklyn asking a Jewish psychologist from Manhattan just who is the source of A Course in Miracles, and her muttering under her breath, “It said it was Jesus.” Now, do I believe it’s Jesus? The answer is yes, although I think it’s irrelevant . . . the Course itself says it’s not necessary to believe in Jesus to use the Course. . . . In October, 1965 . . . she heard a (channeled spirit) voice say “This is a course in miracles. Please take notes.” . . . So Helen proceeded to transcribe this inner dictation.6 Λ Course in Miracles was transmitted to Helen Schucman over a period of seven years; then the demon spirit worked with her and an associate for two additional years polishing the text. It was published in 1975 by Skutch, then a professor of parapsychology at New York University, and her husband, who jointly founded the Foundation for Inner Peace to promote the course. Reportedly, over five hundred thousand people have taken this demon-written course of study. Sadly, some Christian churches have offered seminars and training classes using the materials. M ore frequently, Unity, Unitarian, and other “science of mind” churches use it. A number of prominent success and positive-thinking seminar leaders and entertainment personalities have endorsed A Course in Miracles. Melanie Chartoff, who gained a measure of fame in ABC TV ’s “Fridays,” told an interviewer, “The Course in Miracles has been a real mainstay for me, a true source of encouragement.”7 In the same interview, Chartoff stated she was also high on the teachings of Emmanuel, a disembodied spirit channeled by Pat Rodegast. Proudly she hailed her fellow actors and performers, commenting, “I’m thankful I’m part of an industry that’s at the vanguard of putting New Age platitudes into practice.”8 C o n ju rin g Up S p ir its Channeling is the process by which a person calls up a demon spirit to communicate with him. This can be accomplished either individually or in a group setting. The spirit usually speaks through the human channeler’s mouth, sometimes taking possession of his entire body. Sometimes he speaks or appears after being contacted at a seance conducted by a medium. The conjuring up of demon spirits is often called spiritism, or spiritual ism, and hundreds of spiritualist churches in America, Britain, South America, and elsewhere have engaged in it over the years. The United States’ churches are members of the National Spiritualist Association. The New Age has greatly refined the ancient and once discredited practice o( spiritualism, also making communication with the dead (necromancy) an international pastime. Previously a means to communicate with one’s departed loved ones, the New Age has tailored this un-Biblical practice into an occult happening by which millions of people trust their very lives to the wisdom of demons whom they obey as their personal spirit guides. New Age believers who channel spirits say that the spirits are all-knowing, possessing the knowledge of the Mystery of the Ages. They are also said to be miracle workers. Reportedly, these demons have helped New Agers make better grades in school and find romantic lovers and mates. They sometimes diagnose illnesses and provide guidance on how the individual can “heal himself.” Quite often a demon spirit is able to disclose cOnfidential information regarding the stock market or financial centers which other human subjects have revealed to it. Also, a number of New Agers are put into touch with other New Agers of like mind, perhaps in a distant city, who can help them succeed. Many New Agers say they are afraid to make any important life decisions without first asking their spirit guide. Reverend Laura Cameron Fraser, the first woman Episcopal priest in the Pacific Northwest, quit her job in 1986 when the bishop of her diocese demanded she repudiate her belief in “Jonah,” a spirit who spoke to her through channeling. The courageous bishop also warned Fraser that failure to cease her spiritism might result in an investigation of her loyalty to the Scriptures.9 Fraser evidently intends to continue consorting with the Devil. She plans to found an institute of healing in Seattle to investigate faith and psychic healing. The demon Seth, through psychic Jane Roberts, transmitted a series of doctrinal books, published by such major publishers as Prentice-Hall and Bantam, which have become best-sellers. Naturally, Seth’s doctrines are totally opposite those of Christianity. This channeled demon entity writes: “it is natural to be bisexual,” “evil and destruction do not exist,” “we create our own reality,” and “there is no authority superior to the guidance of a person’s inner self.”10 Thousands of New Agers around the world believe in Seth’s teachings, and annually an International Seth Seminar is held in Austin, Texas. Obviously a diabolical and clever spirit, Seth advises us that we must follow our “impulses” so we can discover the purpose of our lives: “Our difficulties arise from our mistrust and repression of these vital directives sent out by our inner selves.”11 Some New Agers have become wealthy by charging exorbitant fees to people willing to pay to hear from these “super-wise” disembodied spirits. In New Age bookstores, books, audio cassettes, and videotapes which feature these spirits are brisk sellers. In addition to Ramtha, a current rage is the demon Lazaris (note the similarity to the Lazarus of the New Testament). Excited New Agers flock to hear Lazaris speak on the “mysteries, magick, and the muses of love” during his nationwide lecture tour. A recent advance flyer in Atlanta, Georgia, exuberantly told participants that Lazaris’s love had already “touched the whole planet.” The flyer went on to say: Once we have met Lazaris, he is like an old friend who somehow we have always known. His joy, his insight, his love makes us realize he has always known us, too. . . .12 The cost to hear the marvelous Lazaris was advertised to be $375 per person. Participants were promised “extraordinary experiences,” and were told: “. . . Lazaris will again guide us through a meditation to retune, restore, and recharge us mentally, emotionally, psychically, and physically.”13 Participants were also told that this will be a time of healing and that they were to bring with them a “power object” for meditation, such as “a small crystal, a special stone, a piece of jewelry.”14 Though the flyer of course made no mention of it, sorcerers, shamans, witches, Satanists, and voodoo practitioners have for centuries understood the occultic use of “magical” amulets and charms. M e d ita tio n : U n le a s h in g th e D a r k n e s s W ith in The most common method used in the New Age to make contact with Satan and his demons is the practice of meditation. New Age meditation is not to be confused with that described in the Holy Bible. God wants us to seek guidance from His Holy Spirit through active meditation on His Word and through prayer. In contrast, New Age meditation involves an emptying of ones mind and an inviting in of spirits who are not from God. The world has been sold a bill of goods regarding meditation. Some eight million people in America alone have gone through the initiation process required by the Transcendental Meditation group; another six million have graduated from Silva Mind Control System’s meditation program, and millions more regularly practice some form of Yoga meditation. Possibly 25 percent of all American adults have practiced some form of supernatural meditation. Yet, New Age meditation is based on Hindu principles of linking the human mind with the Universal Mind and thus making contact with demons. The New Age believes that through meditation man can become a god. A desire to be a god and to wield supernatural, superhuman powers thus compels the individual to meditate. As Roy Eugene Davis of the Center for Spiritual Awareness in Lakemont, Georgia, wrote recently: The practice of meditation is the way to God-realization and the fulfillment of destiny. Yogic processes have proven helpful to many thousands of truth seekers over the centuries.15 Satan glories each time a human asks him to through meditation. Every New Age newcomer beyond the veil of our own visible dimension are of all-knowing spirit entities hungry to connect humans through meditation: come to them is taught that large numbers with and help As we begin to connect with our personal power, we can connect with an even deeper source. There is within each of us a “wise one.” . . . That’s why meditation is so helpful. Through meditation the “wise one” is right there to say, “Oh, goody, goody, I’ve got a chance now.” The “wise one” is waiting, as it were, for an invitation. When I introduce people to their “wise one,” they’re always astounded at how much they know. Because their “wise one” knows everything. It’s all right there. It’s truly amazing.16 In his Quartus Report, John Randolph Price told readers that meditation was the key to their becoming one with deity. Through meditation they could connect with the “Christ” within—“The Teacher”: Following a Love Meditation with Spirit each morning, address the Presence in a manner such as this: “Beloved Christ within—the Living God of my Being—I humbly invite you to think through me now. . . .”17 M ost New Age teachers instruct initiates to vacate or empty their minds and let a Presence come in. That Presence—whether it be a famous one such as “Jesus” or “Buddha,” or some unknown disembodied soul—will be their personal guru, their inner guide. German evangelist Kurt Koch writes of one woman, a master of the second stage of Yoga, who chose “Jesus” as her personal guru. N ot her Lord and Savior, mind you. Her guru. During her Yoga exercises, Koch reported, the woman developed occult powers, apparently a gift from the demon who pretended to be Jesus. Frightened, she sought to free herself, only to find that the demonic force refused to yield. After turning to the real Jesus and after Christian friends prayed for her, she was finally able to escape. She has since written a book, From Yoga to Christ.18 Koch also wrote that sometimes when demons claiming to be Jesus are commanded in the name o f Jesus Christ to reveal themselves, they are forced to utter, “I am the unholy Jesus” or “I am the Jesus of Satan.”19 Christians are well advised that to attempt to contact the real Jesus in any way that is un-Biblical— such as through New Age meditation, visualization, or spirit channeling—can possibly lead to catastrophe, giving lying demons a grand opportunity to pose as our Lord. We can be quite positive that a spiritual method is wrong if in any way it does not glorify Jesus and conform to the Word of God. For example, Dave H unt told of one woman who visualized a “Jesus” who had encouraged her, “Go ahead and cuss me out.” Another example is that of Jose Silva, founder of the Silva Mind Control System, who has said that Jesus taught His discipies the same (Silva) method of meditation. However, Silva re vealed on TV’s “John Ankerberg Show” that to succeed in the meditation taught by the Silva System, we need not believe that Jesus is the one and only Messiah. It is only necessary, Silva claims, “to believe in the technique that Jesus taught.”20 There is, of course, not one shred of evidence that Jesus taught such a perverse m ethod—the evidence is all to the contrary. For example, the Lord’s Prayer which Jesus taught His disciples requires active participation rather than a meditative and silent emptying of thought from our minds. Johanna Michaelson, in her chilling book The Beautiful Side o f Evil, told of her frenzied and horrifying life after taking the Silva Mind Control System course. Through meditation her visualized guru was “Jesus,” just as she requested. At first this Jesus appeared to be kind and loving. His physical countenance was perceived to be much like the artist’s depictions in the paintings we have all seen of Jesus. But as the meditation sessions continued, “Jesus” showed himself as a beastly character and made it clear to Johanna that she would suffer immensely if she failed to carry out his instructions.21 Only after many harrowing experiences—and G od’s intervention— did Johanna manage to free herself from the demon’s spiritual chains. Today a relaxed and confident Johanna Michaelson is a Christian, strong in her beliefs and dedicated to informing the world of the dangers of the occult. V is u a liz in g th e D a r k n e s s Johanna’s nightmarish struggle with demons began in earnest after she visualized “Jesus” and invited him to be her New Age guru. In visualization, the individual conjures up an image of a spirit he wishes to contact. Visualization may be enhanced by focusing one’s eyes on a centering device such as a candle flame, a crystal, or a mandala. A mandala is most often a circular pattern (the circle represents Satan and the karmic wheel of reincarnation and birth) comprised internally of a scene or symbols reflecting New Age themes. In one recent New Age magazine, readers were rewarded with a mandala that was a full-page insert they could remove and use. Inside the circle were the names of various M other Goddess figures such as Diana, Artemis, and Kali.22 The user is to visual ize and concentrate on these names and thereby summon his or her spirit guide, which most likely will be a demon purporting to be one of these goddesses from the past. Keep in mind the difference between New Age occult visualization and the visions recorded in the Bible. Visions are from God if they glorify Him and His Word. In such cases, the vision is generated by God and not by man. In contrast, in visualization the individual initiates the image. He, not God, is the one who induces a spirit to enter into his mind. U n h o ly W o rd s During meditation the New Age believer often uses a mantra, a mystical holy word of power, to invoke the demon spirit guide to come. A mantra also serves to relax the mind into a trance state. Elizabeth Clare Prophet’s Church Universal and Triumphant teaches that the repeated chanting of a mantra “magnetizes” the “Presence” whom the meditator desires to communicate with. The magic word recommended is either aum in Sanskrit (Hindu) or I am in English. Prophet also says that this is the word originally used to command the universe into existence.23 Transcendental M editation’s (TM) founder, Maharishi Mahesh Yogi, claims that each individual in the universe has his own holy word (mantra) and that it should never be shared with anyone else. However, it has been revealed by other sources that the mantra which TM assigns is invariably the name of a Hindu god. Furthermore, there are only sixteen mantras in use, one for each of sixteen age groups. For example, all persons aged twenty to twenty-one chant the holy word aem to invoke their personal deity while persons forty to forty-four recite the word hirim.24 The concept of the mantra originated in the Hindu religion. The M other Goddess Kali is said to have used her mantra word om (same as the Church Universal and Triumphant’s mantra word aum) to create the world.25 In Babylon, Greece, and Rome, the mantra was used to command pagan deities to appear, and in Satan worship today such magical words are verbalized to summon Satan or one of his demon princes. Thus, what the New Ager is doing by chanting these unholy words is putting himself into a vulnerable trance state at the same time that demons are invited to appear and do their horrible work. Only the Power o f Jesus Can Surmount the Demonic Powers The demonic power of these channeled spirits is far greater than the New Age believer can ever hope to bring under control. As long as the individual does what the demon tells him, everything is fine. But once the person balks, and especially if he turns to the Bible or to prayer for deliverance, Satanic hostility breaks out as the angry spirit furiously attempts to whip the subject back into line. Yet, in the end these demons are no match for the sincere person who repents and calls on the name of Jesus (see Jas. 4:7). Without Jesus, Lord of Lords and King of Kings, as his shield, any man is helpless when he encounters demon hordes. Once Satan is invited in, the individual finds himself defenseless. The great occult strength of these evil presences was recorded in Acts 19:13-16, in which we read of ungodly exorcists vainly attempting to cast out an angry demon from a possessed man by their own strength. The demon rebuked them, and they were brutally beaten. Alone, man cannot reason with Satan’s demons. The clever ability of these evil spirits to bend and warp the minds of men and women not attuned to G od’s Holy Spirit was manifested in the case of J. Z. Knight, the channeler of Ramtha. Knight says that Ramtha monitors her thoughts and knows everything she is thinking. At first, she explains, she tried to challenge Ramtha by telling him of the doctrines she had learned as a child in the Baptist and Pentecostal churches (both of which she left). Undeterred, Ramtha pressed her and pressed her until she finally succumbed and began to think like him. Asked during an interview if a stronger-willed Ramtha had torn her basic belief system down, Knight replied, “He allowed me. I did it myself. He acted as the catalyst. . . .”26 To demonstrate how completely a demon can master the human will, I have included below a verbatim exchange between J. Z. Knight and Ramtha, as Knight told it to Psychic Guide magazine. N ote how shrewdly and easily this Satanic being was able to inculcate his evil value system into the mind of an unprepared human subject who was unfamiliar with spiritual warfare, not clothed with the arm or of G od’s Word, and not led by the Holy Spirit: He (Ramtha) asked me, “What think you God is?” I replied, “Well, He created us in His own image. He created the world and the heavens and the ocean.” I went back and quoted some verses from Genesis and felt very arrogant that I could do that. He said, “So to you, God created everything. Who created God?” “No one did!” I said, “God always was!” He smiled and said, “But He has created all things?” I said, “Yes!” Ramtha continued, “Who think you to know who the Devil is?” I said, “I don’t know.” I was really getting ticked off at him because I thought he was trying to manipulate me. He was. I explained, “The Devil is a fallen angel. God created heaven, the earth and man. Grand angels were created and Lucifer acclaimed himself to be the most beautiful angel of all and even arrogantly proclaimed himself to be more beautiful than God. As a result he fell from grace and took with him the lot who sided with him. From then on a polarity was created consisting of good and evil.” Ramtha said, “But who created this angel?” I said, “God did.” He asked, “What did He create him out of?” “God stuff.” It seemed logical, I thought. “So whatever God creates,” he said, “is made up of God, correct?” I nodded, “Yes, God creates it out of Himself.” “And so therefore it’s divine and good?” I agreed. “Then Lucifer was divine and good, correct?” “Well, no he wasn’t. He was a very evil entity,” I said. “But then who created the evil?” He was getting right down to basics. “Well . . . Lucifer was, and is, evil.” He came back with, “Where did the evil come from? If God created all things, who created Lucifer? God must have if He created all things. Then, beneath the evil of Lucifer lies God.” “Ramtha,” I said, “you don’t understand. This entity is evil and he seduces us to become evil to take us from the grace of God.” Ramtha said, “Where would he take you to? You say all things are God, and all things thereof are God. In other words, in the seed of Lucifer lies God and divineness.”27 What the Bible Says About Spiritism G od’s very clear, unequivocal commandment is set forth in the Bible: we must not seek to communicate with spirits and with the dead. In Leviticus 19:31 we read this admonition: “Regard not them that have familiar spirits, neither seek after wizards, to be defiled by them: I am the Lord your God.” God condemns mediums and spiritists, classifying them as of Satan and in the same wretched class with sorcerers, diviners, and witches:) It is for our protection—and our salvation—that the Lord has established these guidelines. He loves us and desires that we consult with Him, for He has the answer to all our needs. The Christian needs no man-god spirit as his intermediary or guide. We can direct-dial the Great God of creation, the one and only Heavenly Father. “For there is one God, and one mediator between God and men, the man Christ Jesus” (1 Tim. 2:5). The mind is the chief site of conflict for man’s soul. It is where The Plan of Satan is instilled in the consciousness of those in the New Age who foolishly invite demons in. Satan is indeed proving that he has powers against which no man without God can prevail. But the spiritual weapons of the Christian are mighty through God, allowing us to oppose The Plan and its vain imaginings. As Paul implored us, we engage Satan and his demons by: . . . casting down imaginations and every high thing that exalteth itself against the knowledge of God, and bringing into captivity every thought to the obedience of Christ. (2 Cor. 10:5) T E N The New Master Race Therefore let no m an glory in men. . . . (1 Cor. 3:21) When a m an realizes his (God) identity, a race o f gods w ill rule the universe. (John Randolph Price, The Superbeings) ohn Randolph Price calls them the “Super Beings,” Richard M. Bucke termed them men of “Cosmic Consciousness,” Elizabeth Clare Prophet says they are the holy and undefiled “I AM.” To Peter Roche de Coppens they are “Christed human beings.” Ruth Montgomery’s guides say they are spiritually advanced “Walk-ins.” They are said to be endowed with all the powers of the universe. Indeed, they are the universe. They are the seventh—the highest stratum—in a long lineage of roots races that have occupied the earth over the millennia. Their Plan is that soon they will assume leadership of the nations, unify all governments, and establish a One World Religion headed by one of their own. Just who are they} The advanced race of New Age mangods. This is the secret doctrine, what the New Age calls the “Perennial Philosophy”—the Mystery of the Ages— Man is God. As Meher Baba, a Sufi Moslem mystic whose writings are enormously popular with New Agers, explains: There is only one question. And once you know the answer to that question there are no more to ask. . . . Who am I? And to that question there is only one answer—I am God!1 Sir Julian Huxley wrote that the doctrine of man, the supreme being, should be the cornerstone of the new world order. According to Huxley, “The well-developed, well-patterned, individual human being is . . . the highest phenomenon of which we have knowledge, and the variety of individual personalities is the world’s highest riches.”2 Scientist Arthur Clarke, author of 2001: A Space Odyssey and other best-selling futuristic novels, is a fervent New Ager who predicts that consciousness expansion—superintelligence— and human immortality will have been achieved by the year 2100. He also forecasts a wondrous future for mankind, remarking that men “will not be like gods, because no gods imagined by our minds have ever possessed the powers they will command.”3 All New Agers agree with Clarke that man’s destiny is godhood, but few believe man will have to wait more than a few years. Ruth Montgomery, whose supporters have bequeathed her the title “The Herald of the New Age,” has said that her spirit guides from the dead have revealed that we are at the very threshold of a momentous chaotic event—the shifting of the earth. This will occur by the close of the century, her guides tell Montogomery, and it will usher in the Age of Aquarius, also called the New Age. Montgomery is ecstatic when she states that a new race of man-gods is on the near horizon: The New Age will bring joy and happiness unexcelled since the days of the Atlantean era. . . . Those who survive the shift will be a different type of people from those in physical form today, freed from strife and hatred, longing to be of service to the whole of mankind. . . . Their minds will be open to the reality of one world. . . .4 John Randolph Price targets an even sooner date for the initiation of man into godhood. Price has confided to his followers that “a new species of man is coming forth to lead us out of the darkness into a new dimension. . . .”5 He believes that December 31, 1986, the day when the world celebrated a Plan etary Healing Day, was the beginning of the end for the old race man, and that 1987 is an important year of preparation which will be followed by a time of consolidation. The final period of inauguration will see the reappearance of the New Age “Christ” to rule earth and the triumph of Cosmic Consciousness— divinity—for collective humanity.6 Bernadette Roberts, a fifty-five-year-old former cloistered Catholic nun and now a New Age author and “theologian,” says that man is now on a spiritual journey toward total unity with the One, which she terms the “Godhead.” “One glimpse of the Godhead,” Roberts remarks, “and no one would ever want God back!”7 John White, another New Age “theologian” and a prolific writer of New Age propaganda, offers this simple description of how modern man is evolving into a race of gods: First you go toward the light. Next you’re in the light. Then you are the light.8 White contends that “sooner or later every human being will feel a call from the cosmos to ascend to godhood.” He rejects the Christian belief that Jesus was the only Son of God and scoffs at the assertion that Jesus died on the cross for our sins. White states that the significance of Jesus’ death and resurrection “is not that Jesus was a human like us but rather that we are gods like him.” White adds, “This is the secret of all ages and all spiritual traditions. This is the highest mystery.”9 Throughout the books and writings of New Age prophets, theologians, gurus, and teachers, one finds a common thread: Jesus is not Lord, a personal God is a myth, man is his own Lord, man is God. New Age believers are falling for the oldest lie ever told a human being—the same lie Satan told Adam and Eve in the garden: “Ye shall be as gods.” The Racial Doctrine o f the New Age The evolving New Age man-god is described as a totally new species that will replace the outmoded race which until now has controlled the destiny of man and the planet. Ruth Montgomery and others maintain that every person on earth is either an Atlantean or a Lemurian.10 Edgar Cayce also believed in this theory, speculating the existence hundreds of thousands of years ago of two great continents and races, Atlantis and Lemuria. The Lemurian race is peace-loving and dedicated to the good of all humanity, while the less desirable Atlantean race is warlike and separative. The future is said to belong to the higher consciousness Lemurian race.11 According to Montgomery, the spiritually advanced Lemurians represent the fast-approaching New Age. She says mankind is being assisted into the Aquarian Age by “Walk-ins, ״reincarnated guides who are even now taking possession of living humans. She says that the old soul within the body is replaced by the more highly developed soul from the spirit plane. The new person or soul, called a Walk-in, is a New Age creation sent by the guides to help mankind “by instilling courage, compassion, love and cooperation.12״ Montgomery’s cheery description of a benign process of Walk-ins taking over human bodies is in reality a horrendous picture of Satanic demons entering willing humans and boldly taking possession. Sealed by Satan, the “new” person is imbued with a reprobate mind and the New Age spirit of Antichrist. Montgomery doesn’t see it that way. Walk-ins, she says are “harbingers of a new order that will bring peace on earth in the 20th century.”13 Her spirit guides tell her that there are tens of thousands of them now in physical form. “They are New Age disciples who are returning at an accelerated pace to usher us into the Age of Aquarius when we will all be as one and the biblical prophecy of the millennium will be fulfilled.”14 The Children o f Darkness vs. the Sons o f One The Collegians International Church also teaches two seed races. There is said to be a race of lower consciousness called the “Children of Darkness” and a higher consciousness race known as the “Sons of One.” The Children of Darkness are described as the children of Cain: They may be intelligent and brimming with knowledge, but they lack wisdom. Often self-indulgent, power and wealth hungry, they may succeed again in bringing disaster to mankind.15 In contrast, the Sons of One are thought to be the descendants of N oah’s son, Shem. These highly evolved spiritual persons are children of light; they resist harmful technology, nuclear power, pollution, and abuses of nature. Therefore, they are the race that will succeed, bringing a universal era of peaceful consciousness.16 The Lucis Trust and a number of other groups speak of a New Age vanguard, said to be a superior race centered in the Tibetan mountains in a place called Shamballa. There, assisted by the invisible Masters, this race of supermen awaits the dawning of the New Age. However, their representatives have now gone out in bodily form to help humans achieve higher consciousness.17 Christ Consciousness: A Racial M ark o f Superiority? Other New Age leaders depict the New Age man-god as a being who has achieved the supernatural state known as Christ Consciousness and the superior race as collectively possessing Christ Consciousness. This does not mean following Christ Jesus. On the contrary, the New Age heaps scorn on Christianity, calling fundamental Christians a “Jesus cult.” Hayward Coleman, who advocates “Christian Yoga,” exemplifies the New Age concept of Christ Consciousness without Jesus Christ when he says: The right way of thinking is to see Christ in every human being. This may sound born-again but it isn’t. Born-again Christianity emphasizes the personality of Jesus; what I call Christian Yoga sees Christ as a Consciousness.18 Given New Age doctrines, there is really no place for traditional Christianity in the luminescent New Age that awaits the birth of the new race of man-gods. Of what use is the God of the Bible to a race that is its own god or a Christian Messiah to a person whose theology teaches him he is his own savior? The New Age man or woman is all-sufficient, believing that the ascension of man to godhood is inevitable. Though traditional Christianity is reviled by the New Age, apostate Christianity, affirming the divinity of man, is heartily welcomed. Peter Roche de Cappens is one who brushes aside objections that the New Age is opposed to Christianity. De Cappens says that the divinity of man through spiritual initiation is the Great Work that is the central objective of the “Ageless Wisdom.”19 He suggests that if Christians were to discover the hidden messages in the Bible, they would realize that Christianity and this ageless wisdom are perfectly compatible. De Cappens further claims that: A “living Christian” or a “Christed human being” is really a God-Man or woman who has achieved and incarnates selfknowledge, self-mastery, and self-integration—one who can truly express the self.20 This is, of course, a horrible abuse of Scripture, for the Bible makes clear that man must not exalt himself. The Christian would never say, “I am G od” or “I am Christ,” but “N ot I, but Christ liveth in me” (Gal. 2:20). Isaiah cautioned us not to place our trust in man (Isa. 2:22). Jeremiah prophesied the destruction of the Babylonian man-gods worshiped by the ancient world when he stated: “Thus shall ye say unto them, The gods that have not made the heavens and the earth, even they shall perish from the earth, and from under these heavens” (Jer. 10:11). The Old Testament prophet reminded the people that the human heart is “deceitful above all things, and desperately wicked . . .” (17:9). Jesus gave a similar testimony: “For out of the heart proceed evil thoughts, murders, adulteries, fornications, thefts, false witness, blasphemies” (Matt. 15:19). There can be only one God, only one Christ, and man was made to honor and obey Him and Him alone. Darwin’s Legacy: The Evolution o f Consciousness The New Age belief in an evolving human race of gods originated in ancient Babylon. In 1859 Englishman Charles Darwin published his Origin o f the Species, reviving in a pseudoscientific form the old Babylonian doctrine. Darwin’s theory caught on with agnostic and atheistic scientists and continues to receive support to this day. However, over the past few decades the generally accepted theory of evolution has undergone some revisions and additions. In the late 1950s a Jesuit priest, Pierre Teilhard de Chardin, modified evolutionary theory by refining existing philosophies and adding to Darwin’s theory the concept of a further evolutionary stage for mankind—evolution into higher consciousness. Teihard de Chardin wrote that man will progressively become more Christlike until humanity reaches its ultimate goal: godhood, which he called the Omega Point.21 Teilhard de Chardin has since become practically the “patron saint” of the New Age Movement. His ideas form the basis for its un-Biblical doctrines of divine man. However, Teilhard de Chardin has a popular competitor in the person of Richard M. Bucke, whose evolutionary theories actually preceded those of the heretical Jesuit priest. Cosmic Consciousness: The M ark o f the Nobler Race? Richard M. Bucke, a Canadian psychiatrist, in 1901 first developed the theory of a superior race evolving into a godlike Cosmic Consciousness. His book Cosmic Consciousness is now a New Age classic. Similar in most respects to Christ Consciousness, Cosmic Consciousness, wrote Burke, “appears in individuals . . . of good intellect, of high moral qualities, of superior physique.” He proposed that “a time will come when to be without the faculty. . . will be a mark of inferiority. . . .”22 Bucke also stated that “any man permanently endowed with the Cosmic Sense would be almost infinitely higher and nobler than any man who is self-conscious merely.”23 Naturally Bucke told his readers that he himself had been reborn into Cosmic Consciousness. He also claimed that Jesus, Buddha, Plato, Mohammed, Francis Bacon, and Walt Whitman, among others, had possessed this enlightened cosmic sense. Richard Bucke’s theory of the emergence of a spiritually superior race destined to take over the reigns of leadership is a dangerously volatile idea. Yet, it has become the cornerstone of the New Age World Religion. But Satan needed one more modi fication to his theory of evolution to guarantee The Plan would succeed. He needed to show how an evolutionary spark could ignite the rise of man to godhood. That addition was made possible only recently. Transformational Evolution A recent and profound addition to the theory of evolution is the concept of punctuated equilibria, first articulated in the Soviet Union in the early 1970s. According to this theory, species can develop very quickly. It does not take millions of years of random selection, as Darwin proposed, for a new species to evolve. Instead, an entire new species can arise over a brief period of only tens of thousands (not millions) of years.24 New Agers subscribe to this theory but take it one dreamy step further. They believe that an evolutionary leap can occur instantaneously This theory of spontaneous, super-rapid evolution has become known as transformational evolution. New Age teachers and gurus are fascinated by the idea that modern man might be on the precipice of an incredible evolutionary leap—to a level of superhuman higher consciousness. He will then be a god. New Age doctrine holds that as more and more racially superior human beings become aware of their divine nature and their latent powers within, a critical mass of energy will develop and a new Cosmic Consciousness will envelop the globe. Transformed into Superbeings, H om o sapiens will become a race of gods. Enlightened man shall rule the universe, unite with it, and he and it shall become one. New Agers often quote Lama Govinda, an Indian Hindu mystic who taught that the entire cosmos is but an extension of the human mind. Said Govinda, “To the enlightened man . . . whose consciousness embraces the universe, to him the universe becomes his physical body, while his physical body becomes a manifestation of the universal mind.”25 M arks o f the Inferior Race As we’ve seen, according to New Age doctrine there are two great root races in the world: one on the threshold of god-status, the other holding the first back. The latter is an inferior race of lower consciousness.26 W hat are the marks of the inferior race? Negative thinking is this race’s chief identifying mark. In contrast, positive thinking is touted as typifying the person of higher consciousness. That person is spiritually enlightened and has achieved Cosmic, Christ, or God Consciousness. In a nutshell, the higher consciousness person has an appreciation for unity, love and peace; the lower consciousness person does not. As Christians we know that our Lord Jesus Christ loved and desired the unity of all mankind. Isaiah described the coming Messiah, Jesus, as the “Prince of Peace.” So the Christian, after first trusting in his Heavenly Father, also strives for unity, love, and peace. Does the Christian, then, typify that person so highly esteemed by the New Age as a being of higher consciousness? N o, the Christian is held by the New Age to be of the lower consciousness race. New Age meanings for unity, love, and peace are diametrically opposed to the way the Bible uses these same terms. The New Age despises Christian unity, love, and peace because the powers of darkness which rule the New Age cannot abide the Holy Spirit who embodies these cardinal Christian values. The following explanation will make this point clear. True Christianity can never be merged into the New Age World Religion. New Age Unity Satan’s drive for unity, for a One World Religion and a One World Government led by one man-god, the puppet of the Devil, impels New Age leaders to reject Christianity. Christianity is viewed as a negative philosophy that is, at its core, separatist. To the Christian, Jesus is the way. God loves each one of us—even sinners, and the Bible is G od’s Holy Word. The Christian grieves for the Hindu, the Buddhist, the atheist, the Satan worshiper and men and women of all religions and all creeds who have not yet accepted Jesus Christ as their personal Lord and Savior. It is the Christian goal to help these lost sinners learn of the truth—that Jesus Christ alone is Lord. The Christian doctrine of Jesus only is hated by the New Age, which maintains that it is a negative doctrine hostile to world unity. The New Age teaches that all paths have “light” within them. They are all acceptable. Furthermore, in New Age theology, we are all collectively “G od”; thus there is no personal God who loves us. Additionally, the Bible is considered only one of many sacred books. New Age leaders say that if only the Christian would give up his “negative,” “exclusive,” and “separatist” views the world could race toward unity. Unity of religions and world peace would then ensue: . . . We are all pure light, or pieces of God. . . . We are obviously ALL ONE. . . . If you can just remember that we are all one, we are ALL GOD. . . . Your negative feelings will disappear. . . . Logic, reason, intuition and the esoteric literature from most world religions indicate that if you think you have the only way then your God is too limited.27 According to the New Age, unity requires that the Christian cease his efforts to convert the world to salvation through Jesus and recognize that man is himself divine. To think otherwise exemplifies narrow-mindedness and wrong thinking: This mistake and narrowness of thinking is especially evident when we try to restrict and confine God’s love, compassion and forgiveness to one special group. For example, many believe that either you accept Jesus as your personal master, or you will go to hell. This limits the experience of the Christ Consciousness to only one man (Jesus) and denies the universality of God’s power within each of us that has been demonstrated by many Masters before, and since, the Master Jesus. . . . Intuitively, most people realize the awkwardness of this position in the orthodoxy and either ignore it, or ignore the church.28 So the Christian who believes in Jesus is labeled “anti-unity.” He is also a sinner! Usually the New Age rejects any notion that “sin” exists. But the concept is resurrected for Christians who refuse the “oneness” of all creation and all religions. N ot only is their refusal a separatist anti-unity “sin,” but it identifies Christians as being out-of-step with The Plan: The great secret of life is unity. We are all at one in the mind of the creator. . . . Sin is the ignoring of this fact of oneness. . . . Such ignoring or ignorance leads to envy, frustration, criticism, robbery and hate. These states of mind cause illness. If we can learn to love our fellow men (not sentimentally but in oneness . . . because all is an expression of God’s Plan) . . . We will then become healers—of ourselves, of others, and of the world.29 The principles underlying the Plan teach that higher, Cosmic Consciousness—“Christ Consciousness”—ends separativeness. Collectively, the peoples of earth can bring in the New Age Kingdom and summon the New Age “Christ.” As one New Age writer emphasizes, by following the Divine Plan, “each individual is reunited with the whole, and the entire world is lifted up to a spiritual dimension of love, joy, and peace.”30 Christians are viewed as stumbling blocks to the world’s being gloriously lifted into a new spiritual dimension! Our fears of religious and world unity, our sins, our karmic debt prevent critical mass from being achieved. Therefore, “The Plan,” says John Randolph Price, “must include the elimination of fear, the dissolving of fake beliefs, and the raising of karmic debts in each individual soul . . . so that the Light can dispel the darkness and indeed make all things new.”31 Price has recommended that every person on earth sign a covenant with the organization he founded, The Planetary Commission, pledging to end separativeness and consenting to the healing and harmonizing of the planet. The covenant includes this phrase: I choose to be a part of the Planetary Commission. . . . I know that as I lift up my consciousness, I will be doing my part to cancel out the error of the race mind, heal the sense of separation, and restore the world to sanity. . . .32 The Christian, it is implied, is contributing to an insane world if he opposes New Age unity. By professing Jesus Christ as the way of salvation, the Biblical Christian is demonstrating “the error” of his lower consciousness “race mind” and opposing the will of God. (“God,” you may recall, is defined by the New Age as a universal energy force.) Thus Price writes: The Divine Plan is the Strategy and the Blueprint for each individual man or woman, for the entire human race, and for the planet itself, as conceived by the Infinite Thinker. In essence, we’re talking about the will of God . . . the infinite Good-for-all. . . .33 “All is one,” proclaims the New Age, “nothing is separate.” Any religion or person who opposes this basic, humanistic concept is a threat to peace and the brotherhood of man. Barry McWaters suggests that an aggressive spirit of separativeness because of Christian error emerged during the last two hundred years, evidently referring to the period when the United States became an independent nation founded on a Christian belief in “one nation under God, indivisible. . . .” All traditional religious paths are destined to lead humanity, individually and collectively, to this fundamental understanding (of all-is-one). However, during the last 200 years, the Western world has gone through a “fall,” a forgetfulness, a misunderstanding of separative thought from which we are just now re-emerging.34 Apparently God threw a monkey wrench into the Devil’s age-old Plan when he helped create the democratic United States. At that time the entire planet was composed of undemocratic kingdoms, only a handful of which allowed the practice of Biblical Christianity. Since its founding, the United States has been at the forefront of the Christian movement. Thousands of American congregations have sprung up to praise the Lord, and they have sent forth missionaries throughout the world—missionaries dedicated to a Church headed by Jesus Christ only. New Age Love One of the reasons the New Age attracts so many people today is its emphasis on love. A theology of love is a powerful aphrodisiac in a selfish world so universally devoid of true caring. The Bible has much to say about love—pure altruistic agape love. John’s three-word expression is superbly beautiful when he says, simply but powerfully: “God is love.” John 3:16 expresses the ultimate in agape love: “For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.” Paul said that the greatest attribute of man is love. Jesus taught that the greatest commandment is love—first for God, and then for our neighbors as ourselves. Regardless of the fact that the Bible’s greatest theme is love, somehow Satan has been able to persuade millions of people that Christianity is not the antidote for people in desperate need of the redeeming power of love. Moreover, Satan is using New Age teachers to promote sick kinds of love. The New Age believer is taught to love everything in the world—every deed and thought, good or evil, every religion, no matter how foul its tenets may seem; all are good, all are one. He is also taught to especially love his guru or teacher. Even Lucifer, the dragon, is to be loved, for the New Age preaches that we create an evil Lucifer when we fail to shower him with our unconditional love. John Welwood, in a recent issue of Yoga Journal, remarked that the failure of man to give unconditional love creates “dragons and dreams.”35 As Rainer Rilke puts it, “Perhaps all the dragons in our lives are princesses who are only waiting to see us act, just once, with beauty and courage. Perhaps everything that frightens us is, in its deepest essence, something helpless that wants our love.”36 New Age masses are easy prey for cunning teachers and gurus who charm with their hypnotic powers, preaching false concepts of love. Baghwan Rajneesh, the guru who led thousands in a strange and frenzied existence in Oregon a few years ago, was one example. Another is an Indian guru known as “His Divinity Swami Prakashanand Saraswati” (shortened to Shree Swamiji), founder of the International Society of Divine Love. This group has regional centers in Philadelphia, New York, Miami, San Diego, and Santa Cruz and Malibu, California, with administrative headquarters in Philadelphia.37 Shree Swamiji offers to all his teaching of Divine-Love-Consciousness. He promises you will experience what he calls “Krishn love” (evidently the love of the Hindu god, Krishna) within three days by attending one of his seminars. Advertising himself as a “living saint,” Shree Swamiji claims his form of meditation can remake you into a loving divinity: an “all-beautiful supreme personality of the Godhead. . . .”38 The New Age believer must also demonstrate his love for M other Earth. Failure to love and serve divine M other Earth is a mark of the materialistic person of lower consciousness. Christian ministers and laymen beseech lost souls to be healed through the power of Jesus Christ. New Age leaders exhort believers to heal the earth, to meditate for the earth, to protect its ecology and environment, to respect nature as God, to believe in an evolutionary universe. Vera Alder laments that “The world today is a sick world. It needs healing.”39 Harvard University biologist Edward O. Wilson, spokesperson for the Club of Earth, stresses that mankind is destroying entire species of insect and animal life, an event second only to the threat of nuclear war.40 Thinking, caring Christians most certainly are interested in preserving the planet God made for man’s physical habitat, but we draw the line at loving a divine earth. Jeremy Rif kin, for example, says that restoring the sacred status of nature is “the great mission of the coming age.” Like many other New Agers, he envisions a back to nature, whole earth (holistic) campaign to treat the earth as a living organism to be revered and loved.41 Robert Mueller remarks, “You know and love your home, don’t you. Well, you must also know and love your planetary home.” Perhaps, says Mueller, “this will be the new spiritual ideology that will bind the human race. . . . We must reestablish the unity of our planet and of our beings with . . . divinity.”42 Another type of unacceptable New Age love is that of selflove. Dave H unt calls this self-idolatry, and it is much in vogue in the New Age scheme of things.43 Pop singer Whitney Houston, in her number-one record, best expressed the New Age view when she belted out the unfortunate phrase, . . to love yourself . . . is the greatest love of all.” Self-love is so paramount a teaching of the New Age that the first question New Age minister Elizabeth Clare Prophet often asks a person who has come to her for healing is, “Do you forgive and love yourself?” Regarded by the New Age as a form of “positive thinking” that builds a person’s self-esteem, this is instead highly damaging to a person’s spirit. It leads unnaturally to the concept that man is a perfect being, that he is a god. It is narcissistic and negative. In contrast, the Bible teaches that the greatest love of all is to love God. Then God will lift up our spirits so we can be filled with love for others . . . and for ourselves. If the Christian is expected by the New Age to love, adore, and worship his guru, love a divine earth, and— foremost of all— to love himself above a personal God in heaven, then Christian love cannot coexist with the “love” espoused by the New Age World Religion. N e w A g e Peace The Christian’s failure to subscribe to the New Age’s perverted doctrines of unity and love makes world peace an impossible attainment, New Age leaders believe. They see a world poised on the brink of global destruction due to the buildup of nuclear armaments and conclude that only a universal turning to cosmic planetary consciousness will save humanity from disaster. In 1975 at the United Nations, a convocation of spiritual leaders of all faiths issued this declaration: The crises of our time are challenging the world religions to release a new spiritual force transcending religious, cultural, and national boundaries. . . . We affirm a new spirituality divested of insularity and directed toward planetary consciousness.44 The solution proposed by these ecumenical-minded religious leaders is wrong. The Bible directs man to fix his eyes on God, the great I AM. He is not a “new spiritual force,” but the one and only God, whom the Jews called the “Ancient of Days.” G od’s Plan provides for true world peace to unfold as Jesus returns to preside over man’s activities. The New Age obviously has a different idea as to how world peace can be achieved. Lola Davis says that “peace can only come when we recognize the divinity in each person.”45 Edgar Cayce agreed, adding that “peace . . . must be within self.” Cayce also taught that failure to recognize man’s divine nature, along with “false belief” in a Satan, can actually harm the cause of world peace and lead to other tragedies.46 Cayce advised that “We should not view the devil as the cause of our troubles and make him the scapegoat.” Why? Because, Cayce stressed, believing in Satan “can create fear, confusion, disharmony, murders, and wars—the direct opposites to the fruit of the spirit.”47 Jesus recognized and cast Satan’s demons out of oppressed human beings and commanded the evil one, “Get thee behind me, Satan.” In so doing, did our Lord, as Cayce suggested, create fear, confusion, disharmony, murders, and wars? God forbid! M an’s thirst for world peace can only be quenched by Jesus Christ. N o Christian can support a world peace founded upon a denial of Jesus’ divinity and the affirmation of man’s divinity. N or will the true Christian relinquish his conviction that Satan is alive and is the archenemy of peace on earth and goodwill toward men. The Dangers o f the New Age Racial Doctrine In the New Age view, their concept of unity, love, and peace marks Christians as members of an inferior race. It doesn’t take much foresight to recognize the dangers in a doctrine that artifidaily creates two races and sets one up as superior. Hitler’s poisonous racial theories were not far afield from those of the New Age extremists. The Aryan race was to become the mangod race of a thousand-year Reich founded by Hitler and his monstrous SS troups. It is no coincidence that, like those of New Age leaders today, Hitler’s theories were grounded in the occult and in the teachings of Theosophy and Hinduism. Furthermore, like Alice Bailey, Hitler, too, believed in the Masters of Shamballa and in the superiority of a Tibetan occultism. A world view of a polluted racial doctrine that distinguishes one race as noble and godlike and the other as barely above the level of animals cannot bring to humanity the moral authority needed to solve world problems. Two-race doctrines brought us the World War II holocaust and the recent genocide by the Khmer Rouge in Cambodia. Today it is partly the Hindu racial caste system that leaves India seething with violence as sect wars against sect and Hindus go head-to-head against their Moslem neighbors in Pakistan. In recent years India has seen its prime minister assassinated while the nation’s military has armed itself with nuclear bombs to frighten its would-be religious foes abroad. In his excellent primer on New Age philosophy, David Groothuis concludes that its world view makes the New Age unfit to lead: The new cosmic humanism of the New Age threatens to become the consensus. This should cause us to shudder in horror. The pantheistic consensus in India has perpetuated the country’s poverty, misery, and hopelessness for thousands of years. Any world view at odds with the truth of God and His creation can only wreak havoc wherever it plants roots. “Unless the Lord builds the house, its builders labor in vain.” (Psa. 127:1 )48 The Fate o f the Christian If Cosmic Consciousness is to be ushered in on a global scale, if unity, peace, and love are to succeed in tearing down the walls that separate the world’s religions, the Christian must first be dealt with. He must not be permitted to thwart the reappearance on earth of the New Age “Christ” and his hierarchy. The Plan must be fulfilled. What, then, does the New Age have in store for the Christians? E L E V E N The Dark Secret: What Will Happen to the Christians? A nd when he h ad opened the f ifth seal, I s a w under the a lta r the souls o f them th at were slain f o r the w ord o f God, an d f o r the testim o n y which they held: a n d they cried w ith a loud voice, saying, H ow long, O Lord, holy an d true, d o st thou not ju dge an d avenge our blood on them th a t dw ell on the earth? (Rev. 6:9, 10) Those who survive the sh ift w ill be a different type o f people fr o m those in ph ysical fo rm to d a y free d f ro m strife an d hatred, longing to be o f service to the whole o f m an kin d. . . . The souls who helped to bring on the chaos o f the present century w ill have p a ssed into sp ir it to rethink their a ttitu d es. (Ruth Montgomery, Threshold to Tbmorrow) nly one thing stands in the way of Satan and his Plan today: the true Church of Jesus Christ. Up to now God has not allowed Satan to move aggressively to destroy the earth’s Christian believers. But leaders of the New Age World Religion see their coming triumph over traditional Christianity as inevitable. A new, superhuman race of man-gods led by a New Age “Christ,” they believe, will fashion a peace-loving kingdom of heaven on earth and unite all religions and peoples. When will this new race, supposedly already emerging, complete its evolutionary metamorphosis and usher in a One World Religion and Government? New Agers say this will only come after the earth has been fully cleansed of negative forces—such as traditional Christianity—which today are obstacles to the new world order. The question is, what will happen to the Christians? What do New Age leaders mean by “cleansed”? The Dark Secret The Plan most definitely includes ominous provisions for Christians. Now, 1 say this with due caution for, even if they exist, it would be difficult—perhaps impossible— for us to gain access to the actual documents that reveal outright a hideous, hidden intent to persecute, purge, or kill all the Bible-believing Christians at some point in the future after the Antichrist ascends to dictatorial power. Furthermore, our human minds cannot read the warped mind of Satan. Still, the leaders of the New Age— Satan’s earthly representatives—have given the world unmistakable indications of the horrors that undoubtedly lie in store for Christians. Jesus gave us these encouraging words, which we should take to heart in these precarious days: Fear them not therefore: for there is nothing covered, that shall not be revealed; and hid, that shall not be known. . . . And fear not them which kill the body, but are not able to kill the soul: but rather fear him which is able to destroy both soul and body in hell. (Matt. 10:26, 28) Whatever fate awaits us, we need not be alarmed. Instead, we should be joyful that every day is another day we can live for the Lord. Bible prophecy tells us that G od’s people will be sorely tested in the last days and will suffer for His name’s sake. Satan’s latter-day World Religion will be “drunken with the blood of the saints, and with the blood of the martyrs of Jesus . . .” (Rev. 17:5, 6; also see Rev. 19:11-21). Are the Last Days Imminent? Are we today racing toward Armageddon? Are the days of Christians numbered? Over the past few years, as I studied the New Age World Religion and sought to understand fully its aims in fulfillment of Satan’s end-time Plan, I began to draw some frightening conclusions. If this is the revived Babylonian religious system of Revelation 17—and much evidence points to this—then Christians will soon be compelled to endure a harrowing period of unparalleled persecution and strife. My own firm conviction is that the New Age is the last age. I encourage you to make up your own mind, just as I have done, and base your decision on the evidence. Farewell to Jesus: The End o f the Piscean Age The New Age says that mankind is about to enter the Age of Aquarius—the long-awaited era of universal peace, love, and joy. The fading Piscean Age, which brought man such heartache and tragedy, was the Age of Jesus and the Christian Church. Aquarius is to be the Age of Lord Maitreya and the Universal Church. Matthew Fox, the New Age Catholic priest, writes that God was angry when the Israelites set up their golden calf in the wilderness and worshiped a false god only because they were not in accord with the New Age Moses had ushered in:. . . .י To what “gods of the past” is Fox referring? To the gods of the Piscean Age—to Jesus and His Father in heaven. So, in effect, using the most sacrilegious and derogatory of terms, Matthew Fox warns us not to go “whoring” after Jesus! Jesus’ age is past. Marilyn Ferguson has said that the dark, violent Piscean Age can be replaced by a millennium of love and light—a time of the “mind’s true liberation,” but only if New Agers first can find the necessary courage to destroy the few remaining vestiges of the Old Age. “If we have the courage . . . to expose the incomplete ness, the rickety structure,” she remarks, “we can dismantle it.”2 What New Age leaders are telling their disciples is that the Piscean era of Jesus and Biblical Christianity was riddled with error and negativity and has now lost its momentum as the new evolutionary energies generated in support of the new Aquarian Age take hold. Negativity from the Piscean Age, and all that is corrupt in the existing system, gained power at a time when evolutionary energies were not strong enough to challenge that momentum. Endeavors which remain plugged into the dying battery of the old world will increasingly have nothing to draw from.3 The Cleansing o f Mother Earth The Piscean Age is on its last legs, say the Aquarian prophets, but the old world still has vestiges that need to be removed and cleared away—cleansed and purified— before it is possible for the New Age Kingdom to be built in its place. Those of lower consciousness who refuse to bow down to the gods of the New Age must be purged. Moira Timms explains that the Planetary Initiation of humanity and earth by the Masters is not yet possible. “Such attainment,” she warns, “appears hampered by certain emotional energy which has not been spiritualized— possibly in the form of war a n d /o r the complete purging of all back karma.”4 In other words, what Timms calls the “New Order of the Ages” is being delayed until those who oppose its manifestation are disposed of. Thus, Timms and others predict a coming period of bloodshed and suffering, or “purification,” leading to initiation and a new order. “The earth will be purified . . . for that she is being prepared,” proclaims the Association of Sananda and Sanat Kumara.5 One frighteningly lucid statement of the purification and cleansing process was transmitted to David Spangler by a “communication from an angelic source.” Spangler says that the “angelic source” advised that the redemption of the earth is near and that: . . . Earth seeks and is given this redemption in a vast initiatory process occurring throughout the total body and life of the Solar Father. . . . Now a vast work of purification is upon us to cleanse and beautify Earth as one would beautify a bride before her marriage; in this fashion, we greet Earth in her time of joy and accomplishment. This event seeks its expression through your hearts and minds and your dedication.6 The cleansing of earth is necessary, says Barry McWaters, because of the negative, self-centered acts of humanity that have harmed sacred M other Earth. These acts, he laments, are “a cancerous tissue in the body of GAIA (Mother Earth).”7 Similarly, G. I. Gurdjieff writes that humanity has made a number of errors that have seriously impeded the evolutionary process toward higher consciousness.8 Gurdjieff and McWaters would categorize traditional Christian believers as the most important group—the cancerous tissue—impeding the evolutionary process. McWaters very obviously refers to negative Christians when he complains that much of human consciousness is still caught in a “separative, alienated condition.”9 Are Christians Fit fo r the New Age Kingdom? Perhaps the chief “sin” of the Christian believer is his insistence that every human being who believes not in Jesus is in need of salvation. Therefore, McWaters brands the Christian as unfit for the New Age when he says, “We now enter a period wherein the goal of individual salvation is no longer appropriate. Our guidance calls for a collective transformation.”10 From whom has McWaters received his “guidance” that “individual salvation is no longer appropriate”? Evidently, his guidance comes from the same source as the guides that inform Ruth Montgomery and the angelic spirits that have revealed The Plan to David Spangler. This source can only be Satan, who is spreading the lie that individual salvation is out and a belief in unity, in the “One,” is in. According to New Age spokesmen, the Christian’s failure to trust in the One will be fatal; it will mark him as unfit and unprepared for godhood. Moreover, Timms emphasizes that those life forms” who are not attuned to the spirit of the New Age won’t survive. What is needed is to be “of One Mind, to attune to the M aster within, the Christ Consciousness. . . .” Spiritual preparedness is what is needed for ultimate survival. . . . So let us state it very clearly: those who embody the consciousness of the New Age and are performing greater services to humanity will receive divine protection. . . . The good shepherds know their sheep and the light in the spiritual eye in the forehead identifies those on the journey home. The stormy channel from this age of sorrows to the New Age cannot be navigated by life-forms of unrefined vibration. This is the Law.11 “Life-forms of unrefined vibration” to whom Timms refers are quite likely the very same group of people whom the Maharis Mahesh Yogi, the grand guru of Transcendental Meditation, says are targeted for extinction. In a chilling remark that reminds us of Darwin’s brutal evolutionary theory of the survival of the fittest, and echoing Timms’s commments about “the Law,” the Maharishi stated: There has not been and there will not be a place for the unfit. The fit will lead, and if the unfit are not coming along there is no place for them. . . . In the Age of Enlightenment there is no place for ignorant people. Nature will not allow ignorance to prevail. It just can’t. Nonexistence of the unfit has been the law of nature.12 Apparently, Christians, “life-forms of unrefined vibration,” do not deserve to even exist! The Maharishi’s threat that the unfit must pass into “nonexistence” and Timms’s statement that it may take “war and purging” to cleanse, purify, and ready the earth for the New Age Kingdom are paralleled by the writings and speeches of many other New Age authorities. Ruth M ontgomery’s “guides” have predicted a World War III and a catastrophic shift of the earth’s axis, causing floods and other natural disasters.13 However, M ontgomery’s demon “guides” say that all the chaotic events they predict will be merely “a cleansing process for M other Earth.” 14 Evidently, Biblical Christians won’t survive this cleansing process. Survivors, the guides say, will be attuned to the one world philosophy of the New Age, and the guides predict that following the cleansing and purifying process, “The new race will engage in peaceful pursuits and the uplifting of spirits. Their minds will be open to one world so that they will easily communicate with those in sp irit. . . beyond the grave.”15 Christians Will Pass into Spirit So the man or woman of New Age consciousness will inherit the earth. Christians and other less-enlightened souls will not be able to inherit the cleansed earth because of negative attitudes. Those who survive the shift will be a different type of people from those in physical form today, freed from strife and hatred, longing to be of service to the whole of mankind. . . . The souls who helped to bring on the chaos of the present century will have passed into spirit to rethink their attitudes . . .16 Will the cleansing process really doom people to death so they can “rethink their attitudes”? Interviewed by Magical Blend magazine in 1986, Montgomery clarified this key point: Millions will survive and millions won’t. Those that won’t will go into the spirit state, because there truly is no death.17 “There truly is no death”? The Bible assures us that there is, in fact, a death that eventually awaits those who reject G od’s plan of salvation: “The wages of sin is death” (Romans 6:23). What Montgomery means is that after millions of persons unfit to live in the New Age die physically, they will go on in spirit where they can be reeducated and rehabilitated. Simply stated, after they die physically and pass into spirit, they’ll be given a chance to change their attitude. Then and only then will they become eligible to return. Where will Christians and other unfit persons of lower consciousness go to rethink their attitudes? David Spangler suggests that individuals who do not wish to “reach out for the rock of the new world” will be sent to places called “the inner worlds.” In these inner worlds, “they can be contained and ministered to until such time as they can be released safely into physical embodiment again.”18 The horror of what Montgomery, Spangler, and others are proposing comes fully to light when we read another of Spangler’s suggestions. He cynically notes that the many people who are to be physically terminated and sent in spirit to an “inner world” remind him of the fate that the God of the Bible has assigned to the Devil: There is a suggestion of this in the Bible when it speaks of Satan and his minions . . . being bound for a thousand years and then being released again. Thus these ones could be withdrawn into an inner realm that would be their home while the consciousness attuned to the New Age was active in building the new world physically and psychically.19 In an astonishing reversal of roles, Spangler blasphemously assigns these future Christian martyrs to the same fate that the Bible assigns Satan, his demons, and his unsaved human followers. The Christian and others deemed unfit for the New Age are to be bound in the pit—the “inner realm— for a thousand years while above, Satan and his followers desecrate the earth by building their corrupt kingdom. Is the Christian the Antichrist? Spangler’s proposing that Christians be banished to the hell reserved by God for Satan and his minions is typical of efforts by other New Agers to twist the Scriptures. It gives Satan great pleasure to take G od’s Word and attempt to turn it inside out. To attack the Christian believer by mocking the Bible is a common device of New Age leaders. The abuse of Scripture takes on especially dark overtones when New Age leaders even seek to label Christians and others of “lower race consciousness” as the Biblically prophesied Beast or Antichrist. It is also common for the New Age to threaten that the plagues and tribulations prophesied in the Bible will be visited on Christians as retribution for their stubborn failure to adopt New Age attitudes. An example of this is found in the book Prophecies and Predictions: Everyone’s Guide to the Coming Changes, in which author Moira Timms, using the concepts of evolution and Hinduism, solemnly warns that: . . . the plagues of Revelation are special packages of karma visited upon the obstinate that they might awaken to their wrong attitudes . . . animals that don’t adapt become extinct. Remember? Survival today means understanding and responding to change within the context of the internal “revolution.”20 Timms also brings the message heard from so many elitists in the New Age hierarchy that in the New Age Kingdom on earth, those with obstinate attitudes “will graduate on to planes of existence more suited to (their) unfoldment.”21 This is a thinly veiled commitment to wipe off the face of the earth those who worship God and His Son only and who deny the New Age man-god doctrine. Another example of the New Age plan to rid the earth of Christians is found in the attempt of John Randolph Price to define the Antichrist as: Any individual or group who denies the divinity of man . . . i.e., to be in opposition to “Christ in you”—the indwelling Christ or Higher Self of each individual. . . .22 The Bible has a definition for the Antichrist far different than that of the New Age. It’s found in 1 John 4, verses 2. . . . N ot only is the person who does not confess Jesus as Lord of the spirit of Antichrist, but he is also a “deceived (see 2 John 7). Man is no god, though Price and other deceivers in the New Age make seductive claims to the contrary. We are told by James to “humble yourselves in the sight of the Lord, and he shall lift you up” (Jas. 4:10). Peter testified that the saved person should have “a meek and quiet spirit” (1 Pet. 3:4). Price s venomous attitude toward Christians was made crystal-clear in his book, The Planetary Commission, in which he vented his wrath at those who opposed the New Age Movement and its belief in the divinity of man. Price snapped, “There are some groups who continue to cling to the absurd idea that man is a miserable sinner and worm of the dust.”23 Two other New Age leaders who attempt to link Christians with the Antichrist are LaVedi Lafferty and Bud Hollowell, founders of the Collegians International Church. They would have us believe that the plagues mentioned in the Book of Revelation refer to diseases and pollution caused by the spiritually inferior who desire materialism.” (The materialistic person, in the New Age view, does not profess unity of all religions and the sanctity of M other Earth.) They define the Antichrist as all those individuals who possess a lower state of consciousness. W hat’s more, they assert that: The Battle of Armageddon is not a war fought with weapons, it is a battle of consciousness—Christ (cosmic) consciousness against the Antichrist (Earth/material) illusions.24 According to Lafferty and Hollowell, the conflict between the New Age throng of believers and their lower consciousness opposition will be victoriously waged and won by the New Age. The result will be a “Yogic Kingdom of Heaven on earth.”25 Woe to those who oppose the New Agers: “. . . if earth is unsuitable for them, they will go on to other worlds. The Yogic Kingdom will be coming to pass for this planet.”26 So those unfit for the “Yogic Kingdom” will go on to “other worlds.” Alice Bailey’s demon master, Djwhal Khul, is quoted as saying that two-thirds of humanity will advance into the New Age Kingdom. The other one-third “will be held over for later unfoldment.”27 This one-rhird of humanity obviously includes Bible-believing Christians, as well as Jews who refuse to deny a personal Jehovah. They are ‘‘unsuitable.” What the New Age Bible Commentary Has to Say Perhaps the worst example of Scripture twisting is a series of publications by the New Age Bible and Philosophy Center in Santa Monica, California. This group has published six volumes of commentaries purporting to interpret the Scriptures for the New Age. These books, titled N ew Age Bible Interpretation,28 constitute an all-out assault on the Bible, mangling every passage to conform to the lies of Satan. In these perverse New Age Bible commentaries, the reader is led to believe that Satan is one of God’s messenger angels and that all the “root races” except the New Age super-race comprise “the Antichrist.” Heaven is defined as the “realm of the gods” (plural). The “dragon” is said to be men whose minds function on lower planes of consciousness. The Beast of Revelation is not a single being or church, but people who embody all the evil of past incarnations and life cycles. The Beast’s number, 666, is the number of inferior-consciousness man. The mark of the Beast is placed on the forehead and right hands of the masses who are “negative” in their thinking. Mystery Babylon is said to be the regeneration of man’s soul as he enters the joyous and spiritually advanced New Age. The Apostle John is described as an “initiate” into the Mysteries who recognized the fruits of practicing “white magic.”29 These Devil-inspired Bible commentaries are widely read and studied by those active in the fast-growing New Age World Religion. But the doctrines they express are not new. They are based on the occult and Mystery writings of the Masons, Rosicrucians, Gnostics, and other anti-Christian sects and groups. First copyrighted in 1935, these hardcover publications have been revised several times since, most recently i n 1 9 8 4 ־. Proclaiming her works to be “an exposition of the inner significance of the Holy Scriptures in the light of the Ancient Wisdom,” the writer, Corinne Heline, states in the Preface: The reception given these interpretations has been of such encouragement as to make this work a most joyous labor of love. They are unmistakably meeting a deep spiritual hunger of countless souls. It is this need that has called them into being. . . . So it is the hope and prayer of this writer that these interpretations will prove helpful in meeting the present pressing need to restore the Bible to its rightful place. . . .30 Corinne and Theodore Heline are also authors of many other New Age books, including those with such revealing titles as America’s Destiny, Mystery o f the Christos, Mythology and the Bible, Occult Anatomy and the Bible, and Supreme Initiations o f the Blessed Virgin. But these, sick as they are, pale in comparison to Heline’s Bible commentaries. I’ve culled out several meaningful passages to give readers an idea of their scope and intent. My own comments follow the quote from N ew Age Bible Interpretation. Revelation 6:1-8 (John sees the vision o f the four horsemen o f the Apocalypse after one o f four angelic ״beasts” invites him to “come and see)״: One of the four beasts, which says “come and see” is Aquarius, Lord of Air, summoning the Initiate to look upon the type of new race men who will qualify to meet Christ in the air when he comes again.31 Corinne Heline is saying in the above passage that an entity named “Aquarius, Lord of Air” is the heavenly angel who summons John to view the four horsemen. This Aquarius is no angel, for we don’t have to guess who the real “Aquarius, Lord of Air” is. In Ephesians 2:2 Satan is identified as “the prince of the power of the air.” Moreover, the name Aquarius is not Biblical, but refers to the astrological sign of the New Age: the Age of Aquarius. Also, John is falsely described by Heline as an “Initiate” into the New Age Mysteries. John was an apostle, a prophet, a Christian, but he most certainly was not a Mysteries initiate. Finally, Heline’s reference to “new race men” clearly demon- strates the New Age obsession with racial doctrine and their belief in the evolution of man to god status. Revelation 13:11-18 (the Beast with the number 666): The collective evil of mankind has built a great form of evil, the Antichrist, described in the fifth vision of John as the beast with seven heads and ten horns. This is the concentrated evil of all the great Root Races.32 Here the author of N ew Age Bible Interpretation attempts to get around the wording of Revelation 13:18 which unequivocally states that the Beast is a man and his number is 666. Portraying the Beast as a collective group which embodies the “concentrated evil of all the great Root Races” is simply a tactic to characterize all those who are considered spiritual inferiors (i.e., Christians, Jews, and other New Age unbelievers) as the Antichrist. Mind was a gift of the gods to man and was to be used as a rainbow bridge whereby he might pass from earth and heaven.33 This error by Heline reflects the common Hindu and New Age philosophy that “the gods,” plural, gave man the “gift” of mind. It also refers to the evolution of man’s mind as the key to his becoming a god and entering the New Age Kingdom. The rainbow is a popular New Age symbol which signifies initiation into godhood. Revelation 15:3-8 (the seven angels with seven plagues and the seven golden vials full o f the wrath o f God): Taurus, Lord of Earth and one of the recording Angels, metes out to man just retribution for deeds done while upon earth. The seven last plagues . . . refer . . . to the suffering that comes upon man as the result of following material law. . . . He has made his birthright disease, sorrow, poverty and death instead of health, happiness, plenty and immortality. These latter will be the heritage of the New Age race.34 Heline’s comments here are bone-chilling, because “Taurus” is the astrological Taurus the Bull. Nimrod, the King of Babylon was idolized as a bull. The massive Gate of Ishtar, through which visitors entered the City of Babylon, was decorated with murals of bulls and dragons. The Babylonians were also the inventors of the psuedo-science of astrology and its zodiac signs, such as Taurus and Aquarius. When Heline refers to “material law” and to the “race,” she is alluding to the New Age doctrine that the superior race of New Age man-gods will be rewarded, while men of the lower consciousness race (material consciousness) will undergo punishment and retribution in the coming Tribulation period. Revelation 16:12-14 (the great River Euphrates was dried up that the kings o f the East might come across. Three unclean demon spirits, like frogs, beckon the kings o f the world, gathering them to the Battle o f Armageddon): As man learns to “lift” himself into a gradually ascending state of consciousness . . . the dragon and the beast will cease to exist. All evil is transitory; it is man’s creation and he himself must dissolve and transmute it. A . . . cleansing will take place when the Christ returns . . . mankind may assist in this work and thus prepare the way for the “Kings of the East.”35 Heline tells us that with the dawning of the New Age, an evil Satan who does not really exist at all, will vanish from man’s memory. The Beast—Christians unfit for the New Age__will also cease to exist. It (they) will be wiped off the earth by the New Age “Christ.” Ominously, she states that this cleansing will prepare the way for the kings of the East, which she views as a positive event. The Bible prophesies that these literal kings, travehng toward Armageddon with a vast army of two hundred million, will slay one-third of the earth’s inhabitants. Revelation 21:10-27 (describes the N ew Jerusalem descending out o f heaven and describes its inhabitants as those whose names are written in the Lamb’s Book o f Life): The seventh vision of John pictures the pioneers of the New Age whose names are written in the Lamb’s Book of Life.36 Those names written in the Lamb’s Book of Life are not, as Heline states, the names of “New Age pioneers,” but those who believe on the Lord Jesus, repent of their sins, and are saved by His blood. Revelation 22:1-5 (out o f the throne o f God and o f the Lamb proceeded a pure river o f the water o f life and also the tree o f life, and the Lord God shall give the light): Through the powers of the Christ . . . all nations will be welded into one vast fellowship. . . . The brand upon the head of Cain was separativeness. . . .37 These comments reflect the New Age Plan to unite all the world’s religions and governments into one. Christians, because they are separative and against religious unity, are symbolically compared with Cain, a murderer. Special Code Language o f the Mind Destroyers As we’ve seen, the New Age has made an art of twisting Scripture. Its leaders have its own unique meanings for such terms as purification and cleansing and for such phrases as washing away karmic debts and pass into spirit. Satan, the real master of the New Age, delights in mysterious code words and phrases because they allow his agents, when questioned, to escape public censure by hiding behind a verbal mirage. History has given us many examples of this. Hitler had his “final solution to the Jewish problem.” Modern-day killers use such intentionally confusing terms as “neutralize,” “waste,” and “terminate with extreme prejudice” to indicate a person is to be murdered. I believe that the New Age is shrewd to the point of being diabolical in using dark code words to mask its true intentions. I am reminded of the outrage after the Nazis were defeated and the atrocities of the concentration camps became public knowledge. The meaning of terms that Hitler had expressed in his book Mein K am pf was suddenly understood. In April 1945, as British troops liberated Begen-Belsen Concentration Camp in Germany, they were awe-struck at what they saw. The foul stench of rotting and burned corpses filled the air, and dead bodies were stacked like cordwood. Emaciated, soreinfested inmates looked up at them with hollow cheeks. A British news correspondent accompanying the liberators was moved to report: “It is my duty to describe something that is beyond the imagination of mankind.” Satan’s Hollow Victory Jesus told His disciples that they could expect to be called devils: “The disciple is not above his master, nor the servant above his lord. . . . If they have called the master of the house Beelzebub, how much more shall they call them of his household?” (Matt. 10:24, 25). Though we as Christians may be reviled by the New Age, our response must be love and forgiveness. We should, of course, hate the dark spirit of Satan that is causing some in the New Age to label Christians as the Beast and the Antichrist. And we must persevere in contending for the faith. As we’ll see in the following chapter, Satan has the power to temporarily cause suffering and hardship for Christian believers. The Plan tells us he’ll use that power to wrest control. But his victory will prove hollow and fleeting, for just beyond the veil of time, millions of angels are ready to shout and proclaim the coming of the Lord. TWELVE New Age Z eal. . . New Age Aggression . . . they behaved, they acted as gods. We victim s could not look into the fa ce s o f gods, the fa ce s o f the killers. I could only rem em ber the eyes o f the victim s. (Elie Wiesel, Noble Peace Prize recipient, N azi concentration cam p survivor) The Sham balla force is destru ctive an d ejective . . . in spiring new u nderstan ding o f The Plan. . . . It is this force . . . which w ill bring about th at trem endous crisis, the in itiation o f the race into the m ysteries o f the ages. (Alice Bailey, address at the Arcane School Conference, Geneva, Switzerland) an’s evolution to god status and the realization of Cosmic Consciousness are the primary goals of the New Age believer. The New Agers are fanatical in their dream of t the leap to evolutionary consciousness. They strive for a One World Religion and for a cultural revolution, desperate in their mistaken notion that unless mankind achieves this evolutionary leap, the world is doomed to suffer hunger, war, ecological disasters, and unequaled calamity. Higher consciousness, they contend, is the only path to salvation. They believe that only its attainment transforms man into gods who desire unity, world peace, brotherhood, and sharing of resources. Only when men are gods will they protect M other Earth and recognize her sacred nature. The New Age believer is convinced that Christians, Jews, and others who believe in a personal God cannot inherit the coming millennia of peace and prosperity. By refusing to accept M their own divinity, Christians and Jews are destined to remain at a lower level of consciousness. An inferior species, they are a threat to the universal blessings of peace, happiness, and love that will arrive once the New Age dawns. Once New Agers ascend to world power, they will undoubtedly consent to the plans of the Antichrist to rid the world of the inferior “rabble” that prevents universal Cosmic Consciousness. Inspired by this supernatural Antichrist and armed with hightech tools of terror, the New Age “Gestapo” would undoubtedly be unleased to purge the world of Christians and other “sinners” who threaten peace and security and prevent human harmony. This was the same excuse the Roman Emperor Nero gave for persecuting early Christians, Mao offered for his murdering of millions of Chinese “capitalists,” and Hitler gave for his “cleansing” of Germany by “solving the Jewish problem.” I have had occasion to discuss theological and world issues with fanatical New Age believers. On the surface, many are calm, even loving. But I have seen their mood become vicious and angry when the names of fundamentalist Christian leaders arose. Billy Graham, Jimmy Swaggart, Hal Lindsey, Jerry Falwell, and other evangelical ministers and laymen are scoffed at. Christians who profess that Jesus is the Way are termed “ignorant.” To hard-core New Agers, anyone who believes the Holy Bible inerrant is viewed as a mortal enemy. An exclusive belief in Jesus Christ as Lord and Savior is, by New Age standards, a mark of spiritual immaturity. You C ould Be a G od I f O n ly T h o se H o rrib le C h r is tia n s . . . New Age leaders tell the average New Age believer that it is only the negativity of devout Christians and Jews that prevents the world from being magically transformed into the New Age Kingdom. The New Age believer is told, “You could be a god in the next instant if only those horrible Christians weren’t around with their poisonous attitudes.” It’s easy to develop a sense of frustration and anger toward someone who’s holding you back from becoming a god! Jack Underhill recently wrote that if all humanity would come together and accept the New Age, there would be nothing people couldn’t do: They can turn off the sun and turn it back on. They can freeze oceans into ice, turn the air into gold, talk as one with no movement or sound. They can fly without wings and love without pain, cure with no more than a thought or a smile. They can make the earth go backwards or bounce up and down, crack it in half or shift it around. . . . There is nothing they cannot do.1 Yes, Underhill stated, you can do all this. But only if everyone on earth will “come together as one.” In sum, you can only become a god and do miraculous, godlike things i f the world moves into the energies to be available in the New Age. Is it possible New Age leaders will realize, before it is too late, that Christians love the New Agers and that we want only good for them? Can they be made to understand that man cannot transform himself into divine status? We must remember that Satan’s demons have been invited into the minds of millions of New Age believers, and at a certain point their mind is no longer their own. The Love/Hate Duality o f the New Age Those in the New Age often seem to possess dual personalities—almost a love/hate complex. For some, their emotions may initially be sympathetic and kind, but from within Satan reproves and disciplines his own. For others, the external mask of love is only a veneer which, when removed, reveals the depth of hatred that lies within. Love/hate is common to believers in the Hindu and Buddhist faiths which undergird the New Age World Religion. In a letter from Brooklyn, New York’s Lisa M oore, published in a recent Yoga Journal, Lisa wrote that her original notion, when beginning her life in Zen Buddhism, was that the practice of the religion brought the “cultivation of a sweet gentle personality.” But, she added, “My experience in Zen practice has been the discovery of my strength, creativity, sexuality. . . . My actual practice, actual experience has been a tremendous upsurge of bottled, stored energy, including deep rage”2 M oore’s “bottled energy” and “deep rage” is an inevitable by-product of devotion to self and to a demonic religion. Her remarks are similar to those of Miriam Starhawk, the high priestess of The Church of Wicca (Witchcraft), who has found a home in New Age circles. Starhawk has told New Agers: “We become whole through knowing our strength and creativity, our aggression, our sexuality, by affirming the self, not by denying it.”3 Another real-life example of the New Age’s seething spirit of agression is found in Kurt Koch’s book Occult ABC, in which the Church of Scientology, a New Age cult, is briefly discussed. Koch tells of a letter received by a person who had been “treated” by a Scientologist in New York and was billed for $350. When the young man refused to pay because the treatment had been unsuccessful, he received a frightening letter from a Reverend S. Andrew Bagley of The Founding Church of Scientology which read in part:.4 The Extrem ist New Age Doctrine Are these isolated examples? Certainly they appear extreme. But the New Age ideology lends itself to extremes, causing a person to first wax sweet, then vengeful when the demons stir up the aggressive traits latent in every man who does not have Christ within. The extreme nature of New Age doctrine promotes aggression, hatred, violence, chaos. The demon spirit who used David Spangler as his medium saw no room for compromise with those who oppose the New Age World Order: You cannot heal a corpse, nor do we have any wish for you to do so. The old must pass away. . . . It . . . must now make way for a new, more expanded and more fruitful manifestion.5 Alice Bailey, in an address at the Arcane School Conference in Geneva, Switzerland, over a decade ago.6 Bailey’s comment that this destructive force would precipitate a crisis and lead to the initiation of the race into the “mysteries of the ages” is foreboding. All who refuse the Luciferic Initiation into the New Age will be adjudged to be unfit for the New Age. This will ensure a crisis period as the earth is cleansed and purified. This cleansing could be reminiscent of the fate that befell those in Babylon who refused to partake of the Mysteries or, worse yet, revealed the Mysteries after initiation. The M other Goddess of Babylon was a deity both of love and revenge. As Hislop’s research demonstrated:.7 The New Age World Religion has its roots in the Babylonian Mystery Religion m which, through initiation, the worthy individua could join a race of man-gods. This is the same doctrine t e New Age is promoting today, a doctrine it wishes to enthrone as the cornerstone of its world religion. It is a doctrine in keeping with the love/hate duality of the New Age. This same doctrine is found in the Hindu religion many concepts of which have been adopted for the New Age' Referring to the Hindu doctrine of karma and reincarnation,' New Age leaders say that if the coming period of world crisis and purification results in suffering and death for unbelievers, so be it—their karma is being worked out. In other words, Christians, Jews, and other unbelievers deserve exactly what they’re getting. In deed, it is suggested that pain and suffering are unavoidable. They are part of universal law and serve as preparation for eventual godhood. Christians and Jews must pay back the karmic debt they have incurred because of unbelief in world religious unity. Only then will they be fit for reincarnation into the New Age KingIn the Bhagavad Gita, we find all the justification the Antichrist would need to order Christian and other spiritual rebels * In heathen Hindu scriptures so revered by the New Age, the devout are taught that both life and death are illusions maya), that the M other Goddess’s karmic wheel catches all men up into a revolving-door cycle of reincarnations. The New Age believer rejects the Christian doctrine of judgment as negative-thinking,” maintaining that man will return again and again in an endless stream of life and death. So, killing a person can be a righteous act to help the victim work out his karma. He can thus be reborn in a later reincarnation as a happier individual. Will the Murder o f Christians Be an Act o f Love? The Antichrist will convince the world they are doing the Christian—that pitiful unspiritual, unenlightened member of a racially inferior s p e c .e s-a favor by sending him on to another dimen sion or to the next incarnation where he will be more happy. The wholesale massacre of Christians may well be justified as a humanitarian and creative act of love. LaVedi Lafferty and Bud Hollowell tell their followers, “death is not something to fear, but only a new beginning.”8 They further state that during the Piscean Age, now passing, many people accumulated large amounts of karmic debt, the result of which is persecution, suffering, and death, which washes away karmic debt and prepares man for advancement: Suffering, by counter-balancing karma . . . can serve greater purposes than are apparent. We should never, from our human viewpoint, assume that any situation or circumstance is BAD, just because we do not understand why it must be experienced.9 Rivaling these words of New Age “wisdom” are the teachings of Sue Sikking, a California-based New Age minister. In Seed for a N ew Age she explains: So many signs for the times are called evil but they are man learning the lesson of his God-Self. This is the preparation for the advancement of mankind.10 This is the same horrendous idea that Christian Scientists have swallowed. Mary Baker Eddy, its founder, said: “N o final judgment awaits mortals. Man is incapable of sin, sickness, death.”11 The confused New Ager has come to believe the Satanic lie that suffering is by choice o f the victim, that the unyielding law of karma demands suffering. James Sire, a Christian editor, explains: Karma is the Eastern version of what you sow you reap. But karma implies strict necessity. If you have “sinned,” there is no God to cancel the debt and forgive. The sin must be worked out and will be worked out. . . . Karma demands that every soul suffer for its past “sins,” so there is no value in alleviating suffering.12 NEW AGE ZEAL . . . NEW AGE AGGRESSION □ » 159 As Sire points out, to the believer in karma and reincarnation, all suffering is “illusion” anyway. The only reality is ultimate reality, Brahaman (oneness), which is beyond good and evil. In the New Age scheme of things, self is king, and since self is king, lord, god, and judge, why worry about ethics? If the self is satisfied, then all is right and nothing is wrong. This error in thinking permits and self-justifies the grossest cruelty. Alexander Pope expressed the bizarre nature of this type of thinking when he poetically wrote: All nature is but art, unknown to thee; All chance, direction which thou canst not see; All discord, harmony not understood; All partial evil, universal good; And, spite of pride, in erring reason’s spite, One truth is clear, Whatever is, is right.13 Man is the only judge. Even if murder, rape, and other crimes could be measured on some type of moral scale and found to be “bad” or “evil,” these events are necessary if karma is to be worked out: It’s all just part of the theater of life: Who is at fault? Who is the criminal? Who really dies? Nobody! It has all been produced and staged in the physical theater for the growth of our souls.14 In some kind of “Twilight Zone” way of reasoning, the New Age is suggesting that we are all actors in a never-ending stage production. David Spangler calls life the “Cosmic Drama.” Thus suffering and death are of little consequence. It’s all just part of a Cosmic Drama. This truly monstrous doctrine was expressed by Shirley Maclaine in her best-selling books about reincarnation and the channeling of spirits. Her television miniseries, O ut on a Limb, includes several examples of the dangers of this un-Biblical doctrine. In one segment of the miniseries, while driving over the mountains in Peru during a visit to an ancient Inca religious site, Shirley Maclaine and friend David see the wreckage of buses that had careened off the treacherous, narrow road and had crashed to the rocks far below, killing all passengers. Emotionless, David tells Shirley that there was a good reason why every one of those people were on those buses. “There’s no real death anyway, so there are no victims.” In Toward a N ew Brain, authors Stuart Litvak and A. Wayne Senzee discuss the New Age confusion of love and hate, good and evil. They explain that its advocates sincerely believe that: . . . for humankind the material world is only a severe workshop essential to the forging and refining of the spirit. Therefore, they suggest that even “good” and “evil” are relative. Good is whatever accelerates evolutionary consciousness, evil whatever decelerates it.15 The Rapture and Persecution by Antichrist If the material world is only a “severe workshop essential to the forging and refining of the spirit,” and good and evil are relative, then the New Age need feel no guilt in removing the major impediment to the achievement of world evolutionary consciousness: Bible-believing Christians. We are the only obstacle to the total control and domination of humanity by Satan. Still, the Devil cannot touch a hair on our heads unless God allows it. Many, many Christian writers, pastors, and theologians believe that just before the Great Tribulation, as Satan’s Antichrist is preparing to attack Christians with an unparalleled wave of persecution and terror, all Christians will be lifted up—raptured— by Jesus. The Bible says Jesus will descend from the clouds with a shout. In the twinkling of an eye, the living who are in Christ Jesus will rise, meeting the dead in Christ in the air (see 1 Cor. 15:50-52; 1 Thes. 4:13-18; M att. 24:37-41). It is evident that the Satanic impulse surging through New Age believers and the transmissions being received from the Masters and the spirit guides (demons) are preparing the carnal world for the momentous staggering events to come. These events include the disappearance of Christians, the mass kidnapping and elimination of those who turn to God after the Rapture takes place, and the coming persecution of all who will not bow down and worship the Antichrist, who refuse his mark and who refuse initiation into the mysteries of the New Age World Religion. The Plan: Ascension o f the New Age Root Race What New Age evangelists are teaching their converts is that their “God” (the demon hierarchy) has a Plan. This Plan will result in the ascension to power of the superior root race composed of New Agers with higher, Cosmic (Christ- or God-) Consciousness. Men will at that point become gods, and the Antichrist, the Great Teacher, will inaugurate his wondrous reign of planetary unity, peace, and love. This poisonous racial doctrine was the very same occult theology that captivated Hitler. The Fiihrer supposed that he was to be the New Age Christ and that his Reich would last for a thousand years. The Aryan race, the highest expresson of man’s evolutionary progress, would, Hitler believed, inaugurate the world into its new higher state of consciousness. Compare Hitler’s sick reasoning and his Aryan supremacy theory with that of the current New Age, as explained in explicit detail in the N ew Age Bible Interpretation: Not every pupil makes equal use of his ability nor does he take full advantage of his opportunities. . . . Consequently, there develops marked differences in progress. . . . The Anthropoids are failures of the human race. They failed to develop mind and are, therefore, man-like in form only. They are animal-like in consciousness, standing behind even the most advanced members of their kingdom. . . . Man will be emancipated from Race Spirit direction when he has evolved the divine powers within himself to the point where he becomes master of his own course. Seven Root Races succeed one another in the racial evolution on a planet during a world Period. . . . Aryan (is) the term applied to the Fifth root race.16 The New Age is teaching a doctrine of seven root races. The Aryan— Hitler’s chosen race—was the fifth. The highest race order that may currently be attained by human beings on earth appears to be the sixth; but the New Age “Christ,” the Lord Maitreya, is said to be a member of the exalted seventh root race. He is a spiritized being full of light who can manifest in the flesh at will. All New Agers strive to achieve this same exalted status: Seven is the number of perfection and completion. . . . Civilization is now at the sixth state of evolution, the polarization point between matter and spirit, light and darkness. The seventh stage of evolution will burgeon when the necessary period of purification has passed. . . .17 New Age doctrine teaches that as soon as enough men on earth awaken to the god within—to their Higher, Divine Self— and after the inferior root race has been eradicated from the earth, the superior root race will vault into a fourth dimension. This new dimension—the New Age Kingdom—is alleged to be the New Jerusalem: The New Jerusalem, the new heaven and new Earth, are invisibly present. They await us as the New Reality, a world in which we are about to be reborn when we have created our new bodies of light.18 The lower consciousness root race, including the obstinate Christian believers, is to be banished to another world, also described as another dimension and as the inner realm. Bluntly stated, Christians will die physically and pass into spirit as the two worlds move apart and become separate. David Spangler’s demon spirit mockingly lifted phrases from the Bible and pretended to be God when he explained it this way: My power has been liberated and all now move swiftly toward their appointed destinies as their consciousnesses have chosen. Your world shall become—and swiftly it shall become—two worlds. You will call one light and one dark. . . . Their world (of darkness) is under the law and shall disappear. Increasingly, the worlds will move apart in consciousness until they are absolutely separate and perceive each other no more. For it is written that two are at work in the vineyards; one shall be taken and the other remain. I shall snatch you up to me. This I have promised and this I am doing. . . .19 Satan’s demons are passing the word: The Plan calls for Christians and others of lower race consciousness to vanish so the New Age Kingdom can be revealed. The sudden disappearance of millions of Christians will be seen as a confirmation of New Age doctrine. Global Cosmic Consciousness will have been realized. The Antichrist will declare an international holiday. Man will finally have achieved his ultimate potential. Collectively, he is God. The Aftermath: No Room fo r Pity and Remorse However, some will miss their brother, sister, husband, wife, or other loved ones. In their grief, they will turn to the ministers of the New Age gospel for answers, and they will get soothing reassurances: “All is well. The Plan is being worked. N o ultimate harm has befallen your lost loved ones. Live for today, as gods.” The doubters will also be reminded of the prophetic words of Spangler’s demon guide, “Limitless Love and Truth”: In revealing a New Age . . . I can be a sword that divides and separates. You must be prepared to accept this and not resist it if such separation occurs.20 Resistance will be a sign that the individual has regressed to a lower Race Mind. Those who continue to resist, as well as those who turn to Jesus Christ for salvation, will be dealt with harshly by the Antichrist and his police state. As the purges are carried out, the masses will be told it is the destiny of those being arrested to be dispatched in spirit to another world for their own good. Reference will be made to the laws of karma and reincarnation, which instruct the initiate that man’s spirit is in bondage until he learns sufficient wisdom to become a man-god. Passage from this world into the next is therefore an event to be welcomed. One can almost imagine the voice of the Antichrist speaking to the people of earth via satellite on television and radio. In a mesmerizing, hypnotic voice, he tells his listeners that they can sing praises that their departing loved ones will now learn the meaning of peace and unity in the invisible realm they are entering. As his audience sinks into a relaxed trance-state, the Anti- christ will reassure them that any suffering that is being experienced is for the glorification of man, that it has been foreordained that suffering and separation would occur. They must not be fearful and anxious over the loss of the old world, nor pity those who have been and are being targeted for purification and removal. Instead, his listeners throughout the world are to be One, to attune to the divine concepts of peace, love, and truth. They must see all that is occurring as natural and perfect, as a triumph of Light. Incredibly, this greatest of man’s speeches has already been prepared and rehearsed in advance. Listen to what “Limitless Love and Truth” has already told the New Age world as recorded in David Spangler’s New Age classic, Revelation: The Birth o f a N ew Age: Release them to me, no matter where their destiny leads them . . . all responses must flow from the higher level of Love, Light, of Truth, of Joy, and of Wisdom. Whether the old is what you see on your television, whether it is within your family or within the suffering of mankind, you must see it impartially. You must see it in its perfect state. You must not allow your personality to interfere in fear, in anxiety, in pity. You must allow yourself to relax and see it in its new and perfect state. . . . Let your awareness flow out . . . and realize that by building the new you are giving power to those thoughtforms of Peace, of Love, and of Truth which must ultimately triumph upon the earth.21 The Christian POW’S W hat will happen to Christians? W hat is to be the fate of those the New Age has already branded as the Beast, the Antichrist, the evil root race that needs to suffer plagues and suffering if its karma is to be worked out? “Limitless Love and Truth,” that smooth and seductive demon of the New Age, says there is a place prepared for us. The Plan provides for Christians, Jews, and other “heretics” to be contained in this other world and become helpless prisoners of war (POW’s). David Spangler says the fate of New Age unbelievers might tempt one “to speak in terms of a day of judgment, a time of separating the chaff from the wheat,”22 were it not for other statements of “Limitless Love and Truth.” But, Spangler comments, the unbelievers will not be destroyed after their earthly demise, but just put away where they will do no further harm. And there, under watchful eyes, they’ll stay. Cynically, this Satanic demon announces: I am in both (worlds). . . . Shall I forsake those who even now drift apart into a destiny of their own? I am their shepherd as well. I am with you and I am with them. . . . None are saved. None are lost.23 Those whose loved ones have vanished will believe that their loved ones are being shepherded by the spirit hierarchy somewhere in another dimension. They will be unaware that the dead in Christ will be with the Lord in paradise! Though to Satan we are counted as sheep to slaughter, God is our Protector and our Redeemer. In believing the Great Lie of the serpent, the New Age masses will also neglect to heed the prophecy of Timothy who some nineteen hundred years ago predicted that in the latter times men would be deceived by devils: Now the Spirit speaketh expressly, that in the latter times some shall depart from the faith, giving heed to seducing spirits, and doctrines of devils. (1 Tim. 4:1) T H I R T E E N A New Culture, A New Barbarism A n d he shall speak g reat w ords again st the M ost High, a n d shall w ear out the sa in ts o f the M ost High, and think to change tim es a n d laws: an d they sh all be given into his hand. . . . (Dan. 7:25) . . . A nd th at no m an m ight buy or sell, save he th at had the m ark, or the nam e o f the beast, or the num ber o f his nam e. (Rev. 13:17) I see the beginnings o f a new barbarism . . . which tom orrow w ill be called a “new culture.” . . . N a zism w a s a p rim itive, bru tal an d absu rd expression o f it. But it w as a f ir s t d ra ft o f the so-called scientific or prescien tific m o ra lity th at is being prepared f o r us in the ra d ia n t future. (Erwin Chargaff, Nobel Prize winner, in Future Life) n my book Rush to Armageddon, I envisioned a future world in which mankind was a pawn in the hands of a Satanic Antichrist. I also described the dangers of the man-centered philosophy embodied by the New Age, warning that this end-time religious system threatens humanity with catastrophe. I also noted that “the new barbarism comes cloaked with respectability, cleverly disguised as the only rational religion for twenty-first-century man.” It comes not as an evil religion but as a glowing entity of love, peace, and world harmony. Regardless of its positive world image, the New Age Plan for a One World Religion and a one world political order is exposed by the Bible as nothing less than a scheme for a totalitarian system calculated to enslave every man, woman, and child on earth. In this chapter we’ll take a close-up view of the grand society planned for all of us in the fast-approaching New Age. The gurus and Masters of the New Age are promising an era of world peace and religious unity, of brotherhood and universal joy. What we are presented with is nothing less than The Plan for a heaven on earth. And best of all, the New Age offers every human being on earth the opportunity to be a god on this heavenly planet. Billions of earth’s inhabitants will fall for these glowing promises of a Utopia populated with human gods. But they will discover they’ve been deceived by the greatest liar the universe has ever known. The New Age heaven will have become a hell, and G od’s fearful judgment will fall upon it and its inhabitants. Exactly what does Satan have in store for humanity in this Utopia to come? More specifically, how will he organize this wondrous New Age society? Just how will he create his own perverse, ecumenical religion? What means will Satan use to spread his gospel? The Origins o f the New World Order One of the most remarkable New Age documents I have come across outlining the New Age Plan for a one world political and religious order is the book, When H um anity Comes o f Age, by Vera Alder. First published in Great Britain by The Aquarian Press, this book is used as a handbook by many New Agers intent on fostering a One World Government. It has been reprinted repeatedly in the United States, being most recently published and distributed by Samuel Weiser, Inc., a New York publisher specializing in New Age and occult publications. Samuel Weiser displays on this book as a company logo the Egyptian ankh, a perverted cross which has at its uppermost focal point the Satanic circle. Also on the cover of this book is an evillooking serpent coiled around a white dove and a drawing of the Egyptian Sphinx. When Hum anity Comes o f Age provides an incredible blueprint for the New World Order, described as the “Divine Plan” or “Ideal World Plan.” This Divine Plan is derived from the lesson humanity has learned “through a long series of incarnations upon earth.”1 These lessons, Alder explains, reveal that man has been going through an evolutionary process that will ultimately cultimate in a World Order, or government. According to Alder, this World Order can only be made possible if man uses the knowledge that has been made available to him over the millennia. “Is there,” Alder asks rhetorically, “a heritage of wisdom which we can seize and claim upon whose foundations we can move forward with a clear purpose and a strengthened will, to bring a new Civilization and a Golden Age into being?” Her answer is, Yes, there is such a wisdom, residing in the Temple Mystery Schools and secret fraternities that have coexisted uneasily with the major religions since the early days of man. “The origin of all such (Mystery) knowledge all over the world is buried in the mists of time and usually stated to have been given to mankind by ‘the Gods.’ ”2 Alder goes on to explain that in the “old civilizations”— evidently a reference to ancient Babylon, Sumeria, Assyria, and Egypt— there was a system of high priests, astrologers, and magicians (or Magi). Rulers were expected to have reached these exalted religious positions only after a long period of initiation into the Mystery Teachings or Ancient Wisdom. Buddha and Jesus also were intitiated into these Mysteries, she claims.3 The early Christian Church is said to have begun to subject those of the “truth faith” who believed in these Mystery Teachings to fierce persecution. Fortunately, Alder writes, the high priesthood was able to survive this persecution: The Mystery Teachings were cherished and kept alive in various ways and under various guises. Freemasons, Rosicrucians, Alchemists, Kabbalists, Yogis and many other such were all keeping some aspect of the Teaching alive, in more or less uncorrupt form. These people gave their lives to this precious work because such knowledge was believed to be man’s key to Godhood and to his true destiny.4 The early Christians did in fact recognize the evil that lay in the Mystery Teachings. So did the devout Jews of that era. The Old Testament is replete with warnings against these anti-God practices, which included necromancy (communication with familiar spirits), witchcraft, sexual perversions, astrology, psychic forecasting, divination, the worship of idols, and the upholding of men as deities. Yet the Jews persisted, and their ungodly practices so angered the Lord that He brought them into captivity in Babylon and later, in 74 a .d ., allowed the Roman general Titus to totally decimate Jerusalem, destroy the Temple, and disperse the Jews throughout the world. The very Mystery Teachings that Alder says form the basis for the New Age are those which God hates. Alder reveals to us that these Mystery Teachings, kept hidden for centuries by an elite priesthood, are now being released “in a form suitable for the present day” as a result of the work of Theosophy founder H. R Blavatsky, “who was one of the foremost to resurrect the Ancient Mystery Teachings.”5 Alice Bailey, founder of the Lucis Trust and The Arcane School, is owed a special debt, Alder says, because she received instructions from her spirit guide, the Tibetan M aster Djwhal Khul, consisting of specific guidelines amplifying the ancient Mystery Teachings regarding a Plan for humanity. Why has the Tibetan M aster come at this particular juncture in history? As Alder explains it: Humanity is considered (by the Hierarchy) to have moved forward to the point where the theories and ideals of the Mystery Teaching may soon be put into practice in the life of the community as a whole, because a sufficiently large number of people are now so advanced as to make this possible. The ancient writings all claim that a Golden Age is indeed due to follow the death of the present Dark Age. It seems unquestionable that a time has now arrived in history where an attempt to rebuild civilization will—and must be made. . . . Plans and hope for world reconstruction are now universal and permeate all strata of the community.6 Robert Mueller is also a follower of the demon Master Khul. Accordingly, Mueller also advocates a Mystery Religion which embodies “universal” or “cosmic” laws. “M ost of these laws,” he writes, “can be found in the great religions and prophecies, and they are being rediscovered slowly but surely in the world organizations.”7 Mueller encourages a dramatic speed-up of the uniting of all religions. He says we must recognize “the unity of their objectives in the diversity of their cults.” Mueller also remarks: Religions must actively cooperate to bring to unprecedented heights a better understanding of the mysteries of life and of our place in the universe. “My religion, right or wrong,” and “My nation, right or wrong,” must be abandoned forever in the Planetary Age.8 Mueller speaks of a “design,” a “pattern” for the New Age. Reading Alder’s book and other New Age materials, we discover that the details of this Plan are shockingly precise. Satan has unquestionably gone to great lengths to minutely design a master blueprint for the construction of a world system led by the Antichrist. Everything prophesied by the Bible is included— nothing of importance is omitted. Let’s examine the essential details of The Plan for a New World Order. The Four Great Principles The Plan embodies four foundation stones. First, the one world system must be formed upon the premise that is “found at the roots of all the great world religions”: that man is destined “to progress toward a state of Godhood translated into terms of a living human civilization.”9 Second, the framework of the one world designs must inelude unity, the concept that “Both man and his planet are living organisms and that the love of man must include an understanding and love of our planet, as a living being, and of all the kingdoms in nature.”10 Third, the planet earth and man (including all animal and plant life) combined will make up a World Body to be governed by an elite group of twelve wise men. Collectively known as The World M ind, this body will constitute a World Government which will act for the good of all humanity.11 Finally, The Plan will confer to this World Mind of elite rulers sufficient power and authority so it can synthesize or unify all aspects of life, including religion, art, and science. The Dictatorial Authority o f the World Mind We see, then, that The Plan calls for the organic unity of the planet. The World Mind will exercise total control over every aspect of life on earth. It is man’s duty Alder intones, “to perform all the acts of his life in accordance with ‘The Plan.’ ”12 The ruling elite who compose the World Mind will not be ordinary men but statesmen the people can trust, men of spiritual integrity. These superior intellects will be “composed of highly spiritual and dedicated life, drawn from all races and religion. Through the practice of meditation and by reasons of their very nature they could . . . conduct world affairs in step with the natural process of evolution.”13 “The People will gradually be educated to the point where they will unerringly nominate such men to the ranks of government.”14 This indoctrination of the New Age citizen will be a major preoccupation of the totalitarian dictatorship in the coming New Age Shangri-La on earth. Robert Mueller sacrilegiously proposes that New Age educators instruct people regarding the “holistic” teachings of Jesus.15 W hat Mueller has in mind are the un-Biblical New Age teachings that all is God and thus man is God. In this teaching, man is exalted and God is forgotten. As Mueller explains: I have in mind the spiritual values, faith in oneself, the purity of one’s inner self which seems to me is the greatest virtue of all. With this approach, with this philosophy, with this concept alone, will we be able to fashion the kind of society we want. . . .16 New Age man, thoroughly indoctrinated, will unerringly nominate men of spiritual integrity and superior intellect. However, if as Mueller has suggested the New Age will be a “world spiritual democracy,” surely there might exist differences of opinion as to who deserves to be crowned with leadership. How will the citizenry discern among the candidates? What is meant when Alder says that “the people will be educated gradually”? The Education and Indoctrination o f M ankind We get an appalling clue to the answers in the book Gods o f Aquarius by Brad Steiger, a popular New Age writer on psychic and occult phenomena, and in The Armageddon Script by Peter Lemesurier, a New Age pyramidologist and “expert” on prophecy. Each author presents to us a terrifying vision of a Satanic high-tech world in which, as Lemesurier puts it, “All individual human minds and wills could eventually be merged into one vast world-wide megapsyche.”17 Originally the brainchild of Tom Bearden, what is depicted is the brains of all humans directly linked by wearing skullcap radio receivers. Presto—a New Age world of harmony and peace! “At a stroke,” says Lemesurier exuberantly, “most of man’s major problems would be solved”: Since all would have instant, universal feedback, there would no longer be any feeling of “us” and “them.” No longer would human beings regard each other as enemies to be competed against. No longer would nations even need to exist as such. Every human being would become a man-cell of the greater body which is man himself.18 Lemesurier emphasizes that the technology to create such a universal thought system is nearly here and that satellite telecommunications could be the forerunner of the World Mind. While Lemesurier says that such a system would not be compulsory, Bearden talked about enforced use.19 As I discussed in both Rush to Armageddon and a second book, Robotica, the technology needed to link the human mind directly to computers and robots is already a reality The age of the biologically grown microchip (called the biochip or biocomputer) that can be surgically implanted in the human brain is on the immediate horizon, and other startling technological advancements are as little as a decade away.20 A chilling Orwellian 1984 world of monstrous proportions may be the fate of mankind if some future New Age dictator employs the nightmarish tools of oppression that will soon become available. For example, a system could be devised in which persons wearing an electronic belt or apparatus on their foreheads would be subjected to frightening and hideous mental images indistinguishable from reality if their thoughts were unacceptable to the men controlling the thought machine into which they were forcibly linked. As Englishman Jonathan Glover discussed in his thought- provoking W hat Sort o f People Should There Be?,lx totalitarian governments have long desired to rule by fear and torture. But forced physical brutality is usually messy and imprecise. Soon electronic techniques will exist to make people want to behave in the desired way. New mind control and brain-altering drugs currently being researched will provide yet another avenue of control. The “proper education” of New Age man will not present a problem for a future New Age hierarchy desiring absolute compliance with a World Mind. The Perversion Process The Plan does not call for an instant revolution throughout the world, but a gradual process of education and reorganization. Only after full preparations will the “Christ” and the Ancient Masters of Wisdom— the spirit hierarchy—take their place on the world throne of power. The New Age Messiah and his disciples will then slowly extend their octopuslike tentacles to envelop government, education, science, the arts, medicine, law, economics, and religion. Alder explains that “spiritual councils” will be set up in every town, village, and city and in every workplace to monitor the new system. All aspects of life will be examined to inspire conformance with the New Vtarld Religion. The final arbiter for all of man’s activities—governing his every thought—will be the N ew Age Bible, containing the Great Mystery Teachings of the ages, given to the world by the “Christ” who reigns as the New World ruler.22 If these visions of a New Age Kingdom come to fruition, man’s mind and soul will fall under the total dominion of Satan incarnate. Alder assures us that the masses will not find this control over their daily lives objectionable. The Plan she presents calls for a Council of Education and Psychology to indoctrinate the world’s citizens to enthusiastically accept “an ideal conception of their own destiny and development.”23 Properly trained, people will begin to see that the New World Order is merely “the Church in action, the Church taking its true and rightful place as the guide and motivation of all activity.” Thus, Alder remarks that: . . . the right frame of mind would be evoked through . . . meditation. All Christians would believe that they are producing conditions in which Christ could guide and lead them in their efforts.24 Christians and others had better adopt “the right frame of mind,” as Alder phrases it, because the Plan is for the World Government to assume total control over the nations’ economies. Money will supposedly “come to be considered as crystallized power or spiritual energy.” Money as such would revert to its original token value. As . . . individual needs would largely be supplied on the ration-card system, the need for handling of money would dwindle. There would, of course, be a universal currency the world over. There would be a central bank. . . .25 This provision of the New Age Plan is particularly frightening. It would bring to pass the prophecy of Revelation 13:16, 17 regarding the Antichrist’s extensive control over the Rush to Armageddon, I discussed new technological advancements in lasers and computer science that could enable the Antichrist to control each and every financial purchase. A “ration-card” can now be maintained in a central computer’s memory banks and annotated each time a person makes a purchase at a store or shop or by telephone. Tiny computer chips the size of a pencil dot can now be programmed and inserted under the skin of a person s hand or forehead with a hypodermic needle or other device. A laser or infrared beam is then focused momentarily on the spot where the chip is located, revealing on a computer terminal screen whatever information the chip reveals, such as the individual’s Social Security number or other identify- ing information. These are examples of how modern science and technology might be abused by a World Government bent on tyranny.26 M an ’s Behavior and Lifestyle in the New Age The Antichrist and his cohorts will control politics, the economy, and all other aspects of society. Satan will author an unholy New Age Bible, with no restrictions on man’s desire to enjoy a licentious lifestyle. Almost anything evil that man finds pleasure in will be encouraged by the religious teachers ordained to oversee New Age society. Here are some of the characteristics of the ideal lifestyle envisioned for mankind. Families. Alder suggests that monogamy—marriage to one mate—might be deemed “too possessive and separatist.”27 Thus, the traditional family may be broken up and laws passed prohibiting marriage. Crime. Society will be soft on criminality in the radiant New Age: A criminal or an idler will be recognized as a sick individual offering a splendid chance for wise help. Instead of being incarcerated with fellow unfortunates in the awful atmosphere of a prison, the future “criminal” will be in much · demand. The finest types of psychologists or religionists will offer him sanctuary and earnest help. . . .28 Sexual Behavior. The most perverse sexual practices will have legal and cultural sanction. For example, according to Alder, “the idea that an unmarried person of either sex should have to remain childless will seem far-fetched.”29 Social Prohibitions and Fixed Beliefs. Vestiges from the past, when man believed in Christian principles, will have to be eradicated: The sages of the East, such as the famed Zen Buddhists, contradicted everything that their students knew and believed in until there was nothing left. . . . We should search ourselves very carefully to see if we have any fixed ideas, any great shyness or self-consciousness. If we have, we must seek freedom.30 The Penalty for Disobedience. In the New Age culture, every person will be his own judge of what is right and wrong, with this key exception: disobedience to the Antichrist by worshiping the true God will result in severe punishment. Revelation 13:15 tells us that the Beast will decree that “as many as would not worship the image of the beast should be killed.” Robert Mueller set the tone for the future in his book The N ew Genesis when he suggested that once the Kingdom of Man is set up under a World Government and after the One World Religion is established, “God” could go away forever, leaving man to be his own god. M ueller’s book paints a picture of a God who, after the New Age Kingdom is in place, looks down upon the earth and says: Farewell, my grown-up children. At long last you are on the right path, you have brought heaven down to earth. . . . I will now leave you . . . for I have to turn my attention to other troubled and unfinished celestial bodies. I now pronounce you Planet of God.31 A Bright New Future . . . A New Culture This, then is the bright new future being prepared for those here when the New Age Antichrist ascends to the throne of World Government. What we can expect is a tight-fisted theocracy with the technological means to make us “want” to obey. We can also expect a freedomless, sin-stained world in which carnality and bloody criminal behavior explode in a rampage. Erwin Chargaff, the Nobel Prize-winning biologist often called the father of bioengineering, has said that he already sees “the dark beginnings of a new barbarism . . . which tomorrow will be called a ‘new culture.’ ”32 Few Christians can doubt the wisdom of Chargaff’s keen assessment of where man, without God, seems to be headed. F O U R T E E N The Unholy Bible of the New Age World Religion All Scripture is given by in spiration o f God, a n d is profitable f o r doctrine, f o r reproof, f o r correction, f o r instruction in righteousness. (2 Tim. 3:16) We can take all the scriptu res an d all the teachings an d all the tablets an d all the law s, an d all the m arsh m allow s an d have a jolly good bonfire an d ■ m arsh m allow roast, because th at is all they are w orth. (David Spangler, Reflections on the Christ) A ny religion that has as its chief aim the goal of becoming the only World Religion needs a bible, its own sacred scriptures. Its bible must incorporate the major doctrines of the religion, provide guidance to believers for daily living, and include guidelines for organizational structure. Currently the New Age World Religion has a multitude of writings that are acknowledged as bibles, but it leaders recognize the need for a single bible to unify all New Age believers. They are already making plans for this bible and have mapped out the major elements it is to contain. The Formation o f a One World Religion The first and most important order of business for the new World Mind will be the establishment of a One World Religion. A research panel will assist these world rulers in studying “man’s knowledge of the divine Plan of creation throughout the ages.” Again taking Alder’s blueprint as a guide, their study of The Plan will be carried out in this way: The ancient wisdom, as it existed in all old civilizations, will be sifted, pieced together, correlated and synthesized with the finding of modern scientists and the developments in religious fields.1 “The ancient wisdom” refers to the Mystery Teachings, the idolatrous practices and teachings of cultures associated with the Babylonian harlot system (including those of the ancient Egyptians, Greeks, and Romans). These repugnant doctrines and rituals will be blended with the findings of science and new revelations received from demon spirits. M iriam Starhawk well expresses the New Age concept of w hat form and shape the W orld Religion should take when she states: We need to create a religion of heretics who refuse to toe any ideological lines or give their allegience to any doctrines of exclusivity.2 When the New Age preaches against “exclusivity,” they are really talking about Christianity. In the New Age World Religion, worshipers will be allowed to believe anything they wish as long as it isn’t based on what the New Age calls separativeness, the notion held by Christians that Jesus is the way. The Unity o f Church and State The doctrine for the New Age World Religion “will be used as a test against governmental activities,”3 which means that the state will enforce the doctrine throughout society. This becomes more clear when we read that the new Divine Plan or set of doctrines will: . . . be given out to mankind in the form of a Spiritual World Teaching or Religion. It will enable all men gradually to vision the nature of God’s Plan for this earth and the part they will play therein. It will imbue them with a sense of purpose, of responsibility, and of spirtual security and maturity.4 The World Mind, the twelve-person council of world rulers, will impose on the world’s population the “new gospel” that Paul warned the early Church about: a gospel of Satan. Acceptance will not be optional; the government will force people to obey. As The Plan so aptly and politely puts it, “Progressive simplification and unification will . . . have taken place in the religious field.”5 The New Age gospel will soften up the world for the appearance on earth of the fake “Christ” and his disciples, the Masters of Wisdom. The World Government, also known as the World Mind, will give way to the Antichrist and his chosen hierarchy of demon-possessed men: There will thus be the Spiritual Cabinet of twelve whose rightful head would be none other than Christ himself. . . . He whom the Christians know as Christ, the Jews know as Messiah, and the Orient knows as Maitreya may eventually be recognized as one and the same Being. In this way could a “World Religion” develop quite naturally, and in harmony with a World Government.6 Alder’s book even describes in great detail the work of the New Age “Christ” and his twelve-person (mimicking Jesus’ twelve disciples) Spiritual Cabinet, who will see that The Plan is translated into reality on earth. They will not actually administer world government—subordinates will handle the mundane. Instead, the “Christ” and the Masters of Wisdom will supervise new developments in science and psychology, insuring their “spiritual purity.” All of society will be homogenized into one Master Mind as provided for in the Divine Plan. Religion would no longer be an “aspect” of human living but the almost unconscious foundation of every activity. Men would have become aware of the purpose and presence of God in every part of creation and themselves to such an extent that they would be incapable of separating “religion” from science, education, or government. The integration would have become complete.7 The new society that results from this “integration” Alder ecstatically describes as heaven on earth. But any God-fearing Christian who has read the Biblical prophecies can see that this New Age Kingdom is really a hell on earth. This becomes most clear when we discover what is planned for currently existing religions in Satan’s New Age Utopia. Alder informs us that in carrying out the Plan, the New Age “Christ” and his Spiritual Cabinet “will represent a World Religion in which every denomination, creed and type of belief would find its place fully appreciated and without fear or favor.”8 This pledge rings hollow when we find out what doctrines will be acceptable in this New Age system. Under The Plan, every belief is acceptable only as it agrees with the Mystery Teachings. Every iota of religious teaching must conform to the New Age Bible that will be published by the New Age “Christ.” The New Age Bible Is Developed The New Age “Christ” and his spiritual aides are to develop “the new Bible of a World Religion which will be the basis of future education.” People will theoretically be free to practice the particular religion to which they previously gave allegiance. But in practice, the Bible of the New Age World Religion “will become the framework for them all, assisting in their interpretation, stimulating them to move with the times and to cooperation amongst themselves.”9 The Antichrist will initially appear to respect many parts of the Christian and Jewish traditions as well as those of other religions. But eventually he will require all religions to conform to the New Age World Religion, even decreeing that all churches, temples, and synagogues are to become centers of the new One World Religion. Here’s how Lola Davis describes this “conversion process” of world religions: What will happen to present-day religious groups? . . . Religions of today probably will continue to function initially much as they do now. . . . As concepts of the world religion are scientifically validated, learned and spread about, present religions will begin to make changes and evolve into centers for the world religion.10 In the Antichrist-led New Age era, anyone who defies the Mystery Teachings of the mandatory World Religion or who uses a Bible other than the official version will be considered a danger to the state. The New Age has long sought to destroy the Bible of the Jews and the Christians. Alice Bailey has accused the God of the Old Testament as being unworthy of man’s worship. In 1947 she wrote that “all sane, sincere, thinking people should repudiate the Old Testament and its presentation of a God full of hate and jealousy.” She termed the Christian belief in heaven and hell unacceptable doctrines designed to “keep people in line with . . . fear and threat.”11 Universal contempt for the Holy Bible among New Age leaders is convincingly demonstrated by David Spangler who has stated, “We can take all the scriptures, and all the teachings, and all the tablets, and all the laws, and all the marshmallows and have a jolly good bonfire and marshmallow roast, because that is all they are w orth.”12 While the New Age has placed a low value on the Jewish and Christian Scriptures, Satan recognizes that a bible is needed to control the masses. Thus, the development of a New Age Bible is among his top priorities. Robert Mueller, who calls himself a “good Catholic,” has called for the publishing of a worldwide bible which would both implement the divine commandments of the Bible and “show how the United Nations is a modern biblical institution.” Mueller says this should be done for the Christian, “as well as all great religious or sacred books, such as the Koran, the Grant Sahib, etc.”13 What the New Age Bible Will Contain What will be the teachings and doctrines in the New Age Bible? New Age leaders agree on its format and composition. Lola Davis has written that, in addition to the existing Bibles in all religions, there is now new knowledge available that can be included in the New Age Bible: In this century religious data previously unavailable has been found or released. Among these are the Dead Sea scrolls; the vast treasures of religious writings found in the Potola in Tibet; Christian writings deleted from the Bible during the 4th century; writings of Teilhard de Chardin; and previously carefully guarded knowledge of the Ancient Wisdom, including the writings of the Tibetan in the Alice Bailey books; writings of mystics from various religions; the materials offered by the Rosicruicians; and many books on Buddhism and Hindu philosophies and practices. . . . Probably much of this knowledge could be advantageously used in synthesizing the major religions with a World Religion for the New Age.14 The Collegians International Church, a self-styled “Church Universal of the New Age,” suggests many of these same sources for New Age disciples searching for the Mystery Teachings, promising that they will bring instantaneous “Purified Enlightenment”: Humanity today is ready for the (mystery) inner teachings. . . . Your search for these inner teachings is likely to take you to both the historic and esoteric literature of mystery schools. For centuries these teachings have been preserved and the inner knowledge discreetly passed on. Some of the movements which have kept these teachings alive in the West throughout the centuries have been Gnosticism, Freemasonry, Kabbalism and Rosicrucianism. To broaden our perspective we should . . . add the esoteric literature that is behind most of the world religions. This literature includes books like the Bhagavad-Gita, The Tibetan Book o f the Dead, and the writings of (theosophist) Alice Bailey. Put it all together, and combine it with a study of the Kabbala (underlying most Western mysticism), add a touch of soul, bake under pressure for many lifetimes, and PRESTO . . . Purified Enlightenment.15 The New Age Bible will contain countless lies and blasphemies. It will be distributed to the masses, who will be expected to pattern their lives after its dictates. This Satanically inspired bible will include such un-Biblical doctrines as reincarnation and karma, both of which are universally found in the Mystery Teachings. It will also encourage man to believe he is a deity— though spiritually inferior to the New Age “Christ.” A central theme will be the teaching that man can develop great psychic powers that will make him prosperous and keep him healthy. The Penalty fo r Polluting God’s Holy Word Peter advised us that G od’s Word is like a light that shines in a dark place, for Scripture comes direct from God (2 Pet. 1:19-21). But this “new Bible” will spew out only the false doctrines of Antichrist. John, in Revelation 22:18,19, warned men against adding to or subtracting from the Bible: If any man shall add unto these things, God shall add unto him the plagues that are written in this book: and if any man shall take away the words of the book of this prophecy, God shall take away his part out of the book of life. Peter also cautioned: “there shall be false teachers among you, who privily shall bring in damnable heresies, even denying the Lord that bought them, and bring upon themselves swift destruction” (2 Pet. 2:1). What Do the Mystery Teachings Reveal? Since the New Age has pledged to develop a world Bible based on the Mystery Teachings, it is important that we ask, what are these teachings? And second, what—or whom—is their source? Alexander Hislop wrote that in the wicked Babylonian Mystery Religion: All knowledge, sacred and profane, came to be monopolized by the priesthood who dealt it out to those who were initiated in the Mysteries exactly as they saw fit. . . ..16 W hat was true in Babylon is true today in the New Age World Religion. The gurus, the Mystery Teachers, the chosen leaders and psychics to whom demon spirits transmit mystical messages and “Bibles” from beyond— these are priests and priestesses to whom the New Ager must turn for enlightenment. M aster Da Free John is one such high priest. New Age writer Ken Wilber {Up from Eden) has acknowledged Da Free John’s teaching as “unsurpassed by any other spiritual Hero, of any period, of any place, of any time, of any persuasion.”17 Presumably this includes Jesus. Wilber also hails Da Free John’s work The Dawn Horse Testament, as “the most ecstatic, most profound, most complete, most radical, and most comprehensive single spiritual text ever penned.” This presumably includes the Bible. Other New Age authorities agree that Da Free John and his bible are wonderfully profound:18 The teachings of Da Free John, embodied in an extraordinary collection of writings, provide an exquisite manual for transformation. . . . I feel at the most profound depth of my being that his work will be crucial to an evolution toward full humanness. (Barbara Marx Hubbard, The World Future Society) A gift of unparallel importance. It very likely marks the beginning of a new tradition, a new culture, a new vision of what it means to be a human being transformed. (Herbert Long, Th.D., former dean of students, Harvard Divinity School) W ho is M aster Da Free John and what marvelous teachings do we find in his writings? Da Free John was born in 1939 on Long Island, New York. After he graduated from Columbia University, he attended several Christian seminaries but dropped out. He then practiced Yoga under several Yogis, studying the full range of psychic and mystical phenomena. He now lives an eccentric life in the Fiji Islands with a small group of devotees, writing books and making videos that are sold and shown across the United States.19 Da Free John states that the “Way” he describes “can be realized by you if you will understand The Secret and realize The Mystery of You and M e.” What is this Way? Simply the same old New Age line: That you and I are evolving gods who just need to realize our divinity; we and the universe are one; being gods, we can enjoy life to the hilt without worrying about some old Father God in the sky telling us what to do. Of course, like all Mystery Teachings, Da Free John’s works mention such mysterious, elitist-sounding phenomena as “transcendental reality,” “consciousness,” “enlightenment,” “Divine Reality,” and something called “Radiant Bliss.” But these are just icing on the cake. At the core of any and all Mystery religions and cults is the same old chorus: man is a god. As William Kingsland has remarked in his study of Gnosticism: The final goal, the final objective of all the Mysteries, was the full realization by the Initiate of his divine nature in its oneness with the Supreme Being—by whomever name called—who is the Universe in all its phases and in its wholeness and completeness.20 The New Age deceivers would have the masses believe that only the hidden wisdom in the Mysteries provides answers for man’s purpose in life. They wrap their “man is god” teaching inside mystical mumbo jumbo and often make the disciple on the quest for wisdom pay dearly with his money—and his soul— for the “key” that will unlock the Mysteries. Nevertheless, millions are flocking to New Age leaders who have acquired reputations as Mystery Teachers. In 1985 Randall King, ex-husband of Elizabeth Clare Prophet, head of California’s Church Universal and Triumphant, alleged that Prophet and the church used devious tactics to get people’s money. As King explained it: You wanted to get them hooked into the organization’s belief system . . . you wanted to get them decreeing, which was the programming technique. You get a little bit more control over these people by having them repeat these things (hypnotic chants) over and over. They would be so caught up that, well, they would give us all their money, sell their houses, hock their jewelry, sell everything. They would give us a hundred thousand dollars and then wind up on our doorsteps in their sleeping bags and be willing to sleep on the floor, if we would just show them “the way.”21 Prophet, who claims to be “M other of the Universe,” has denied King’s allegations but claims she has “the way.” The Ascended Masters, says Prophet, constantly talk to her, and guide her ministry, and help her perform healing and other miracles. Randall King believes that Prophet, his ex-wife, is in touch with these spirits and that the Mystery Teachings she reveals result from extraworldly transmissions.22 Beware the Great “Mysteries” Hoax! As is historically true of mystical cults, Mystery Teachings hide the true intentions of cult leaders from the uninitiated. Once a person is brought into the fold, it’s often too late to fully exercise free will. This is why in late 1985 the Church of Scientology became enraged when The Los Angeles Times, in an expose, revealed hidden “scriptures” of that New Age church. One Scientology minister angrily remarked, “These scriptures are not even available to members of the church until they have progressed to a higher state of spiritual enlightenment.”23 Ironically, L. Ron Hubbard, the founder of Scientology, once trumpeted his teachings as “the road to total freedom.” Unlike authentic Christianity, which through the Holy Bible reveals to anyone who seeks knowledge the answers to the ultimate mysteries of life, New Agers worry that outsiders might find out the truth behind their facade of lies and deceit. I recommend you beat a hasty retreat when anyone offers to reveal inner secrets or “Mystery Teachings,” for they are of the Antichrist. Be especially wary if someone tells you that initiation into the Mysteries is necessary for spiritual advancement. This is a favorite trick of New Age teachers. A prime example is the false teachings of psychologist M. Scott Peck, best-selling author of The Road Less Traveled. Peck, ostensibly a Christian who claims that the study and practice of Zen Buddhism has strengthened his faith, presents a seminar entitled The Taste for Mystery. Since Peck’s books are favorites with psychologically-oriented Christians, he has been invited to give his seminar at a number of large, more liberal Christian churches. In the leaflet describing the seminar Peck held at Riverbend Baptist Church in Austin, Texas, May 2-3, 1986, the New Age psychologist asserted: “The taste for mystery is a prerequisite which can be developed and which is essential for the further reaches of spiritual growth.” This is a lie that appeals to intellectuals and others on neverending quests for “the truth.” The Bible tells us that in the message of salvation, there is simplicity. In the walk to spiritual maturity, one need only ask for guidance from the Holy Spirit. He will reveal to His own “the way.” Unequivocally, the prerequisite of a “taste for mystery” is a lying concept of the Adversary. The True Mystery o f the Ages New Age teachers are fond of misquoting the Holy Bible, twisting its passages to mean whatever is pleasing to Satan. But there is as least one part of the New Testament that the New Age continually shys away from: the first two chapters of Paul’s Epistle to the Colossians. The reason why they avoid these chapters like the plague is simple: Colossians says that Jesus Christ is the Son of God; He is “the image of the invisible God, the firstborn of every creature.” W hat’s more, in Colossians Paul told us in uplifting words that Jesus was the Creator of the heavens and the earth and of every dimension: “all things were created by him, and for him.” There’s even more truth in Colossians—much more. Paul tells us that Jesus “is the head of the body, the church.” He says that Jesus is “the beginning, the firstborn from the dead” and that Jesus “made peace through the peace of his cross,” reconciling all men and “all things unto himself.” Then Paul writes momentous words that lay bare all the doctrines of the New Age, exposing Satan’s promise to reveal the Mystery of the Ages to New Age initiates as a lie and a deception. The gospel of Jesus Christ, Paul reveals, is “the mystery which hath been hid from ages and from generations, but now is made manifest to his saints“ (Col. 1:26). W hat’s more, the powerful truth is that God wants us to know that Jesus Christ inside His own— in you!— is “the riches of the glory of this mystery” (Col. 1:27). God wants us to serve His Son only (Col. 2:6). The Mystery of the Ages is revealed in the life, death, and resurrection of Jesus Christ, for in God the Father and Jesus His Son “are hid all the treasures of wisdom and knowledge” (Col. 2:3). Another Bible passage which confirms that Jesus is the Mystery of the Ages is 1 Timothy 3:16: And without controversy great is the mystery of godliness: God was manifest in the flesh, justified in the Spirit, seen of angels, preached unto the Gentiles, believed on in the world, received up into glory. You won’t find this true Mystery of the Ages revealed in New Age books or in the Hindu scriptures. It won’t be unveiled in the sermons of New Age ministers or made known in secret to initiates. And you can be sure it won’t be found within the context of the New Age Bible that is even now in preparation. You find it only in the pages of the Christian Bible. This is why Satan’s disciples so despise Christianity and why the New Age World Religion is so eager to have its own unholy bible. F I F T E E N Doctrines of Devils N ow the S pirit speaketh ex p ressly th at in the la tter tim es som e shall d epart fro m the fa ith , givin g heed to seducing sp irits, an d doctrines o f devils. (1 Tim. 4:1, 2) The idea o f a m an groveling before his God com es dow n fr o m his ancient heritage. . . . The science . . . revealed b y the Ancient M asters restores to m an kin d in this age . . . the original d estin y in perfection before the expulsion fro m Paradise. (Lord Maitreya, a demon spirit said to be the N ew A ge “Christ,â€? The Science o f the Spoken Word) he great battle of today and of the coming crisis period will be over doctrine. If Satan is to succeed with his Plan, he must win this greatest of battles. The Bible foretold that in the latter times men would give heed to seducing spirits and doctrines of devils. The New Age Bible will be the unholy vessel into which the Antichrist will pour these doctrines of devils. It is important that Christians understand these false and seducing doctrines of the New Age if we are to salvage as many souls for Christ as we can while there is still time. On close examination we find that New Age dogma is expressed under nine major doctrinal cornerstones: Mystery Teachings Occultism and Eastern mysticism Psychology/powers of the mind Science and technology as revelation Hedonism Evolution Pantheism Selfism Leadership by spiritually superior beings We discussed the doctrine of Mystery Teachings in the foregoing chapter. In this present chapter, we will cover the other eight doctrines. Occultism and Eastern M ysticism The New Age Bible will affirm the “truths” to be found in Hindu, Buddhist, Sufi Moslem, and other Eastern mystical religions. Many New Agers are also enthusiastic supporters of the so-called “hidden arts”—witchcraft and the occult, which they see as compatible with Eastern teachings. The occult, they say, is a two-edged sword which can be used for white or black magic. But Christians knowledgeable of the occult attest that deep wounds are inflicted on those who draw that sword with naked hands. There is no white magic, as entrapped New Agers often find out to their horror. The person who practices the occult arts is a shaman. Joan Halifax, in her book Shaman: The Wounded Healer, states: “Communion with the purveyors of power is the work of the Shaman. Mastery of that power: this is the attainment of the Shaman.”1 Webster’s N ew Collegiate Dictionary defines shamanism as an Eastern religion “characterized by a belief in an unseen world of gods, demons, and ancestral spirits responsive only to the shaman.” Increasingly, New Age literature has been packed with glowing stories of visualization, spiritism, sorcery, magic, witchcraft, and earth and witch doctor medicine. Prominent New Agers often claim that Jesus was Himself a shaman and a sorcerer. The New Ager active in occultism and Eastern mysticism believes himself‘to have higher consciousness and powers derived from close relationship to hidden spirits and forces. These powers are said to enable him to work wonders. It is claimed a person can use “white magic” to heal sickness, win another’s love, lose weight, improve school grades, improve memory, or achieve other goals. New Age leaders do sometimes perform miracles with the power of Satan and wield considerable psychic skills. The Bible tells us that in the last days lying spirits will be able to perform miracles and to emulate the wonders of God and His angels and prophets so well that, if it were possible, the very elect would be deceived. Witchcraft is also a growing movement among New Agers, who claim that witchcraft is a legitimate religion which has strong similarities to the Eastern religions: Witchcraft is a religion. . . . Only in this century have witches been able to “come out of the closet” . . . and counter the imagery of evil with truth. . . . To reclaim the word “witch” is to reclaim our right . . . to know the lifespirit within as divine. The longing for expanded consciousness has taken many of us on a spiritual “journey to the East” and to Hindu, Taoist, and Buddhist concepts. . . . Eastern religions offer a radically different approach to spirituality than JudeoChristian traditions. . . . Their goal is not to know God, but to be God. In many ways these philosophies are very close to that of witchcraft.2 The Bible warns us to avoid the dangers of practicing witchcraft and occultism. We read in Deuteronomy 18:10-12: are an abomination to the Lord” (also see Gal. 5:20 and Rev. 9:20, 21). Karma/Reincarnation The un-Biblical concepts of karma and reincarnation are almost universally accepted by New Agers. This is understandable, for all Eastern religions likewise embrace these dreadfully poisonous doctrines. The law of karma demands that individuals suffer and pay in this life, or in a subsequent reincarnated life, for one’s shortcom ings. However, the Christian New Testament makes clear that while we do reap what we sow, nevertheless Jesus’ sacrifice on the cross redeemed us and removed the stain from original sin. Furthermore, Paul taught us that salvation is a gift from God, “lest any man should boast” of his good works. We also know that bad things often happen to good people, as was proven in the case of Job and martyrs among the early Christians. Many New Agers believe in the concept of national, racial, or group karma as well. They reason that the Jews must have had “bad karma” for Hitler and the Nazis to persecute them so vilely. This concept of group bad karma is a malevolent thing, for it can be used to justify such evil acts as mass torture, incarceration of a particular ethnic, racial, or national group, and genocide. The law of karma suggests that whatever an “inferior race” gets, it deserves! A future Antichrist would certainly find the concept of bad karma useful in dealing with those who refuse to take the mark of the Beast or who stubbornly display a “low level of consciousness” by professing belief in either Jesus as Christ or a personal God. In addition, the Bible instructs us of the eventual resurrection of the dead but labels reincarnation as a falsehood. “The wages of sin is death.” Reincarnation (also called rebirthing) implies eternal existence, or immortality. But immortality is a gift from God available only to those who receive salvation through the redemption offered by the suffering of Jesus Christ. Replacing the Biblical teaching of a heavenly paradise ruled by God the Father and His Son, Jesus Christ, many New Agers substitute the Eastern doctrine that enlightened men, through higher consciousness, can achieve godhood. New Agers believe that until this state is achieved, when a person passes away he is usually reincarnated into another body. (However, he may remain a spirit indefinitely if he or his spirit guides and superiors dictate.) Reincarnation and the existence of some type of shadowy spiritual ruling order are definitely antithetical to Christian belief. As to achieving a state of higher consciousness tantamount to godhood—a kingdom of God, or heaven, on earth—Scripture guides us to the truth that “flesh and blood cannot inherit the kingdom of G od” (1 Corinthians 15:50). Psychology/Powers o f the Mind Psychology and the belief that all men can unlock magical forces in their minds to perform miracles will be among the doctrines included in the New Age Bible. The emphasis on psychotechnologies and the mind sciences by New Age advocates reflects their preoccupation with self. Satan’s goal is to separate man from G od’s love. Therefore, the New Age World Religion focuses on the individual. Its seductiveness and attraction lie in its promises to make believers divinely powerful and give them absolute control over their lives. The individual is held up as either a god or a potential god whose latent, godlike powers can be unleashed through self-help application of psychological techniques such as Transcendental Meditation or the use of LSD and other psychedelic drugs to alter one’s consciousness and release the powers of the mind. The New Age believer is convinced that through diligent self-help and by invoking spirit guides, he can link his own psyche to the Universal Mind. In this way he can create his own reality. Health, wealth, and happiness are thought to be selfcreated. New Age psychologists and teachers successfully appeal to many potential members with a “psychology gospel” and claim that man can attain godlike mind power. A number of New Age healers and ministers practice psychic healing and claim to demonstrate other supernatural phenomena. “Anyone can do it” is the bait that lures people. Science and Technology as Revelation For centuries Satan has inspired scientists and pseudoscientists to label Christianity as unsophisticated and behind-the-times. Many of these atheistic, agnostic, and secular humanist arguments will become part of the New Age Bible. The bible that is developed by the Antichrist will be applauded as fully in keeping with a high-tech age. Furthermore, New Age citizens will be told that the New Age scriptures can be changed whenever new scientific discoveries suggest revisions are needed.3 Much of the New Age science is ancient Hindu and Babylonian doctrine given a fresh coat of paint with the “revelations” of new technology. New Agers promoting Hindu philosophies rarely inform the new recruit that a touted scientific “discovery” is of ancient Hindu origin. An example of this is the ad shown below, just as it appeared in the Austin American-Statesman (January 10, 1986). N ote that nowhere is the public told that “Vedic Science” is actually doctrinal Hinduism. At the core of this fake science is the Hindu practice of Transcendental Meditation. Vedic Scientists Report Breakthroughs on World Problems Educators, Administrators, Business Leaders, & Health Professionals Will Attend Symposium A symposium to be held this In the past 25 years* over 3 million Sunday will summarize reported people have learned the technique breakthroughs in solving our most and there has been a worldwide plaguing social problems. It appears resurgence of interest due to its that problems in education, ousi- effectiveness. Symposium schedule: ness, government administration, 1:00-1:45 pm—Education and health may indeed have a simple Amy Moss, Director and common solution. The premise MTU School in Austin is that the human nervous system is 1:45*2:30 pm—Business the common element in every Dr. Scott Heniott, UT Professor problem. The soludon therefore is of Business Management physiological. If the nervous system 2:30-3:15—Health can be made to function naturally at Dr. James Williams, Cardiologist higher levels of ability, then more 3:15-4:00— Government success in every sphere of society is with George Humphrey, the inevitable result Scientific Austin Qty Council Member research at Harvard Medical School and elsewhere appears to substantiate Symposium: Open to Public the claims. Vedic Science is the -Sunday Afternoonsource of the techniques used to 1:00 pm 4:00 ־pm physiologically refine the nervous system. At its core is the Transcen- Austin TM Program Center 2806 Nueces St. dental Meditation technique which (near 29th and Guadalupe) has long been recommended by Call 472-8144 for more information. medical doctors for reducing stress. Science or Pseudoscience? Below I have listed a few quotes from scientists, technologists, and others who have endorsed the New Age, believing its precepts consistent with modern science and technology. It would be wise in view of New Age claims of scientific authenticity to consider the words of Paul in 1 Timothy 6:20: “O Timothy, keep that which is committed to thy trust, avoiding profane and vain babblings, and oppositions of science falsely so called.â€? A New Age world religion is needed to synthesize scientific knowledge with spiritual teachings and to unify mankind. (Lola Davis, Toward a New Age World Religion) If there are those who claim a conversion experience through reading scripture, I would point out that the book of nature (science) also has its converts. (Heinz R. Pagels, The Cosmic Code) We need not make a pilgrimage to India or Tibet to become enlightened about . . . Eastern thought. . . . The East and West could blend in exquisite harmony. Do not be surprised if physics curricula of the 21st century include classes in meditation. (Gary Zukav, The Dancing Wu Li Masters) As we approach the 21st century. . . religion, art, and science are encountering each other anew and are molding a new consciousness that will transcend all three. (Stuart Litvak and A. W. Senzee, Toward a New Brain) The parallels to Eastern mysticism are appearing not only in physics but also in biology, psychology and other sciences. Western science is finally. . . coming back to the views of early Greek and the Eastern philosophies. (Fritjof Capra, The Tao o f Physics) Today we are at the threshold of a new era. All signs point to this fact. . . . We look toward a transformation into a New Age using, however, the insight and wisdom of the ancient mystics. This new world view is emerging because there has been a recent correlation between modem physics and the mysticism of Eastern religions. (Henry Clausen, Sovereign Grand Master of Freemasonry, Emergence o f the Mystical) Hedonism The New Age Bible will definitely allow for hedonism, based on the belief that no act is sinful. This is music in the jaded ears of a mass murderer, a rapist, or a child molester. Jesus came because of man’s sin: He that committeth sin is of the devil; for the devil sinneth from the beginning. For this purpose the Son of God was manifested, that he might destroy the works of the devil. (1 John 3:8) In John’s day, there were also hedonists who claimed that sin was a fiction. But John cut straight through their lie when he boldy stated: “If we say that we have no sin, we deceive ourselves, and the truth is not in us” (1 John 1:8). This Biblical passage is neglected by the New Age. The only “sin” that the New Age will admit to is that committed by men who fail to become god-conscious. Here are some examples of their twisted hedonistic thinking: ' There is no authority superior to the guidance of a person’s inner self; the universe is of good intent; evil and destruction do not exist, (from “Seth’s Teachings,” Seth Center, Austin, Texas) If . . . what Christ represents demands suffering, repentance, and self-negation, then this needs to be seen clearly, in contrast to the New Age which represents abundance, love, upliftment of the individual, collective well-being. . . . (David Spangler, Revelation: The Birth o f a New Age) The Bible was not intended to be interpreted literally in all its parts. . . . The idea of “original sin” is totally false. . . . The High Religion has nothing to do with sin, only the spiritual development of man. Evil exists only in our minds—it is a human creation. (John Randolph Price, Superbeings) Everybody has the truth. Jesus had his truth; I got my truth. I can’t use anybody else’s. . . . You are all beautiful. You are God. That is it, baby, you are having a time, and that is life. (Terry Cole-Whittaker, Magical Blend magazine) You are the supreme being . . . there isn’t any right/wrong. (Carl Frederick, Playing the Game the New Way) No one is guilty. We are all innocents. (Leo Buscaglia, Personhood) What we know about the universe is so amazing! There are a hundred billion galaxies out there; no generation before ours has known this! And what does 99 percent of religion in the West do? It tells people to think about their sins. (Rev. Matthew Fox, Yoga Journal) Evolution The unified government led by the Antichrist will certainly make the teaching of transformational evolution a principal part of public and private school and college curricula. Students at all levels will be taught—and ministers will be required to teach— that man is capable of godhood through god-consciousness. The New Age Bible will outline the concept that all evolution began and is controlled by a higher intelligence emanating from within the material universe. The Babylonian worship of the Sun God will be revived under a scientific-sounding guise. New Age leaders have already paved the way for this new scientific “revelation.” Their contention is that the sun created basic life-forms on earth so they would evolve into human life. The sun is therefore man’s god and creator. Elizabeth Clare Prophet is a leader in this New Age philosophy that places a Sun God in man’s spiritual orbit. She has told readers of her magazine, The Coming Revolution, that: The healing of the nations begins with the healing of ourselves. We must draw forth from the Great Central Sun— the highest concentration of spirit in our universe, the Great Source of light and energy—that eternal Light with which we were anointed from the beginning.4 The modern-day, New Age Sun God is called the Solar Logos (Word) by Alice Bailey, who in her book The Rays and the Initiations reveals him not only as a fiery planetary body but as Lucifer Bailey talks of the Central Spiritual Sun as being the “universal energy force” that is the source of power for Lucifer, man’s planetary initiator into the New Age to come. Lucifer is to oversee man’s evolutionary march toward divinity.5 The arrival of the Solar Logos was announced in a full-page ad in Newsweek which stated in part: At this very moment, our world is undergoing an enormous change comparable to the dawning of the day itself. We are facing the reality of a gigantic Force of Life such as mankind has never experienced before, which is called the spiritual “Sun of the New Age.6 Pantheism The evolution doctrine of a Sun God and a Solar Logos fits in nicely with the ancient pagan belief system called pantheism. Pantheism will also be a core teaching of the New Age Bible. Pantheists deny the existence of a personal God, maintaining that the universe itself and everything in it is “G od.” Man, the New Agers believe, is both a piece of the whole and the whole itself. As Ruth Montgomery was told by her spirit guides: . . . We are as much God as God is a part of us . . . each of us is God . . . together we are God . . . this all-for-one-andone-for-all . . . makes us the whole of God.7 The absurdity of pantheism requires a fantastic imagination. In J. D. Salinger’s short story “Teddy,” a sharp-minded youngster recalls his experience of the immanent, pantheistic God while watching his little sister drink a glass of milk: “All of a sudden, I saw that she was God and the milk was God. I mean, all she was doing was pouring God into God.” If for New Agers there is no personal God, and if man is himself God, there can be no place called heaven where God and His Son Jesus and all of His mighty angels reside. Yet, Jesus taught His followers, “Our Father, which art in heaven, hallowed be thy name. . . .” The Bible makes clear that there is a heaven separate from this planet (see Col. 1:12-29; Eph. 1:20; Acts 7:49). As to the lie that God resides in all matter, in Isaiah 45:12 we find this proclamation by God: “I have made the earth, and created man upon it: I, even my hands, have stretched out the heavens, and all their host have I commanded.” In Ecclesiastes, we are instructed, “For God is in heaven, and thou upon earth. . . .” In Acts 7:48, Stephen announces that God does not reside in idols or in earthly habitats: “The M ost High dwelleth not in temples made with hands. . . .” Further evidence is found in Hebrews 9:24: “For Christ is not entered into the holy places made with hands . .. but into heaven itself, now to appear in the presence of God for us.” Satan’s M aster Plan cannot work unless people accept the fiction that there is no personal God who loves and cares for them. So he has sent forth his ambassadors to push in the West the strange but currently popular doctrine so long accepted in the East: pantheism. Eckankar is a group teaching pantheism. Listen to what its advocates say: God is worldless. . . . God is then everything and in all things but unconcerned about any living thing in this universe, or throughout the cosmic worlds. He is detached and unconcerned about man. . . .8 Once a person swallows the odd theory of pantheism, he is handed a complementary theory: since God is in everything, everything is God. Therefore, the sun is God, M other Earth is God, the moon, stars, and galaxies are gods. They are alive. And if the planets and stars are living gods, man is subordinate to them. It is therefore his sacred duty to revere these divine, living beings. The New Age’s revolutionary theory of a Sun God and a Solar Logos (Lucifer) as M aster of humanity becomes a required tenet of religious belief. Vera Alder informed us in When H um anity Comes o f Age about these strange new nature teachings that will be incorporated in the New Age Bible. She says that the Antichrist and his “Spiritual Cabinet” will assist our understanding that the pagans were right all along: It will come to be realized that the habit of older civilizations and of intuitive primitive peoples of investing the earth, the sun, and the forces of nature with the character of deities and worshipping them as such, was not one of ignorance. It will occur to people eventually that the fact of acknowledging one God over all should not necessitate denying the existence of all the major and minor deities whom many believed that He created in order to develop and run the universe and who are mentioned under various names in all Bibles.9 Worshiping the Heavens This belief in a divine sun, earth, and moon leads many New Agers to worship these planetary bodies as deities. The full moon ritual is especially popular, as is the passing of seasons. Meditation in general is thought to be beneficial, lending peace and harmony to earth. A report from one New Age group, the Academy for Peace Research, has seriously issued a preliminary report which asserts: It’s clear that the combined thought power of several million people is continuing to affect the solar and geomagnetic activity. The Academy is involved in a three-year scientific research project to test the hypothesis that people praying or meditating together on a global basis can decrease solar activity and the Earth’s magnetic field and thereby bring more harmonious conditions on earth.10 Jesus said, “I am the way, the truth, and the life: no man cometh unto the Father, but by me.” G od’s commandment is, “Thou shalt have no other gods before me.” But according to The Plan, it is holy and proper to worship the earth, the sun, and other forces of nature as gods, as did the pagans. Selfism Get man to believing he is the only god there is, teach him selflove and self-worship, and he’ll forget all about the true God in heaven. This is the Devil’s Plan, and it is working magnificently. Selfism, one of the Commandments in the coming New Age Bible, won’t be viewed as a strange doctrine, because it is already fervently practiced by millions today both in the New Age World Religion and in the Secular Humanism community. Today’s New Age leaders are emphatic about the man-centered focus of their religion, attributing to man a divine dimension. M ost readily and arrogantly proclaim that at the very heart of their heretical doctrine is the teaching that man-is-a-becoming-god. This is the essence of selfism. Swami M uktananda, a guru highly praised by EST’s Werner Erhard and by M aster Da Free John, tells his listeners: “Kneel to your own self, honor and worship your own being. God dwells with you as you!”11 Benjamin Creme says that in the New Age men will invoke (command) things into existence, this being possible for men who have become deities. Creme assures us that “prayer and worship as we know it will gradually die out and men will be trained to invoke the power of deity.”12 Allan Cohen writes that man will understand the ultimate meaning of personhood only when he realizes, “I am God, there is no other.”13 The seductive concept of selfism aligns New Age religion with contemporary lifestyles. “Be all that you can be,” a U.S. Army TV commercial promises. “Look out for Num ber One,” demands a best-selling nonfiction book. Psychologists, fashion experts, beauty advisors, and inspirational speakers—some of whom are ordained Christian ministers—exhort us to put self first, to love ourselves, and to seek, before all else, to be smart, beautiful, self-sufficient, rich, successful. The attainment of “self-esteem” is touted to be the primary and most important ingredient in a contented and happy life. In my Bible I find that the two greatest commandments are first to “love the Lord thy God with all thy heart, and with all thy soulâ€? and then to “love thy neighbor as thyself5 (Matt. 22:36-40) Nowhere do I find that we must love ourselves before we can love others, nor is the concept of self-esteem mentioned even once. Instead Jesus and the great spiritual leaders of the Bible counseled that we deny ourselves and that we seek God not as man-gods puffed up with self-love, but with a humble heart and a spirit of meekness. The rise of selfism was prophesied by Paul, who wrote that the last days would be perilous times: For men shall be lovers of their own selves, covetous, boasters, proud, blasphemers, disobedient to parents, unthankful, unholy. . . despisers of those that are good. (2 Tim. 3:2, 3) N ot everyone who preaches self-love is necessarily a New Ager, but those who espouse this anti-Christian philosophy inevitably find fhemselves in the same camp with ardent New Agers because self-love is an essential part of New Age belief. It is no wonder New Age religion has been successful in drawing new members. It calls for no change in behavior and no humbling oneself before the true God. And it proposes to take under its rainbow-colored umbrella people of all religions and faith groups. Leadership by Spiritually Superior Beings (Satan and His Demons) The doctrine that man is an evolving god, but that he must be obedient to superior evolved man-gods will be an important feature of the New Age Bible. This teaching will ensure the dominance of the Antichrist and his demonic aides. Perhaps the major drawing card of the New Age World Religion is its seductive flattery that man is a deity. But ironically man will find that in seeking to be his own master, he has become the slave of one far greater in intelligence and supernatural power. Have Doctrines o f Devils Infiltrated the Christian Church? Jude’s epistle warns us about people who have “crept in unawares” into the very tabernacle of God: infiltrating His body, the Church. Charles Bullock, pastor of Christ Memorial Church in Austin, Texas, aptly describes these apostate unbelievers as “religious creeps.”14 Pretending to be believers, their undercover purpose is actually to subvert the truth. In the following chapter we’ll discuss the treacherous work of these apostate men and women and see just how The Plan seeks to undermine and destroy the Christian Church from within. S I X T E E N Apostasy: The New Age Plan to Take Over the Christian Church Let no m an deceive you b y a n y means: f o r th a t d a y sh all not com e, except there com e a fa llin g a w a y f ir s t, an d th at m an o f sin be revealed, the son o f perdition; who opposeth an d exalteth h im se lf above a ll th a t is called God. . . . (2 Thess. 2:3, 4) Teaching ritual an d the h istory o f the G oddess religion to p riests, m in isters, nuns a n d Christian educators w a s a new experience but deeply rew arding. I fo u n d the stu den ts very receptive to new ideas, hungry f o r new f o r m s o f ritu al an d very creative. . . . I a m very g la d to discover such stron g m ovem ent w ithin Christian churches th a t is sy m p a th etic to the Pagan S pirit an d w illin g to learn fr o m the teachings o f the Old Religion. (Miriam Starhawk, Circle N etw ork N ews) he Plan of the New Age is to take over every Christian church and every Jewish temple in the world and to turn these great and small architectural structures into centers for the New Age World Religion. This is an absolute fact. If this grandiose goal of The Plan does not astonish you, then hear this: New Age leaders are convinced that they will vanquish and destroy the Christian churches of America and the West without so much as a whisper o f protest from the tens of millions of Christians in those churches. W hat’s subtle subversion and quiet undermining of Christian doctrine will result in total victory. It will not be necessary to stage a direct, frontal assault on Christianity. No. What is planned is an insidious, veiled attack. The horrible intent of the leaders of the New Age is to invade and conquer Christianity much as bacteria do a living organism. The end result will be to leave the Christian body a rotting corpse, full of worms and eaten away from within. Marilyn Ferguson reveals in The Aquarian Conspiracy some of the ideas being circulated about how New Agers can use subtle means to infiltrate churches and other organizations. Ferguson recommends against frontal attack, explaining it “hardens their position.” Better, she says, are such strategies as that of John Platt, who advises that any minority that understands the power of the seed crystal, of amplifying an idea, can quickly assume influence beyond its numbers. Another strategy is offered by M att Taylor who suggests, “You can steer a large organization with subtle input.”1 Such tactics may be the reason avid New Age writer and intellectual William Thompson has said: The new spirituality does not reject the earlier patterns of the great universal religions. Priest and church will not disappear; they will not be forced out of existence in the New Age, they will be absorbed into the existence of the New Age.2 Dictators learned long ago that willing acceptance by a peopie is far preferable to forced repression. To threaten Christianity with open destruction is not Satan’s style. He knows that it only invites counterattacks, and he does not wish to awaken and alarm those who might oppose him. Satan plays the game dirty, with trickery and treachery. He makes inside moves. His is the tactic of the Trojan horse. The Three-Pronged Plan to Take Over the Christian Church The leaders of the New Age have a sophisticated Plan to replace Christianity and Judaism with their own World Religion. The three phases of this scheme are to discredit, infiltrate, and deceive. Objective: Discredit Jesus and the Bible How can the Christian Church best be strangled and rendered lifeless? Satan knows that all he has to do is to first undermine belief in Jesus Christ and, second, discredit the Bible. The New Age war on Jesus and the Bible is vile and vicious. Some New Agers seek to portray Jesus as just a man, a man who studied at the feet of his spiritual superiors—Tibetan, Egyptian, and Indian priests, priestesses, and gurus. Others attempt to label Jesus a rich man’s son, as a teacher whose supposed miracles were faked, or even as a powerless disciple who was raised from the dead by the Lord Maitreya, the New Age “Christ,” in an occult manner. By some New Age accounts, Jesus’ mother, Mary, was a Temple prostitute and Jesus Himself had an extramarital affair with Mary Magdalene. Perhaps the most prevalent lies by New Age leaders are accounts of what happened to Jesus during the so-called “lost years” between His boyhood and the beginning of His ministry. Since these eighteen years are omitted from the accounts in the Gospels, the New Age has, like a ravenously starving vulture, moved in with dispatch to fill the gap. Kevin Ryerson, the demon channeler for Shirley Maclaine and other celebrities, says his spirits have told him that “the man Jesus studied for eighteen years in India before he returned to Jerusalem. He was studying the teachings of Buddha and became an adept Yogi Himself.”3 Elizabeth Clare Prophet claims to have come across documents from deep in the Himalayas which describe what Jesus did and said in India, Nepal, and Tibet. Her book, The Lost Years o f Jesus, “reveals” that the youth Jesus joined a caravan headed for the East, where he studied under wise men who taught him mysticism.4 Reverend J. Finley Cooper, a priest in the Episcopal Church of the United States, has said of Prophet’s book: “I am indeed grateful to Elizabeth Clare Prophet. . . . I commend the book to all of G od’s sons and daughters.”5 Edgar Cayce’s demon guides gave him the revelation that Jesus traveled extensively in Egypt, India, and Persia. In Persia, said Cayce, Jesus learned from Mystery Religion teachers about the truth of Zu and Ra, two Babylonian gods. In Egypt, as an initiate of the Mysteries, He was tested at the Great Pyramid, earning membership into the exalted White Brotherhood of Masters.6 These heretical accounts of Jesus’ travels and of His being initiated into the Satanic Mystery Teachings are not supported by one shred of evidence. But they are made more palatable by scheming New Age leaders who claim that “Much of this information was probably cut from the Bible in the 6th century by the church, along with reincarnation, as being an ‘embarrassment’ and threat to the exclusiveness of the doctrines and their power over the people.”7 Did Christ Die in Vain? Another horrendous attempt to strip Jesus of His unique status as the Son of God is the assertion that Jesus’ death was not sacrificial, was staged by plotters, or was arranged by the Lord Maitreya, the New Age Christ-pretender. Denying Jesus’sacrifice on the cross is common among New Agers. Elizabeth Clare Prophet, the fount of so many lies regarding Jesus and the Bible, writes: . . . the erroneous doctrine concerning the blood sacrifice of Jesus—which he himself never taught—has been perpetuated to the present hour, a remnant of pagan rite long refuted by the Word of God. God the Father did not require the sacrifice of His Son Christ Jesus, or of any other incarnation for the sins of the world. . . .8 That Jesus died on the cross as an atonement for our sins is indelibly stamped throughout the Old and New Testaments. Here are just a few passages: John 1:1, 14; 3:16; M atthew 1:1825; 20:28; Galatians 4:4, 5; Philippians 2:5-11; 1 Corinthians 15:3-8; 2 Corinthians 5:21; Hebrews 4:14-16; 1 John 2:1, 2; Romans 4:25; 5:18, 19; Isaiah 53:6. In the face of such voluminous evidence, Prophet’s statement that God did not require the sacrifice of His Son, Jesus, is exposed as a bold lie unsupported by the Scriptures. Peter Lemesurier, an occult pyramidologist and prolific New Age writer, has an even more blatant account of Jesus’ death. He suggests that Jesus was a member of the Essene sect, a radical Jewish group that sought the overthrow of the Romans and the throning of Jesus as king. Lemesurier proposes that the Essenes snatched Jesus off the cross before He physically died, and this is why His tomb was empty.9 That Jesus’ resurrection was arranged by a psychically powerful spirit other than God is the claim of Benjamin Creme. Creme says that the resurrection happened this way: The Christ (Maitreya). . . . This . . . has happened quite often since, and before. But resurrection is a very special thing technically. It is a great occult happening.10 Creme and others also tell Christians not to pray to Jesus because Jesus is not God but a disciple of Lord Maitreya. Even the Apostle Paul, now called “the M aster Hilarian” in the spirit world, is ahead of Jesus in the hierarchy: “. . . Christ is not God. He is not coming as G o d .. . . He would rather you didn’t pray to Him but to God within you.”11 The New Age elite also says there will be no real Second Coming of the Lord. This untruth goes hand-in-hand with the New Age doctrine that Jesus is not Christ. Emmett Fox, formerly a prominent liberal Christian minister whose books are very popular among New Agers, has written: The Christ is not Jesus. The Christ is the active presence of God—the incarnation of God—in living men and women. . . . In the history of all races the Cosmic Christ has incarnated in man—Buddha, Moses, Elijah and in many other leaders. . . . However, in his New Age, the Cosmic Christ will come into millions of men and women who are ready to receive it. This will be the second coming of Christ for them.12 This same idea is taught by Lavedi Lafferty and Bud Hollowell of the Collegians International Church: The second coming of Christ does not refer to the man Jesus but to the manifestation of the Spirit of the Cosmic Christ in the hearts and minds of all humanity. The “cloud” Jesus said he would appear as, refers to the dimensional level of mind or consciousness.13 It is important to the New Age that Jesus5 divinity be discredited, that He be demoted from Godhood to manhood. Jesus the man will not return as God to rule humanity. That role is reserved for the Lord Maitreya. This blasphemous teaching fulfills the prophecy of Saint Peter: . . . there shall come in the last days scoffers, walking after their own lusts, and saying, Where is the promise of his coming? for since the fathers fell asleep all things continue as they were from the beginning of the creation. (2 Pet. 3:3, 4) New Agers insist that Jesus is practically a nobody, yet go to great lengths to tie Jesus’ teaching with the unholy doctrines and practices of the New Age World Religion. Jose Silva, founder of the Silva Mind Control System, says Jesus came expressly to teach people the Silva system of meditation and communication with “spirit counselors.” Paul Twitchell tells initiates of Eckankar the Jesus’ words, “Come, follow me,” were the Lord’s invitation to men that they meditate and travel out-of־the-body to the astral plane. Is the Bible Riddled with Errors? The Plot to Discredit the Bible The New Age teachers are also quick to quote, or rather, misquote, the Bible when it serves their purpose. On one hand, they maintain the Bible is flawed and of very little use. On the other, they claim the Bible confirms the New Age world view. They twist and distort Scripture to make it say exactly the opposite of its true literal meaning. One New Age authority who attempts to cite the Bible for evil purposes while insisting it is riddled with errors is F. Aster Barnwell. The cover of his book The Meaning o f Christ for Our Age is decorated with drawings of Buddha, the serpent draped over a cross, and a skull superimposed on a winged rod. The contents are even more hideous than the cover.14 Who is F. Aster Barnwell? Formerly an economist with the Canadian province of Ontario, Barnwell says that in 1979 he abandoned his job and began to devote his life to the study of astrology, psychology, Eastern philosophy, comparative religion, Yoga, and mysticism, leading him to realize that the JudeoChristian Bible isn’t what it appears to be. Barnwell claims there are many myths, errors and inconsistencies in the Bible. He recommends that we don’t accept the Bible and Jesus as literal truth but instead, we see Jesus in a psychological context as opposed to a factual, historical one. He specifically cites the “myth” of the virgin birth, suggesting that this is legend rather than miracle. Also mythical is Jesus’ sacrificial death and resurrection.15 Barnwell informs us that “many Eastern concepts and doctrines have heretofore gone unrecognized in the teachings of Jesus.”16 To Barnwell, we need to reinterpret Scripture using New Age concepts. For example, “salvation” is not an event but a lifelong process of “breaking down psychological barriers.” The “Name of Jesus” or the “Blood of Christ,” says Barnwell, “is more understandable if we think of these phrases as meaning ‘an agency of activation’—something inside a person that works to promote consciousness and growth.” “It is doubtful,” adds Barnwell, “that the apostles could have meant anything more by the ‘name’ of Jesus than a sort of psychological focusing.”17 Barnwell criticizes the traditional view that Jesus is the “only name under Heaven” by which salvation can be attained by man. We must, he insists, go beneath these literal words in the Bible to understand their hidden Mystery meaning, and so discover that Jesus is not the only way. Therefore: When a Christian accepts . . . that the name of the historical person, Jesus, is the “only name under Heaven” by ^vhich salvation can be attained by man, he may actually hinder the cause of Christ rather than promote it.18 The author of The Masters o f ,W isdom, John G. Bennett, goes even further in a Satanically generated attack against the Biblical accounts of Jesus. He rejects the idea that Matthew, Mark, Luke, and John authored the Gospels and sees them as Mystery writings. Their authorship, according to Bennett, must be attributed to Mystery schoolteachers and to disembodied spirit (demon) Masters: The four gospels were compiled by four different schools of wisdoms, each entrusted with a different task. . . . St. Luke’s gospel was written to connect Christianity with the Great Mother tradition through the Virgin Mary. . . . St. John’s gospel is an interpretation based on the Gnostic tradition. . . . St. Matthew’s is preeminently the gospel of the Masters of Wisdom.19 The Gifts o f the Spirit: Are They fo r Everyone? Again and again, we see in action this conspiracy to undermine the Scriptures. A favorite stratagem is to pretend that the gifts of the Spirit described by Paul in 1 Corinthians are not exclusive to Christians, nor, it is said, are they gifts from a personal God. Anyone can freely access the universal forces and beome a healer, a psychic, a prophet, or a worker of other miracles. A Course in Miracles, given to a New Ager by a demon through automatic writing, emphasizes: “Miracles are natural. When they do not occur, something has gone wrong.”20 Another New Age source remarks: You don’t have to be a born again evangelist or a Filipino (psychic healer) miracle-worker to heal people. All of us possess the power to be psychic healers. . . .21 Satan is indeed giving some of his followers extraordinary occult powers. In exchange, he wants and gets their souls. Jesus said that in the last days there would be those who do wondrous works in His name; but, said Christ, they will not be His. 7:21-23) Revising the Bible: The Devil’s Foul Strategy A devious strategy that seems to be paying off for the New Age is that of revising—or updating— the Bible to make it more “meaningful” to modern times. This strategy takes several paths. One is the drive to create a unisex Bible. Radical feminist groups and liberal churchmen, encouraged behind-the-scenes by New Age leaders, have ardently campaigned for several years now that the Bible’s language is sexist and exploitative. The National Council of Churches has long demanded that the words “Lord” and “King” be replaced with “Sovereign.” This group also wants the word “G od” to be changed to “O ur Father and M other.” Even the term “Son,” which refers to Jesus, the Son of God, isn’t good enough for the National Council of Churches, which insists that “Son” should be removed in favor of the neutral term, “child.”22 The revised National Council of Churches lectionary, which contains recommended Biblical passages for pastors to read during worship services, arbitrarily slices some words and adds other terms to the universally recognized translations of the Bible. John 3:16, for example, becomes: “For God so loved the world that God gave G od’s only child, that whoever believes in that child should not perish, but have eternal life.”23 It is likely that this new, monstrous rewording of John 3:16 and the recommended use of the terms “She” and Her” to refer to God is a preliminary to reintroducing the ancient Babylonian concept of the M other Goddess to Christian congregations. Satan’s motive in sowing Scriptural confusion and discord in the Church becomes clear once we understand the obvious parallels between the perverse Mystery religious system of Babylon and the present-day doctrines of the New Age. Does the Bible Contain Hidden Mystery Teachings? Yet another effort to revise the Bible is the New Age push to reinterpret the Bible to unveil and discover its hidden Mystery Teachings. New Age scholars hope to reinterpret the Bible in light of the occult teachings of Eastern mysticism. This is the reason for The N ew Age Bible Interpretation and for the recent publication of a score of books that offer a “fresh look” at the Scriptures. Those pushing Satan’s Plan for a One World Religion are working hard to pollute Christianity with Eastern teachings. Peter De Coppens, editor of a series of books on New Age theology published by Llewellyn, a company specializing in astrology and occult publications, suggests that a “universal brotherhood of human beings” can be achieved by Christians who practice a “Yoga of the West.” “If the final planetary synthesis o f the Eastern and Western spiritual traditions is to be realized,” he writes, “Eastern mysticism must be incorporated into traditional Christianity.”24 De Coppens praises the creation of a New Age theology in which Christianity is horribly mixed with almost every antiChristian philosophy that ever existed. He mentions the quest for wisdom by those who earnestly study “Eastern religions and Yoga, the new psychologies, the old Sacred Traditions and Esoteric Brotherhoods of Mysticism, Occultism, Magic, and Alchemical Schools as well as Theosophy, Anthrosophy, and Rosicrucian Societies, not to mention ancient witchraft, modern parapsychology, and the m any W estern cults th at have emerged.”25 After listing these Satanic religions and philosophies, he states that “all religions, all races, all societies” have always had the same living source of revelation and spiritual guidance, and that to find Truth, the Christian need look no further than within his own self, for each of us is God: What we are interested in is not the calcified, institutional shell we are most familiar with, but Christianity as a true and living adventure, as the . . . “Ageless Wisdom” whose central objective has always been and will always be the incarnation and full realization of the Great Work—Spiritual Initiation through union with God, who . . . is none other than our true Self.26 De Coppens encourages Christians to believe in the development of “Christed human beings,” whom he defines as “a Godman or -woman who has achieved and incarnates self-knowledge, self-mastery, and self-integration—one who can truly express the Self.”27 . De Coppens further says his research showed that the roots of Christianity can be traced back to the Chaldean, Egyptian and Greek Mystery traditions, as well as the Hermetism, Qubalah, Alchemy, Druidic, and Rosicrucian traditions. T hus, it is not necessary for those in the West seeking *‘a viable, livable, and effective process of psychospiritual transformation” to depart the Christian faith. Instead, a sincere and devout Christian may find in his own tradition and church “the answer to his deepest and most authentic spiritual needs and aspirations.”28 In essence, de Coppens tells us that we need not make a pilgrimage to Tibet, New Delhi, or Mecca to seek guidance from the gurus. All that’s necessary is that we “discover” within our present Christian faith Eastern and occult meanings and reinterpret the Bible accordingly Other New Age authorities echo de Coppens. “In the Gospel of Jesus Christ,” says Barnwell, “there is a hidden ‘blueprint’ showing the way that a human being becomes divine.” Corinne Heline’s The N ew Age Bible Interpretation contends that “the entire Bible is written so that it has one meaning for the masses of the people and another for occult students.” Will Christians be gulled into believing the claims of New Age leaders? As the New Age’s Lola Davis so proudly exclaims, “Within the last two decades there has been an increasing awareness of mysticism among Christians. Many are studying meditation and reading esoteric books.” The next step, already taken by many, is to view the Bible as just another esoteric book of secret Mystery Teachings, whose true meanings can only be deciphered by those to whom the “spirits” provide revelation. Paul wrote that he was careful to avoid fancy words and argument in his sermons lest the simple but powerful message of Jesus and salvation be obscured. The Bible, then, is not a book of hidden Mystery Teachings to be explained for us by some New Age guru, but a revelation of Jesus Christ and a clear and simple guide to every aspect of our lives. Fake Gospels In an attempt to reduce the growing influence of early Christianity, the Jewish Essene sect, the Gnostics, and other heretical groups created a number of fake bibles and Gospels (including the Gospel of Peter and the Gospel of St. Thomas). Invariably these books include details that contradict the Bible, including lies about Jesus teaching reincarnation and karma. Predictably, New Age spokesmen quote such passages as “p ro o f’ of their unBiblical doctrines. Fake Gospels are also turning up that are said to be new revelations given by angels or spirits to modern-day prophets. The Book o f Mormon is an example, as are the abominable versions of the Bible published by the Jehovah Witnesses and the Christian Scientists. A “Gospel” that is widely quoted by the New Age is The Aquarian Gospel o f Jesus the Christ. Supposedly transmitted verbatim to an American from Ohio named Levi in 1911 through a vision by an angelic presence, the Aquarian Gospel depicts Jesus studying with the Yogis in India. Consider this passage in which Jesus and a friend ponder about the “truth” of reincamation: 9 One day Ajainin sat with Jesus in the temple porch; a band of wandering singers and musicians paused before the court to sing and play. .10Their.29 Outright Lies When it is not possible to discredit the Bible and its teachings of Jesus and godly doctrine by means such as the production of fake Gospels, New Age spokesmen sometimes go on the offensive, directly challenging the Scriptures and the writers of the books of the Bible. Thus, Benjamin Creme attempts both to slam Christianity and exalt The Plan by holding Paul up to a bad light: Christianity was really built by St. Paul . . . and St. Paul made a number of mistakes. He distorted Christianity considerably. He is now one of the Masters of Wisdom . . . humanity suffered through Paul’s mistakes, but The Plan eventually won out. The Plan is ideal.30 Creme’s ridiculous assertion is that after his death Paul was informed of his mistakes by the Lord Maitreya. Paul has since been assigned by Maitreya to a position as a M aster of Wisdom. John Randolph Price also challenges and reinterprets Scripture. He says that Deuteronomy 6:5-9 (“and thou shalt love the Lord thy God with all thine heart, and with all thy soul, and with all thy might”) means that we are to love our own Higher Self. We also find the following statements made by this high-ranking leader of the New Age: The Divine Plan for you does not have a special section on suffering . . . you are not here to endure hardships.31 In truth . . . you never fell from grace, and you certainly were not tossed out of some garden and told to till the ground until you dropped dead.3.2 Objective: Infiltrate the Christian Church Infiltration—subversion of the Christian Church from within— is already far advanced. Marilyn Ferguson warned in 1980 that: Formal religion in the west has been shaken to its roots by defections, dissent, rebellions, loss of influence, diminishing financial support. . . . If they cannot find new roles in a rapidly changing society, they may go the way of the railroads—without Amtrak.33 The New Age does not seek to have Christianity “go the way of the railroads.” It suits the Devils purpose to keep the Christian churches intact. What Satan wants is the hearts and minds—the very souls—of the living members of Christian churches. Christian pastors who bring blasphemous New Ageoriented messages and lay witnesses who teach new Christian converts that the Bible is flawed and that the New Age doctrine and the Bible are compatible are examples of what Satan has in mind for the future of Christianity. Evangelist Jimmy Swaggart has wisely said that the Christian cannot be sure he’s in a local Christ-filled congregation just because he’s a member of a certain denomination or that the shingle on the door of his church indicates a particular faith group. Apostasy and heresy seem to be sweeping Christianity. The New Age is heartened and encouraged by Christianity’s growing apostasy. New Age leaders now often advise their followers not to leave their churches, but instead to work for changes from within. The New Age plans to seed the churches with what Elissa McClain has called “Cosmic Christians”—peopie who pretend to be Christians, but are in fact disciples of Satan sent to disrupt and destroy. New Wave, Cosmic Christians There is a New Wave of “Christians” flooding our churches today, bringing with them the idolatrous and blasphemous doctrines of the New Age. Calling themselves “spiritual,” some support social welfare goals and pacifism but deny the power of Jesus. Others profess a belief in the New Age prosperity gospel. Norman Boucher, in N ew Age Journal, enthusiastically reports that “after rejecting the belief of its fathers, an entire generation is reclaiming religion—and changing our churches and temples in the process.”34 The New Wave Christian leadership and laity is eager to learn of the ideas and doctrines of the New Age. For example, New Age psychic and medium Ruth Montgomery says that for years she has received support and invitations from both Catholie and Protestant churches: When I reluctantly wrote A Search for the Truth in 1965, I feared ostracism by the religious community. Instead, I was flooded by invitations from Protestant ministers to speak from their pulpits, and from Catholic academia to address their student bodies.35 As mind-boggling as it is sad, even witchcraft and Satanism are finding favor inside a few Christian churches. Miriam Starhawk, perhaps the world’s best known witch propagandist, has been invited by Christian groups to speak about her goddess witchcraft religion. In Circle Network N ew s, a newsletter for witches, she stated that she “found the students very receptive to new ideas, hungry for new forms of ritual and very creative.” Starhawk concluded: “I am very glad to discover such strong movement within Christian churches that is sympathetic to the Pagan Spirit and willing to learn from the teachings of the Old Religion.”36 The success of Satanic witchcraft in infiltrating Christian churches has spurred the Church of WICCA to escalate their efforts at achieving recognition and respect. The Christian Information Bureau, a Dallas, Texas, ministry wonderfully dedicated to shining some light on the growing apostasy, recently published in its newsletter a story about a witches’ organization which asked its members to “contact Christian allies: Put us in touch with sympathetic Christian clergy and lay people . . . who will write letters on behalf of us and the WICCAN religion, which we can pass on. . . .”37 The mixed-up Christian leaders and congregations who are now desecrating their churches by bringing in occultism and listening to New Age heralds and teachers, or worse, demons, are the vanguard for Satan’s New Age One World Religion. For years we have seen a tidal wave of heresy and apostasy as some churches ordained homosexual ministers and even sanctioned marriages between members of the same sex. We’ve seen a growing number of churchmen spread lies about our Lord and about the Bible. Below are just a few recent examples. D e n ia l o f B ib lic a l A c c u r a c y In Great Britain, Right Reverend David Jenkins, the Anglican Bishop of Durham, prides himself on his heresies. Newsweek magazine reports that Henkins denies the miracle of Jesus’ resurrection. “N o concrete event underlies the doctrine,” says the bishop. He also denies the virgin birth and claims that the description of Biblical tongues of fire at Pentecost is just colorful phraseology. However, Jenkins’s boss, the M ost Reverend Robert Runcie, smiles at his heretical underling, remarking, “There’s room for everyone in the Anglican Church.”38 P o litic iz a tio n o f th e C hurch Long-time members of mainline denominations are becoming increasingly frustrated at the heretical turn their Church’s leadership is taking. Nikolai Lenin, the first Communist ruler in the Soviet Union, once urged his followers to politicize the Church if they wished to neutralize its influence. His advice is now being adopted by a growing number of Presbyterian, M ethodist, Episcopal, Lutheran, Baptist, and other Churches in the United States. The leadership of the Presbyterian Church (U.S.A.) repeatedly has branded the U.S. government a warmonger. Its Advisory Council on Church and Society recently published a study which promotes pacifist resistance to the government and calls on its members to withdraw from military-related occupations and refuse to serve in military service. Opinion polls show that rankand-file Presbyterians strongly disapprove of their Church’s stance, but its activist hierarchy has seized control and continues its broadsides against America.39 The Presbyterian Church has also adopted the title “New Age Dawning” for its Five-Year Plan for Evangelism in the Presbyterian Church (U.S.A.) To critics who opposed this, including many Presbyterians, Robert Meneilly, chairman of the committee that chose this slogan, retorted, “Those who oppose the New Age movement would likely oppose what the Presbyterian Church (U.S.A.) already is doing and saying.”40 The United M ethodist Church also has a number of pastors in high places who appear to have become pawns of the New Age. In one recent issue of the United Methodist Report alone, several M ethodist laymen wrote Letters to the Editor pleading with the Church to return to its long-standing traditions of loyalty to the Bible and to God.41 Here are a few selected, actual comments from the published letters of M ethodist laymen that perfectly characterize what seems to be happening at-large inside the denomination: Letter No. 1: “The . . . changed self-concept of today’s minister is provoking and troubling. . . . I reject the notion a minister’s personal life offers the sole opportunity or context in which he can express his real self.” Letter No. 2: “It gets harder each year to sell the (church) . . . when the hierarchy promiscuously abuse the system with what appears to be very little concern for the folks back home. “Boards such as the General Board of Global Ministries and its high-handed approach . . . disregard(s) the need for missionaries. . . . Instead they support . . . schools and rebellious groups promoting violence—definitely not Christian in any way, shape, or form, at the expense of the Gospel. “On top of that, the church has within its structure such groups as the Commission on the Status and Role of Women . . . that hires self-avowed practicing lesbians. . . .” Letter No. 3: “The creeping spiritual rot that destroys our church continues. Among other incidents, I have endured a pastor who prayed to ‘our heavenly Mother,’ a district superintendent who . . . announced he was voting in favor of the ordination of homosexuals, and a United Methodist missionary to Japan who torpedoed a missions conference with this statement: ‘I teach English and would never presume to convert a Shintoist. They have their way.’ ” Church Unity and Ecumenicism One of Satan’s greatest lies is that unity guarantees purity and goodness. He seeks to unite all Christian Churches— indeed all religions—in an inseparable bond of un-Biblical ecumemicism. Pastor Thomas H. Trapp, campus pastor for Wisconsin Lutheran Chapel and Student Center at the University of Wisconsin in Madison, last year wrote an article taking to task those who call for unity but push for a gospel other than Jesus: Jesus is the starting point for discussion on spiritual unity. But ecumenical organizations, like the World Council of Churches, frown on those who insist on the Christ of Scripture. Members of the modern ecumenical movement say or imply that it’s “narrow” or “unloving” when we insist that Jesus is the only way. . . . These critics, in effect, deny the Christ of Scripture who personally insists that He is the only way to God. (John 14:6)42 Pastor Trapp’s decrying of a false unity is Biblical, for Peter (2 Pet. 2:1) and other Bible writers cautioned us to beware of false prophets and apostasy in the last days. In regard to the World Council of Churches (WCC), these prophesied warnings have come to pass. In recent years key articles in Readers Digest exposed the terrible misdeeds of this politically-oriented apostate group. The WCC has given millions of dollars to Marxist groups and terrorists around the world fighting pro-Western governments. The WCC has refused to criticize Soviet atrocities in Afghanistan and elsewhere, and averted its eyes when countries such as Ethiopia massacred its citizens, persecuted Christians, and closed Christian churches.43 The most convincing indictment I have seen of the WCC comes from Edmund W. Robb, chairman of the Institute on Religion and Democracy in Washington, D.C., and his journalist daughter, Julia Robb. In their extremely well-documented expose The Betrayal o f the Church, they lay bare the apostate conduct of the WCC, the National Council of Churches, and the mainline Christian denominations that support these groups. “The World Council of Churches is blatantly and unashamedly opposed to the free market,” the Robbs report, “and makes full use of its U.S. funds to combat the free enterprise system.”44 Might the WCC, either unwittingly or knowingly, someday throw its support behind a One World Government led by the New Age “Christ?” The Robbs show how, in its battle against free enterprise, the WCC has called for a “world economic order or have advocated some sort of international control of the earth’s economies.” The WCC and its supporters believe “that the fortunes of the world’s disadvantaged would improve if the world’s economic system were under a gigantic bureaucracy.”45 You begin to fully understand the depths to which the WCC has sunk when you learn that many New Age spokesmen are very complimentary toward this four hundred-million-member organization. Lola Davis expresses the general consensus of the New Age when she remarks that the WCC may well become the nucleus of a World Religion: The World Council of Churches . . . has potential to serve as a source of unity among the diversity of religions. The West is becoming more familiar with the Eastern religions because of the efforts of some of their spiritual leaders.46 The National Council of Churches (NCC) also has sent funds to Communist Vietnam, praised Marxist regimes, as well as terrorist groups such as the Palestine Liberation Organization (PLO), and criticized U.S. government policies. Among the largest of thirty-two denominations representing forty million Christians in the NCC are the United M ethodist Church, the Presbyterian Church (U.S.A.), the United Church of Christ, the Discipies of Christ, and the Episcopal Church.47 Apostasy: The Roman Catholic Example It can easily be documented that New Age practices and doctrines are rampaging within the Catholic Church also. So, while Biblical Christians rightly are alarmed about the growing trend toward apostasy within the Protestant churches, they should understand that apostasy within the Catholic Church has an even stronger foothold. Examples of Catholic New Age apostasy are so numerous I have room for only a few. Some Catholic priests invite demons by teaching Silva Mind Control and other meditation and invocation rituals to their parishoners. Jose Silva, the founder of the Silva Mind Control System, is a Catholic. A number of Catholic nuns and priests are devoted believers in Zen Buddhism, Tai Chi, and Hinduism. A recent article in The Catholic Accent displayed photos of nuns at a Zen retreat bowing to each other, to recognize the divinity in each other.48 Father Bede Griffiths, a monk in the order of St. Benedict, has lived among the Hindus in India for the last thirty years. He remains officially a recognized Catholic teacher of the gospel, even though his teachings are 100 percent Hindu and 100 percent New Age. Griffith says he agrees completely with heretic priest Meister Eckhart, who once said, “I pray God to rid me of God.â€?49 Objective: Deceive the Christian Churches The New Age is not having difficulty deceiving many Christian leaders and laypeople. Two examples will suffice to illustrate the extent to which some Christians have fallen victim to The Great Deception. Peace and Love: The Empty New Age Commitment Many Christians have been seduced by the New Age’s soothing commitment to “love” and “peace.” These two words pack such power among Christians that many just cannot believe that New Agers who express commitment to love and peace could be instruments of Satan. The words of Hal Lindsey on October 28, 1986, on TV ’s Trinity Broadcasting Network should provide an awakening: “The pursuit of peace by the Antichrist through the New Age Movement is how they’ll take over the world.” Larry A. Jackson, president of Lander College in Greenwood, South Carolina, a graduate of Union Theological Seminary in New York, exemplifies the new view that instilling brotherly love is the most important mission of the Christian Church: The church of tomorrow will affirm a belief . . . that ultimate reality is love. . . . Love as ultimate reality will become the central message of the church.50 The Devil can appreciate a human love that excludes Jesus. Jackson has also implied that dropping insistence on the Lordship of Jesus while emphasizing some kind of abstract love will appeal to scholars, politicians, and business executives. This is New Age propaganda. Does God Want Everyone to Be Rich? An un-Biblical doctrine gathering steam in Christian churches is the “Prosperity Gospel.” This unholy doctrine is a key tenet of the New Age which falsely claims that riches are marks of the truly religious person. Lola Davis explains that since God is in everything— trees, grass, automobiles, and paintings—material possessions must be the “bounties of God.” “Would it not,” she asks, “contribute to peace and joy on earth if we accepted material things as expressions of God and therefore, as spiritual elements? Only this way,” Davis exclaims, “can mankind develop God-like qualities.”51 Fashion and success consultant Robert Pante, who has been called the “high priest of prosperity, minister to the moneyed,” scoffingly remarks, “Those who pray with a poverty consciousness aren’t going anywhere. Lots of poor folks pray and don’t get anything.”52 Pante specializes in conducting seminars in which he berates women attendees who don’t dress great— that is, who are not up to Pante’s standards—with such derisive comments as, “You look like you don’t get out much,” and “She looks like an aging cheerleader.” Pante, the author of Dressing to W in, says that he is “a social worker for the rich, soon to be rich and those strongly desiring to be rich.” He believes that the problem with the poor is that they don’t believe they are gods. That’s how he acquired wealth, Pante insists. “I was very poor. Then I found out I was god, a cocreator.”53 Riches and success ensued, Pante assures his audiences. These sentiments are shared by many other New Age spokesmen. They say that not only does induction into the New Age World Religion certify a person as scientific-minded and a thinking person, but it also makes him destined to become blessedly affluent. The New Age leader lures new converts by holding out the carrot of riches and prosperity through mind power. Man-gods supposedly will money to come their way. John Randolph Price thrills his followers by telling them, “You were born to be rich!” He teaches that all that’s necessary is for the individual to develop a prosperity consciousness through willpower, which Price terms the “Will of Wealth.”54 Was Jesus a Wealthy Man? One New Age minister has even been able to appeal to the individual’s most coarse materialistic desires while, at the same time, casting doubts on the life of Jesus. Dr. Catherine Ponder, a minister of the Unity Church in Palm Desert, California, has been described as the “Norman Vincent Peale among lady ministers.” She teaches positive thinking and powers of the mind, asserting that a person can profit from prosperity “secrets.” Dr. Ponder’s books allege that Biblical heroes were wealthy because of their spiritually advanced minds. Her book, The Millionaire from Nazareth: His Prosperity Secrets for You pro claims that there is gold in the gospel for you. According to Ponder, “Jesus understood, used, and taught the mental and spiritual laws of prosperity. A part of Jesus’ mission was expressly to save mankind from its belief about financial limitations.”55 Ponder further claims that Jesus practiced what he preached. He was not a poor illiterate carpenter. Jesus was a world-traveling rich man: “Contrary to what most of us have believed, Jesus certainly was not poor. Instead, Jesus was the wealthiest man who ever trod this earth.” She goes on to say that it is pagan to be poor. “The prosperous truth is that, as a child of God, it is a sin to be poor and it is your birthright to prosper and succeed.” Ponder’s claims are ridiculous but contain within them a covetous message that has captivated tens of thousands of peopie who want desperately to become rich. Certainly if Jesus, a simple carpenter’s son, had been a materially wealthy man, He would not have had to resort to the miracle of the fishes and loaves of bread. He would not have been without honor in His own city, and after His arrest, His disciples could have paid off the authorities to win His release. Instead, He went to the cross a pauper. The Roman guards attending His execution cast lots for His only worldly possession: His cloak. The promise to deliver prosperity to its converts is the driving force behind at least some of the New Age success. Unfortunately, some Christian leaders have taken this same tack, preaching that a Christian can have Cadillacs, mansions, millions of dollars. “Just name it and claim it.” Some, like Harlem’s Reverend Ike, are terribly blatant. The ministry of Reverend Ike, known as the flamboyant “money preacher” because of his penchant for diamond rings, gaudy gold jewelry, and expensive luxury cars, continues to thrive even though he preaches heresy. In early 1987, when he agreed to record a song, “Mind Your Own Business,” with country music star Hank Williams, Jr., Ike snapped: I really wanted to sing “Mind Your Own Business,” because if you mind your own [curse word deleted] business, you’ll have more time and energy to get rich, which is what it’s all about. Get your own [curse word deleted] Rolls Royce instead of being jealous of mine.56 Reverend Ike may be the most crass and brazen “money preacher,” but many others have joined the prosperity bandwagon in recent years. In addition to money, some ministers and TV evangelists are preaching to their listeners the horrible falsehood that giving to the Lord is a financial investment, that God will pay them back tenfold, even a thousandfold for their contributions. Thousands of Christians today are giving for entirely the wrong reason: only to get something back in return. Does the Bible Support the Prosperity Gospel? God does not promise us material riches. We know that Jesus told us it is harder for a rich man to receive salvation than it is for a camel to go through the eye of a needle. He also praised the poor widow who was only able to give an insignificant sum as a tithe, while he condemned the rich who beat their breasts and boasted of all they had given the Church. Jesus gave us this wisdom: Do not store up for yourselves treasures on earth, where moth and rust destroy, and where thieves break in and steal. But store up for yourself treasures in heaven, where moth and rust do not destroy, and where thieves do not break in and steal. For where your treasure is, there will your heart be also. (Matt. 6:19-21, NIV) Material things are not in themselves bad, but to expect God to shower us with them is. God promises to take care of our financial needs sufficiently. Anything more than the basics should be deeply appreciated and the Lord given thanks and praise. But He owes us nothing. Indeed, His Son Jesus bought us. We are His. In His love for us, He paid the price and now He offers to us the world’s richest possessions—greater than all the diamond mines in South Africa, all the gold and jewels that King Solomon ever possessed: the priceless gifts of forgiveness of our sins, contentment while on earth, and the incredibly valuable rewards that await each believer in heaven. Christian ministers of the Prosperity Gospel are “spiritual cousins” of the New Age. They are blurring distinctions in the minds of their flocks as to the vital difference between the spiritual teachings of the Bible and the money-hungry values of the New Age. Such leaders bring discredit on God and themselves, and they help the New Age deceive men and women and keep them from the truth. W h ere A p o s t a s y L e a d s The Great Apostasy is already far advanced. Satan’s Plan to discredit, infiltrate, and deceive is succeeding in weakening the very foundations of the Christian Church. This is no surprise, for Peter w 2rned of false prophets who will bring in damnable heresies (2 Pet. 2:1-3). Peter told us to “Be sober, be vigilant; because your adversary the devil, as a roaring lion, walketh about, seeking whom he may devour” (1 Pet. 5:8). The Devil is no respecter of persons: he seeks to devour all. In the following chapter I’ll show how Satan has designs on the most vulnerable and least protected segment of humanity: our children. S E V E N T E E N Cry for Our Children But whoso shall offend one o f these little ones: which believe in me, it were better f o r him th at a m illstone were hanged about his neck, an d th at he were drow ned in the depth o f the sea. (Matt. 18:6) I a m convinced th at the b a ttle f o r m a n k in d ’s fu tu re m u st be waged an d won in the public school classroom s by teachers who correctly perceive their role as the proselytizers o f a new fa ith . . . . The classroom m u st an d w ill become an arena o f conflict between the old an d the new— the rottin g corpse o f Christianity, together w ith all its adjacent evils an d m isery an d the new fa ith . . . resplendent in its prom ise. . . . (John Dunphy> The H um anist) hristene Mireles was so pleased that some classmates from school had invited her to a party. But shortly after the fourteen-year-old student arrived, she found that no one among the twenty-five people at the party would talk to her. In fact, they all seemed to be angry with her. “Some had a terrible look in their eyes,” Christene recalled. Suddenly a group of girls ran toward her and started punching and beating her up. Surprised and frightened, she cried out to a nearby adult chaperone. The man just looked on, a smirk etched across his face. Christene heard him actually encouraging her attackers to continue beating her. Later, from her hospital room, Christene tearfully explained, “I didn’t know they were all Satanists.” The young teenager had been beaten because she had refused to become a Satanist and join a devil-worship group.1 Across America and throughout the world, Satanism has spread its strong and evil tentacles around young men and wornen. The rise of the occult has become a plague among youth of all ages as well. But Satanism and the occult are only two symptoms of the disease know as New Age spirituality. The New Age has cast its rotten net in a bold quest to destroy an entire generation. Its subversive influences permeate all of society. It is imbedded in the curricula of our public schools, infecting kid’s library and comic books; it has reared its hideous head on Saturday morning TV cartoon shows and turned many popular cinema productions into celebrations of sorcery, violence, and sadism. The New Age has transformed America’s largest toy companies into purveyors of demonic terror and has helped to turn rock music concerts into bloodcurdling ritualistic devil-fests. Our children have been at risk for decades now as Satan has worked The Plan, wielding his dark supernatural powers in unprecedented attack waves. His goal: to wipe out all vestiges of Christianity and the Bible from our schools and our culture and, by so doing, to win youth away from Christ. Atheism and Secular Humanism, though extremely successful, were only crude first attempts by the Devil. In the New Age movement and religion, Satan has latched on to something far more effective and more direct. Both atheism and Secular Humanism honor man and his potential. But man does not have the spiritual resources to stand on his own. His destiny is to serve either darkness or light, God or His adversary. The New Age is designed, therefore, to take man-worship to its logical and ultimate conclusion: the exaltation of Lucifer as Lord of the Universe. Where Does God Stand? Jesus was not a man to tolerate evil of any kind. But of all the sinful acts a man might commit, the Lord made it abundantly clear that harming a child is one of the most despicable. Jesus loved sinners so immensely that He willingly gave His life for them. Yet He bluntly told His disciples that “whoso shall offend one of these little ones which believe in me, it were better for him that a millstone were hanged around his neck, and that he were drowned in the depth of the sea” (Matt. 18:6). The adult who damages a child subjects himself to the terrible wrath of the Almighty. An especially frightening condemnation is reserved for the individual who harms a child spiritually, for, as Jesus said, “It is not the will of your Father which is in heaven, that one of these little ones should perish” (Matt. 18:14). The child abusers of the New Age will someday be judged for what they are doing to our children. I cry aloud for the defenseless boys and girls whose tender bodies and souls are at the cruel mercy of the New Age overlords. Why Children Are the Target The Bible instructs us to “Train up a child in the way he should go: and when he is old, he will not depart from it” (Prov. 22:6). The mind of a young child is much like a malleable lump of clay. Satan desires to grasp and mold the precious commodity that is the clay-like mind of a child into a grotesque shape and form. Mocking G od’s creation, Lucifer is intent on refashioning our children into his own grim and perverse image. New Age leaders know that if they are to bring in the New Age Kingdom, it will be necessary to snatch the new generation from their parents. William McLoughlin, a New Age political activist, believes that what he calls the “awakening” can be accomplished by the 1990s: The reason an awakening takes a generation or more to work itself out is that it must grow with the young; it must escape . . . the old ways. . . . Revitalization is growing up around us in our children, who are both more innocent and more knowing than their parents and grandparents. It is their world that has yet to be reborn.2 The Lucis Trust’s Alice Bailey pinpoints the year 2000 as the Jubilee period for the New Age. Until then, she suggests that New Age disciples work especially hard to impart a new consciousness to young people. What must be done, Bailey emphasizes, is to “condition” the minds of young people, preparing them for the emergence of the New Order: We are today vitally concerned with what is called the “new consciousness,” from which new values to live by may be born as an impetus to carry humanity on into the New Age.3 Even a brief look at New Age literature reveals the importance given to the spiritual seduction of children. Among recent writings are such books as Magical Child, Gift o f Unknown Things, Children o f the N ew Age, Celebration o f the Child, Nurturing the Child o f the Future, and The Conscious Child. In such books, New Age adults are learning all the subtle and deceitful tricks they can use to persuade the young that the religion of their elders is of no value, and that instead they must worship the demon gods of the New Age. Readers are told, for example, that children may have to be “encouraged” into exploring the new world that awaits them. Marilyn Ferguson suggests that one must not be afraid to “upset the learner.” Ferguson cites one New Age spiritual teacher who commented, “True compassion is ruthless.” Ferguson also approvingly quotes the poet Apollinaire, who wrote: Come to the edge, he said. They said: We are afraid. Come to the edge, he said. They came. He pushed them . . . and they flew.4 This is scary and spine-tingling stuff. O ur kids are like some kind of spiritual fodder to the New Agers, to be ruthlessly pushed and mauled until, finally, they willingly accept the “truth” that the Bible is a lie, that the Son of God is a hoax, and that Lucifer the Great Initiator is the “bright and morning star” coming soon to restore each of us to wholeness. The Plan envisions a society so saturated with occultism and New Age symbolism that children cannot escape being drawn into the clutches of Satan. As Phil Phillips so wisely stated in his expose of occultic toys and cartoons: “By the time the child is a teen, unless his parents have instilled Christian values in him, he will have more knowledge o f the occult than he will have o f God.5״ If you doubt for a moment the death grip that New Age leaders have on the souls of our children, examine the current trends in each of the following areas of our culture and society: Schools Books Cartoons and movies Toys and games Rock music Are Public Schools the Devil’s Playhouse? Do you know what happens to your child once he or she is bundled up and sent off to school each day? Are you aware of the ideas teachers are putting into your child’s head? Beneath the calm exterior of our nation’s schools lies a raging volcano known as New Age doctrine and ritual. Each day, children are made to walk through the fire of this volcano so that the values of the New Age will become second nature to the upcoming generation. The children themselves are not mature enough to know what is happening to them, and they have no frame of reference they can use to explain to their moms and dads the changes that are being induced into their hearts and minds as a result of classroom activity. John Dunphy, an ardent New Ager who confesses a consuming interest in “folklore, history, and religion, especially ancient mystery-fertility cults and the Christian Gnostics,” sounded the clarion call to battle in an award-winning essay he wrote for The Humanist magazine. In his essay, entitled “A Religion for the New Age,” Dunphy remarked:. The classroom must and will become an arena of conflict between the old and the new—the rotting corpse of Christianity, together with all its adjacent evils and misery, and the new faith . . . resplendent in its promise. . . .6 The Underhanded, Deceptive Tactics o f New Age Educators Just how does the New Age propose to rid the schools of the “rotting corpse of Christianity”? The answer can be quickly seen: It is expected that deceit, treachery, and subversive lies will win the day. The influence of Dr. Beverly Galyean, who recently passed away, is still apparent in the curricula and educational practices being fostered on an unsuspecting public by New Age educators, administrators, and teachers. At an educators’ conference sponsored by the Association for Humanistic Psychology, Galyean, a consultant on New Age-oriented “confluent education” for the Los Angeles City Schools, told co-conspirators: Around Los Angeles hundreds of people are practicing this kind of education, but fear permeates the environment because of a call for “fundamentals,” discipline, control. . . . Our answer: . . . if your district wants discipline, tell them about programs that operate on the principle of selfcontrol. . . . perhaps hyperactivity is a problem at your school. Use natural methods for calming over-active energies: Yoga, meditation, massage, movement, nutrition. . . . The crises now facing most school districts can be the springboard for your own humanistic experiments.7 Galyean’s suggestions to educators call for them to inculcate in our children the belief that “We are all God, that we all have the attributes of God. . . .”8 But in order to get this belief into our classroom without arousing the hackles of Christian parents who might object, Dr. Galyean advised discretion. Don’t reveal our intentions, she cautioned. For example, when a teacher leads children into a group meditation exercise in which they visualize and make contact with demon guides, the teachers are to describe such guides as “imaginary guides” or “wise persons.”9 Mario Fantini, formerly a Ford consultant on education, now at the State University of New York, has bluntly stated: “The psychology of becoming has to be smuggled into our schools.” Marilyn Ferguson says that many New Age teachers have opted for “peaceful struggle.” Esther Rothman finds it encouraging that “many teachers are already crusading rebels in the best sense of the word.” “Only then,” Rothman contends, “when aggression, love and power are used constructively in the classroom, can education really suceed.”10 School supervisory personnel and administrators are even given formal instruction and training on how deceit and camoflauge can bring New Age material into classrooms. Charlotte Iserbyt, an educator who is also a Christian, has documented that subversion is rampant. Charlotte was herself given such training through federally funded programs, including the course Innovations in Education, designed by Professor Ronald Havelock. Charlotte says that this course: . . . instructed me on how to sneak in all the mind-bending techniques and humanistic courses and methods without getting caught, and how to identify the resisters in my community. Of course, I was a resister.11 Many teachers and educators promoting the New Age World Religion now blatantly and without fear slam Christianity in the classroom, while openly praising New Age principles and proclaiming the coming of the New Age Kingdom. Almost every conceivable New Age perversion is now being practiced in the classroom, offered up to our children as “constructive therapy,” “values clarification,” and enlightenment.” Child Abuse in the Classroom Teachers have incredible powers for good or for evil. Unfortunately, Satan is inspiring many teachers to work at pushing an entire generation of young students over the cliff into a sea of occultism and spiritual despair. Marilyn Ferguson has devilishly noted that “even doctors, in their heyday as godlike paragons, have never wielded the authority of a single classroom teacher, who can purvey prizes, failure, love, humiliation and information to great numbers o f relatively powerless, vulnerable young peopie.”12 Some of the many types of spiritual mayhem being carried out by New Age warrior teachers and administrators came to light when the U.S. Department of Education conducted hearings around the country to gauge public opinion regarding the implementation of the “Protection of Pupil Rights” Amendment to the Hatch Act. Hearing examiners were startled when so many parents came forward to speak to the tragedy that has become commonplace in the classrooms of America. Phyllis Schlafly, president of Eagle Forum, provided a wonderful service to America and to Christianity when she edited the transcripts of these hearings in the book Child Abuse in the Classroom (Crossway Books, 1985). This important book convincingly documents the inroads made by the New Age World Religion and its fellow traveler on the path, Secular Humanism. Below I have extracted some of the more poignant and revealing testimonies. “My son was given questionnaires. . . . The young children are expected to fill in sentences, such as, ‘The trouble with being honest i s _______________’ They are asked, what would be the hardest thing for you to do: steal, cheat, or lie? . . . (and) for group discussion in 3rd grade: How many of you ever wanted to beat up your parents?” “MACOS (Man: A Course of Study) was a very subtle way of teaching our children genocide, homosexuality, euthanasia.” “Toward the end of this course last spring, my son told me what was happening in class. Mr. Davis, the teacher, would bring up a controversial moral issue such as premarital sex or homosexuality and call on members of the class to defend their positions on the issue. He would call upon those with opposite moral beliefs from Jon, thus exerting peer pressure on Jon to change his moral values. Jon was consistently called on up to 23 times per class session to defend his values. . . . When Jon mentioned to Mr. Davis that he was calling on him more than anyone else, Mr. Davis just said, O h ,’ and continued calling on him.” “Dungeons and Dragons is a game played in many classes. . . . This game has been named as the reason for several suicides in the United States.” “In my son’s 5th grade Health class . . . homosexuality was presented as an alternative lifestyle. Sexual activity among 5th graders was not discouraged.” “My younger daughter, in the 4th grade . . . started telling the happenings in her room . . . these happenings included role playing, Circle Times, and Secret Circle Times, in which my daughter was instructed not to tell anyone what was said or done, not even parents . . . my daughter has had to receive medical treatment because of this. . . .” “A school test had this phrase dropped in—just like subliminal advertising: ‘It must be lonely to be God. Nobody loves a master.’ ” “On Labor Day. . . our son, Joe, committed suicide . . . when going through some . . . of his things I found some papers with notes taken in his psychology class. The notes were about psychic experiences, ESP, psychokinesis and astroprojection. . . . I began to question what was being taught. . . . “. . . I then asked my daughter, Theresa, who was a junior, to bring home the psychology book from the school. It was Psychology for You, by Sol Gordon. . . . Sol Gordon is a signer of the Second Humanist Manifesto. As I looked through it, it seemed to be a “how to” manual to the occult world. It suggested devising an experiment with a Ouija board. Pages 234 to 239 explain how to do meditation and TM and on page 313 and 314 it tells how to do Yoga.” “As we have removed prayer and the Bible from our schools, Yoga and Transcendental Meditation and other Eastern religions have crept into the classrooms . . . replacing the Judeo-Christian ethic. Mount Lebanon High School has a sign pointing the way to the Yoga room.” “I have a Future Studies publication, which was produced with the support of the National Institute of Education. The name of the publication is Future Studies in the Kindergarten through Twelve Curriculum authored by John D. Haas. The material is prepared for teachers to give them ideas. The preface suggests that the teachers infiltrate strategies into the curriculum. If this course has merit, why would a teacher be encouraged to sneak it into the curriculum? Topics suggested for the study include: Fertility Control, Contraceptives, Abortion, Family Planning, Women’s Liberation, Euthanasia, New Age Consciousness, Mysticism, ESP, New Religions, Changing Older Religions, Guaranteed Income, Nuclear War, and so on.” . . ‘We teach them Yoga to attain peace, harmony and selfawareness.’ ‘Also,’ the teacher said, Ί turn off the lights in the room and turn on moonlight, then we just lie on the floor and talk and fantasize. We also play fantasy scenes, breathing exercises and do . . . a Yoga exercise. . . . Children are to meditate.’ . . .” “Astrology books for youth were also available at that time. Children were to write their own horoscopes and make their own astrological sign.” “I met with a 6th grade teacher regarding a . . . seance that was held in her classroom. . . .” “The children had to role-play the main character in each book, such as a warlock, a spiritist, an exorcist, and a poltergeist.” “The (school) counselors said . . . ‘Yes . . . Christianity once served our country in a positive way, but now students today should seek other forms of religion to study and learn from.’ Then the counselor suggested Yoga and meditation, and some of the Eastern mystic religions . . . these are little kids going up against a strong-speaking counselor.” “Our county was chosen . . . to implement the Global Studies Program. . . . The goal of Global Education is to prepare all youths to accept a world government for all systems and a global interdependence.” “In language textbooks in my own school district for grades K through 8, I found entire spelling lessons dealing with the terminology of the occult. . . . School libraries are full of witchcraft, demonic, and occult literature.” These are examples of how our children’s minds are being warped and how our rights as parents are being violated. But as horrendous as these examples are, they are only the tip of the iceberg. My research has turned up hundreds of other nightmarish examples of the New Age takeover of many of our classrooms. In Buffalo, New York, young students are required to learn the Silva Mind Control method and have reportedly “contacted” such dead spirit luminaries as George Washington and Patrick Henry. In Atlanta, Georgia, in a case I became personally involved in, two courageous Christian women who objected to their children being forced by teachers to lie in the darkness and listen to hypnotic, mind control tapes became the retaliatory target of angry teachers and educators. Local pastors refused to “get involved.” In other schools, witches have been invited by officials to acquaint students with “alternative religions.” A literal avalanche of religious filth has entered the classroom, brought in by those responsible to protect our children. Many of our kids are currently defenseless victims of adult men and women who are, in truth, ministers and propagandists for an alien religion hostile both to Christianity and to everything America stands for. The classrooms of America have become the breeding grounds and assembly lines for the manufacture of tens of thousands of little New Age gods. Books Written in Hell Young boys and girls who visit their school libraries are nowadays certain to find on the shelves a large number of books written to indoctrinate children on New Age values and ways of thinking. Here are descriptions of some of the more popular kids’ books that school and public libraries have recently added to their collections: The Dragons o f North Chittendon, by Susan Fromberg Schaeffer. A fantasy story about a world constantly in a state of war because of the enmity that exists between humans and dragons. The hero is Arthur, a peace-loving dragon. Through visualization, he befriends a young man, Patrick. Patrick, who communicates with the dragon in dreams, longs for a “new age” in which dragons and men will live side-by-side in harmony and peace. The Dragon ABC Hunt, by Loreen Leedy. For three- to sixyear-olds. Depicts dragons as fun-loving, gleeful, humanlike creatures deserving love and respect by humans. Secret Spells and Curious Charms, by Monika Beisner. This book comes fully illustrated with Satanic circles, triangles, and squares. It contains many magic spells and incantations for youngsters to practice. King Stork, by Howard Pyle. The King of Storks helps a little boy woo a princess. In reviewing the book, even the liberal Publishers Weekly says it was surprised to find “such a sexy, bare-breasted lass as the princess in a children’s book.” I Will Call It Georgie’s Blues, by Suzanne Newton. This is a book that tells the story of a Reverend Mr. Sloan, a Christian minister whose behavior is destructive to his family. The Reverend is pictured as a master of outward pretense. Watermusic, by Sarah Sargent. This book is an outrage. It is practically the story of a “young Shirley Maclaine,” relating the mystical experiences of a thirteen-year-old girl as she talks with demons from beyond, as well as a giant white bat. It includes the playing of occultic ritual music and a confrontation with a monster, an “evil” counterpart to the “good” white bat. Nelson Malone Meets the Man from Mush-nut, by Louise Hawes. Young Nelson borrows a huge snake from a neighbor who practices witchcraft. The young boy takes the snake to school with him for the celebration of Pet Day. The snake wins a prize as the most glamorous animal. Dragon Dance, by John Christopher. Two young boys are thrown into an alternate world. They visit a mystical Eastern religious sect in the mountains of Bei-kun, where the priests have strange psychic powers. Elliott and Win, by Carolyn Meyer. A story with decidedly pornographic overtones. The plot includes broken marriages and affairs, “faggots” and homosexuality, and a tough gang that rapes a young girl. Is there any doubt the secular publishing industry is aiding and abetting the New Age conspiracy? The messages in the books mentioned are neither subtle nor veiled. They openly and forcefully focus the child’s attention toward the decadent, proSatan theology of both the New Age and Secular Humanism. For example, notice that in some of these books, the dragon, the bat, and the snake—symbolizing Lucifer—are portrayed as “good,” while the Christian minister is blasted for his sorry example as a leader. Whatever Happened to Wholesome Movies and TV Shows? Donald Duck, Mickey Mouse, and Pollyanna aren’t “in” nowadays. New Age sorcery and devil worship are. If you haven’t recently watched the Saturday morning TV cartoon shows for kids, do so. You’ll be shocked at what you see. It’s as if Satan himself produced some of these shows. Let me give you just a few examples of shows that the major networks and advertisers swear by the most: “Thundercats.” This cartoon series is chock-full of sorcery images. There’s the magical eye of Thundra (which any student of ancient religions will easily recognize as the Third Eye of the Hindus and the all-seeing eye of the EgyptianBabylonian Sun God, Horus). The main character in this cartoon frequently “talks” to his dead father’s spirit. His magic sword levitates to his hand—a psychic trick often claimed by occultists and Hindu gurus. “Thundercats” also is known for Yoga exercises, serpents, and demon gods. “The Smurfs.” These lovable blue critters appear at first glance to be harmless. But New Age scriptwriters, directors, and producers have been successful in perverting the friendly Smurf show with New Age occult symbolism. Again we find levitation being practiced as well as magical chants and the occasional display of the Satanic pentagram. Papa Smurf uses enchantment to ward off evil. “Rainbow Brite.”. “She-Ra, Princess of Power.” This is the fantasized story of MYSTERY BABYLON, MOTHER OF HARLOTS incarnate. Ra is the ancient Egyptian Sun God/Goddess, also known as the Queen of Heaven and the Goddess of Power. In the TV , cartoon, She-Ra operates within and between two planet worlds: Eternia and Etheria. (Though the show does not explain the name, the Ether world is the habitat where some New Agers say their New Age “Christ” and the disembodied spirits reside.) She rides on a friendly horse, “Spirit,” that has the ability to transform itself into a unicorn (a New Age symbol of horned power and Satanic enmity) and has wings of rainbow colors. She-Ra is portrayed as a godlike being with supernatural powers—the most powerful woman in the universe—who constantly battles with evil. “He-Man, Master of the Universe.” He-Man is also a supernatural man-god. Children are indoctrinated into such New Age occultic symbols and practices as pyramid and crystal power, serpents, the Satanic ram’s head, the skull, witches’ charms and spells. The child is introduced to such characters as Skeletor, Sorceress, Beast Man, and Stratos, a half-man and half-bird. And on the Big Screen . . . Big screen movies don’t offer much better fare for children. Movie producers seem driven to churn out one occult fantasy feature after another. By cleverly weaving together “good” and “evil” characters and themes, anti-Christian movies have managed to cloud our children’s minds so they can no longer discern between the real and the unreal or between right and wrong. A prime example is the movie E.T., which grossed over $619 million. E.T., a demon look-alike, was a creature from space who had powers only a god could possess. In fact, he was patterned after Jesus Christ. E.T. healed people; he could read their minds and communicate without language; he levitated and ascended. This cinema production even included death and resurrection scenes. E.T. is just one of many films that capture and manipulate the subconscious minds of children. Another is Close Encounters o f the Third Kind, a Steven Spielberg production in which powers from another world communicate with selected humans on earth. Each person is drawn by impulse toward a meeting and union with the peaceful aliens. Many in the New Age say that they, too, are called by impulse by their spirit Masters from the invisible world. Young boys especially love the many Ninja movies. Watch just one such movie and your eyes will be dazzled by the brutality and carnage represented. These include direct allusions to mental sorcery, oriental meditation, and supernatural mind powers. Also note that the Ninja warrior is skilled at wielding a unique death weapon: a Chinese star, a Satanic pentagramshaped instrument with razor-sharp edges. Study carefully the messages most of today’s movies are sending kids and you’ll soon realize the shocking truth: our children are being gradually initiated into a New Age of occultism, sorcery, and blasphemy. In Dune, children are given an image of a young man’s initiation into godhood; the Star Wars sagas present a universal deity vaguely named “The Force,” a cosmic energy that is incorporated in all living things. In the adventurous Raiders o f the Lost Ark and The Temple o f Doom, children are exposed to “powers” and then shown how to actively participate in their exercise. What Happened to Joy in the Tbybox? Once upon a time parents could be confident that their only worry in buying toys was whether the toy was physically safe for kids. A far greater danger now lurks in the toybox: the strong possibility of irreversible damage through explicit Satanism built into the toy. Toys have become spiritual killers. Today the largest-selling toys are dolls and figurines of licensed cartoon characters, such as She-Ra and He-Man. Incredible as it may seem, many of these toys represent demons. For example, the “Masters of the Universe” cartoon series offers children toys connected with He-Man, manufactured by Mattel. One offering is Skeleton Read the instructions that come with Skeletor, and you’ll discover that every child who follows those instructions is inviting into his mind nightmarish demons of darkness: When you put on your Skeletor helmet and armored belt you become transformed into an agent of evil. Use your power sword shield to combat good. With your mystical ram’s head scepter you will be able to call forth the denizens of darkness to help conquer the forces of good. Your child can get his hands on a dizzying array of similarly demented toys. He can purchase Godbox and be guaranteed a direct line to God. Little girls and boys can play with the Power Lords, a toy set with such characters as “Shaya, Queen of Power,” “Raygoth,” and “Gapplog.” Shaya, like She-Ra, has cosmic powers and can transform her body into that of an extraterrestrial. Crystlar introduces children to a strange world where magic reigns following a cosmic demon war. Some toy companies don’t even try to disguise the Satanic message inherent in their toys. Yet parents seem all too eager to buy their kids toys like Skeletor, Power Lords, Godbox, and Crystlar. The same holds true for fantasy games now popular with children. That Dungeons and Dragons is an occult game endangering the souls of young players is no secret. This also can be said of a similar game, Dragonraid. In addition to toys and games that are openly occultic in nature, there is an alarming trend among toy and game makers and comic book publishers to display Satanic and witchcraft symbolism. Some skateboards now being sold by Toys R Us, for example, have hideous dragons emblazoned on the surface. Other times this is done subtly, for maximum subliminal effect. For instance, in what is otherwise a joyful adventure story, a Satanic triangle or hexagram or an upside-down cross will appear innocuously in the background of a scene. Certainly the artist, writer, and publisher know exactly what they’re doing. M ost parents haven’t the foggiest notion that their children’s minds are being subjected to underground psychic warfare. Rock Music Several Christian writers have exposed rock music’s preoccupation with sexism, Satanism, and occultism. However, too many parents continue to allow their children and teenagers to focus their minds on heavy metal rock music. The time has certainly come when Christian parents should put their feet down and take authority over their children. The alternative is to willingly allow the child to enter a spiritual realm of unspeakable horror. Consider the names of some of the most successful rock groups and their biggest hits. The group Judas Priest sells out in live performances at Madison Square Garden in New York City. Their blasphemous album “Defender of the Faith” smashed all sorts of sales records. They’ve also released “Hell Bent for Leather,” “Point of Entry,” “Unleashed in the East,” and “Screaming for Vengeance.” In Nevada in 1985 two teenagers formed a suicide pact after listening to the Judas Priest album “Stained Glass” while drinking liquor and smoking marijuana. One died from the shotgun blast; the other is permanently disfigured for life. The Dead Kennedys is another rock group. The offensive name is only part of their story. Their repugnant album “Frankenchrist” (a hellish combination of Frankenstein and Christ) comes complete with a poster neatly tucked into the album sleeve. The poster depicts what initially appears to the eye to be beansprouts poking out from a bed of plants. But a second glance makes one’s heart sick, for the rigid, tubelike objects turn out to be not plants, but erect male sex organs. Such atrocities are not rare in the bizarre world of rock music. I recently opened up a revealing issue of the immensely popular teen magazine Spin, available at most grocery stores. There I learned about the group Def Jam and its new album, “Slayer: Reign in Blood.” The leadoff song on this monstrous album begins with the words, “Auschwitz, the meaning of pain.” From there, the listener is taken on a roller-coaster ride straight to Hades. Along the way his mind feasts on Satanism and death. Def Jam tells us that the brutal Nazi concentration camp doctor Joseph Mengele was the “Angel of Death”: a “sadist of the noblest blood” who “toiled to benefit the Aryan race” by “performing surgery without anesthesia.”13 Rock’s Worship o f Satan I began this chapter with the true story of Christene Mireles, an El Paso, Texas, teenager unmercifully beaten after she refused to join a cult of Satan worshipers. Unfortunately, her story is not unique. Satan worship and its allied activity, witchcraft, is on the rise throughout America and the world. It is undeniable that Satanically inspired rock music is a prime contributor to this despoiling of youth. Book retailers report that sales of Satanic Bibles have doubled in the last three years. These Bibles are bought by adults and youth alike. Satan worship groups and witches’ covens have sprung up everywhere, often formed by school-age youth. The Chicago Tribune carried a story of a fourteen-year-old DuPage County, Illinois, boy who threatened two other youths, saying that his Satan worship cult would sacrifice them to the Devil.14 The Associated Press reported that in M onroe, Michigan, a seventeen-year-old was killed in a Satanic sacrificial ritual. Police investigated at the local high school and eventually seized a black robe and hood, a dagger, a chalice, red liquid in a bottle, and other Satanic paraphernelia.15 In El Paso, where Christene Mireles unexpectedly encountered a band of devil-worshipers, school officials and police authorities admit that Satanic worship and witchcraft rituals have become a fad among the young. Teenagers proudly display occult symbols such as 666, pentagrams, lightning bolts, upsidedown crosses, and swastikas. Also highly favored is Satanic art on T-shirts sold by such heavy metal rock groups as Black Sabbath, Slayer, Iron Maiden, Judas Priest, and Ozzy Osbourne.16 Florence Luke, director of El Paso Hotline, reports that some teens who have experimented with Satanism and occultism later call in to say they are gripped with fear that the Devil is trying to kill them. “The animal sacrifices and the drinking of blood is very real to these children. M ost of them can’t even sleep at night. Some of them have thoughts of suicide and thoughts of killing others,” Luke said.17 From Texas, Michigan, Florida, California, New Jersey, and across the nation, reports keep coming in. Satanic symbols are found at crime scenes by police, homeowners report damages by vandals who leave behind spray-painted or scratched symbols of Satanism, the dead carcasses of sacrificed animals turn up in vacant lots near isolated farmhouses, and depressed (and oppressed) teenagers are committing suicide. Satan is at war with the youth of planet earth. A Call to Parents The New Age has designs on your children. The question is, What are you, a Christian mom or dad, going to do to prevent your child from being hopelessly sucked into the swirling vortex of New Age occultism that surrounds him or her? There is much you can do. Our God is strong enough to protect our innocent children. We must put our boys and girls off-limits to the New Age and to its spiritual leader, Satan. I was struck recently by the testimony of the elderly, articulate Irene Park.18 Irene, today a committed Christian, was formerly the High Witch of Florida. “My mind was totally depraved and taken over by the Devil,” she said. She admits to terrible deeds during her many years in the occult; for example, seducing young children sexually and introducing boys and girls to Satan1st ritual. A repentant Irene now confesses that Satan had vested in her his dark powers, which she used to savage young children. Irene said that as a witch the only children she could not seduce—though she greatly lusted after them—were the children of dedicated Christian parents, parents who constantly prayed over their children through the precious blood of Jesus. There is a lesson here. We as Christians should rightly be outraged at what our schools, the entertainment industry, and others are doing to our children. But we need not be paralyzed with fear about the prospects for our children. God has the answer, and we can turn to Him with confidence. E I G H T E E N Dress Rehearsals for the Main Event The Lord is not slack concerning his prom ise . . . but is long-suffering . . . not w illin g th at a n y should perish, but th at all should com e to repentance. But the d a y o f the Lord w ill com e a s a th ie f in the night. . . . (2 Pet. 3:9, 10) The Second Com ing has occurred. . . . N ow is the tim e to begin building the new earth. (David Spangler, Revelation: Birth o f a N ew Age) e do not know at what hour the New Age “Christ”—whom Spirit-filled Christians will recognize as the Antichrist— will come. But New Age prophesiers and seers suggest that he is now living and that his appearance is imminent. Jeanne Dixon, the world-famous astrologer with definite ties to the New Age, on February 5, 1962, had what she referred to as “the most significant and soul-stirring vision of her life.” Dixon saw an ancient pharaoh and his Queen Nefertiti walking toward her. The queen held out a baby as though offering it to the world. “The eyes of the child,” reported Dixon, “were allknowing . . . full of wisdom and knowledge.”1 Dixon watched as the baby grew into manhood. Then the image of a cross formed above him and began to expand until it enveloped the earth. “Simultaneously, peoples of every race, religion, and color, each kneeling and lifting his arms in worshipful adoration, surrounded him. They were all as one.” Ms. Dixon was convinced that this vision was of the reincarnated “Christ” who, she suggested, was born on that day. He will, Dixon predicted, “bring together all mankind into one allembracing faith . . . the foundation of a new Christianity with every sect and creed united.” One prominent New Age group, the Tara Center, announced that the “Messiah” was ready to assume his earthly throne:. . . . We will recognize him by his extraordinary spiritual potency, the universality of his point, and his love for all humanity. . . . He comes not to judge, but to aid and inspire. The Tara Center published the above announcement in paid ads in major newspapers around the globe in 1982. The ads promised that the “Christ” would appear “within the next two months,” speaking to humanity through a worldwide television and radio broadcast: His message will be heard inwardly, telepathically, by all people in their own language. From that time, with his help, we will build a new world. The world has yet to meet this New Age “Christ”-figure. But Benjamin Creme, head of the Tara Center, headquartered in London and North Hollywood, California, has stated that the “Christ,” whom he calls the Lord Maitreya, is now confidentially working in London and is a member of a Pakistani community in that city. The time for his appearance on the world scene did not prove to be ripe in 1982, Creme explains, insisting that the Lord Maitreya will yet appear to commence his earthly reign.2 God’s Timetable fo r the Last Days Why was the time not ripe in 1982? Why has the New Age “Christ” failed to appear? There can only be one explanation: Satan has up to now been constrained by the Holy Spirit. Though Satan is surely anxious to do his dirty work, the almighty power of God has up to now denied Satan his longawaited opportunity to seize total control. God has a timetable for these last days, known only to Him (Matt. 24:36). Neither Satan nor any man knows when God will allow the final curtain to rise. So for the past several decades Satan has been forced to practice dry runs for the main event. The aborted ascension to power of the Tara Center’s Lord Maitreya is one example of a dress rehearsal. There have been—and may be—many others. Satan’s Plan for a One World Religion and a One World Government will eventually succeed, but only according to God's timetable. Let’s review a few more of Satan’s ill-fated failures to establish his one world system led by Antichrist. What we’ll see is that Satan’s power is severely circumscribed by that of our Heavenly Father. Yet, Satan’s insatiable craving for absolute authority drives him on in his quest for sovereignty. Krishnamurti, the New Age Messiah The strange case of Jiddu Krishnamurti demonstrates that Satan has been practicing for many decades for the main event—the time when his Beast with the number 666 would acquire absolute dominion on earth. Krishnamurti is a disciple of Theosophy and a Hindu. In 1909 Annie Besant, then head of the Theosophical Society headquartered in India, announced that through Yoga and meditation it had been revealed to her that the young Krishnamurti had been chosen to be the “World Teacher” and “Guiding Spirit of the Universe.” Besant prophesied that the “Christ” spirit—he who directs the invisible hierarchy—would manifest itself by taking possession of Krishnamurti’s body. Dave Hunt, in his insightful, best-selling work Peace, Prosperity, and the Coming Holocaust, documents the turn of events that occurred after Krishnamurti’s selection as the “Christ.”3 Besant, H unt noted, predicted that the new “Messiah” would combine all religions into one. Then he would create a world government. ' Theosophists and many other New Age believers were convinced that the long-awaited “Christ” was finally being revealed to mankind. It was reported by those who listened to Krishnamurti speak at a Star of the East convocation in 1911 that he “spoke in the first person as a god.” Nearly six thousand delegates were there, and some knelt down and worshiped Krishnamurti. Others witnessed “a great coronet of brilliant, shimmering blue” appearing above his head. In 1926, after a tumultuous welcome in Europe, the New Age Messiah sailed off to America. As H unt put it, “Krishnamurti needed only a favorable reception in the world’s most powerful and influential nation to launch the New Age.” It was not to be. Even as his ship docked, Krishnamurti complained about the “electrical atmosphere” in New York City and America. He said that he was unable to meditate successfully. Apparently his occult powers failed him, and his spirit guide mentors were unable to function. The N ew York Times reported tht the young “Christ” heir apparent became almost incoherent during an interview aboard ship. Rather than being perceived as a powerful spiritual figure worthy of world rulership, Krishnamurti was reported to be “a shy, badly frightened, nice-looking young Hindu.” Plans for Krishnamurti to speak in New York were abruptly canceled. He sailed back to his native India a failure. The publicity which hailed him as God incarnate abated. Krishnamurti himself later disavowed that he was the “Christ.” Today Krishnamurti’s books sell well to New Agers, and he is occasionally interviewed for New Age publications. But no longer does anyone—not even the most ardent of Theosophists— believe that he is the “Messiah” or “Christ.” New Agers now wait expectantly for the “real Christ” to be unveiled and appear as World Teacher. Hitler, the Aborted New Age Messiah There is abundant proof that Adolf Hitler was specially chosen by Satan for his horrid mission. It may well be that the Nazi monster was slated to be the Antichrist. However, God’s time table of events did not agree with Satan’s. Also, evidence unearthed since World War II indicates that Hitler disobeyed Satan and ic:’ out of favor with his hellish master. It is certain that Hitler was heavily into the occult and a Satanist and that his murderous activities were carried out under orders from below. In 1974 theosophist Foster Bailey, Alice Bailey’s husband, apparently referred to Hitler’s role as Satan’s discipie in carrying out The Plan when he wrote: Another approved hierarchical project is the uniting of the nations of Europe into one cooperating peaceful community. . . . One attempt was to begin by uniting the peoples living in the Rhine River Valley using that river as a binding factor. It was an attempt by a disciple but it did not work. Now another attempt is in full swing, namely the . . . European Common Market.4 In his excellent book The Twisted Cross, Joseph J. Carr documents the depths of occultism in Hitler’s Third Reich.5 He shows that the Nazis worshiped pagan gods, that the dreaded SS (Gestapo) conducted Mystery initiation rites and swore blood oaths to Satan, and that the top Nazi leaders were dedicated students of the black magic arts and witchcraft. The Nazis also believed in evolution, karma, and reincarnation—all New Age concepts. Hitler himself was an avid reader of occult literature and a member of the occultist Thule Society. The swastika, the Nazi symbol of a twisted cross, is itself an occult religious symbol found frequently in ancient times on the altars of pagan gods and still seen today on the walls of some Hindu temples in India. The Babylonians first originated this religious symbol, Satan being fully aware of the future death of Jesus on the cross and desiring to distort the meaning of that event. To the Babylonians, the swastika symbolized the Sun God, Baal. According to Carr, Hitler was taught his occult and magical knowledge by Dietrich Eckart, a M aster Adept of the Thule Society’s inner circle. Eckart had passed the word to others in this group that he had received confirmation from his “master” that he would be the one to train up a “vessel for the Antichrist” who would lead the Aryan race to great triumph and victory over the Jews. Adolf Hitler is known to have greatly admired his mentor and teacher, Dietrich Eckart. In return, Eckart showered praise on the popular young radical. However, the old man well recognized the source of Hitler’s uncanny, almost hypnotic powers. On his deathbed in December 1923, Eckart told those nearby not to mourn him because he, Eckart, will have influenced history more than any other German. He exhorted his followers to “follow Hitler,“ reveling that: He (Hitler) will dance but it is I who will call the tune! I have initiated him into the SECRET DOCTRINE, opened his centers of vision and given him the means to communicate with the powers.6 In the last chapter of The Twisted Cross, author Joseph Carr discusses the parallels between Nazism and the New Age Movement. He concludes that while he is not yet fully convinced that the New Age is the Antichrist movement predicted in Biblical prophecy, it is “an Antichrist movement that could easily spawn another Adolf Hitler—and a holocaust that makes the killing of the Jews during World War II look like a minor action.”7 He also writes: One cannot argue against the claim that the Nazi worldview and major elements of the New Age Movement worldview are identical. They should be, after all, for they both grew out of the same occultic root: theosophy. Their respective cosmogony, cosmology, and philosophies are identical.8 The False Prophecy o f the False ״Christ” In a previous chapter, we discussed David Spangler’s New Age “Christ,” who mockingly calls himself “Limitless Love and Truth.” Evidently this Satanic entity has been constrained up to now by the Holy Spirit from emerging from the “inner realms of the earth,” where Spangler says he now resides. In 1961 it was announced by this spirit that by Christmas Day of 1967 he would be revealed to the universe. Between the years 1961 and 1967, New Age believers waited expectantly for their “Christ” to appear as promised. “When nothing externally significant happened,” Spangler admits, “there was considerable disappointment.”9 However, Spangler cleverly explains away the failure of his “Christ’s” prophecy by belatedly declaring that “Limitless Love and Truth” did come at the appointed time in the form of “a remarkable release of energy upon the earth.”10 Spangler further maintains that thousands of individuals around the world felt that energy flow: The transfusion of energies from the old etheric to the new one had been sufficiently completed; Cosmic blessings had been placed upon earth. The Christ, imprisoned in the tomb of matter for nearly two thousand years, had ascended. . . . The New Age had been born. . . . Revelation was on the move!11 Spangler does not fully explain his statement that the “Christ” (that is, Satan’s “Christ”) had been “imprisoned in the tomb of matter for nearly two thousand years” before his ascension. Apparently this refers to the fact that by His sacrifice on the cross, Christ Jesus had bound Satan in his tomb within the inner reams of the earth, severely limiting his freedom of movement and his ability to operate with impunity on earth. But Spangler is claiming that with the end of the year 1967, Satan had been loosed from his tomb of matter and is now on the move. If this be so, it was G od’s will that the Holy Spirit no longer restrain the evil one. The ultimate battle for control of man’s soul had commenced. As Daniel correctly prophesied, the Antichrist is to be allowed to “forecast his devices against the strongholds, even for a time,” for “his heart shall be against the holy covenant; and he shall do exploits” (11:24, 28). Still, what is significant to realize is that in 1967, contrary to Satan’s ultimate Plan, God confounded the New Age by refusing to allow him to appear in his final incarnation in the flesh as the Antichrist, the Beast of Revelation. The earth operates by G od’s timetable, not by Satan’s, and the events of the last days will be exactly as God has planned. Jesus Himself testified: But of that day and hour knoweth no man, no, not the angels of heaven, but my Father only . . . Watch therefore; for ye know not what hour your Lord doth come. (Matt. 24:36, 42) In 1982, fifteen years after the New Age “Christ” had failed to appear as promised through David Spangler, another New Age leader, Benjamin Creme, announced that the time had come. As I mentioned earlier, in April of that year, in major newspapers around the globe, Creme’s group, the Tara Center of London and North Hollywood, California, bought ads proclaiming the “Christ’s” appearance would take place within the next two months. Again, God confounded those who plotted against His will. The Lord Maitreya, the chosen vessel of Creme’s New Age group, failed to appear as predicted. The time was not ripe for his emergence. Satan, battered but not yet defeated, came back for more punishment on December 31, 1986. On that day, at 12 noon Greenwich Mean time, tens of millions of New Age followers worldwide gathered in stadiums, convention and meeting halls, hotel rooms and private homes, and in churches to invoke the New Age. Thousands among them summoned the New Age “Christ” and his hierarchy to manifest themselves. The event was designated International Meditation Day (also called by other names, such as World Peace Day and World Healing Day). This incredible gala was sponsored by hundreds of New Age organizations in sixty nations and coordinated by the Quartus Foundation and its affiliate, The Planetary Commission, Austin, Texas. John Randoph Price declared in advance that five hundred million New Age believers around the globe would be participating in International Meditation Day, one hundred million of these worshipers being Hindus in India. Fifty million Americans were expected to join in the meditation. As Price put it, the intent of these millions was to participate in: A planetary affirmation of love, forgiveness and understanding involving millions of people in a simultaneous global mindlink. The purpose: to reverse the polarity o f the negative force field in the race mind, achieve a critical mass of spiritual consciousness, usher in a new era of Peace on Earth, (and) return mankind to Godkind.12 Speaking to the 71st Annual International New Thought Alliance Congress on August 1, 1986, Price pledged, “Both earth and man are waking up. . . . It is going to happen, because the restoration of the Kingdom on Earth is the Divine Plan.”13 The tens of millions of New Age religious believers who dutifully participated in this momentous “awakening” were, however, not treated to the desire of their hearts. Reciting in unison the World Healing M editation14 prepared by The Planetary Commission, they pleaded with the “One Presence and Power of the Universe” to deliver “peace” and “good will” to earth. They pridefully declared, “I am a co-creator with God, and it is a new heaven that comes.” Blaspheming our Father in Heaven and His Son, they flattered themselves with the pronouncement that “I and the Father are one, and all that the Father has is mine. In Truth, I am the Christ of God. . . . I am the light of the world.” Finally, the masses who congregated at locations near and far on December 31, 1986 decreed some type of magical command by affirming that “I am seeing the salvation of the planet before my very eyes. . . . It is done and it is so.” Their fervent declarations and commands were of no avail. The New Age failed to promptly materialize, and the New Age Messiah they were invoking did not appear. This time, however, New Age leaders had cleverly prepared an explanation in advance for the eventuality that God would once more deny the fulfillment of the coming of the Antichrist and a One World Order. John Randolph Price had written that there may be those (presumably Christian fundamentalists) “who will continue to resist based on the illusion of vested interests.”15 Price said that the Seekers and the Light Bearers (the New Age believers) would in that case need to embark on a threestage program to 1) construct or build upon the spiritual foundation begun on International Meditation Day; 2) consolidate and strengthen the bond of Divine Love that had begun; and 3) finally, and most importantly, inaugurate the world into a New Age Kingdom.16 Price told readers it should be obvious what this third stage or phase is all about. “The word inauguration,” he explains, “comes from Latin inaugurate which means to give sanctity to a place or official person.” Does that mean that Jesus Himself is returning, and that this stage will usher in His reign as Lord of the world in physical form? Or does it mean the “externalization” of the Hierarchy of Spiritual Masters? Or does it mean that . . . each one of us will awaken to the Truth of our being—that the Higher Self of each individual is the Christ? Perhaps all three happenings and experiences will occur. . . .17 Here Price seems to appeal to almost every perverted New Age doctrine. First, he tells the deluded Christian apostate that the New Age “Jesus” (or rather, the reincarnated demon spirit who would come masquerading as Jesus) might return. Then he addresses the desires of those who preach the externalization, or spontaneous appearance, of the hierarchy of spiritual Masters, now said to operate in an invisible spirit dimension. Finally, he seductively implants the almost universally acclaimed New Age idea that, with the inauguration of the earth, each of us will ascend to godhood by becoming ourselves a “Christ.” Regardless of the clever machinations of such mesmerizingly talented New Age leaders as Spangler, Creme, and Price, the failure of their “Christ” to appear as predicted is persuasive evidence that these men are not prophets of God, but of the Adversary. The M ark o f the True Prophet The Bible flatly states that, without fail, every prophecy announced by a true prophet will come to pass (see Deut. 18:2022). God does not fail, nor do His prophecies. Never has even one prophecy of the Bible failed. Now contrast this incredible accuracy with that of the New Age “prophets.” We have already seen that their New Age “Christ” has repeatedly failed to materialize as prophesied. Another example of a spectacular failure of a New Age prophecy is that of Ruth M ontgomery’s reincarnated spirit guides. In Strangers Among us, they erred by predicting a “big spending Democrat” would succeed Jimmy Carter as President and that the Shah of Iran would spend his declining years in Europe. Reagan, a Republican, succeeded Carter, and the Shah died unexpectedly in Mexico of a terminal illness.18 Other examples of prophecies that went awry are found in the predictions of Edgar Cayce, idolized by millions of New Agers as the “Sleeping Prophet” because medical diagnoses came to him in a vision while he slept. Cayce, a Kentucky Sunday school teacher now deceased, is still greatly revered, and his many books are praised by the New Age as exemplifying the best of “Christian mysticism.” Cayce was a spiritual healer who practiced telepathy, fortune-telling, and clairvoyance. Kurt Koch, world-renowned occult expert, enumerated in his book Occult ABC the many false teachings of this New Age prophet.19 Among them: 1) Jesus Christ was only a reincarnation of Adam, Melchizedek, Joshua, and Zend (the father of Zoroaster). 2) God is a Mother-Father God. 3) Jesus and His mother Mary were “twin souls.” 4) God does not know the future (though Cayce himself claimed he did!). 5) M an’s redemption comes from his own doing; in other words, we are our own saviors. Cayce professed to be an avid Bible reader and a dedicated Christian. He erroneously testified that his gifts came from God. As Koch so eloquently states: “We are faced here with a strange mixture of Bible study and magic. It is one of Satan’s specialties to hide under a Christian disguise.”20 The Sleeping Prophet, Edgar Cayce, had a number of prophecies which failed to come to pass. A most notable failure came in 1941 when he prophesied that in 1967 or 1968 a portion of the long-fabled continent of Atlantis would emerge from under the sea. News reports from those two years certainly do not reveal any such thing happening. Yet Cayce’s prediction undoubtedly caused many people who believed in him to be led astray during the years between 1941 and 1968, because a belief in Atlantis and its mythical race of supermen is a key tenet of faith on the part of many New Agers. When Will the Final Antichrist Appear? Satan has been forced time and again to abandon his plans to unleash the final Antichrist on the world. However, these failures should not blind us to the truth. Satan will eventually produce the Antichrist, who will be an evil person outdoing any and all evil rulers who have ever lived. Even Hitler will have been a pale imitation. Just when can we expect this vile Antichrist to appear? Paul gave us a glimmer of knowledge concerning this when he cautioned the church of Thessalonica:. . . . (2 Thess. 2:3, 9) Jesus instructed His disciples that just before the terrible events of the latter days, false “Christs” and false prophets would arise and show great “signs and wonders”: Then if any man shall say unto you, Lo, here is Christ, or there; believe it not. . . .. 24:23, 26, 27) Just as our Lord prophesied, Satan continues to produce false prophets and “Christs.” Maitreya, Krishnamurti, and Hitler were examples of false “Christs,” and Spangler, Creme, M ontgomery, and Cayce exemplify the fake prophets we were warned to expect. We can be confident that Jesus will return as the Christ, but not as a reincarnated spirit and not as a mere man. He will return with brilliant light from heaven, in fullness of glory, triumphantly appearing out of the clouds. This is a certain event that Satan will not be able to to duplicate. So we know there will first be a “falling away” of many in the Church and then the Antichrist will appear, whose coming is after the working of Satan. This falling away, Paul said, will leave the ungodly multitudes vulnerable to the lies of Satan’s man-god, the Beast and Antichrist. Captive to sin, they will not be able to discern the truth but will believe a “strong delusion” (2 Thess. 2 :10- 12). This great falling away is already far advanced. New Age doctrine is being brought into mainline denominations as well as independent Christian churches and is especially gathering strength in the Catholic Church. Combined with other signs of the last days— such as the events in Israel and the Middle East— this is a prime indication that the day i& at hand when the prophetic Tribulation period will begin and the “son of perdition” will be revealed. N I N E T E E N W hat Must Christians Do? (For the weapons o f our w arfare are not carnal, but m igh ty through God to the pulling dow n o f strongholds;) castin g dow n im aginations, an d every high thing th at exalteth its e lf again st the knowledge o f God, an d bringing into c a p tiv ity every thought to the obedience o f Christ. (2 Cor. 10:4, 5) In an sw er to our urgent need, THE CHRIST IS IN THE WORLD. A g reat World Tiacher f o r people o f every religion an d no religion. A practical m an w ith solutions to our problem s. He loves ALL humanity. . . . (The Tara Center, USA Tbday) omewhere, at this very moment, a man is perhaps being groomed for world leadership. He is to be Satan’s man, the Antichrist. His number will be 666. This world dictator will be looked upon by the masses not only as a masterful political genius and leader, but as a spiritual teacher In every nation, including the United States, he will aggressively move to replace Christianity with his own religious system: The New Age World Religion. This one world religious system is at the core of The Plan. Doubters may object, this can’t happen in America—Anywhere else, but surely not in the U.S.A.! Americans, who have always enjoyed the fruits of democracy, find it difficult to believe that their religious freedoms could ever be abridged by a future New Age Antichrist. The history of this planet says otherwise. The United States and the handful of other democracies in the world are but a small oasis surrounded by a hostile desert of totalitarian and authoritarian dictatorships. A disastrous world war, a great economic depression, a concerted campaign by terrorists armed with nuclear weapons to overthrow the government—any of these events could within months or even minutes possibly bring to Washington a new, undemocratic regime bent on destroying the remnants of Christianity. The end of democracy and religious freedom could also come gradually as more and more liberties are lost and an antiChristian environment slowly develops within democratic nations. Some believe this process has already begun. Though we do not know specifically how or when our democratic freedoms will be extinguished, what we do know is that the Bible prophesies the last-days arrival of an Antichrist who will assume dictatorial world power and move aggressively to punish Christian believers. First Peter 4:12, 13 tells us not to be taken by surprise when this occurs, but to rejoice: Beloved, think it not strange concerning the fiery trial which is to try you, as though some strange thing happened unto you: but rejoice, inasmuch as ye are partakers of Christ’s sufferings; that, when his glory shall be revealed, ye may be glad also with exceeding joy.1 The New Age appears to be the instrument that Satan will use to catapult his Antichrist to power. Once he is firmly entrenched, he will unite all cults and religions into one: the New Age World Religion. When Christians refuse to be initiated into this Satanic religious system, they will be dealt with very harshly. Many will be put to death. The New Age is working hard today to set up an enviornment of hatred toward Christians and what they stand for, so the public mood will be ready when the Antichrist begins his brutal anti-Christian programs. A New Age propaganda campaign is already at full-throttle to brand us as warmongers and separatists. We are described as the Beast, the Antichrist, a racially inferior species unfit for the New Age Kingdom. Discerning Christians see the signs and know what is happening. Billy Graham, for example, in his book Approaching Hoofbeats: The Four Horsemen o f the Apocalypse demonstrated his discernment when he wrote: “I hear the hoof- beats of the four horsemen approaching. I hear the thundering approach of false teaching, war, famine, and death.”2 The Sovereignty o f God It is significant, however, to note that after confiding to us that he hears “the thundering approach of false teaching, war, famine, and death,” Billy Graham went on to say: “I see and hear these signs as a shadow of G od’s loving hand at work for the world’s redemption. God is offering hope for those who heed the warning.”3 The New Age has come so far so fast that unless we put things in perspective it is easy for us to assume that all is lost. All is not lost. The Word of God assures us that Satan’s victory will be short-lived. The Plan will ultimately fail. Because we are Christians, Jesus has given us freedom from worry. We know that He who is within us is greater than he who is in the world. God is our victorious, all-conquering King. Paul spoke to this in these uplifting words:) So we are not fearful for ourselves. Our joyous fate is sealed by the grace of the Lord. But we can rightly be anxious over what might befall our loved ones, neighbors, and friends—and all of mankind—who, because they do not know Jesus, do not possess eternal security. The emergence on the world scene of the prophesied, endtime Satanic religious system can in one sense be viewed as positive, for it signals the imminent return of Jesus Christ and heralds the Kingdom of God that is soon to come. But our hearts grow heavy when as Christians we realize the harvest is drawing near and there is so little time to warn the lost and bring to them the blessed message of salvation. The New Age World Religion should provide incentive for Christians to boldly preach the gospel and to earnestly spread the good news that the time of man’s deliverance is truly at hand. W h a t C an You D o? I have prayerfully asked God to reveal to me what I should say to concerned Christians who ask, “What can I do about The Plan of the New Age to destroy Christianity and put man under bondage?” The Lord has answered my prayers, and 1 would now like to share with you the four positive steps that you and every Christian can take in this time of crisis and turmoil. Step 1: Read and study your Holy Bible so you will be knowledgeable o f God's Word and invulnerable to N ew Age distortions and unholy claims. While all around us, muddled intellectuals and mixed-up men and women are, figuratively speaking, “losing their heads,” we should keep ours clear by strengthening our minds with the wisdom of the Book of Books. The warfare for man’s soul involves a series of battles over doctrine, and if Christians are to save as many of the lost as possible, we must be girded with G od’s truth. O ur footing must be sure as we engage the enemies of the Scripture. Step 2: Put Jesus first in your life and make soul-winning for Christ your top priority When we put Jesus first in our own lives and make soulwinning our top priority, all the forces of hell cannot withstand us. Christians who affirm and commit themselves and their churches to what Jerry Falwell has called the “irreducible minimums” will serve as shining beacons of light to lost souls. Falwell says these include the primacy of the Bible as the inspired, inerrant Word of God, an unshakable belief in the divinity of Jesus Christ, and the acceptance of Jesus Christ as the only way to salvation. Step 3: Confront and fight N ew Age apostasy wherever you find it, understanding that Jesus is Lord and that He will prevail. Use prayer as both a resource and a powerful vehicle to ward off God's enemies. In the Epistle of Jude we find the admonition that we should “earnestly contend for the faith which was once delivered unto the saints.” Jude told us to look). What a powerful message for today! Earnestly contend for the faith! Listen also to what James told us: “resist the devil, and he will flee from you” (Jas. 4:7). How do we go about this? The Bible provides the answer. James told us to be soulwinners, to convert the lost: “Let him know, that he which converteth the sinner from the error of his way shall save a soul from death, and shall hide a multitude of sins” (Jas 5:20). Be assured that in witnessing for Christ, you will be going up against the strongholds of Satan. You will also, on many occasions, be locked in battle with the evil “wisdom” of those promoting New Age doctrines and falsehoods. The Bible tells us that we must not wish men of evil Godspeed (2 John 10, 11). Theirs is a mean-spirited goal, and we must not be tolerant toward a belief system which has as its principal aim the poisoning of souls. O ur right attitude should be one of “tough love”: we love the individual, but we deeply regret and reject his awful message. Confrontation with evil cannot be won without prayer. The Christian who prays constantly and meditates on God’s Word will find that his actions and words are imbued with great power from the Holy Spirit. Always remember that Jesus has already proven victorious. As Pastor Charles Bullock has so profoundly said, “We’re not on the winning side. We’re on the side that won!”4 Step 4: Reach out in Christian love to individuals in the N ew Age Movement, many o f whom are confused, hungry for spiritual things, and searching for truth. Show them that Jesus Christ is the answer and that He loves them. Though Satan is the very foundation-stone for the New Age World Religion, we must be very careful about our attitudes toward New Age believers. By no means is every person involved in the New Age Movement calculatingly evil. M ost people entangled in this movement are themselves victims. Some are ear nestly searching for the truth and are spiritually hungry. Also, many are motivated by sincere humanitarianism; but being mentally confused, these individuals are deluded by New Age gurus and teachers. A great number may not even be fully aware of The Plan which Satan and New Age human leaders have conceived for man’s future. While we abhor the un-Christian tenets of New Age believers, we must always keep uppermost in our minds the fact that Jesus died for their sins as well as our own. This is why I encourage Christians to reach out to New Agers in love and to counteract this apostasy with all the spiritual weapons that Jesus so richly provides us, including prayer, reading God’s Holy Word, Christian example, and—most important of all—faith. But they that wait upon the Lord shall renew their strength; they shall mount up with wings as eagles; they shall run, and not be weary; and they shall walk, and not faint. (Isa. 40:31) Notes CHAPTER 1: The Plan 1. M arilyn Ferguson, T he A quarian C on spiracy: Personal a n d Social T ransform ation in the 1980s (Los Angeles: J. P. Tarcher, Inc.: 1980), pp. 23, 24. 2. John Randolph Price, T h e P lan etary C o m m issio n (Austin, Tex.: Quartus B ooks, 1984), p. 32. 3. Vera Alder, W hen H u m a n ity C o m es o f Age (N e w York: Samuel Weiser, Inc., 1974), pp. 190-193. 4. John Randolph Price, T he P lan etary C o m m issio n , back cover. 5. John Randolph Price, T h e Superbeings (Austin, Tex.: Quartus B ooks, 1981), p. 1. 6. John Randolph Price, T he P lan etary C o m m issio n , p. 69. 7. Ib id ., pp. 47 , 48. 8. Μ . E. H aselhurst, “T he Plan and Its Im plem entation,” T h e Beacon, S e p te m b e r/O cto b er 1975, p. 147. 9. M oira Tim m s, P rophecies a n d P rediction s: E veryon e’s G u ide to the C om in g Changes (Santa Cruz, Calif.: U nity Press, 1980), pp. 129-131. 10. Benjamin Crem e, full-page ad by Tara C enter in tw enty major newspapers around the glob e, April 25, 1982. 11. David Spangler, Revelation: T he B irth o f a N e w Age (M id dleton , Wis.: Lorian Press, 1976), p. 61. 12. Ib id ., pp. 2 0 4 , 205. 13. From the prom otional material o f T he N e w G roup o f World Servers, reprinted in C onstance C u m bey’s A P lanned D eception : T he Staging o f a N e w Age M essiah (East D etroit, M ich.: Pointe Publishers, Inc., 1985), pp. 2 4 8 -2 5 3 . 14. Barry M cW aters, C on sciou s E volution: Personal a n d P lanetary Transform ation (San Francisco, Calif.: Evolutionary Press, 1982), p. 15. 15. Ibid., p. 147. 16. C onstance Cumbey, A P lanned D eception , pp. 195-197. 17. Lola A. Davis, T ow ard a W orld Religion fo r the N e w Age (Farmingdale, N.Y.: Colem an Publishing, 1983), p. 189. 18. Ib id ., pp. 177, 178. 19. John Randolph Price, T he Superbeings, pp. 3, 38. 20. John Randolph Price, T he P lanetary C o m m issio n , pp. 47. 21. Terry C ole-W hittaker, qu oted in M agical Blend, Issue 14, 1986, p. 13. CH APTER 2: M ystery Babylon: Satan’s Church, Yesterday and Today 1. A lexander H islop , T he T w o Babylorts (N e w York: L oizeaux, 1959; first edition published 1916 in England), pp. 2 8 7 , 288. 2. I have benefited in my research from the excellent accou nts o f the M ystery Religion o f Babylon found in Alexander H islop ’s b o o k The T w o Babylons. Also o f great use were these references: Werner Keller, T he Bible as H is to r y (N e w York: Bantam B ooks, 1982); H enry M . Hailey, H ailey’s Bible H a n d b o o k , 24th Edition (Grand Rapids, M ich. Zondervan, 1965); and Ralph W oodrow , B abylon M y ste ry Religion (Riverside, Calif.: Ralph W oodrow Evangelistic A ssociation, 1981). 3. M iriam Starhawk, q u oted in Yoga Journal, M ay-June 1986, p. 59. 4. T he S p irit o f Truth a n d the S p irit o f Error, com piled by Keith L. Brooks (Chicago: M o o d y Press, 1985). 5. Kathleen Alexander-Berghorn, “Isis: T he G odd ess as Healer,” W om an o f Power, W inter 1987, p. 20. 6. Hal Lindsey, q u oted on “Praise T he Lord,” Trinity Broadcasting N e twork (T B N ), O ctob er 28, 1986. 7. Paul C rouch, ibid. 8. Full-page ad by N e w Age Activists in P sych ic G u ide m agazine, Septem ber-N ovem ber 1986, p. 5. 9. Ibid. 10. Ibid. 11. W illiam Irwin T hom p son , Pacific Sh ift (San Francisco, Calif.: Sierra Club B ook s, 1986). 12. John Randolph Price, T he P lan etary C o m m issio n , p. 46. 13. “Djwhal Khul” (channeled by Alice Bailey), “F ood for T h ou gh t,” Life T im es, W inter 1986-87, p. 57. 14. R obert Lindsey, reported in the N e w York T im es, Septem ber 2 8 , 1986. 15. Ibid. 16. Ibid. 17. Ibid. 18. Jack Underhill, “T he Second American R evolution, The N e w Crusades,” L ife T im es, W inter 198 6 -8 7 , p. 2. 19. Ibid. 20. Ibid. 21. John Randolph Price, T he Planetary C o m m issio n , pp. 28-32. 22. Corinne H eline, N e w Age Bible In terpretation , Vol. VI, N e w Testam ent, fifth edition (Santa M onica, Calif.: N e w Age Bible and Philosophy Center, 1984), pp. 4 4 -4 9 , 213 -2 1 5 . 23. Peter Lemesurier, T he A rm ageddon S cript (N e w York: St. M artin’s Press, 1981), p. 232. 2 4. Ib id ., p. 237. CHAPTER 3: Toward a One World Religion and a Global Order 1. Gerald and Patricia M isch e, T ow ard a H u m an W orld O rd e r (Ramsey, N.J.: Paulist Press, 1977). 2. David Spangler, Revelation: T h e B irth o f a N e w Age, p. 204. 3. John Randolph Price, T he P lan etary C o m m issio n , pp. 30 -3 1 , 143-147, 162. A lso, Superbeings, pp. ix-xv, 3, 15, 38. 4. John Randolph Price, T he P lan etary C o m m issio n , p. 28. 5. Lola Davis, T o w a rd a W orld Religion fo r the N e w Age, p. 180. 6. Ib id ., p. 212. 7. H o u sto n Chronicle, N ovem ber 3, 1975, p. G -12. 8. Robert M ueller, T he N e w Genesis: Shaping a G lobal S p iritu a lity (N ew York: Image B ooks, 1984). 9. LaVedi Lafferty and Bud H ollow ell, T he Eternal D ance (St. Paul, M inn.: Llew elyn Publications, 1983), Epilogue pages (unnum bered). 10. Ibid. 11. Jonathan Stone, S C P Journal, July 1977. 12. Benjamin C rem e, full-page ad. 13. Jean H o u sto n , interview ed in “Jean H ouston: T he N e w World Religion,â€? T he T arrytow n Letter, Ju n e/Ju ly 1983, p. 5. 14. M arilyn Ferguson, T he A quarian C onspiracy, p. 191. 15. Lewis M um ford, T he T ransform ation o f M an (N e w York: Harper & Row, 1972), p. 142. 16. W illiam Irwin T hom p son , D arkness a n d S cattered Light (Garden City, N.Y.: A nchor B ooks, 1978), p. 13. 17. M ark Satin, N e w Age Politics (N e w York: D ell, 1979), p. 149. 18. Ibid. 19. D onald Keys, Earth a t O m ega: Passage to P lan etization (Boston: Branden Press, 1982), p. iii. 20. A lice Bailey, T h e E xtern alization o f the H ierarch y (N e w York: Lucis Publishing Company, 1957). 21. Lola Davis, T ow ard a W orld Religion fo r the N e w Age, pp. iv, 167, 168, 175, 176. 22. Alice Bailey, T h e E xtern alization o f the H ierarch y A lso see T h e Reappearance o f th e C h rist (N e w York: Lucis Publishing Company, 1948) and T h e R ays a n d the In itiation s (N e w York: Lucis Publishing Com pany, 1960). 23. M atthew Fox, W hee, Wee, We, A ll the W ay H o m e . . . A G u id e to a Sensual, P rophetic S piritu a lity (Santa Fe, N .M .: Bear & Company, 1981), p. 242. 24. M atthew Fox, M an ifesto fo r a G lobal C iviliza tio n (Santa Fe, N .M .: Bear & Com pany), pp. 6, 4 3-45. 25. Ib id ., p. 43. 26. Robert M ueller, N e w Genesis: Shaping a G lobal Spirituality, p. xiii. 27. Ibid. 28. Ib id . 29. Ib id ., p. 126. 30. Ib id ., p. 28. 31. Ibid., p. 29. 32. Ib id ., pp. 145, 146. 33. Ibid. 34. Ib id ., pp. 169-171. 35. Ib id ., p. 171. 36. Ib id ., p. 189. 37. Ib id ., p. 186. 38. See Dave H u n t, T h e C u lt E xplosion (Eugene, Ore.: Harvest H ou se, 1980), pp. 2 2 9 -2 3 4 . 39. M aharishi M ahesh Yogi, q u oted in Dave H u n t, T he C u lt E xplosion , p. 230. CH APTER 4: Conspiracy and Propaganda: Spreading the N ew Age Gospel 1. H . G . W ells, T he O p e n C o n sp ira cy : B lueprints f o r a W orld R evolution (Garden City, N . J.: Doubleday, Doran, 1928). 2. A lice Bailey, T he E x tem a liza tio n o f the H ierarchy, p. 67. 3. M arilyn Ferguson, T he A quarian C onspiracy, pp. 4 1 3 -4 1 6 . 4. D onald Keyes, Earth a t O m ega: Passage to P lan etization (Boston: Branden Press, 1982), pp. 96, 98. 5. M ihajlo M esarovic and Edvard Pestel, M a n k in d a t the Turning P oint (N e w York: E. P. D u tton , 1974). 6. Ibid. 7. M arilyn Ferguson, T he A quarian C onspiracy, pp. 23, 24. 8. John G. B ennet, q u oted by Barry M cW aters, C on sciou s E volu tion, pp. 84, 85. 9. LaVedi Lafferty and Bud H ollow ell, T h e Eternal D ance, p. 468. 10. Statistics from the prom otional flyer o f the Spiritual Em ergency N e tw ork, M en lo Park, California. 11. D onald Keys, Earth a t O m ega, p. 88. CH APTER 5: The N ew Age Antichrist and His Will to Power 1. Levi, T he A quarian G o sp el o f Jesus the C h rist (Los Angeles: DeVorss & C o., 1970). 2. Lola Davis, T o w a rd a W orld Religion fo r the N e w Age, p. i. 3. Ib id ., p. 186. 4. Ibid. 5. Ib id ., p. 228. 6. A lice Bailey, T he E x tem a liza tio n o f the H ierarch y A lso see T he Reappearance o f the C hrist. 7. Benjamin Crem e, full-page ad. 8. D ire c to ry fo r a N e w W orld (Los Angeles: Unity-in-Diversity, 1979), p. 30. 9. LaVedi Lafferty and Bud H ollow ell, T h e Eternal D ance, p. 2 (Epilogue). 10. Elissa Lindsey M cC lain, R est fro m the Q u e st (Lafayette, La.: H untington H ou se, 1984), pp. 66, 67. 11. Elissa Lindsey M cC lain, qu otin g Eklal Kueshana, R est from the Q u est, p. 25. 12. John Randolph Price, T h e P lanetary C o m m issio n , pp. 163, 164. 13. LaVedi Lafferty and Bud H ollo w ell, T he Eternal D ance, p. 153. 14. Ibid. CHAPTER 6: H ow Will We Know the Antichrist? 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Peter Lemesurier, T he A rm ageddon Script, p. 228. Ib id ., p. 231. Ib id ., p. 239. Ib id ., p. 233. Benjamin Crem e, full-page ad. LaVedi Lafferty and Bud H ollow ell, T he Eternal D ance, p. 4 8 3 . G eorge Bernard Shaw, q u oted in Dave H u n t, T he C u lt E xplosion (Eugene, Ore.: Harvest H ou se, 1980). F. Aster Barnwell, T he M eaning o f C h rist fo r O u r Age (St. Paul, M inn.: Llewellyn Publications, 1984), pp. xiii-xxxiv, 75-78. ib id ., pp. xx-xxviii, 70, 75-78. Jean M ichael Angebert, T h e O ccu lt a n d the T h ird Reich: T h e M y stica l O rigins o f N a z is m a n d the Search fo r the H o ly G rail (N e w York: M cG raw H ill, 1975), Preface. Aleister Crowley, q u oted by Kathryn Paulsen, T he C o m p le te B ook o f M agic a n d W itch craft (revised edition) (N e w York: N e w American L ibrary/Signet Books: 1980). CHAPTER 7: Come, Lucifer 1. T his is a teaching o f Freemasonry, given to holders o f the 3 0 th , 31st, and 32nd degree o f Freemasonry. See J. Edward Decker, T he Q u estio n o f F reem asonry (Issaquah, Wis.: Free the M asons M inistries). Decker, coauthor o f the best-selling T he G od-M akers and a form er M ason, also q u otes M asonic teachings that instruct members: “Yes, Lucifer is G o d . . . , ” “Everything g o o d in nature com es from O siris” (Osiris is the ancient Egyptian god derived from the Babylonian M ystery Religion), and “W hen the M ason . . . has learned the m ystery o f his craft . . . the seething energies o f Lucifer are in his hands. . . .” N e w Age spokespersons Lola Davis and Alice Bailey sp oke highly o f Freemasonry as a precursor to the N e w Age World Religion. 2. David Spangler, R eflections o f the C h rist (Scotland: Findhorn, 1977), pp. 36-39. 3. Ib id ., pp. 4 0 -4 4 . 4. Ibid. 5. Eklal Kueshana, T he U ltim ate Frontier (Chicago: T he Stelle G roup, 1970). 6. Elissa Lindsey M cC lain, R est from the Q u est, pp. 24-26. 7. Lola Davis, T o w a rd a O n e W orld Religion fo r the N e w Age, p. 186. 8. Letter from the Lucis Trust, reprinted in C onstance Cumbey, A P lanned D eception : T he Staging o f a N e w Age M essiah , pp. 2 4 4 , 245. 9. Shirley G. C lem ent and Virginia Fields, Beginning the Search: A Young Person’s A pproach to a Search fo r G o d (Virginia Beach, Va.: ARE Press, 1978), pp. 60-62. 10. Ibid. 11. A lexander H islop , T he T w o B abylons, pp. 5-9, 13, 4 0 , 74, 75. 12. See Barbara G. Walker, T he W om an’s E ncyclopedia o f M y th s an d 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 2 5. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. Secrets (San Francisco: Harper & Row, Publishers, 1983), pp. 450-452; and A lexander H islop , T h e T w o B abylons, pp. 103-110, 3 0 7 -3 1 0 . Barbara Walker, T h e W om an's E ncyclopedia, p. 553. M atth ew Fox, interview by W illiam Rodarmar, “Original Blessing,” Yoga Journal, N o v e m b e r/D e c em b er 1986, pp. 2 8 -3 1 , 64-67. Ib id ., p. 31. C onstance Cumbey, H id d e n D angers o f the R a in b o w (Lafayette, La.: H untington H ou se, 1983), pp. 33, 34. Hal Lindsey, Satan Is A live a n d Well on Planet Earth (N e w York: Bantam, 1985). This b o o k is an excellent rebuttal to th ose w h o discount the existen ce or the pow er o f Satan and his horde o f dem on angels. See T he D ic tio n a ry o f Bible a n d Religion, W illiam H . G en tz, general editor (N ashville, Tenn.: A bingdon Press: 1986), p. 699; Kurt K och, O ccu lt A B C (Germany: Literature M ission Aglasterhausen, 1978; distributed in the U.S.A. by Grand Rapids International Publications, Grand Rapids, M ichigan), pp. 172-174; and A lexander H islop , The T w o B abylon s, pp. 2 6 0 -2 6 4 . Kurt K och, ibid. From prom otional brochure, Church Universal and Triumphant, M aiibu, California. A ssociation o f Sananda and Sanat Kumara, T h e S ibors P ortion s (M ount Shasta, Calif.). Benjamin Crem e, T he R eappearance o f the C h rist an d the M asters o f W isd o m (London: T he Tara Press, 1980), p. 135. Alice Bailey, T h e E x tem a liza tio n o f the H ierarch y p. 86. Benjamin Crem e, T h e Reappearance o f the C h rist a n d the M asters o f W isd o m , p. 165. Jack Boland, “T he M aster M ind Principle,” M a ste r M in d G oal Achievers Journal (Warren, M ich.: M aster M ind Publishing Company, 1985), p. 2. T he U rantia B ook (Chicago: Urantia B rotherhood, 1955). Ib id ., p. 1193. Ib id ., p. 1192. Ib id ., p. 1194. “Kwan Yin” (channeled by Pam Davis), “T he Power o f O n e,” L ife T im es, W inter 8 6 / 8 7 , p. 84. Ibid. Ibid. Szandor A nton LaVey, Satanic Bible (N e w York: Avon B ooks, 1969), p. 146. N igel Davis, H u m an Sacrifice in H is to r y a n d T oday (N e w York: W illiam M orrow ), pp. 86-96. Carl O lsen, editor, T he B ook o f the G o d d ess (N e w York: Crossroad Publishing Company, 1986), pp. 110-123. A lso see Barbara G. Walker, T he W om an’s E ncyclopedia o f M y th s a n d Secrets, pp. 4 8 8 -4 9 3 . Fritjof Capra, T he Tao o f P hysics, 2nd edition (N e w York: Bantam B ooks, 1984; originally published by Shamballa Publications, Boulder, C olo.), p. xix. 37. Ib id ., p. xv. 38. Edward R ice, Eastern D efin ition s (N e w York: D ou b led a y /A n ch o r B ooks, 1980), pp. 398 -4 0 0 . 39. In this passage, many Biblical scholars believe that Isaiah w as comparing the king o f Babylon to Lucifer because the Babylonian ruler had required the nations to w orship him as a god. 40. T he term A d o n a y (or Adonai) is subject to som e confusion. Som e scholars contend that Adonay was the G reek and Sem itic (Jewish) G od equivalent to Shiva, the H indu god . But m ost n ote that in early H ebrew translations o f the O ld Testam ent, this term , m eaning “Lord,” is simply used as another form o f address for G od Jehovah. (See A lexander H islop , T he T w o B abylons, p. 70.) O bviously Satan has no objection w hatsoever to either m eaning as long as the worshiper is addressing him as Lord. 41. Kathryn Paulsen, T he C o m p lete B ook o f M agic an d W itchcraft, p. 24. 42. Alice Bailey, Problem s o f H u m a n ity (N e w York: Lucis Publishing Com pany), p. 166. 43. The use by the N e w Age o f the w ords “Secret Place” should n ot be confused w ith the verse, “H e that dw elleth in the secret place o f the M o st H igh shall abide under the sh adow o f the Alm ighty,” found in Psalm 91:1. In the Psalms con text, the phrase is taken from the Aramaic language and means “fortress” or “protection.” Psalm 91:1 tells those w h o obey (“dw elleth in”) G od that they will receive divine protection because G od is like a fortress. As G eorge M . Lansa, editor o f O ld Testam ent Light (San Francisco: Harper & R ow Publishers, p. 517) points out, “G od has no secret place, nor d oes H e need protection.” 44. David Spangler, Revelation: T he Birth o f a N e w Age, p. 150. 45. Ibid., pp. 152, 153. 46. Lola Davis, T ow ard a W orld Religion fo r the N e w Age, p. 180. 47. David Spangler, R evelation, p. 144. 48. Ibid., pp. 2 2 2 -2 2 4 . 49. H elena P. Blavatsky, T he Secret D octrin e (Calif.: T heosophical University Press, 1888), pp. 4 7 2 , 473. CHAPTER 8: Messages from Demons: Communicating Satan’s Blueprint for Chaos 1. Stories about “Ramtha” and his human channeler, J. Z . Knight, have multiplied throughout the m edia. Knight and Ramtha were profiled on ABC television^ “2 0 / 2 0 ” program (January 22, 1987) and Knight has been a guest on “G o o d M orning, Am erica” and the “Phil D onahue Show.” Also see “Channels, the Latest in Psychic C hic,” USA Today, January 22, 1987, p. D ־l . 2. Kurt K och, O ccu lt A B C , p. 215. 3. Vera Alder, W hen H u m a n ity C o m es o f Age (N e w York: Samuel Weiser, 1974), pp. 19, 20. 4. Ib id ., p. vii. 5. LaVedi Lafferty and Bud H ollow ell, T he Eternal D ance, pp. 36, 37. 6. David Spangler, Revelation: T he Birth o f a N e w Age, p. 178. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. John Randolph Price, T he Superbeings, p. 3. Ibid. Ibid. Lola Davis, T ow ard a W orld Religion fo r the N e w Age, p. 4. Ib id ., p. 220. Ib id ., p. 186. John Randolph Price, T he Superbeings, pp. 51, 52. Ibid. W illis W. H arm an, “Rationale for G o o d C h oosin g,” Journal o f H u m an istic Psychology, W inter 1981. David Spangler, Revelation: T he B irth o f a N e w Age, p. 64. Paul Tw itchell, Eckankar: T he K e y to Secret W orlds (M en lo Park, Calif.: IWP Publishing, 1982), p. 72. Ib id ., pp. 7 2 , 73. Ibid. CH APTER 9: “It Said It Was Jesus"— the Leadership o f the N ew Age Revealed 1. W illiam Plummer, “Turmoil in a California C am elot,” People Weekly, July 1, 1985, pp. 75 -77. 2. Jose Silva and Philip M iele, T he Silva M in d C o n tro l M e th o d (N e w York: P ock et B ooks, 1977). 3. H elen Schucm an, A C ou rse in M iracles (Foundation for Inner Peace, 1975). 4. John W hite, “A C ourse in M iracles: Spiritual W isdom for the N e w A ge,” Science o f M in d , M arch 1986, pp. 10-14, 80-88. 5. Ibid. 6. Ib id ., pp. 13, 14, 80, 81. 7. M elanie Chartoff, interview ed in M agical Blend, Issue 14, 1986, p. 51. 8. Ibid. 9. Reported in the C h ristian In form ation Bureau Bulletin, D ecem ber 1986, p. 4. 10. Prom otional flyer, “ 1987 International Seth Seminar,” Austin Seth Center, A ustin, Texas. A lso see Jane R oberts, T h e Seth M aterial (Englew o o d Cliffs, N.J.: Prentice-H all, 1970) and other “Seth” b ook s. 11. Ibid. 12. Prom otional flyer, “Lazaris,” C oncept: Synergy, Fairfax, Calif. 13. Ibid. 14. Ibid. 15. Roy Eugene Davis, q u oted in Yoga Journal, July-August 1986, p. 22. 16. Barry M cW aters, C on sciou s E volu tion, p. 141. 17. John Randolph Price, in T he Q u a rtu s R eport, Report N o . 11, Vol. V, 1986. 18. Kurt K och, O ccu lt A B C , p. 259. 19. Ib id ., pp. 2 0 9 , 210. 20. Jose Silva, interview ed as a guest on T he John A nkerberg Show, aired D ecem ber 1986-January 1987. A lso see Jose Silva, T he Silva M in d C on trol M eth od. 21. Johanna M ichaelson, T he Beautiful Side o f E vil (Eugene, Ore.: Harvest H ou se, 1982). 22. M agical Blend, Issue 14, 1986, p. 71. 2 3. M ark and Elizabeth Prophet, T h e Science o f the Spoken W ord (Colorad o Springs, C olo.: Summit University Press, 1974), pp. i, ii, 12, 13. 24. Reported in O m n i m agazine, January 1984, p. 129. 25. In the article “O M : The Sacred Syllable and Its Role in World Peace,” the N e w Age publication L ife T im es, W inter 1 986-87, p. 3 5 , the author states, “H e w h o m editates on O M attains to Brahman (God). H indus and Tibetan Buddhists have consciously used the pow er o f O M for centuries, especially chanting O M w hile sitting in the configuration o f a circle. . . .” T he article also remarked that O M is “som etim es also pronounced A U M .” 26. J. Z. Knight, interview by Paul Z urom ski, P sych ic G u ide, Vol. 5, N o . 2, D ecem ber 1986, p. 16. 27. Ib id ., pp. 16-18. CHAPTER 10: The N ew Master Race 1. M eher Baba, q u oted by Allan Y. C oh en , “M eher Baba and the Q uest o f C on sciou sn ess,” W h at Is Enlightenm ent?, edited by John W hite (Los Angeles: Jeremy P. Tarcher, Inc., 1984), p. 87. 2. Julian Huxley, Religion W ith o u t R evelation (London: M ax Parrish, 1959). 3. Arthur C. Clarke, Profiles o f the Future (N e w York: H olt, Rinehart, W inston, 1984). 4. Ruth M ontgom ery, T hresh old to T om orrow (N e w York: B allan tin e/ Fawcett Crest, 1982), p. 206. 5. John Randolph Price, T he Superbeings, back cover. 6. John Randolph Price, T he P lan etary C o m m issio n , p. 29. 7. Bernadette R oberts, qu oted by Stephen Bodian, “T he Experience o f N o -S elf,” Yoga Journal, N o v e m b e r/D e c em b er 1986, p. 35. 8. John W hite, editor, W h at Is Enlightenm entf (Los Angeles: Jerem y P. Tarcher, Inc., 1984), p. 219. 9. Ib id ., p. 126. 10. Ruth M ontgom ery, T hresh old to Tom orrow, pp. 2 0 6 , 207. A lso see W. Scott-E lliott, T he S to ry o f A tlan tis a n d the L o st L em uria (W heaton, 111.: T heosop hical Publishing H ou se, 1968) and John M itchell, T he V iew o ver A tlan tis (N e w York: Ballantine B ooks, 1969). 11. Edgar Cayce, Edgar C a yce on A tlan tis (N e w York: Paperback Library, 1968). 12. Ruth M ontgom ery, T hresh old to Tom orrow. 13. Ib id ., pp. 9, 10. 14. Ib id ., p. 1. 15. LaVedi Lafferty and Bud H ollow ell, T he Eternal Dance, p. 89. 16. Ibid., pp. 89, 90. 17. See Alice Bailey, T he E xtern alization o f the H ierarch y and Benjamin Creme, T he R eappearance o f the C h rist a n d the M asters o f W isdom . 18. Hayward C olem an, q u oted by Susan W oldenberg, “M im e Yoga: M editation in M o tio n ,” Yoga Journal, J u ly /A u g u st 1986, pp. 23, 24. 19. Peter R oche de C oppens, Foreword to F. A ster Barnwell, T h e M eaning o f C h rist fo r O u r Age (St. Paul, M inn.: Llewelyn Publications, 1984), pp. x ix -x x x i. 20. Ib id ., p.. xxiii. 21. See James Bolen, “Teilhard de Chardin, 1 8 8 1 -1 9 8 1 ,” N e w Realities, Vol. IV, N o . 1 (1981). 22. Richard M . Bucke, C o sm ic C onsciou sness (N e w York: E. P. D u tton, 1901). 23. Ibid. 24. See my discussion in R ush to A rm ageddon (W heaton, 111.: Tyndale H o u se, 1987), pp. 4 7 , 48, 2 4 2 , 243. 25. Ib id ., p. 48. 26. For a brief but revealing discussion o f the concep t o f “root races,” see Corinne H eline, N e w Age Bible In terpretation , pp. 2 5 0 -2 5 5 . 27. LaVedi Lafferty and Bud H ollow ell, T he Eternal D ance, p. 503. 28. Ib id ., pp. 5 0 4 , 505. 29. Vera Alder, W hen H u m a n ity C o m es o f Age, p. 154. 30. John Randolph Price, T he P lan etary C o m m issio n , p. 48. 31. Ibid. 32. Ib id ., p. 153. 33. Ib id ., pp. 4 7 , 48. 34. Barry M cW aters, C on sciou s E volution: Personal a n d P lanetary Transform ation , p. 55. 35. John W elw ood , “O n Love: Conditional and U nconditional,” Yoga Jou rnal, J u ly /A u g u st 1986, pp. 7-10. 36. Rainer M aria Rilke, L etters to a Young Poet, translated by Stephen M itchell (N e w York: Random H ou se, 1984), p. 92. 37. International Society o f Divine Love, full-page ad in Yoga Journal, M ay /J u n e 1986, p. 25. 38. Ibid. 39. Vera Alder, W hen H u m a n ity C o m es o f Age, p. 154. 4 0 . E d w a rd O . W ils o n , q u o t e d in “ B io lo g ic a l D iv e r s ity : G o in g . . . going. . . ?,” Science N e w s , Vol. 130, N o . 13, Septem ber 27, 1986, p. 202. 41. Jeremy R ifkin, Algeny (N e w York: Viking Press, 1983), p. 252. 4 2. Robert M ueller, T he N e w G enesis: Shaping a G lobal Spirituality, p. 37. 43. T he pom pous doctrine o f self-love is so im portant to the N e w Age religion that its prom otion som etim es reaches incredulous heights. For exam ple, consider the titles o f tw o recent N e w Age books: D ea r M e, I L ove You and W h at to S a y W hen You Talk to Yourself. Unfortunately, this is also a doctrine that is being spread by a few Christian ministers. See Dave H un t and T. A. M cM ah on , T he Sedu ction o f C h ristia n ity (Eugene Ore.: Harvest H ou se, 1985), pp. 11-22. 4 4. U N D eclaration, qu oted in M arilyn Ferguson, T he A quarian C onspiracy, p. 3 6 9 . A lso see H o u sto n C hronicle, N ovem ber 3, 1975, p. G -12. 45. Lola Davis, T ow ard a W orld Religion fo r the N e w Age, p. 9. 4 6. Edgar Cayce, q u oted in M oira Tim m s, P rophecies a n d Predictions: E veryon e’s G u ide to the C o m in g Changes, p. 156. 47. See Shirley G. C lem ent and Virginia Fields, Beginning the Search: A Young A d u lts A pproach to a Search fo r G o d , p. 61. 48. Douglas R. G rooth uis, U n m askin g the N e w Age (D ow ners Grove, 111.: Inter Varsity Press, 1986), p. 174. CHAPTER 11: The Dark Secret: What Will Happen to the Christians? 1. M atthew Fox, W hee, Wee, We, All the W ay H o m e . . . A G u id e to a Sensual, P rophetic Spirituality, p. 242. 2. M arilyn Ferguson, T he A quarian C onspiracy: Personal a n d Social T ransform ation in the 1980s, pp. 19, 34. 3. M oira Tim m s, P rophecies a n d P redictions: E veryon e’s G u id e to the C om in g Changes, p. 289. 4. Ibid., pp. 125, 126. 5. A ssociation o f Sananda and Sanat Kumara, T h e Sibors P ortion (M t. Shasta, Calif.). 6. David Spangler, q u oted by Barry M cW aters, C on sciou s E volution: Personal a n d P lan etary T ransform ation, pp. 120, 121. 7. Barry M cW aters, C on sciou s E volution: Personal a n d P lan etary Transform ation , p. 130. 8. G. I. G urdjieff, q u oted by Barry M cW aters, Ib id ., p. 124. 9. Ibid., p. 113. 10. Ibid. 11. M oira Tim m s. P rophecies a n d P redictions: E veryon e’s G u id e to the C om in g Changes, pp. 2 7 6 , 277. 12. Maharishi M ahesh Yogi, Inauguration o f the D a w n o f the Age o f E nlightenm ent (Fairfield, Iowa: M aharishi International University Press, 1975), p. 47 . See Dave H un t, T he C u lt E xplosion (Euguene, Ore.: H arvest H ou se, 1980), pp. 2 2 9 -2 3 4 for an exam ination o f the M aharishi’s plan for a w orld governm ent. 13. Ruth M ontgom ery, T hresh old to Tom orrow, pp. 196-207. 14. Ib id ., p. 196. 15. Ib id ., pp. 2 0 6 , 207. 16. Ib id ., p. 206. 17. Ruth M ontgom ery, interview in M agical Blend, Issue 13, 1986, p. 23. 18. David Spangler, Revelation: T he B irth o f a N e w Age, pp. 163, 164. 19. Ibid. 20. M oira Tim m s, P rophecies a n d P redictions: E veryon e’s G u id e to the C om in g Changes, pp. 5 7 , 58. 21. Ibid. 22. John Randolph Price, T he P lan etary C o m m issio n , pp. 163, 164. 23. Ibid., pp. 162, 163. 24. LaVedi Lafferty and Bud H ollow ell, T he Eternal Dance, p. 153. 25. Ibid. 26. Ibid. 27. “Djwhal Khul” (channeled by A lice Bailey), “F ood for T h ou gh t,” Life T im es, W inter 1 9 8 6 /1 9 8 7 , p. 57. 28. Corinne H eline, N e w Age Bible In terpretation . 29. Ibid., pp. 197, 198, 2 0 2 , 228. 30. 31. 32. 33. 34 . 35. 36. 37. Ib id ., p. v. Ib id ., p. 44. Ib id ., p. 2 2 6 . Ib id ., p. 2 2 7 . Ib id ., p. 2 3 0 , 231. Ib id ., p. 2 3 2 , 233. Ib id ., p. 2 4 4 . Ib id ., p. 2 4 5 . CH APTER 12: N ew Age Z e a l. . . N ew Age Aggression 1. Jack Underhill, “M y G oal in Life,” Life T im es, W inter 1 9 8 6 /1 9 8 7 , p. 90. 2. Lisa M o o re , letter to the editor, Yoga Journal, J u ly /A u g u st 1986, p. 4. 3. M iriam Starhawk, q u oted inYoga Journal, J u ly /A u g u st 1 9 8 6 , p. 4. 4. Kurt K och, O ccu lt A B C , p. 201. 5. David Spangler, R evelation: T he B irth o f a N e w Age, p. 89. 6. Alice Bailey, “Externalizing the M ysteries,” Part I, T he Beacon, N ovem b e r /D e c e m b e r 1975, p. 171. 7. Alexander H islop , T h e T w o B abylons, p. 291. 8. LaVedi Lafferty and Bud H o llo w ell, T he Eternal D ance, p. 473. 9. Ib id ., p. 4 6 8 . 10. Sue Sikking, Seed o f the N e w Age (N e w York: D oubleday, 1970). 11. See K enneth Boa, C u lts, W orld Religions a n d You (W heaton, 111.: Victor B ooks, 1977), pp. 81-89. 12. James Sire, T h e U niverse N e x t D o o r (D ow ners G rove, 111., InterVarsity Press, 1976), p. 142. 13. Alexander Pope, E ssay on M an. A lso see discussion in James Sire, T he U niverse N e x t D oor, p. 53. 14. LaVedi Lafferty and Bud H o llo w ell, T h e Eternal D ance, p. 367. 15. Stuart Litvak and A. Wayne Senzee, T o w a rd a N e w Brain (E nglew ood Cliffs, N.J.: Prentice-H all, 1986), pp. 199, 200. 16. Corinne H eline, N e w Age Bible In terpretation , pp. 2 4 8 -2 5 5 . 17. M oira T im m s, P rophecies a n d P redictions: E veryon e’s G u id e to the C o m in g C hanges, p. 58. 18. Ib id ., p. 99 . 19. David Spangler, R evelation: T he B irth o f a N e w Age, pp. 6 3-65. 2 0. Ib id ., p. 94. 21. Ibid. 22. Ib id ., p. 156. 23. Ibid. CH APTER 13: A N ew Culture, a N ew Barbarism 1. 2. 3. 4. 5. Vera Alder, W hen H u m a n ity C o m es o f Age, p. xii. Ib id ., pp. 5-7. Ib id ., p. 8. Ib id ., p. 10. Ib id ., p. 11. 6. Ib id ., p. 13. 7. Robert M ueller, T he N e w G enesis: Shaping a G lobal S pirituality, p. 164. 8. Ib id ., p. 183. 9. Vera Alder, W hen H u m a n ity C o m es o f Age, p. 20. 10. Ib id ., p. 21. 11. Ibid., pp. 20-24. 12. Ib id ., p. 22. 13. Ib id ., p. 29. 14. Ib id ., p. 23. 15. Robert M ueller, T h e N e w G enesis: Shaping a G lobal S pirituality, p. 155. 16. Ib id ., p. 8. 17. Peter Lemesurier, T he A rm ageddon S cript, p. 247. A lso see Brad Steiger, T h e G o d s o f A quarius (N e w York: H arcourt Brace Jovanovich, 1976). 18. Lemesurier, ibid. 19. D iscussed in Brad Steiger, G o d s o f A quarius. 20. Texe Marrs, R ush to A rm ageddon, pp. 27 -5 2 , 77-90; Texe W. Marrs and Wanda J. Marrs, Robotica: T he W hole U niverse C atalogue o f Robo ts (Briarcliff M anor, N.Y.: Stein & Day, 1987); and Texe M arrs, H igh Technology Careers (H o m ew o o d , 111.: D o w Jones-lrw in, 1986), pp. 110113, 121-127. 21. Jonathan Glover, W h at S o rt o f People Sh ould T here Be? (N e w York: Penguin B ook s, 1984). 22. Vera Alder, W hen H u m a n ity C o m es o f Age, pp. 32, 33, 3 6-40. 23. Ib id ., pp. 68-76. 24. Ib id ., p. 67. 25. Ib id ., pp. 4 8 , 49. 26. Texe Marrs, R ush to A rm ageddon, pp. 77-90. 27. Vera Alder, W hen H u m a n ity C o m es o f Age, p. 83. 28. Ibid., p. 82. 29. Ib id ., pp. 83, 84. 30. Ibid., p. 148. 31. Robert M ueller, T he N e w Genesis: Sh aping a G lobal Spirituality, p. 191. 32. Erwin Chargaff, q u oted by M ichael Saloman, Future L ife (N e w York: M acm illan, 1983). CHAPTER 14: The Unholy Bible o f the N ew Age World Religion 1. Vera Alder, W hen H u m a n ity C o m es o f Age, p. 31. 2. Miriam Starhawk, “W itchcraft and the Religion o f the Great G od d ess,â€? Yoga Journal, M a y /J u n e 1986, p. 56. 3. Vera Alder, W hen H u m a n ity C o m es o f Age, p. 31. 4. Ibid. 5. Ibid., p. 35. 6. Ib id ., pp. 3 3-35. 7. Ib id ., p. 37. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. Ibid. Ib id ., p. 39. Lola Davis, T o w a rd a W orld Religion fo r the N e w Age, pp. 187, 188. Alice Bailey, P roblem s o f H u m a n ity (N e w York: Lucis Publishing C om pany, 1947), pp. 142, 143. David Spangler, R eflections on the C h rist (Scotland: Findhorn Publications, 1982), p. 73. Robert M ueller, T he N e w G en esis: Shaping a G lobal S p iritu a lity Lola Davis, T ow ard a W orld Religion fo r the N e w Age, p. 25. LaVedi Lafferty and Bud H ollow ell, T he Eternal D ance, pp. 4 5 1 -4 5 3 . Alexander H islop , T he T w o B abylons, p. 7. “T he Way o f the H eart,” A u stin A m erican-S tatesm an, M arch 13, 1986, p. B-8. Ibid. John W hite, editor, W h at Is Enlightenm ent?, pp. 2 2 8 , 229. W illiam Kingsland, T he G n osis o r A n cien t W isd o m in the C hristian Scriptures (London: Allen and U nw in, Ltd., 1937), p. 93. Randall King, q u oted by W illiam Plummer, “Turmoil in a California C am elot,” People Weekly, July 1, 1985. W illiam Plummer, ib id ., pp. 75-77. “Scientology Scripture H eld Sacred,” A u stin A m erican-S tatesm an, January 6, 1986, p. A-9. CH APTER 15: Doctrines o f Devils 1. Joan H alifax, Sham an: T he W ou nded H ealer (N e w York: C rossroad, 1982). 2. M iriam Starhawk, “W itchcraft and the Religion o f the Great G od d ess,” Yoga Journal, M a y /J u n e 1986, pp. 38-41. 3. Lola Davis, T ow ard a W orld Religion fo r the N e w Age, pp. 178, 180182, 193-195, 222. 4. Elizabeth Clare Prophet, “In Search o f the Power o f M oses: Reclaim ing our Spiritual H eritage,” T he C o m in g R evolution, Summ er 1986, pp. 12, 13. 5. Alice Bailey, T he R ays a n d the In itia tio n s (N e w York: Lucis Publishing Company, 1960). 6. N e w sw e e k , February 7, 1983. 7. Ruth M ontgom ery, A W orld B eyon d (N e w York: B allan tin e/F aw cett Crest B ook s, 1972) p. 12. 8. Paul T w itchell, Eckankar: T he K e y to Secret W orlds, pp. 41, 42. 9. Vera Alder, W hen H u m a n ity C o m es o f Age, p. 55; also see pp. 85, 93, 101, 114. 10. Planetary C o m m issio n U pdate, July 1986, A ustin, Texas. 11. Swami M uktananda, q u oted in Dave H u n t, T h e C u lt E xplosion (Eugene, Ore.: Harvest H ou se, 1982). 12. Benjamin Crem e, Reappearance o f the C h rist a n d the M asters o f W is dom . 13. Allan Y. C oh en , “M eher Baba and the Q uest o f C on sciou sn ess,” in John W hite, editor, W h a t Is Enlightenm ent?, p. 83. 14. Charles B ullock, serm on at Christ M em orial Church, A ustin, Texas, January 18, 1987. CHAPTER 16: Apostasy: The N ew Age Plan to Take Over the Christian Church 1. Marilyn Ferguson, T he A quarian C onspiracy: Personal a n d Social T ransform ation in the 1980’s, p. 222. 2. William T hom p son , Introduction, in David Spangler, Revelation: The Birth o f a N e w Age. 3. Kevin Ryerson, q u oted in Shirley M aclaine, O u t on a L im b (N e w York: Bantam B ooks, 1983), p. 181. 4. Elizabeth Clare Prophet, T he L o st Years o f Jesus (M alibu, Calif.: Summit University Press, 1984). 5. J. Finley C ooper, q u oted in T he C om in g R evolution, Summer 1986, p. 102. 6. Anne Read, Edgar C ayce on Jesus a n d H is Church (N e w York: Paperback Library, 1970). 7. LaVedi Lafferty and Bud H ollow ell, The Eternal D ance, p. 172. 8. M ark and Elizabeth Clare Prophet, T he Science o f the Spoken W ord, p. 73. 9. Peter Lemesurier, T he A rm ageddon Script, pp. 139-173. 10. Benjamin Crem e, T h e Reappearance o f the C h rist a n d the M asters o f W isd o m , p. 95. 11. Ibid. 12. Em m ett Fox, D iagram s fo r Living: T he Bible U nveiled (N e w York: Harper & Row, 1968), pp. 158, 159. 13. LaVedi Lafferty and Bud H ollow ell, T he Eternal D ance, pp. 4 7 1 , 472. 14. F. Aster Barnwell, T he M eaning o f C h rist fo r O u r Age (St. Paul, M inn.: Llewelyn Publications, 1984). 15. Ib id ., pp. 10-13. 16. Ib id ., pp. 165, 166. 17. Ibid., p. 46. 18. Ibid. 19. John G. B ennett, T he M asters o f W isdom (England: Turnstone Press, Ltd., 1980), p. 74. 20. H elen Schucm an, A C ourse in M iracles. 21. Susan Jacobs, “Psychic H ealing,” Yoga Journal, J u ly /A u g u st 1986, p. 30. 22. M ichael D oan, “A U nisex Bible? Reformers Run Into a Storm ,” U.S. N e w s & W orld R eport, D ecem ber 17, 1984, p. 70. 23. Ibid. 24. Peter R oche de C oppens, Foreword, in F. Aster Barnwell, T he M eaning o f C h rist fo r O u r Age. 25. Ib id ., pp. xix-xxii. 26. Ibid., p. xxiii. 27. Ibid. 28. Ib id ., xxii. 29. Levi, T he A quarian G ospel o f Jesus the C hrist, p. 76. 30. Benjamin Crem e, T he R eappearance o f the C h rist a n d T he M asters o f W isd o m , pp. 159, 160. 31. John Randolph Price, T he P lan etary C o m m issio n , p. 54. 32. Ib id ., p. 144. 33. M arilyn Ferguson, T he A quarian C on spiracy: Personal a n d Social T ransform ation in the 1980s, p. 368. 34. N orm an Boucher, “A Faith o f Our O w n ,” N e w Age Journal, April 1986, p. 27. 35. Ruth M ontgom ery, interview ed in M agical Blend, Issue 13, 1986. 36. M iriam Starhawk, C ircle N e tw o rk N e w s , April 1983. 37. C h ristian In form ation Bureau Bulletin, D ecem ber 1986, p. 4. 38. “Britain’s D ou bting B ishop,” N e w sw e e k , June 17, 1985, p. 91. 39. C ol. M inter L. W ilson, Jr., “Peacemaking: Are We N o w Called to Resistance?,” T he R etired Officer, O ctob er 1986, p. 5. 40. C h ristian In form ation Bureau Bulletin, April 1986, p. 1. 41. U n ited M e th o d ist R eport, D ecem ber 6, 1985. 42. T hom as H . Trapp, “Ecum enical,” T h e N o rth w este rn L utheran, O cto ber 15, 1 9 8 5 , p. 32. 43. Joseph A . Harriss, “Karl M arx or Jesus Christ?,” R eaders D igest, August 1 9 8 2 , pp. 130-134. 44. Edm und W. R obb and Julia R ob b, Betrayal o f the C hurch (W estchester, III.: C rossw ay B ook s, 1986), p. 64. 45. Ib id ., p. 45 . 46. Lola Davis, T ow ard a W orld Religion fo r the N e w Age, p. 2 1 2 . 47. Rael Jean Issac, “D o You K now W here Your Church O fferings Go?,” R eaders D igest, January 1983, pp. 120-125. 48. C h ristian In form ation Bureau Bulletin, D ecem ber 1986, p. 4. A lso see N orm an Boucher, “A Faith o f O ur O w n .” 49. Roger Spence, “Father Bede Griffiths: U nity at the Source o f All T hin gs,” M agical Blend, Issue 13, 1986, pp. 7-11. 50. Larry A. Jackson, “K eeping the Faith: W estern R eligion’s Future,” The F uturist, O cto b er 1985, p. 261. 51. Lola Davis, T o w a rd a W orld Religion fo r the N e w Age. 52. R obert Pante, q u oted by Carlos Vidal G reth, “H igh Priest o f Prosperity Promises Plenty,” A u stin A m erican-S tatesm an, M arch 1, 19 8 6 , p. F -l. 53. Ibid. 54. John Randolph Price, T h e Superbeings, pp. 101-103. 55. Catherine Ponder, T he M illionaire from N azareth : H is P ro sp erity Secrets fo r You (M arina del Rey, Calif.: DeVorss & C o., 1979). 56. Reverend Ike, q u oted in U S A T oday, July 22, 1986, p. 2-D . CH APTER 17: Cry for O ur Children 1. A sso cia ted Press, February 17, 1986. 2. W illiam M cL ou ghlin , q u oted by M arilyn Ferguson, T h e Aquarian C on spiracy: Personal a n d Social T ransform ation in the 1980s, pp. 231, 2 32. 3. A lice Bailey, q u oted by Foster Bailey, T hings to C o m e (London: Lucis Trust Publishing, 1974), pp. 2 5 2 -2 5 7 . 4. M arilyn Ferguson, T h e A quarian C on spiracy: Personal a n d Social T ransform ation in the 1980s, p. 293. 5. Phil Phillips, T urm oil in the T oy B ox (Lancaster, Pa.: Starburst, Inc., 1986), p. 25. 6. John Dunphy, “A Religion for the N e w A ge,” T he H u m a n ist, JanuaryFebruary 1983. 7. Beverly G alyean, qu oted in M arilyn Ferguson, T he A quarian C on spiracy, pp. 3 1 3 , 314. 8. Beverly G alyean, q u oted by Francis Adenay, “Educators L ook East,” S piritu al C ou n terfeits Journal, W inter 1981, p. 29. 9. David H un t, Peace, Prosperity, a n d the C o m in g H olocau st, p. 78. 10. M arilyn Ferguson, T he A quarian C onspiracy, p. 312. 11. Charlotte Iserbyt, q u oted in C h ild A bu se in the C lassroom , edited by Phyllis Schlafly (W estchester, 111.: Crossway B ooks, 1985), p. 391. 12. M arilyn Ferguson, T he A quarian C onspiracy, p. 203. 13. Spin, Septem ber 1986, p. 32. 14. C hicago Tribune, April 19, 1986. 15. A sso cia ted Press, “Satanism T ied to Death o f M ichigan Teen,” February 20 , 1986. 16. A sso cia ted Press, “Satanic Teen Fad Feared in El Paso,” February 17, 1986. 17. Ibid. 18. Irene Park, interview ed by host D ou g Clark, “Praise the Lord,” Trinity Broadcasting N e tw o r k , D ecem ber 8, 1986. (Irene Park is author o f the b o o k T he W itch T h a t S w itch ed.) CHAPTER 18: Dress Rehearsals for the Main Event 1. Ruth M ontgom ery, A G ift o f P rophecy: T he Phenom enal Jeanne D ix o n (N e w York: Bantam B ooks, 1966), p. 172. N o te : Subsequent to this prophecy, Jeanne D ixon changed her m ind regarding the source o f her vision because so many Christians cam e to her and m entioned the parallels with the teachings o f Eastern m ysticism . R eportedly D ixon n o w believes her vision cam e from an “evil sou rce.” 2. On January 12, 1987, a full-page ad by the Tara C enter appeared in USA T oday announcing once again the im m inent w orldw ide appearance o f the N e w Age “Christ.” T his tim e a specific date for his appearance was n ot given. 3. Dave H un t, Peace, Prosperity, a n d the C o m in g H olocau st, pp. 124-127. 4. Foster Bailey, T hings to C o m e (London: Lucis Press, 1974). A lso see C onstance Cumbey, A P lanned D eception , p. 88. 5. Joseph J. Carr, The T w iste d C ross (LaFayette, La.: H untington H ou se, 1985). 6. Ibid., p. 87. 7. Ib id ., p. 276. 8. Ibid. 9. David Spangler, Revelation: T he B irth o f a N e w Age, pp. 148, 149. 10. Ibid. 11. Ibid. 12. John Randolph Price, P lan etary C o m m issio n U pdate, August 1986, p. 4. 13. Ibid. 14. “World H ealing M ed itation,” T he Planetary C om m ission, A ustin, Texas, 1986. 15. John Randolph Price, T he P lan etary C o m m issio n , pp. 29, 30. 16. Ib id ., p. 30. 17. Ibid. 18. Ruth M ontgom ery, Strangers A m on g Us (N e w York: B allan tin e/F aw cett Crest B ook s, 1979). 19. Kurt K och, O ccu lt A B C , p. 59. 20. Ib id ., p. 58. CH APTER 19: What M ust Christians Do? 1. Biblical scholars say that Peter addressed this remark to the early Christian C hurch, w hich w as then suffering intense persecution by the Roman authorities. Certainly Peter’s com m ent is also applicable to Christians in the last days. 2. Billy Graham, A pproach in g H oofbeats: T he Four H orsem en o f the A pocalypse (W aco, Tex.: W ord, 1983). 3. Ibid. 4. Charles B ullock, serm on. About the Author Texe Marrs, author-evangelist, and president of Living Truth Ministries in Austin, Texas, has thoroughly researched Bible prophecy, the New Age Movement, and the occult challenge to Christianity. Author of the recently released Rush to Armageddon (Tyndale House, 1987), Texe is a firm believer in the inerrancy of the Bible and salvation through Jesus Christ. Prior to answering a call to the ministry, Texe was a hightech consultant and successful author of thirteen books on robotics, computers, and related topics for such major publishers as Simon & Schuster, Dow Jones-Irwin, John Wiley, and Stein and Day. Previous to to that, he was a career officer in the U. S. Air Force. For five years he was assistant professor of aerospace studies at the University of Texas at Austin, and he has taught international affairs, political science, and American government for two other universities. Texe graduated summa cum laude from Park College in Kansas City, and earned his M aster’s degree at North Carolina State University. Currently active as a seminar speaker and workshop leader, Texe frequently addresses church congregations and groups. He is now working on a sequel to Dark Secrets o f the N ew Age and has recently filmed a documentary further exposing the New Age Movement. For More Information Texe Marrs and Living Truth Ministries offer a free newsletter about Bible prophecy, the New Age Movement, cults, the occult challenge to Christianity, and other important topics. If you would like to receive this newsletter, please write to: Texe Marrs Living Truth Ministries 8103 Shiloh Court Austin, TX 78745 I n the pages of this revealing new. -w ith material that promotes New Age religious thinking and doctrine. Finally, Marrs shows how New Age ideas have already begun to infiltrate and undermine Christian churches from within. Dark Secrets of the New Age is a sobering expose of the alarming New Age Movement with an urgent message for every believing Christian. Texe Marrs is the author of more than a dozen books on computers, technology, and Christian faith in the modem world. He has taught at the University of Texas at Austin as well as two other universities. He is a retired career officer in the U.S. Air Force and currently heads Living Truth Ministries in Austin, Texas. He frequently speaks to churches and other organizations on the New Age Movement and has appeared on radio and TV talk shows across America.
https://issuu.com/guraja/docs/dark_secrets_of_the_new_age_-_texe_
CC-MAIN-2018-13
refinedweb
95,577
67.89
First time here? Check out the FAQ!). One thing that is really strange to me, while performing the wget/iperf tests I am also doing tcpdump on the qr-* (qrouter) namespace. In the qrouter namespace of the network node I see the "seq" packets and on the qrouter of the compute I see the "ack" packets. mtu is already at 1450 (lowered it to 1400 but no effect). iperf however does much better than wget, against the same server: VM - 120 Mbits/sec - 150 Mbits/sec; Host - 250+ Mbits/sec. It's a confirmed bug:... Yes, I have the same behavior when I use tcpdump. But the problem is that TCP requests don't work. its a single node deployment. l3 agent is in dvr_snat mode Hello, I have a liberty with dvr deployment. I have two machines connected in the same VXLAN network. VM1 is 10.0.0.2 and VM2 10.0.0.3. VM1 has a floating ip assigned (let's say 2.2.2.2). The problem is: if VM2 has no floating ip assigned (so traffic goes through SNAT namespace), I cannot access 2.2.2.2 (but any other requests i.e curl google.com works). If VM2 has floating IP assigned, I can access 2.2.2.2 Scenarios: The MTU of my machines is 1450. Run sudo swift-init restart main sudo swift-init restart main For development I also recommend to use this (...) The local_ip are set ok ? Can you ping controller on local_ip from compute node ? Did you try to write something to /images as a normal user ? Maybe glance doesn't have permissions to /images. is the glance service running ? can't you see anything in the glance logs ? what exactly did you modify in the config files after adding the eth2 ? It's already 1454 on the guest OS. However, the Host OS (controller node running snat router) has MTU 1500 on the router gateway nic. The VM is able to open the socket on port 53 and send packets, but the returning packets are not coming, i think. I have 8.8.8.8 in VM /etc/resolv.conf and I can ping 8.8.8.8. I have google .com in the dns cache and I can ping google .com, but if I try to ping google .de for example, it doesn't work because my machine can't access 8.8.8.8 on port 53 do query the dns server. I can ping anything. The problem comes when I try to do TCP traffic through different ports such as 443 or 80. Hello, I am running a setup with Neutron DVR, having 1 controller node (with l3 agent in dvr_snat mode) and other compute nodes with l3 agent in dvr mode. The external traffic (SNAT) made by VMs without a floating IP is routed through the controller node (dvr_snat router). The external traffic (DNAT/SNAT) made by VMs with a floating IP is routed through the compute node (dvr router). So let's say I create a VM with a private only IP. - wget - doesn't work; the request stays on hold- wget - works, but I can see a delay - apt-get update also doesn't work for all the repositories After I associate a floating IP all the external requests works smoothly. Before associating the floating IP, I went to the SNAT namespace in the controller node and tried these wget commands. All worked smoothly, so my IP is not banned. There might be a connection problem between the compute nodes and the controller node. Can you help me with some instructions how to debug this? Thanks. Reagarding 4.: I am using neutron DVR, meaning that I don't have a network node. My Floating IPs and inter-vm traffic is distributed across the compute nodes, therefore I want to run the lbaas-agent on each compute node. Is neutron able to distribute the load balancers uniform across the nodes? I have a Liberty deployment using DVR scenario. So I have 1 controller (which includes l3 agent in dvr_snat mode) and multiple compute nodes (which includes l3 agent in dvr mode). I want to add LBaaS service to this deployment, but I am a bit confused about how it will integrate. Would it work if I run the LBaaS agent on each compute node ? (compute nodes handles DNAT and floating ips) What about Octavia ? Is it stable enough ? Can you recommend some installation instructions for octavia ? Thank you. I have the following setup:. OpenStack is a trademark of OpenStack Foundation. This site is powered by Askbot. (GPLv3 or later; source). Content on this site is licensed under a CC-BY 3.0 license.
https://ask.openstack.org/en/users/15421/mariusleu/?sort=recent
CC-MAIN-2020-40
refinedweb
790
85.28
Hmm. Sounds interesting. I had a look at org.apache.tools.ant.taskdefs.Manifest to see what I could see. -- A Manifest object contains a set of Section object keyed by name -- A Section contains a set of Attribute objects, keyed by name.toLowerCase(). -- Both mappings use java.util.Hashtable to maintain the String:Object mappings. There is no code that I could see which sorts the attributes in a section upon writing, so the order will be that imposed by the hashCode values of the keys. Indeed, running the simple test program test.java: import java.util.*; class test { public static void main(String[] args) { Hashtable h = new Hashtable(); addEntry(h, "Main-Class"); addEntry(h, "Created-By"); addEntry(h, "Class-Path"); int i = 0; for (Enumeration e = h.elements(); e.hasMoreElements();) { System.out.println(String.valueOf(i++) + ": " + e.nextElement()); } printHash("Main-Class"); printHash("Created-By"); printHash("Class-Path"); printHash("main-class"); printHash("created-by"); printHash("class-path"); } private static void printHash(String s) { System.out.println(s + ": " + s.hashCode()); } private static void addEntry(Hashtable h, String s) { s = s.toLowerCase(); h.put(s, s); } } Yields the following results: 0: main-class 1: created-by 2: class-path Main-Class: 1325056100 Created-By: -931871332 Class-Path: 1655920538 main-class: -638856092 created-by: 1369632092 class-path: -336591014 Therefore, the test class printed the elements of the hashtable [0, 1, 2] in the same order seen by you when the manifest is written to a file, which also explains why the order of the XML does not matter. I think I remember reading somewhere about the Class-Path that it *must* be the line directly following the Manifest-Version string. Definitely my past experience with .ear's deployed within Weblogic and JBoss suggest it. Unfortunately I cannot seem to find any documentation that confirms this. If that is the case, I would consider this to be a bug in Manifest.java since it does not enforce this ordering. The fix to Manifest.java would be to check if the attribute "class-path" exists, and write this first. The source for ant 1.4.1 has this 'bug' (if it is one) as well as the cvs tip. The workaround would seem to be <exec> jar directly from within ant, it would appear that <jar> would be unusable for you under these conditions. Can anyone confirm that Class-Path needs to be the first entry in the main section of a manifest? Cheers, Paul > -----Original Message----- > From: Todd Wilson [mailto:todd_wilson@byu.edu] > Sent: Tuesday, March 12, 2002 1:20 PM > To: ant-user@jakarta.apache.org > Subject: Using Main-Class and Class-Path in a manifest file > > > Greetings, > >"/> > > <!-- distribution directory --> > <mkdir dir="$. > > > -- >>
http://mail-archives.apache.org/mod_mbox/ant-user/200203.mbox/%3CE6062644D006474BAEB2A3933C1C459C0D57BE@lucidamail.lucidainc.com%3E
CC-MAIN-2013-48
refinedweb
450
57.87
We can easily fix the error importerror cannot import name qtwidgets by just installing pyqt5 python package using pip , conda etc. Actually, qtwidgets is package/module of pyqt5 . Hence once pyqt5 is successfully installed on the system, You will not get the same error. In this article, We will explore those ways to install the pyqt5 python package. Importerror cannot import name qtwidgets : ( Solution ) The first and most convenient way is the pip package manager. So let’s go with it. Method 1: Here is the command for installing pyqt5 python package. pip install PyQt5 Remember the above command will install the latest version for PyQt5 package. If you want to go with some other compatible version, You may have to define it with the below command. pip install PyQt5==5.15.3 Here you may pass any other version for PyQt5 as per your compatibility. Last but not least to add – sudo prefix. In some places where the directory needs admin privilege’s to run. You may add sudo prefix before above mention command. Method 2 : Let’s use conda for installing PyQt5 package. Here is the command for this- conda install -c ipa pyqt5 Conda is the default package manager from Anaconda. How to check the error is fix? The simple way to check the above error “cannot import name qtwidgets” is either you run the same code where you were getting the same error. Another way is to run the import line if it is not showing any error. We have simply fixed that error. As you already know QtWidgets is the submodule from PyQt5 package. import PyQt5.QtWidgets as QtWidgets Hope you will be able to troubleshoot the error. Still, if you are facing the same issue, Let the team know about the same. We will surely help you to fix the same as soon as possible. Thanks Data Science Learner Team Join our list Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
https://www.datasciencelearner.com/importerror-cannot-import-name-qtwidgets-fix/
CC-MAIN-2021-39
refinedweb
334
75.2
#include <wx/dataobj.h> A! Constructs a data format object for a custom format identified by its name format. wxPerl Note: In wxPerl use Wx::Bitmap->newUser(format). Returns the name of a custom format (this function will fail for a standard format). Returns the platform-specific number identifying the format. Returns true if the formats are different. Returns true if the formats are different. Returns true if the formats are equal. Returns true if the formats are equal. Sets the format to be the custom format identified by the given name. Sets the format to the given value, which should be one of wxDF_XXX constants.
https://docs.wxwidgets.org/stable/classwx_data_format.html
CC-MAIN-2021-17
refinedweb
106
61.33
Catching and killing bugs can be fun! However, if the project is a living creature and is not destined for termination in the foreseeable future, it will require new features! You’ve done this before - plain and simple - by writing more code! But now, we’ve got to take advantage of the test driven development technique! Let’s see how we can enhance our project in a sustainable way! Introducing the new feature The basics are all covered in our app. Now it's time to make it more fun! Let's encourage the players to stay focused and motivated by rewarding the consecutive wins! 🏆 Each additional consecutive time a player wins, instead of adding a single point to their score, we'll add as many points as there are uninterrupted consecutive wins! A draw will be considered an interruption of a sequence and the score rewards get reset back to 1. Here's an example of game states: Player 1 - score 1 (+ 1) : 0 Player 1 - score 3 (+ 2) : 0 Player 1 - score 6 (+ 3) : 0 Player 2 - score 6 : (+ 1) 1 Player 2 - score 6 : (+ 2) 3 Draw - score 6 : 3 Player 2 - score 6 : (+ 1) 4 etc... And finally, to make it extra fun: in case of 3 consecutive draws, the scores for both players will reset to 0! 😈 A player who advanced a lot would have to make sure this doesn't happen, when a player who got behind may want to stroll a little to facilitate this event. While working on this final touch for the app, we'll follow the Red, Green, Refactor methodology in TDD. Let the battle begin! Cycle 1. Progressive rewards The first addition we can implement is to make sure we are progressively increasing the score for players who win consecutively. Cycle 1. Red - create a test We'll start by writing a test against our new addition: if the first player wins 3 times in a row from the start of the tournament, the expected score will be 6:0, as shown below: func testGivenGameWonByPlayerOneForThirdTime_WhenAdded_ThenScoreShouldBe6x0() {tournament.addGame(withWinner: .one)tournament.addGame(withWinner: .one)tournament.addGame(withWinner: .one)XCTAssertEqual(tournament.score(forPlayer: .one), 6)XCTAssertEqual(tournament.score(forPlayer: .two), 0)} Once we type that in and execute the test, we can observe our new test fail - and rightly so, as this is not how the score is calculated: Cycle 1. Green - implement the code To implement the newly required functionality we need to add 2 variables to collect the winning history: private var lastWinner: Player?private var gamesWon = 0 And alter the addGame method from this... func addGame(withWinner winner: Player?) {if let winner = winner {scores[winner]! += 1}} ...to this: func addGame(withWinner winner: Player?) {if let winner = winner {if lastWinner == winner {gamesWon += 1scores[winner]! += gamesWon}else {lastWinner = winnergamesWon = 1scores[winner]! += gamesWon}}} Now run the test again and observe it going green: We are almost through the first cycle! Cycle 1. Refactor - clean up and improve What is there to improve here? The production code seems fine for the moment. And the test can be improved. We can anticipate needing to add games a number of times, repeating the same lines of code. Other than create extra work, this would increase the chances of us making a mistake miscalculating the number of lines needed for the test. So, let's create a helper function that will add a number of games for a player: func addGames(_ count: Int, withWinner winner: Player?) {for _ in 0 ..< count {tournament.addGame(withWinner: winner)}} And then replace advancing the tournament with a single line: func testGivenGameWonByPlayerOneForThirdTime_WhenAdded_ThenScoreShouldBe6x0() {addGames(3, withWinner: .one)XCTAssertEqual(tournament.score(forPlayer: .one), 6)XCTAssertEqual(tournament.score(forPlayer: .two), 0)} We are through the first cycle! 👍 Cycle 2. Draw interruption The next circumstance we need to address is the occurrence of a draw. When it happens, we must reset the latest winner information; otherwise, if the previous winner continues winning after the draw, they will gain unearned rewards. 😱 Cycle 2. Red - create a test We'll start this iteration by writing a test for the new condition: the first player wins 3 times in a row from the start of the tournament, then a games ends with a draw, and then the first player wins again. This time, the expected score will be 7:0, as shown below: func testGivenGameWonByPlayerOneFollowing3WinsPlayerOneAndDraw_WhenAdded_ThenScoreShouldBe7x0() {addGames(3, withWinner: .one)addGames(1, withWinner: nil)addGames(1, withWinner: .one)XCTAssertEqual(tournament.score(forPlayer: .one), 7)XCTAssertEqual(tournament.score(forPlayer: .two), 0)} And it fails of course! Cycle 2. Green - implement the code To satisfy the new requirement, we need to add the code to the addGame method handling the event when the winner parameter is nil: if let winner = winner {// ...}else {lastWinner = nilgamesWon = 0} Run the test and observe it pass! Cycle 2. Refactor - clean up and improve We are so good at producing perfectly perfect code. 😎 So, let's move on! Cycle 3. Draw interruption The last component of the new feature to address is accounting for 3 draws in a row, which needs to reset the tournament! Cycle 3. Red - create a test As usual, we'll write a test for the remaining condition, the tournament will advance with a winner 3 times, then we'll let the other player win 3 times, and finally we'll require a draw to happen 3 times. In the end, we'll expect the score to be back to square one: 0:0. func testGivenDrawGameFollowing3WinsPlayer13WinsPlayer2And2Draws_WhenAdded_ThenScoreShouldBe0x0() {addGames(3, withWinner: .one)addGames(3, withWinner: .two)addGames(3, withWinner: nil)XCTAssertEqual(tournament.score(forPlayer: .one), 0)XCTAssertEqual(tournament.score(forPlayer: .two), 0)} The test fails as expected. Cycle 3. Green - implement the code To handle this situation, we need to add a new tracking variable to hold the number of consecutive draws: private var draws = 0 ...and alter the addGame method: if let winner = winner {// ...}else {lastWinner = nilgamesWon = 0draws += 1if draws == 3 {scores[.one]! = 0scores[.two]! = 0draws = 0}} Test it now... And it passed! Cycle 3. Refactor - clean up and improve We are awesome at writing great code! However, there's still space for improvement! Instead of using a constant 3 in the code, let's move it out to a static constant. And, even though we have only 2 players, we might as well reset the whole dictionary of scores. Also, let's move it out to a function: // ...// create a static constantprivate static let maxOfDraws = 3// ...// create reset fucntionprivate func resetScores() {for (player, _) in scores {scores[player] = 0}}// ...// alter handling the drawsdraws += 1if draws == Tournament.maxOfDraws {resetScores()draws = 0} Let's run the test again to make sure nothing is broken... Still passed! Now we are truly awesome! 😇 Here's the final code of the Tournament class: import Foundationclass Tournament {private static let maxOfDraws = 3private var scores = [Player.one: 0, Player.two: 0]private var lastWinner: Player?private var gamesWon = 0private var draws = 0func score(forPlayer player: Player) -> Int {return scores[player]!}func addGame(withWinner winner: Player?) {if let winner = winner {if lastWinner == winner {gamesWon += 1scores[winner]! += gamesWon}else {lastWinner = winnergamesWon = 1scores[winner]! += gamesWon}}else {lastWinner = nilgamesWon = 0draws += 1if draws == Tournament.maxOfDraws {resetScores()draws = 0}}}private func resetScores() {for (player, _) in scores {scores[player] = 0}}} Are we still covered? We need to check that we are still covering 100% of our model. Click Cmd + u to execute all the tests and switch to the code coverage page: Still looking good! Now you can play this fancy variation of the Tic-Tac-Toe game! 🤗 Let's Recap! I hope you enjoyed this demonstration and can appreciate the power of Test Driven Development! Remember to repeat the Red, Green, Refactor cycle without skipping phases. Each time, the goal is to find the smallest possible code adjustment to test to allow us to progress. It's a big change in the way you develop. I encourage you to practice Test Driven Development as much as possible. After a while, you'll end up wondering how you lived without it! 🤩
https://openclassrooms.com/en/courses/4554386-enhance-an-existing-app-using-test-driven-development/5095736-add-a-feature-in-tdd
CC-MAIN-2022-21
refinedweb
1,338
56.66
Register your product to gain access to bonus material or receive a coupon. 7 Hours of Video Instruction Core Java®, Volumes I and II, have long been recognized as the leading, no-nonsense tutorial and reference for experienced programmers who want to write robust Java code for real-world applications. In Core Java®: Advanced LiveLessons, Cay S. Horstmann takes that same approach to introducing experienced programmers to Java, with detailed demonstration. This training pairs with the tenth edition of Core Java®, Volume II—Advanced Features, which has been fully updated to cover Java SE 8. In these video LiveLessons, you will learn about advanced Java language features along with the most useful parts of the standard library. In order to take full advantage of the lessons, be sure to download the companion source code. Related Content: Core Java LiveLessons (Complete Video Course) Core Java, Volume I–Fundamentals, Tenth Edition Core Java, Volume II–Advanced Features, Tenth Edition Lessons 1 and 2 cover lambda expressions, an important addition to Java 8, and the streams library, which makes extensive use of lambda expressions. With streams, you can efficiently analyze large data sets, simply by telling what you want to achieve. Leave it to the streams library to figure out the “how.” Lesson 3 covers bread-and-butter issues related to input and output: text processing, file handling, regular expressions, and connecting to web servers. Lesson 4 covers concurrency, the most important lesson within this LiveLessons training. Nowadays, processors have multiple cores and we need to keep them busy. But it is challenging to write programs that safely run tasks in parallel. This lesson gives you a set of strategies to meet that challenge. The next two lessons are all about building tools. Lesson 5 introduces the annotation mechanism. You will see how tools use annotations for checking program correctness, generating code, interfacing with databases and web services. Another way of making your programs smarter is by allowing your users to provide extensions in Java or a scripting language. Lesson 6 shows you how to run the Java compiler or a language interpreter in your programs. In Lesson 7, you will learn how to write programs for users anywhere in the world, with their preferences for formatting and messages in their language. Lesson 8 covers the new java.time package that handles complexities like leap years, time zones, and daylight savings time. The last two lessons, Lessons 9 and 10, show you how to interface with relational databases and how to read and write XML data. These are essential skills for programming server-side application. Skill Level Intermediate to Advanced Who Should Take This Course Experienced Java programmers Course RequirementsExperience programming in Java and know how to program with loops and arrays, define classes, and use collections such as lists and maps.: Java 8 Interfaces and Lambda Expressions Learning objectives Recall the concept of interfaces 1.2 Understand Java 8 features of interfaces 1.3 Recall how interfaces are used for callbacks 1.4 Understand how lambda expressions work Lesson 2: Streams Learning objectives 2.1 Understand the stream concept and its benefits 2.2 Be able to create streams 2.3 Transform streams into other streams 2.4 Know how to get answers from stream data 2.5 Work with the Optional type 2.6 Place stream results into collections 2.7 Place stream results into maps 2.8 Understand the concept of reduction operations 2.9 Work with streams of primitive type values 2.10 Speed up stream operations with parallel streams Lesson 3: Processing Input and Output Learning objectives 3.1 Understand the concept of input/output streams 3.2 Read and write text files 3.3 Work with binary data 3.4 Create, access, and delete files and directories 3.5 Process data from the Internet 3.6 Work with regular expressions 3.7 Understand the concept of serialization Lesson 4: Concurrent Programming Learning objectives 4.1 Use executors to run tasks concurrently 4.2 Understand the risks of concurrent execution 4.3 Use the Java API for parallel algorithms 4.4 Use the threadsafe data structures in the Java API 4.5 Work with atomic values 4.6 Become familiar with low-level locks 4.7 Understand the characteristics of Java threads 4.8 Organize asynchronous computations 4.9 Run operating system processes Lesson 5: Annotations Learning objectives 5.1 Know how to annotate declarations and type uses 5.2 Define your own annotations 5.3 Be familiar with the annotations in the Java API 5.4 Understand how annotations are processed Lesson 6: Compiling and Scripting Learning objectives 6.1 Run the Java compiler from a Java program 6.2 Use a scripting language in a Java program 6.3 Become familiar with the Nashorn JavaScript interpreter Lesson 7: Internationalization Learning objectives 7.1 Understand the concept of a locale 7.2 Use locale-specific formatting for numbers and dates 7.3 Work with strings in multiple languages 7.4 Organize locale-specific data in resource bundles Lesson 8: Date and Time Learning objectives 8.1 Understand the challenges of computing with dates and times 8.2 Work with instants and durations 8.3 Use the Java classes for local dates and times 8.4 Be able to handle time zones 8.5 Interoperate with legacy date and time classes Lesson 9: Java Database Connectivity Learning objectives 9.1 Understand the design of the Java database connectivity API 9.2 Be able to connect to a database in a Java program 9.3 Execute SQL statements from a Java program 9.4 Use database query results 9.5 Group SQL statements into transactions and batches 9.6 Access database metadata Lesson 10: XML Learning objectives 10.1 Parsing XML documents 10.2 Work with the XPath and namespaces specifications in Java 10.3 Use a streaming parser 10.4 Generate XML documents Summary
http://www.informit.com/store/core-java-advanced-complete-video-course-video-training-9780134643618
CC-MAIN-2017-04
refinedweb
986
60.11
User sensitive info is not protected properly Bug Description Now: If user passes security sensitive information to a workflow it won't be protected properly: it wil may appear in Mistral logs, it won't be encoded before transferred over the network etc. The goal: We need a mechanism that allows to protect sensitive user data used by workflows. Solution ideas: * Client doesn't need to encode sensitive data before sending it to a server. It can use HTTPS. * Create the special section "secret" in the workflow language to let Mistral know that this date must be protected * Create a special data type, for example class "Secret", with string representation "******" so that if something is wrapped into it we'll never see it in logs in its initial form. All variables marked in "secret" should be internally wrapped by instance of "Secret". * Store Secret instances in encoded form in DB, decode them when fetched from DB Syntax ideas: --------- Section "secret" under workflow --------- [renat: Everybody liked this idea at the PTG] version: "2.0" wf: input: - username secret: - keyA tasks: taskA: action: my_action publish: keyA: <% task(taskA) on-success: - taskB taskB: action: my_action2 input: arg1: <% $.keyA %> --------- Encrypt only part of the structure --------- [michal: we need to encrypt only keyA, and not the whole headers section] version: "2.0" wf: input: - username secret: - keyA tasks: taskA: action: std.http input: url: some.url headers: accept: text --------- Wrapping sensitive data using a function --------- tasks: taskA: action: my_action username=<% ... %> password=<% secret(...) %> --------- Using decorator to protect from logging etc. --------- # In this example, the argument "password" will never be logged by Mistral # in its initial form. from mistral_lib.secret import secret @secret( class MyAction(Action): def init(self, password): # do something Renat said on the comment: >>> Honestly, what mask_password() method does doesn't seem 1) obvious because there's no clear documentation on it 2) reliable enough for all situations we may have. I also would like to see some testing for that (I think it's possible to do if we apply some mocking testing etc.) Generally, I would suggest that we create a special utility class Password with string representation like "****". And whenever we need to get a real value we will call a method get_value() or something like that. Thoughts? >>> The other use case for passwords is passing them as parameters via environment __env, or workflow parameters. We may also want to mask them in the DB: else the task context will be inspected and passwords exposed via API. Change abandoned by Renat Akhmerov (<email address hidden>) on branch: master Review: https:/ Reason: Obsolete and almost impossible to rebase. Here's my strong opinion about this ticket and some ideas of how we could address it. * Any solutions based on guessing (any kinds of patterns etc.) what is secure information and what's not won't work out. Just because it's security and this is not a secure approach by definition. Below are my ideas of how we could address it. Client-side An example of input data that we provide to Mistral in JSON format: { "secure_key^&": { "key1": { "_secured": 1 }, "key2": 2, "key3: 3 } } So whenever we need to make something secure we just wrap a corresponding value with {"_secure": value} (we can use a different marker if needed). So the client knows that it needs to be passed to the server as a secure piece of information. Server-side: * We create a special data type (class SecuredData or Password) that has a string representation "*****" * JSON SQLAlchemy type must account for this class and encode/decode info behind this class instances so that we don't keep passwords and other secure things in their original form in DB * Every time we request a info via API we give only its string representation which is "*****" * Every time in the server when we need to get a real value (to pass it to executor etc.) we extract a real value (i.e. using get_value() method) Change abandoned by Lingxian Kong (<email address hidden>) on branch: master Review: https:/ Reason: Should find a generic way to fix the security problem, need more discussion with mistral team. We can work with the ossp (openstack security project) to get a ossn security note, such as https:/ Passwords or any other security information that can be imported in context via CLI are showing in mistral log and mistral dashboard too.
https://bugs.launchpad.net/mistral/+bug/1337268
CC-MAIN-2018-34
refinedweb
732
57.5
Odoo Help Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps: CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc. [v8] how can I combine English & Chinese translation with a python script? I want to make a custom translation. Actually I want to show the (English source) of column E of the translations csv plus the translated term (column F) together. In my case it is a combination of English and Chinese so practically I want to see "Sales 销售“ for the 'Sales' Module for example I have a python script that should do that (combining column E and column F of the Chinese language .csv) that looks like this import csv import sys filename = sys.argv[1] with open(filename, 'rb') as f: rows = list(csv.reader(f)) for row in rows: if row[4] != row[5]: row[5] = ' '.join((row[4], row[5])) #print row[5] with open('chinese_english_combined.csv', 'wb') as f: writer = csv.writer(f) writer.writerows(rows) this worked with an older v7 but now trying to combine languages in v8 I get an error Traceback (most recent call last): File "combineLanguages.py", line 9, in <module> if row[4] != row[5]: IndexError: list index out of range EDIT: I did not write the script myself and I don't know python, that's why I'm asking here "List index out of range" means that either column 5 or 6 (the counting starts at 0 for the first column) is not filled in correctly, or might even be missing. Make sure that the csv file you are feeding your script is exactly equal to the one you use in verison 7. That means that it should have the exact same columns, in the exact same order and has at least one row. If you can confirm that is the case, make sure the 5th and 6th columns at least contain some value. I though it must be something similar to that. It's a little confusing that python uses the term 'row' when it actually means 'column'. Nevertheless, the file structure is the same and both (column 4 & 5) contain data. Can it be I need to remove the 'header'. Will check that out and report back. By the way: the script doesn't work with the 'old' v7 file neither anymore "By the way: the script doesn't work with the 'old' v7 file neither anymore". Check the encoding of your .csv file, it shouldn't unicode as the parser doesn't support it. using "Chinese Simplified" encoding helped with the error message, thanks. Now I see that something is not working with the commas (as if there where too many of them in the translated terms) in the csv file. I have in total 6 columns (the last being the translated term) but when I open the combined translation that is being made by my script now, so of the terms have many more columns. By default my openoffice gives me the option using "," & ";" for separating things (and when I choose anything else the preview just shows one single column). I guess I have to fix these terms handish or is there any suggestion regarding this from you end? About This Community Odoo Training Center Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
https://www.odoo.com/forum/help-1/question/v8-how-can-i-combine-english-chinese-translation-with-a-python-script-64715
CC-MAIN-2018-17
refinedweb
572
71.34
ACTA Rejected By European Parliament 142 Posted by Unknown Lamer from the dodged-another-one dept. from the dodged-another-one dept. Grumbleduke writes "Today the European Parliament voted overwhelmingly to reject the controversial Anti-Counterfeiting Trade Agreement. Despite attempts by the EPP Group to delay the vote until after the Courts have ruled on its legality, the Parliament voted against the Treaty by 478 to 39; apparently the biggest ever defeat the Commission has suffered. However, despite this apparent victory for the Internet, transparency and democracy, the Commission indicated that it will press ahead with the court reference, and if the Court doesn't reject ACTA as well, will consider bringing it back before the Parliament." Thanks to the FFII, EDRI, la Quadrature (Score:2) Congratulations to the FFII, EDRI and quadrature. You guys did awsome work. Re: (Score:2, Insightful) Re:Thanks to the FFII, EDRI, la Quadrature (Score:5, Funny) Europe is once again reborn as a democracy, of the people, for the people. That's our line, you damned socialist hippies. Signed, 'Merika, Fuck Yeah! Re: (Score:2) Europe is once again reborn as a democracy, of the people, for the people. That's our line, you damned socialist hippies. Not anymore. You're in the process of repudiating it, you damned fascist toadie sheep. Re: (Score:2) Europe is once again reborn as a democracy, of the people, for the people. Now all we have to deal with is the ESM [tumblr.com] and we are home free.... Sigh Re: (Score:2, Informative) It may well be that the vote has passed but may not make any difference [slashdot.org] Especially as there appears to be a plan B [] It's a good win at the moment, but the war isn't won. Re: (Score:2) Commission is powerless without parliament (Score:4, Informative) It's rare to see the EU parliament - composing of over half a dozen groups, each of which is umbrella organization for dozens of parties from many countries - to be as united as they were now. They voted not only against the internet restricting laws but also against the kind of shady activity that occurred during ACTA preparations. Whatever the commission says now, I doubt they've got the balls to bring ACTA - or nearly identical equivalents with different name - back anytime soon... it would be such an act of disrespect towards the parliament that things could escalate far more than anyone is willing to risk "just for copyright". I think we're safe at least until June of 2014 (next parliamentary elections in EU)... that is, of course, unless same provisions are brought back in a bill that also mention child pornography. EU legislators are pretty weak against the "think of the children" argument. Re: (Score:3) and I'm kind of proud to be an European. This was the first time were I recognized some "we, the people" feeling - the EU is mostly a bureaucratic umbrella and we have many democratic deficits. But take a look at this [google.de], protests all over the continent, finally some pan-European atmosphere. Neither top-to-bottom nor some organized spectacle (e.g. Euro2012 [football championship]) - great! Re: (Score:3). nice (Score:3) unexpectedly, democracy works ! EP win against EC ! Re: (Score:1, Interesting) Re:nice (Score:5, Informative) The European Parliament has to give its consent. The vote was that it denied its consent. The EC also invoked the European Court of Justice. The ECJ will simply say, we cannot rule on ACTA anymore because the process is terminated. FFII for analysis [ffii.org]. Re: (Score:3) We rewrote parts of it to satisfy their demands, and it went into effect in 2009. Re: (Score:2) It's the age-old problem with representative 'democracy' that the commission, or the power that be get an unlimited number of tries to pass a certain unpopular piece of legislation. They can re-package, re-brand it, attach it to another law, or if necessary water it Re:nice (Score:5, Interesting) The difference in this case is that ACTA isn't a piece of legislation written up by the EU that can be changed willy-nilly in order to secure the votes for passage. ACTA is an international treaty that has been signed (but not ratified) by (most?) of the signatories' legislative bodies. To change ACTA (to re-package, whatever) requires all the signatory nations to get back together & start re-negotiating the points of it. SImply put, the EU cannot alter ACTA for ratification independently. Re: (Score:2) Moreover, Ireland needs the EU, for financial reasons and whatnot. The EP does not need ACTA. Re: (Score:2) Indeed. The EC's man in charge of this treaty has stated he will continue to press-forward through the EU's "supreme court" to get ACTA enforced. So basically the Parliament vote don't mean shit..... you have a law-making body that can bypassed by the executive branch. (Sounds familiar.) Re:nice (Score:5, Insightful) No, it cannot be bypassed. What he can do is have it subject to judicial review and try to resubmit the ratification proposal. However, I would assume that parliament will not take kindly to this. Maybe they should move for a no confidence vote on Karel. Re: (Score:2) Unfortunately I think the EP is a little hindered in their power over individual commissioners, they can only fire the entire commission, not single individuals. Doing that requires requires grand standing and a game of chicken between the EC and the EP. Re: (Score:1) The EC (unelected and largely unaccountable)/quote> Come on, quit that old bullshit. The European Commission is appointed and controlled by the governments of the member states, all of them democratically elected. Re:nice (Score:5, Informative) The EC (unelected and largely unaccountable) Come on, quit that old bullshit. The European Commission is appointed and controlled by the governments of the member states, all of them democratically elected. Ah, indirectly. Most - if not all - EU countries use a parliamentary system, which means our governments are not directly elected, but elected by the parliaments which are directly elected. So you have voters > local parliament > local government > EC. So yeah, that's quite far from the voters. Compare to the EP: voters > EP. One step. A lot of special interests are bound to be happening through those steps. However, the EC has far less power with the passing of Lisbon, so I wouldn't worry too much. Re: (Score:2) I recommend you to read up on party-list proportional representation voting systems. Because you can vote for individual candidates, but the party will also recieve a vote at the same time. Whenever a vote for a party list has elected on its candidate list, the votes from thereon pass onto the next one, and so on. They are not indirectly elected, because their listing has to be made official prior to the election, and moreover, the list has to appear on every ballot, in order. So even if it was indirect, it Re: (Score:2) Re: (Score:2) Come on, quit that old bullshit. The European Commission is appointed and controlled by the governments of the member states, all of them democratically elected. Your point being? The EC is a group of political appointees, with a history of pushing agendas at odds with the wishes of the electorate and their democratically elected representatives. Remember the software patents [ffii.org] battle? Re: (Score:2) The EC members, since 2009, consist of the head of states of every EU countries. Hardly "political appointees". In some countries in Europe the head of state is elected directly by the people. Re:nice (Score:4, Insightful) They'll just extradite everyone who violates it to the U.S. for prosecution. Re: (Score:2) The European Commission is not unelected nor unaccountable. Its president is first proposed by the European Council and then elected by the European Parliament. The European Council, in agreement with the president of the commission, then appoints the commissioners, which are then also subject to a vote of approval by the European Parliament. The European Parliament can also dismiss the European Commission (basically, a motion of no confidence), though not individual commissioners. In fact, an angry Europea Re: (Score:2) An incoming PM immediately faces a vote of confidence though, in the form of the budget vote. If they lose that then it all starts again with someone else being asked to try and form a government. The budget vote, in practice, demonstrates that the appointed prime minster has the backing of the majority of MPs. Re: (Score:2) Of course the EC is elected. It is an executive council made of all the head of states or government (whoever wield the actual top executive power in their respective state) and a few European representative like the president of the European Commission. All these people are elected according to the system of their own country of origin. Of course it is accountable. Decisions taken in the EC are discussed in newspapers in Europe like any other political body of import. Boneheaded decision making result in no Re: (Score:2) No, maybe you are thinking of the council of ministers, which is a separate organ, but even then you would be wrong. The European Commission is made up of people _appointed_ by the executive branch of each member state. As such they do represent the traditional head of government. but not the head of state! Who gives a shit what the queen thinks? No European organ is made up of the heads of state, the kings a Re: (Score:3) Unless they try and slip in onto page 735 of a bill about fisheries. Nah, they'd never try anything as sneaky as that. Well, not again [theregister.co.uk]. Re: (Score:2) I have the feeling that democracy doesn't work here. What does the legality of a rejected law matter? So why does the Court still have a say in this? And why, if ACTA is deemed legal, does the Parliament have to vote again? Is that normal procedure? Re:nice (Score:4, Interesting) Re:nice (Score:5, Informative) This is true, except that the Commission cannot easily change ACTA as is as the treaty is signed. They could ask to have a protocol added which would require the approvals of all the original signing parties which include the US, Canada, the EU, the individual EU member states et.c. This in turn would mean that most governments need to acquire new negotiating mandates from their respective parliaments and so on. This is not a trivial operation. Re:nice (Score:5, Insightful) Nevertheless, the real issue is the unconvinient publicity of the ACTA, which could make all these "hidden" deals very hard to strike. Which is actually a real democracy at work. Re: (Score:2) Personally I fear that this was just a smokescreen and they put it up there just to fail and take up media space while they're busy passing the real treaty throu Well done (Score:3, Insightful) But we're only safe until the next bit of daft legislation. Re: (Score:2) Is there a government? If yes, then they can pass something you don't like and you need to be sure they don't if at all possible. If no, then you don't have to worry about it, but you have bigger issues that you do need to worry about then. well good for them (Score:4, Funny) Its nice to see some political critters with a shred of common sense still. Of course the MPAA/RIAA's of the world over there are thinking what the hell happened and if they didn't donate enough. Re:well good for them (Score:4, Insightful) Re: (Score:3) This is Europe. You can wine and dine the MEPs, to an extent, but you need to corrupt them in so many languages that you might find the task daunting... Also unlike the US, outright buying of politicians is frowned upon. Because make no mistakes, unlimited campaign donations via "superpacs" is just that, buying politicos. Re: (Score:3) No doubt. It should be noted, however, that politicians were bought and sold long before "superpacs" were even thought of. Re: (Score:2) True. SuperPACs are just the big box stores of corruption. But don't underestimate the impact of big box stores. The commission is blatantly against democracy (Score:1) Re: (Score:3) They'll keep sending it until it's passed. It's what they get paid for. Re:The commission is blatantly against democracy (Score:5, Insightful) Won't work. If there's one thing that the EU Parliament have shown is that when people try and bypass their authority they're willing to turn up in huge numbers to vote it down on principle. Re: (Score:1) It would have been very funny seeing this proposal being rejected continuously unless you consider that each iteration of the process costs task payers money. Why are we continuously footing that bill if it has been shown that the treaty has been overwhelmingly rejected? "SOUP! The goat fetched SOUP!!" "SOUP?!?11one This makes no sense!" Re: (Score:1) task payers = tax payers.... sigh... I should stop reading /. and get back to JIRA. Re: (Score:2) Re: (Score:1) You are correct. All actions now should be direct at EC member responsible for Trade Karel De Gucht asking him why after so many rejections of ACTA he is still wasting tax payer money by not retracting his ACTA submission from the EU court. Re: (Score:1) Six hundred no's and a yes, is a yes (Score:5, Funny) ACTA is like a sleezy guy trying to pick you up in a bar. You can tell him no six hundred times and he'll keep coming back, because all it takes is one yes and he's fucked you. Re:Six hundred no's and a yes, is a yes (Score:5, Insightful) And he will keep rephrasing the question until you say Yes by accident. Re: (Score:2) And by consequence the voters that elected them. Re: (Score:1) Yes... Yes I do... Re: (Score:2) Re:Six hundred no's and a yes, is a yes (Score:5, Funny) Europe needs to go back to killing the messenger. If they send the guy carrying the next version of ACTA back in a coffin, it might get the point across. Re: (Score:2) rich guys are running the world. and rich guys LOVE their lives. and to live. hmmm, this may just work. Re: (Score:2) Just send the head back in a flat rate postal box. Save on postage. coffin &ct. Re: (Score:2) Well, they said if it fits it ships! I don't see the problem here. Re: (Score:2) Don't celebrate just yet (Score:1) This is the European July 4th... (Score:4, Insightful) Higgs' Boson discovered by LHC before Tevatron, and ACTA (already implemented in the USA) finally rejected by the European Parliament. Europe wins both in science and democracy. Very sad july 4th for the USA. Dear hollywood cocaineaholics/drunk singers/corrupt american politicians/etc..., f*uck you! Re: (Score:1, Funny) Hey - don't take it too hard.. You still have those beautiful software patents. ... if you are a lawyer that is). Now that's something we don't have here in Europe. It must be a lot of fun to see all those cases increase (well Re:This is the European July 4th... (Score:4, Funny) Don't forget the Apple design patents! Re: (Score:2) Re: (Score:1) Why is the European Parliament doing business today? Don't they know it's the Fourth? Re: (Score:2) Re: (Score:2) Re: (Score:2) To be slightly pedantic, machines don't make discoveries. That, or the Higgs was discovered months ago. Re: (Score:2) Very sad july 4th for the USA Not really, it might just encourage the Americans to do better. They out-Sovieted the Soviets, perhaps it's time they try to out-Europe the Europeans instead. Act of war.... (Score:1) Just wait for Romney to get elected, Europe will find out what it's like to not do what they are told. Retroactively adopt ACTA or face War! we have several ships ready with nuclear armed cruise missles ready to strike every capitol and 3 largest cities in all of europe if you dont to what you are told to do. dissent must be stopped with a swift and severe blow to reinforce the fear to the others. We have always been at war with Eurasia. The emperor commands us to fight against the heretics. Pick any insane w Re: (Score:2) Not only did they reject it... (Score:5, Interesting) Re: (Score:2) That made my day :) Re: (Score:2) Specifically, these are the MEPs from The Greens-European Free Alliance [wikipedia.org] group (you can see its logo on the lower right of the signs). It's worth noting that the two MEPs of the Swedish Pirate Party belong to this group, which is unsurprizing given the Greens have been sharing their concerns for a long time. Vote influenced by Pirate Party? (Score:3) Re: (Score:3, Insightful) The vote was near anonymous. More than 90% against. That's not just populism, the pirate parties don't make any serious inroads. Greece is a bad example: that country is in shatters, and people will vote for whoever is not part of the old leadership. The austerity there hurts too, of course, many people don't like it of course, but it seems the overall opinion of the Greek people is that their country should stay in the Eurozone. That's at least what they're currently heading for. Re: (Score:2, Funny) The vote was near anonymous. More than 90% against. I don't think that word means what you think it means. - Unanimous Coward Re: (Score:3) Well, if you look at the picture here [telegraph.co.uk] he might have meant what he said... But no, I don't think the recent electoral successes have done that much to influence. However, the Swedish Pirate MEP's, Christian Engström and Amelia Andersdotter, have most certainly done a lot of work in the European Parliament. And I would wager that a lot of pirate party activists have been encouraged enough to actually mail various MEP's Re: (Score:2) I stand corrected :-) Re: (Score:3) The Pirate Party is very influential. Take a look for instance at this "Creation and Copyright in the Digital Era" [greens-efa.eu] position paper, in particular paragraph 26. The Greens/EFA is the fourth-largest political group in the European Parliament and officially supports reducing copyright to 20 years after publication. There's even more in that paper. Guess what your MAME collection could look like with a copyright limited to 20 years? Or software for your 8-bit home computer emulator you used way back when? As well Not law in the USA either (Score:5, Informative) The US constitution guarantees a fair+speedy trial (Score:3) Now look at Guantanamo. Re: (Score:2) It seems that most of the prisoners there are not citizens and have no reasonable expectation that we'll gra Re: (Score:2) Re: (Score:2) The sleazebags in the white house seem to claim that it's a 'trade agreement' that doesn't change law so it needs no ratification. And they try to claim the same in Europe, altho they have not gotten around the need for ratification. Of course, that's ignoring the point that signing even an agreement that doesn't change current law will still prevent a scaling back of IP law and thus bind congress and senate. This corruption seems prevalent throughout various government arms in many countries. 'Special' IP en Re: (Score:2) The Constitution is but a piece of worthless paper. That should have been evident since what 10-15 years ago ? 1861. [wikipedia.org] What will ACTA proponents say? (Score:3) People didn't understand? They were the victims of a misinformation campaign? LOL. Wonder how many humiliations it'll take to demoralize and scare copyright extremists enough that they'll never try the likes of ACTA again? Drum Karel De Gucht out. Force Theresa May to reconsider and not extradite O'Dwyer. Kick out the officials who are helping with the harassment of the Pirate Bay. Then the extremists can spend the rest of their lives sulking in their mansions like deposed royalty, since they seem unable to face reality. Re: (Score:2) No amount will be enough. We're going to have to roast one or more of them on a spit to get the point across. Legal or not, who cares? (Score:2) Message to Old Media Model Companies: (Score:2) Just frickin' die already! And stop trying to take the rest of the world with you down your death-spiral. The world owes you NOTHING. return (Score:2) Yes, one commissioner has said that he's going to bring it back again and again. The summary misses something important, though: That EU MEPs have made it very clear what they think of that strategy. Shooting yourself in the foot is a really attractive option compared to the equivalent of telling the judge up front that you're going to appeal his ruling anyways - when he knows that he will also preside over the appeal case. I wonder, who voted PRO-ACTA ?! (Score:2) So, we can vote against those ;) Re: (Score:3) You seem to misunderstand how 'democracy' works in Europe. In the EU, you get a vote, and if you vote the wrong way they keep forcing you to vote again until you get it right. Re: (Score:2, Insightful) Re: (Score:2) He must be Russian. ~ Re: (Score:2) Re: (Score:1) i guess the european politics doesn't need to raise money for their campaigns for office, so they don't have to go after the money from special interests. That's why having a public finance law for political parties is so important not only at the european level but also at the local level. And also why many countries have a tax on tv that serves to finance public broadcasters. These simple concepts, are very important for a democratic society that is not yet subverted totally by private interests is anathema it seems to american citizens.
http://tech.slashdot.org/story/12/07/04/1250218/acta-rejected-by-european-parliament?sdsrc=next
CC-MAIN-2014-52
refinedweb
3,788
64.71
53932/python-typeerror-encoding-invalid-keyword-argument-function I have a tine code snippet and it gives me the following error: TypeError: 'encoding' is an invalid keyword argument for this function code: import numpy as np trump = open('speeches.txt', encoding='utf8').read() # display the data print(trump) Trying using the io module for this purpose. import io trump = io.open('speeches.txt', encoding='utf8').read() Just for the record: >>> int('55063.000000') Traceback (most recent ...READ MORE Hi, good question. The thing is that ...READ MORE Easiest way: math.factorial(x) (available in 2.6 and ...READ MORE you can iterate over a callable returning ...READ MORE You can also use the random library's ...READ MORE Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE can you give an example using a ...READ MORE You can simply the built-in function in ...READ MORE The with statement in Python simplifies exception ...READ MORE Hi @Kashish, try something like this: for i ...READ MORE OR Already have an account? Sign in.
https://www.edureka.co/community/53932/python-typeerror-encoding-invalid-keyword-argument-function?show=53934
CC-MAIN-2020-45
refinedweb
173
71.61
Making HOC with prop type inference from Recompose and Redux connector in Flow Takuya Matsuyama Mar 11 It seems like the type annotation for react-redux’s connect is not compatible with the recompose’s HOC type declaration. I often encountered errors when connect is specified in compose function like this: const enhance: HOC<*, Props> = compose( connect(), pure, // <-- Flow error - Component: This type is incompatible with the expected param type of Component withHandlers({ ... }) ) If I removed connect() from parameters, the flow error disappears. Huh? But the app with this code works fine so I guess there are some bugs in the Flow-typed definitions. I don’t wanna waste time for this problem. So I made simple utility functions to make connect compatible with compose function which yet prop type inference is working in base components. Below code is getDispatch function that calls connect with no parameters so it will simply add dispatch to props of the base component: // @flow import { type HOC } from 'recompose' import { connect } from 'react-redux' import type { Dispatch } from '../types' type CHOC<E: {}> = HOC<{ ...$Exact<E>, dispatch: Dispatch }, E> export default function getDispatch<Enhanced: {}>(): CHOC<Enhanced> { return (connect(): Function) } You can use it like so: const enhance: HOC<*, Props> = compose( withDispatch(), pure, withHandlers({ ... }) ) And you will get props.dispatch. When you want to get store mapped to props, you can use below connectStore function: // @flow import { type HOC } from 'recompose' import { connect } from 'react-redux' import type { Dispatch, State } from '../types' type F<M> = (state: State) => M type CHOC<E: {}, M> = HOC<{ ...$Exact<E>, dispatch: Dispatch, ...M }, E> export default function connectStore<Enhanced: {}, M: *>( mapper: F<M> ): CHOC<Enhanced, M> { return (connect(mapper): Function) } It forces the type of connector function casted as recompose’s HOC so it will work without problem: const enhance: HOC<*, Props> = compose( connect(({ editingNote }) => ({ editingNote })), pure, withHandlers({ ... }) ) const EnhancedComponent = enhance(props => { console.log(props.editingNote) // <-- type inference works! }) Obviously it is just a workaround and it even may break in the future, but it simplifies my codebase and works fine for now. The type inference in Flow is pretty great but type annotations tend to be very complicated. It reminds me of the macro hell in C/C++ 🙄 11 Books All Software Engineers Must Read Developers should read more than technical books. Here is a list of books that I strongly recommend for all software engineers.
https://dev.to/craftzdog/making-hoc-with-prop-type-inference-from-recompose-and-redux-connector-in-flow--3mij
CC-MAIN-2018-13
refinedweb
396
52.6
Created on 2005-11-27 17:47 by adr26, last changed 2014-02-03 19:54 by BreamoreBoy. I have a simple form in HTML to upload a file: <form action="" enctype="multipart/form-data" method="post"> <p> Please specify a file:<br> <input type="file" name="file_1" size="40"> </p> <p> <input type="submit" value="Send"> </p> </form> I use this to post to a CGI python script that looks like this: import cgi import cgitb; cgitb.enable() cgi.maxlen = 50 print "Content-type: text/plain" print q = cgi.parse() print q I was expecting that cgi.pm would then throw an exception if I send a file > 50 bytes long to it. If I construct a FieldStorage object, it certainly does: form = cgi.FieldStorage() print form The issue is that in parse_multipart() in cgi.pm, if a part of a multi-part message does not have the Content-Length header, you read lines until you get to the next boundary "--...", but don't honour maxlen whilst doing so. I'd consider this to be a bug and would even be happy to have a go at fixing it as my first contribution to Python, should others concur with me... :-) Andrew could you please provide a patch. No reply to msg109880.
https://bugs.python.org/issue1367631
CC-MAIN-2019-47
refinedweb
212
72.87
C Programming/C Reference/nonstandard/memccpy From Wikibooks, open books for an open world < C Programming | C Reference The Memccpy function ( which stands for "copy bytes in memory" ) is mainly a function of C Standard Library, typically associated with some type of programming languages.This function operate on strings in memory areas. The memccpy function shall copy bytes from one memory area to other, stopping after the first occurrence of some byte X (converted to an Unsigned char) or after n bytes are copied, whichever comes first. Syntax[edit] void *memccpy (void *dest, const void *src, int c, size_t n); In above syntax, size_t is a typedef. It is unsigned data type defined in stddef.h. Description[edit] - Here memccpy function shall copy bytes from the memory area src into dest, stopping after the first occurrence of byte c, or after n bytes are copied, whichever comes first. Here character c is also copied. Returns[edit] - The memccpy function returns a pointer to the next character in dest after c or NULL if c was not found in the first n characters of src. Examples[edit] #include <memory.h> #include <stdio.h> #include <string.h> char string1[60] = "Taj Mahal is a historic monument in India."; int main( void ) { char buffer[61]; char *pdest; printf( "Function: _memccpy 42 characters or to character 'c'\n" ); printf( "Source: %s\n", string1 ); pdest = _memccpy( buffer, string1, 'c', 42); *pdest = '\0'; printf( "Result: %s\n", buffer ); printf( "Length: %d characters\n", strlen( buffer ) ); } Output Function: _memccpy 42 characters or to character 'c' Source: Taj Mahal is a historic monument in India. Result: Taj Mahal is a historic Length: 23 characters #include <stdio.h> #include <string.h> char *msg = "This is the string: not copied"; void main() { char buffer[80]; memset( buffer, '\0', 80 ); memccpy( buffer, msg, ':', 80 ); printf( "%s\n", buffer ); } Output This is the string: Application Usage[edit]
https://en.wikibooks.org/wiki/C_Programming/C_Reference/nonstandard/memccpy
CC-MAIN-2016-44
refinedweb
315
61.36
In this tutorial, we are going to understand the concept of destructors in C++, their uses as well as try to implement them in our code. Table of Contents What are the Destructors in C++? Theoretically, a Destructor is a member function that is used to destroy or delete an object. It can be user-defined. But if not defined, by default at the time of compilation the compiler generates an inline destructor. A destructor is invoked automatically when the object goes out of scope or is explicitly destroyed by the delete operator. Now let us look at the syntax of defining a destructor in C++ for a class named example: example::~example() { //destructor statements; } Here, as you can see, the destructor function( ~example()) has the same name as that of the class it belongs to. Note: Remember before defining a destructor in C++: - Destructor name and class name must be same - A destructor name should have a tilde(‘~’) before it. For eg. ~example(){} - They must not accept any arguments or return anything to the function call - A destructor can be virtual - Derived classes do not inherit the destructor of their base class - There can only one destructor in a single class. C++ Destructors Example Now let us take a look at an example where we try to define our destructor for our demo class. #include<iostream> using namespace std; class demo { public: int a=10; demo() //constructor { cout<<"Constructor of demo here!"<<endl; } ~demo() //destructor { cout<<"Destructor of demo here!"<<endl; } void print_demo() //function { cout<<"printed demo"<<endl; } }; int main() { demo demo_obj; //object of class demo created cout<<demo_obj.a<<endl; demo_obj.print_demo(); //function called return 0; } //scope of the object ends Output: Constructor of demo here! 10 printed demo Destructor of demo here! Here, - Inside the demo class, we have initialized and defined a variable as a=10and a function print_demo()respectively. Further, we have also defined the corresponding constructor – demo()and destructor – ~demo(). - Inside the main()function we create an object demo_obj that belongs to the above demo class. This leads to the call for the constructor demo(). - Then we also have performed some operations on it like calling the print_demo()function for the object. - As soon as the main() function ends, the compiler calls the destructor for the object demo_obj. Which is clear from the above output. Explicitly Calling Destructors in C++ Apart from the fact that the compiler calls the default or user-defined destructor as soon as an object gets out of scope. The C++ programming language also allows the user to call the destructor for an object explicitly. Let us try to call the destructor ~demo() for our previous example code. We just modify our code inside main(). #include<iostream> using namespace std; class demo { public: int a=10; demo() //constructor { cout<<"Constructor of demo here!"<<endl; } ~demo() //destructor { cout<<"Destructor of demo here!"<<endl; } void print_demo() //function { cout<<"printed demo"<<endl; } }; int main() { demo obj; obj.print_demo(); obj.~demo(); return 0; } Output: Constructor of demo here! printed demo Destructor of demo here! Destructor of demo here! As you can see, as we create an object the constructor demo() is called. After that, we explicitly call the destructor ~demo() for the object obj. This explains the 3rd line of the output ‘Destructor of demo here!’. But, the next line is the result of the default calling of the destructor by the compiler at the end of the main() function(since the scope of the object ends). Note: In case of local variables (the above one) calling the destructor explicitly is not recommended since the destructor will get called again at the close ‘}’ of the block in which the local was created. Virtual Destructors in C++ Destructors in C++ can also be made virtual. They are useful when we try to delete an instance of a derived class through a pointer to base class. Now let us look at an example to have a better understanding. Virtual Destructor Example #include<iostream> using namespace std; class Base { public: Base() { cout<<"Base Constructor"<<endl; } virtual ~Base() { cout<<"Base Destructor"<<endl; } }; class Derived: public Base { public: Derived() { cout<<"Derived Constructor"<<endl; } ~Derived() { cout<<"Derived Destructor"<<endl; } }; int main() { Base * b = new Derived; delete b; } Output: Base Constructor Derived Constructor Derived Destructor Base Destructor Notice, this time we have used the virtual keyword before the base destructor. It is clear from the output that inside the main() function, the instruction Base *b = new Derived leads to the call for constructors Base() and Derived() respectively. While deleting the object b, since this time a virtual destructor is inside the base class, hence first the Derived class’s destructor is called and then the Base class’s destructor is called. Note: if the base class destructor is not virtual then, only the base class object will get deleted(since the pointer is of a base class). This would lead to memory leak for the derived object. Why Destructors? Destructors deallocate memory assigned or allocated to different objects in a program as soon as they go out of scope or are explicitly deleted. If it were not for destructors, then the user would have to individually free memory space allocated to different variables or objects. Which is a pretty hectic task. This automatic de-allocation of memory not only creates a more user-friendly environment to work but also helps manage memory efficiently. Conclusion Thus through this tutorial, we learned about destructors in C++. We also understood the working and use by implementing it in our code. For any questions related to this topic, feel free to use the comments below. References - Destructors – cppreferences - Destructors – Microsoft Documentation - Right usage of destructor – StackOverflow Question.
https://www.journaldev.com/37885/destructors-in-c-plus-plus
CC-MAIN-2021-21
refinedweb
952
54.12
Summary Distributed development is a way of life anymore, especially for an open source project. But remote collaboration has been an essentially unsolved problem, most notably when it comes to specification and design. The upcoming release of NetBeans promises to tackle that problem in a very big way--and you'll benefit, even if you don't use NetBeans. They're saying that the upcoming NetBeans 4.1 is not your father's NetBeans. So far, that assessment looks to be dead on target. There are plenty of new features to write about, including a better layout manager, a GUI design tool, ANT-based builds, and great tools for testing and debugging server-side apps as well as client apps. The guiding principle in all this appears to be "things just work". The tools are doing all the complicated wiring and keeping it hidden behind the walls, so you can focus your attention on the problem you're trying to solve. One of the major advances along those lines is the ability to collaborate with remote developers from within the NetBeans session, from a standalone tool that will part of the release, or eventually, from your favorite IDE --because it will be collab-enabled using the brilliant API standard and implementation libraries the collaboration project is providing. The presentation on all these wonderful new tools was given by Todd Fast. But before I get to the details of the technology, let me motivate the discussion with a little story. That's in the next section. (You can skip if it you want to go directly to the main course and never mind the entree, thank you very much.) In outline, the story and the ensuing article go pretty much like this: - People who need to work remotely are the ones most interested in solving the distributed-collaboration problem. - Because they're remote, it's a hard problem for them to solve. - The new offering coming from NetBeans not only provides an initial tool set to make it possible, the APIs it delivers makes it almost absurdly easy to collab-enable virtually any application you have--because, once again, the wiring is kept hidden so you can focus on the problem you're trying to solve. - How I Came to be Interested in Collaboration - Introducing the Distributed Collaboration Project - Demonstration of Features - File Sharing - Code-Aware Chat - Public (persistent) Conversations - Collaboration-Enabling an App (Building a Collablet) - Immediate Uses - Future Uses - Conclusion - Resources One of the great privileges of my life was to have spent time working with Doug Englebart-- father of the mouse, workstations, windows, outliners, links, and practically everything we take for granted in the computer world these days, with the possbile exception of the Internet. In 2000, I was lucky enough to find out about a colloquium Doug was running called "The Unfinished Revolution". Since I was live and work just down the road from Stanford, it didn't take much arm twisting to get me up there for the weekly sessions. Talk about intellectual stimulation! Every week, my head was spinning with concepts and ideas. The event reawakened my original purpose in working with computers--to figure out how to use them to make a better world. Doug's purpose was nearly identical: To use them to help solve's mankind's most complex problems. (For more information on Doug's work, visit.) When the colloquium started up a mailing list, I was all over it. After several weeks, it turns out that I was responsible for 50% of the traffic on the list. (And that was just message count. Thank goodness they weren't doing a word count...) I'm proud to say that I wound up giving a talk at that event, and that I was invited to talk at the wrap-up session, as well. It was a great way to share my concepts about we could be, and should be, doing to solve the problems mankind faces--hopefully, before they overwhem us. When the colloquium ended, a group of us started meeting with Doug once a week to see if we could build something we could use to get started. You see, there were people all over the world listening in to Doug's sessions, who wanted to contribute. The problem was, we had no good vehicle for distributed collaboration! We needed a tool we could use to design solutions to problems, and the first thing we needed to design was the tool! We met once a week for close to two years, but the problem seemed to metaphorize from week to week, and there were enough different agendas among the participants that we never succeeded in really defining the problem, much less specifying a solution. (In my mind, the issue was clear. But the issue was equally clear to everyone else--but different.) One of the good things to come out of that series of meetings, however, was a non-profit organization devoted to studying the problem of distributed collaboration. The effort, dubbed BlueOxen, was started by Eugene Kim and Chris Dent, and featured no less than Douglas Engelbart on its Advisory Board. (For more, go to). There have many good discussions on the BlueOxen list on collaboration problems, and the group has sponsored several studies of best practices and methods. The group has developed some good software as, well, including some server-side implementations that help you put Engelbart-inspired "purple numbers" on a page. (Small purple numbers at the end of a paragraph that link to the start of the paragraph, so you can easily reference any part of the page by copying it's link.) As always, though, the chicken and egg problem of distributed collaboration remained: How can you allow remotely distributed people to collaborate well enough to design and build a distributed collaboration engine? Lacking the tool they needed to build the tool they needed, progress was necessarily limited. The basic tool needed to solve the problem may just have been demonstrated today at JavaOne, however. In part, it's a distributed collaboration tool that has a standalone implementation and a NetBeans implementation. But more importantly, consists of both a specification that allows remote, heterogenous systems to work together seamlessly, as well as an underlying system that makes it almost simple to enable collaboration for almost any software you write. This section introduces the terminology and describe the demonstration, showing how the technology is currently being used. Subsequent sections describe the demonstration of implemented features and show how the technology works. Like any good modern-day development effort, the NetBeans collaboration-tool project starts by defining the ontologoy for the domain--the collection of terms and concepts that define the problem space: A conversation consists of multiple participants who are communicating using one or more channels, where a channel is, for example, a whiteboard, a vocal exchange, or __xx__. That's pretty much all that a user needs to know to decipher the terms in the interface. For developers, there are a few more terms to introduce-- the ones that define the solution space: Each channel is implemented by in a collablet --a class that implements the tiny little Collablet interface. The collablet registers itself with the application, so it is notified when things changes. It then uses a CollabBean to send messages to participants, and to receive them. The implementation library includes CollabBeans that send and receive XML messages to participants using MOXC--the Message-Oriented XML Collaboration protocol. Other CollabBeans can be implemented as well --for example a Voice Over Internet Protocol (VOIP) bean to handle voice traffic. Notes: - Current implementations include NetBeans 4.1 and CodePal, a standalone tool. - The container (NetBeans or CollabPal, at the moment) handles the work of sending messags and tracking participants. The collablet you write for an application really only cares about the content of the messages. - Because that message protocol is XML-based, collaboration tools can interact on heterogenous systems. - Because the design is message-based, with no code sharing, it keeps things simple. Particpants are easily added and removed. This section describes the implemented features that Todd Fast demonstrated. The next section goes under the hood to describe how the technology works. This section covers: - File Sharing - Code-aware chat - Public (persistent) Conversations Dragging files, directories, or entire projects into the file sharing window makes them available to everyone. Each participant gets a copy of the file, so they're editing locally instead of remotely. While they're editing, the file is locked. It can be read, but not written. Remote particpants can also build the system. The build occurs on the originating system , so that system needs to be fast, and the participants will have to talk to each other. You can drag shared files onto the local system to do your own local builds, but in that case you'll have to drag the modified versions back into the system to share the changes. Also, the system it isn't integrated with a source control system. (It's not perfect. But it's taking a major step down the right road. More importantly, it's providing the basic tools we need to build bigger and better systems.) The chat window automatically recognizes Java code, HTML, and a variety of other languuages. So it does syntax highlighting and peforms code-completion, for example, so you can either paste existing code or write new code in the chat window. The system also adds line numbers so you can talk about line 46, for example, instead of having to say "the 2nd if-statment in the hoozit method". Although it wasn't demonstrated, the NetBeans implementation also has the capacity to define a public conversation--one that is persisted on the server, where it is available for others to examine. The system makes it possible for designated participants to carry on the discussion. For others, it's read-only. They can monitor the conversation, but can't participate. Todd Fast showed how to collab-enable an existing application with a simple little program that tracks mouse clicks with a colored spot. The program let you change the color of the spot (a large circle), and put it whereever you clicked the mouse. The process was completed in fours steps, with no more than a few lines of code in any step. (As the number of possible messages grows, the line count will go up--but all of the additions will be related to the application. All the overhead you need will have been added with those few lines of code.) The process looks like this. - Register property-change listeners and send property-change messages. That requires two simple methods in the application, on to register listeners, and one to notify them when something changes. (For some applications, the hardest part of the process will be "instrumenting" the app to notify listeners whenever something changes.) - Define a unique namespace to use in the XML messages. Define a string constant (final String) for that purpose. It could be anything, but generally it's defined as the project host's URL, along with the project name. So it would be something like this: - Send a MOXC notification: Document doc = createDocument(); // create an XML document Element element = doc.createElementNS(NAMESPACE, "spot:colorSpot); element.setAttribute("color", spotPanel.getColor(color)); // an integer sendMOXCmessage(element); Note: I didn't get the code that obtained the spot's color, but it's the simple, standard spot.getColor() kind of thing. - Receive a MOCX notification: Element element = message.getMessageElement(); if (element.getLocalName().equals("colorSpot") { Color color = new Color(getIntegerAttribute(element, "color"); spotPanel.setColor(color); } else if (element.getLocalName().equals("something else") { ... etc. There are undoubtedly some errors in my transcription. But you get the idea. It's absurdly simple to collab-enable an application. The API libraries does the work of notifying all of the participants in the conversation. The shell you're working in (NetBeans or the standalone CollabPal) keeps track of who's participating. All that wiring is kept behind the walls where it belongs. All it takes is a few lines of additional code, and you're in business. That simplicity, coupled with the basic losely-coupled, XML message-based design, is why I called the APIs "brilliant", and why I'm waxing so enthusiastic about it. These are the things that the NetBeans solution enables today: - Code Sharing and Development. This is the obvious use case, and it just became reasonably possible. - Support. The automatically-generated line numbers on code segments will make it easier to talk about things. - Specification and Design. This where the biggest impact will be, in my opinion. The ability to work collaboratively on use-case documents and design documents may make it possible, practically for the first time ever, for remote people to design together, in addition to working on a shared code base. Here are some other things that the APIs make possible: - Better webLogging tools. - Threaded discussions that lead somewhere. A server-based weblogging like the one provided at Artima has the advantage that you can access it from anywhere--which turns out to be pretty convenient when you're covering a convention like this. On the other hand, if a session times out you lose your recent work. That's somewhat less convenient. With this API, a simple editor could be collab-enabled, and possbily delivered with Java Web Start. Voila! A real editor that runs anywhere, with a simple Ctrl-S command to save work in progress to the server. Email discussions reach their conclusions down at the bottom of the thread, somewhere. That makes them hard to find. What you really want is for the decisions to propogate to the top of the thread list, with a pointer back to the discussion that got you there. (For more on that subject, see What's Wrong with Email? at The need to repeat parts of a message to comment on them creates redundancy. What's really needed is a 3-dimensional hierarchy, with the original author's outline in the 2-dimensional plane on screen, and a hierarchy of comments extended into the 3rd dimension. Weblogs provide a communication channel that solves some of email's problems, but it's essentially one-way. People can comment, but it's hard to have a real discussion. The collaboration APIs raise the interesting possibility of using a discussion management tool that helps a facilitor keep track of a discussion (such as the tool developed by Jeff Conklin at the CogNexus Institute,). By collab-enabling such a tool, peoiple involved in a remote conversation can carry on their discussion within the context of a tool that tracks the results. - Doug Engelbart's Bootstrap Institute: - BlueOxen Collaboratories: - NetBeans - Todd's Blog at - What's Wrong with Email?: - Jeff Conklin's CogNexus Institute: Have an opinion? Be the first to post a comment about this weblog entry. If you'd like to be notified whenever Eric Armstrong adds a new entry to his weblog, subscribe to his RSS feed.
http://www.artima.com/weblogs/viewpost.jsp?thread=117079
CC-MAIN-2016-36
refinedweb
2,520
54.12
Issue Type: Patch Created: 2009-10-10T18:10:59.000+0000 Last Updated: 2013-02-13T12:06:28.000+0000 Status: Reopened Fix version(s): Reporter: Cedric (klando) Assignee: Mickael Perraud (mikaelkael) Tags: - Zend_Db Related issues: - ZF-8455 Just a little imrovment as suggested in the code Posted by Mickael Perraud (mikaelkael) on 2009-11-19T10:29:17.000+0000 Patch applied and tested with r19051 Posted by Abdala Cerqueira (abdalac) on 2009-12-03T07:21:16.000+0000 It did not work. I use PostgreSql version 1.8.4 My sugestion: <pre class="highlight"> $sql = "SELECT c.relname AS table_name " . "FROM pg_catalog.pg_class c " . "JOIN pg_catalog.pg_roles r ON r.oid = c.relowner " . "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace " . "WHERE n.nspname <> 'pg_catalog' " . "AND n.nspname !~ '^pg_toast' " . "AND c.relname !~ '^(pg_|sql_)' " . "AND c.relkind = 'r' "; Posted by Ramon Henrique Ornelas (ramon) on 2009-12-03T08:20:37.000+0000 Problem in pg_catalog.pg_table_is_visible(c.oid) resolved through of the SET search_path TO Posted by Mickael Perraud (mikaelkael) on 2009-12-03T10:11:09.000+0000 My fault, this commit wasn't suppose to be in branch but only in trunk that's why the "Fix Versions" field was "Next minor release" I will revert it in branch ASAP. Posted by Cedric (klando) on 2009-12-07T10:22:08.000+0000 I failed to answer and have to re-edit the ticket.. All is to know what do you realy expect when using show tables. Query provided is fine. Perhaps you just want to select like that : select table_schema, table_name from information_schema.tables where table_schema <> 'pg_catalog' and table_schema !~ '^pg_toast' and table_schema <> 'information_schema'; or just ommit the is_visible from the First query, but please keep clear of that : "AND c.relname !~ '^(pg_|sql_)' " which is useless and can just lead to errors. (damn! do you really suggest I can not have a table name "sql_zend" or "pg_rox" ?!)
https://framework.zend.com/issues/browse/ZF-8046?focusedCommentId=36786&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
CC-MAIN-2017-30
refinedweb
321
69.28
You can click on the Google or Yahoo buttons to sign-in with these identity providers, or you just type your identity uri and click on the little login button. constructs like these typically use very short names: (1) short loops: for i in alist: call.a.function(i) (2) with statements: with file("....") as f: return [f.readline(), f.readline()] which are quite different use case from regular name use, such as (3) def foo(): fd_in = posix.open(...) try: posix.read(fd_in, ...) posix.fcntl(fd_in, ...) # more code while smth: if kkk: # more code xyz = foo(fd_in) # more code if (xxx): raise Yyyy() finally: posix.close(fd_in) The difference is primarily how many times and how far apart (in LOC) an identifier is used. I'd like to have low min limit (1 char in fact) for identifiers in cases (1) and (2) and keep current name requirements in cases such as (3). (atlthough arguably I'd like to use "fd" as an established acronym/jargon, similar to pi and id, but that's a separate wish) Ticket #76627 - created on 2011/09/21 by dimaqq@gmail.com
https://www.logilab.org/ticket/76627
CC-MAIN-2021-43
refinedweb
188
69.72
So I have a L&F which had: Font My_LookAndFeel::getPopupMenuFont() { #ifdef JUCE_WINDOWS return Font ("Helvetica", 11.0f, Font::bold); #else return Font ("Helvetica", 9.0f, Font::bold); #endif } and the menu font was fine… except I got a report from one of my beta testers… They’d just installed this font: On their Windows 10 system and suddenly my plugin’s menu fonts were using this new font. I was able to duplicate the issue locally. I checked the registry key for font substitutions and Helvetica is mapped to Arial for HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes Any ideas? The fix was simple, I changed my font to use Arial on Windows… but now I’m curious…?? Cheers, Rail
https://forum.juce.com/t/odd-windows-helvetica-substitution/37118
CC-MAIN-2020-05
refinedweb
121
53.41
One way to test your cloud development tooling is to see how fast you can actually get a real application up and running if you start from scratch and don't copy/paste code from anywhere (except memory). How intuitive and easy is it to get from logic around business objects to something that is deployed in the cloud. I decided to put myself and my tooling to the test and I wanted to share the results. I managed to write and deploy a real database-backed website in less than 10 minutes. The application is a .NET CORE 2.0 application that provides a simple interface for taking notes and storing them in a database. I deployed it in an Azure Web App with Azure SQL Database on the backend. Here is a video of me actually doing it. As you can see, I am slow at typing, and I make mistakes, but in 10 minutes my app is deployed. Not only that, it is done in way that is easily extended by modifying the object model (and database) or by adding things such as Continuous Integration (CI) and Continuous Delivery (CD). Below I will walk through what I am actually doing with references to when it happens in the video. Details This application is very simple. It is a note taking tool that will allow you to enter notes, store them in a database, edit them, and delete them if needed. Each note has a NoteId, Title, and Content. The approach is a Code First approach using the Entity Framework, where we define our application objects in code and let the tooling update the database to match. The basic steps of building the application are (I am not necessarily doing it in that order): - Creating a new .NET CORE Application - Adding a data model to that application along with a database context. - Creating an Azure Web App and a SQL Server. - Updating the database layout to match the data model. - Creating a Controller and Views for the Notes. - Publishing the application. In the video I have two Visual Studio 2017 windows open and I am managing the .NET app coding in one and the deployment of the Azure resources in the other. I am doing it in the following order: Creating a new .NET CORE (MVC) application (time: 00:00) I am not doing a whole lot with the application at this point. I am just selecting the template and letting it create in the background (it takes a few seconds). I quickly switch to my other Visual Studio View to start the Azure deployment. Creating a new Cloud Azure Resource Group project (time: 00:16) Here I choose a template, which has a Web App and a SQL Server in it. I could have manually deployed these components through the Azure portal, but doing it this way automatically adds the SQL Server connection string as a setting on my web app and we will use that later. It also illustrates that it can be done from Visual Studio where there are some helpful tools for creating templates. One thing I will note is that this particular template uses some naming convention with unique strings for the SQL Server and the Web App. While that ensures deployment without problems, it is not necessarily my personal preference, so I actually keep a modified version of this template where I have chosen some other conventions. But again, it is a matter of preference and not important for this tutorial. Adding a Data Model to the .NET CORE App (time: 01:38) To add a data model (the "M" in the MVC application), I right click on the "Models" folder in my solution and choose Add and Add Item. I select a C# class and call it NoteModel.cs. My typing is slow and a make mistakes, but Visual Studio helps me get through it without too much pain. The final NoteModel.cs looks something like this: using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace WebApplication3.Models { public class NoteContext : DbContext { public NoteContext(DbContextOptions<NoteContext> options) : base(options) { } public DbSet<Note> Notes { get; set; } } public class Note { public int NoteId { get; set; } public string Title { get; set; } public string Content { get; set; } } } There are two important parts to it. The Note class, which defines the object(s) we would like to work with, and the database context (NoteContext), which we implement by inheriting from DbContext in the Entity Framework. The database context has only one method for getting the Notes, but can be expanded as the objects grow in complexity. Registering the Database Context with the application (time: 03:57) We need to register the database context with the application services. This ensures that we have a connection to the database from the different components of the application. In order to connect to the database, we use a database connection string. At this point, we just pull a connection string variable called "DefaultConnection" out of the application Configuration. More on that below. The ConfigureServices function in Startup.cs is modified to look like this: public void ConfigureServices(IServiceCollection services) { services.AddMvc(); var connection = Configuration.GetConnectionString("DefaultConnection"); services.AddDbContext<NoteContext>(options => options.UseSqlServer(connection)); } Setting up database connection string with user secrets (time: 05:06) On the web app that we deployed above, the connection string variable will be configured automatically by the template, but for local debugging and database updates, we need to make sure that a) we have the right connection string and b) that we can access the Azure SQL Server from our local development machine. We use the "user secrets" of the .NET CORE app to set this connection string variable. For more information on how and why to use this, see this blog post. In this example, we are taking advantage of the fact that the web app deployed by the template has this connection string set already and we simply copy it from the web app. We use the Azure portal in the browser to do this. While we are in the Azure portal, we also modify the firewall settings on the SQL server to allow access from the current client computer, which is just the laptop that I am using for development. Using Entity Framework to update database (time: 06:38) In the next step, I take advantage of the Entity Framework to update the database. It is beyond the scope of this tutorial to go into details on that, but whenever the data model layout changes, two steps should be performed: a) add a migration (code to update the database), b) update the database. There is a lot more information about that in this tutorial. In this example, I use the "Package Management Console" to issue the commands. The bottom line here is tha you do not need to be writing SQL scripts to update your database. Adding a Controller with Views (time: 07:20) Last thing we need in the code is a Controller (the "C" in the MVC application) and some Views (the "V" in MVC). I do this by right clicking the controller folder in the solutions explorer and choosing add controller. First I need to add the basic scaffolding and then I can add a controller with views. I need to select which data model object and which database context to use, but then the code is auto generated for me. In almost all cases, this code would need some adjustments, but it gets you started and makes your application functional. Deploying (publishing) the application in Azure (time: 8:31) After a quick build to make sure everything compiles, I deploy to the Azure Web App that was created earlier on. In real development workflow, you would probably test it locally on your machine and almost certainly deploy to a testing environment, but I was trying to get there fast. Testing the application (time: 9:30) After a bit less than 10 minutes the application is online and I can add notes. If you try it yourself, you will see that you can edit the notes, delete them, and so on. Conclusions That is it. It is pretty easy to get up and running with .NET Core, Entity Framework, Azure Web Apps, and Azure SQL Server. There is great support in Visual Studio for these services and with very little coding you are up and running. The only code you really need to write is the stuff that relates to your specific application objects, which is the way it should be. Let me know what you think and let me know if you can do it any faster with your tool chain. Really interesting article!
https://blogs.msdn.microsoft.com/mihansen/2017/09/18/writing-and-deploying-a-database-backed-website-in-less-than-10-minutes/
CC-MAIN-2018-26
refinedweb
1,464
62.48