text
stringlengths
20
1.01M
url
stringlengths
14
1.25k
dump
stringlengths
9
15
lang
stringclasses
4 values
source
stringclasses
4 values
Installation. System Requirements - Windows XP - Windows Vista - Windows 7 - Windows Server 2008 - Windows 8 Pre-requisites SimpleFMOD has been tested with Visual Studio 2012 and Visual Studio 2010. Download and install the FMOD Ex Programmers API from the FMOD web site to install the official FMOD libraries that SimpleFMOD depends on. Download Download link for SimpleFMOD (always use the latest version) Compilation and linking Referencing the FMOD Programmers API Reference the FMOD Ex Programmers API header and library paths in each project as follows: - Right-click your project -> Properties -> Configuration Properties -> VC++ Directories -> Include Directories -> add C:\Program Files\FMOD SoundSystem\FMOD Programmers API Windows\api\inc to the list of paths - Right-click your project -> Properties -> Configuration Properties -> VC++ Directories -> Library Directories -> add C:\Program Files\FMOD SoundSystem\FMOD Programmers API Windows\api\lib to the list of paths Each project must also include the FMOD Ex Programmers API library as a linker input. - Right-click your project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies -> add fmodex_vc.libto the list of dependencies Referencing SimpleFMOD Each project must include the SimpleFMOD library as a linker input. - Right-click your project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies -> add SimpleFMOD.lib(for Release builds) or SimpleFMODd.lib(for Debug builds) to the list of dependencies Link profile SimpleFMOD is statically linked with the Visual C++ run-time libraries. Projects based on it should statically link the runtime library as follows: - Right-click your project -> Properties -> Configuration Properties -> C/C++ -> Code Generation ->Runtime Library -> Multi-threaded (/MT) or Multi-threaded Debug (/MTd) (depending on your build configuration) Hi there! I was attempting to use SimpleFMOD with my program and I get the following error: ” 1. IntelliSense: identifier “SimpleFMOD” is undefined” I followed your instructions to the letter and I’m unsure why I’m getting this error. Could you please advise what could be the cause of this problem? Thanks Do the examples included with the library compile correctly or do they give the same error? Follow-up: try adding “using namespace SFMOD;” after you include SimpleFMOD.h. Everything in the library is defined in a namespace called SFMOD. I will add this to the instructions on page 2 🙂 There we go, that did the trick 🙂 Thank you! Good stuff. I’m not perfect at writing instructions hehe, thanks for pointing that out 🙂 If you have any more problems just have a look through the examples folder, they should all work nicely 🙂 No issues 🙂 After wrangling with the original FMOD for a couple of hours, SFMOD really puts it in terms of plain english! How do you go about releasing sounds once you are finished? I see the struct ReleaseFMODResource with void operator()(FMOD::Sound *r) const { r->release(); } but how do you use it / call it? I tried to include this in my VS2010 project but I get a linking error: SimpleFMODd.lib(SimpleFMOD.obj) : error LNK2038: mismatch detected for ‘_MSC_VER’: value ‘1700’ doesn’t match value ‘1600’ Maybe the libraries aren’t good for VS2010 anymore? Argh, yes, the latest versions I uploaded are compiled against VS2012. It’s easy to fix though, the source code is included, just re-compile it with VS2010 🙂 First of all thank you for the effort to write this great library and tutorials. I’ve tried to get this to work for days now, without any luck. 😦 At first I was trying to make it compile with GCC, but after hours and hours of headaches I surrendered. So I’m now trying to compile the Frequency Analyzer, but there are just soo many issues.. After adding some includes ( and “tchar.h”) which apparently are necessary I finally got through the compiling process for the first time, but now there are linking issues: [text]The object or library file ‘Release\BeatDetecter.obj’ was created with an older compiler than other objects; rebuild old objects and libraries[/text]. After a while I found your comment about it actually not being compiled to work in VS2010… So now I’m at the point where I have to compile the lib… But neither have I ever compiled a static lib, nor have I seriously used Visual Studio. So I just created a new project, selected “static library” and then tried to build it with SimpleFMOD.h as the header file and SimpleFMOD.cpp as the source file, which gave me the following error messages: [text]1>..\..\..\..\..\..\..\Program Files (x86)\DJKaty.com\SimpleFMOD\src\SimpleFMOD.cpp(102): error C2143: syntax error : missing ‘,’ before ‘:’ 1>..\..\..\..\..\..\..\Program Files (x86)\DJKaty.com\SimpleFMOD\src\SimpleFMOD.cpp(102): error C2530: ‘r’ : references must be initialized 1>..\..\..\..\..\..\..\Program Files (x86)\DJKaty.com\SimpleFMOD\src\SimpleFMOD.cpp(102): error C3531: ‘r’: a symbol whose type contains ‘auto’ must have an initializer[/text] I added the fmod include and lib dirs and even tried to add the fmod lib as a dependency, but it keeps giving me the same errors. Any help would be highly appreciated. Okay, after spending a couple more hours on this I figured out that instead of we can use and then the library finally compiles. Then I replaced the resulting .lib with the original one of the installation. Then in the Frequency Analyzer project I set the Runtime Library to “Multi-threaded DLL (/MD)” and put the fmodex.dll in the Release directory and it finally worked. BUT I should mention I have removed all the Simple2D stuff in advance and created a console application.
https://katyscode.wordpress.com/2013/02/18/simplefmod-installation-instructions/
CC-MAIN-2018-17
en
refinedweb
table of contents other versions - jessie 3.74-1 - jessie-backports 4.10-2~bpo8+1 - stretch 4.10-2 - testing 4.15-1 - stretch-backports 4.15-1~bpo9+1 - unstable 4.15-1 other sections NAME¶poll, ppoll - wait for some event on a file descriptor SYNOPSIS¶ #include <poll.h>int poll(struct pollfd *fds, nfds_t nfds, int timeout);int poll(struct pollfd *fds, nfds_t nfds, int timeout);#define _GNU_SOURCE /* See feature_test_macros(7) */ #include <signal.h> #include <poll.h>#define _GNU_SOURCE /* See feature_test_macros(7) */ #include <signal.h> #include <poll.h>int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *tmo_p, const sigset_t *sigmask);int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *tmo_p, const sigset_t *sigmask); DESCRIPTION¶poll() performs a similar task to select(2): it waits for one of a set of file descriptors to become ready to perform I/O. struct pollfd { int fd; /* file descriptor */ short events; /* requested events */ short revents; /* returned events */ };The caller should specify the number of items in the fds array in nfds. - * - a file descriptor becomes ready; - * - the call is interrupted by a signal handler; or - * - the timeout expires. -). - POLLRDNORM - Equivalent to POLLIN. - POLLRDBAND - Priority band data can be read (generally unused on Linux). - POLLWRNORM - Equivalent to POLLOUT. - POLLWRBAND - Priority data may be written. ppoll()¶The. struct timespec { long tv_sec; /* seconds */ long tv_nsec; /* nanoseconds */ }; RETURN VALUE¶. ERRORS¶ - EFAULT - The array given as argument was not contained in the calling program's address space. - EINVAL - The nfds value exceeds the RLIMIT_NOFILE value. - ENOMEM - There was no space to allocate file descriptor tables.
https://manpages.debian.org/stretch/manpages-dev/poll.2.en.html
CC-MAIN-2018-17
en
refinedweb
public class SyncSession extends Object SyncConfiguration. A Session is created by opening a Realm instance using that configuration. Once a session has been created, it will continue to exist until the app is closed or all threads using this SyncConfiguration closes their respective Realms. A session is fully controlled by Realm, but can provide additional information in case of errors. It is passed along in all SyncSession.ErrorHandlers. This object is thread safe. equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait public SyncConfiguration getConfiguration() SyncConfigurationthat is responsible for controlling the session. public SyncUser getUser() SyncUserdefined by the SyncConfigurationthat is used to connect to the Realm Object Server. SyncUserused to authenticate the session on the Realm Object Server. public URI getServerUrl() URIdescribing the remote Realm which this session connects to and synchronizes changes with. URIdescribing the remote Realm.
https://realm.io/docs/java/3.1.0/api/io/realm/SyncSession.html
CC-MAIN-2018-17
en
refinedweb
FlinkML is designed to make learning from your data a straight-forward process, abstracting away the complexities that usually come with big data learning tasks. In this quick-start guide we will show just how easy it is to solve a simple supervised learning problem using FlinkML. But first some basics, feel free to skip the next few lines if you’re already familiar with Machine Learning (ML). As defined by Murphy [1] ML deals with detecting patterns in data, and using those learned patterns to make predictions about the future. We can categorize most ML algorithms into two major categories: Supervised and Unsupervised Learning. Supervised Learning deals with learning a function (mapping) from a set of inputs (features) to a set of outputs. The learning is done using a training set of (input, output) pairs that we use to approximate the mapping function. Supervised learning problems are further divided into classification and regression problems. In classification problems we try to predict the class that an example belongs to, for example whether a user is going to click on an ad or not. Regression problems one the other hand, are about predicting (real) numerical values, often called the dependent variable, for example what the temperature will be tomorrow. Unsupervised Learning deals with discovering patterns and regularities in the data. An example of this would be clustering, where we try to discover groupings of the data from the descriptive features. Unsupervised learning can also be used for feature selection, for example through principal components analysis. In order to use FlinkML in your project, first you have to set up a Flink program. Next, you have to add the FlinkML dependency to the pom.xml of your project: <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-ml_2.11</artifactId> <version>1.4.2</version> </dependency> To load data to be used with FlinkML we can use the ETL capabilities of Flink, or specialized functions for formatted data, such as the LibSVM format. For supervised learning problems it is common to use the LabeledVector class to represent the (label, features) examples. A LabeledVector object will have a FlinkML Vector member representing the features of the example and a Double member which represents the label, which could be the class in a classification problem, or the dependent variable for a regression problem. As an example, we can use Haberman’s Survival Data Set , which you can download from the UCI ML repository. This dataset “contains cases from a study conducted on the survival of patients who had undergone surgery for breast cancer”. The data comes in a comma-separated file, where the first 3 columns are the features and last column is the class, and the 4th column indicates whether the patient survived 5 years or longer (label 1), or died within 5 years (label 2). You can check the UCI page for more information on the data. We can load the data as a DataSet[String] first: import org.apache.flink.api.scala._ val env = ExecutionEnvironment.getExecutionEnvironment val survival = env.readCsvFile[(String, String, String, String)]("/path/to/haberman.data") We can now transform the data into a DataSet[LabeledVector]. This will allow us to use the dataset with the FlinkML classification algorithms. We know that the 4th element of the dataset is the class label, and the rest are features, so we can build LabeledVector elements like this: import org.apache.flink.ml.common.LabeledVector import org.apache.flink.ml.math.DenseVector val survivalLV = survival .map{tuple => val list = tuple.productIterator.toList val numList = list.map(_.asInstanceOf[String].toDouble) LabeledVector(numList(3), DenseVector(numList.take(3).toArray)) } We can then use this data to train a learner. We will however use another dataset to exemplify building a learner; that will allow us to show how we can import other dataset formats. LibSVM files A common format for ML datasets is the LibSVM format and a number of datasets using that format can be found in the LibSVM datasets website. FlinkML provides utilities for loading datasets using the LibSVM format through the readLibSVM function available through the MLUtils object. You can also save datasets in the LibSVM format using the writeLibSVM function. Let’s import the svmguide1 dataset. You can download the training set here and the test set here. This is an astroparticle binary classification dataset, used by Hsu et al. [3] in their practical Support Vector Machine (SVM) guide. It contains 4 numerical features, and the class label. We can simply import the dataset then using: import org.apache.flink.ml.MLUtils val astroTrain: DataSet[LabeledVector] = MLUtils.readLibSVM(env, "/path/to/svmguide1") val astroTest: DataSet[(Vector, Double)] = MLUtils.readLibSVM(env, "/path/to/svmguide1.t") .map(x => (x.vector, x.label)) This gives us two DataSet objects that we will use in the following section to create a classifier. Once we have imported the dataset we can train a Predictor such as a linear SVM classifier. We can set a number of parameters for the classifier. Here we set the Blocks parameter, which is used to split the input by the underlying CoCoA algorithm [2] uses. The regularization parameter determines the amount of $l_2$ regularization applied, which is used to avoid overfitting. The step size determines the contribution of the weight vector updates to the next weight vector value. This parameter sets the initial step size. import org.apache.flink.ml.classification.SVM val svm = SVM() .setBlocks(env.getParallelism) .setIterations(100) .setRegularization(0.001) .setStepsize(0.1) .setSeed(42) svm.fit(astroTrain) We can now make predictions on the test set, and use the evaluate function to create (truth, prediction) pairs. val evaluationPairs: DataSet[(Double, Double)] = svm.evaluate(astroTest) Next we will see how we can pre-process our data, and use the ML pipelines capabilities of FlinkML. A pre-processing step that is often encouraged [3] when using SVM classification is scaling the input features to the [0, 1] range, in order to avoid features with extreme values dominating the rest. FlinkML has a number of Transformers such as MinMaxScaler that are used to pre-process data, and a key feature is the ability to chain Transformers and Predictors together. This allows us to run the same pipeline of transformations and make predictions on the train and test data in a straight-forward and type-safe manner. You can read more on the pipeline system of FlinkML in the pipelines documentation. Let us first create a normalizing transformer for the features in our dataset, and chain it to a new SVM classifier. import org.apache.flink.ml.preprocessing.MinMaxScaler val scaler = MinMaxScaler() val scaledSVM = scaler.chainPredictor(svm) We can now use our newly created pipeline to make predictions on the test set. First we call fit again, to train the scaler and the SVM classifier. The data of the test set will then be automatically scaled before being passed on to the SVM to make predictions. scaledSVM.fit(astroTrain) val evaluationPairsScaled: DataSet[(Double, Double)] = scaledSVM.evaluate(astroTest) The scaled inputs should give us better prediction performance. This quickstart guide can act as an introduction to the basic concepts of FlinkML, but there’s a lot more you can do. We recommend going through the FlinkML documentation, and trying out the different algorithms. A very good way to get started is to play around with interesting datasets from the UCI ML repository and the LibSVM datasets. Tackling an interesting problem from a website like Kaggle or DrivenData is also a great way to learn by competing with other data scientists. If you would like to contribute some new algorithms take a look at our contribution guide. References [1] Murphy, Kevin P. Machine learning: a probabilistic perspective. MIT press, 2012. [2] Jaggi, Martin, et al. Communication-efficient distributed dual coordinate ascent. Advances in Neural Information Processing Systems. 2014. [3] Hsu, Chih-Wei, Chih-Chung Chang, and Chih-Jen Lin. A practical guide to support vector classification. 2003.
https://ci.apache.org/projects/flink/flink-docs-release-1.4/dev/libs/ml/quickstart.html
CC-MAIN-2018-17
en
refinedweb
Direct3D Graphics Microsoft Direct3D is a low-level graphics application programming interface (API) that enables you to manipulate visual models of 3-dimensional objects and take advantage of hardware acceleration, such as video graphics cards. Roadmap - Getting Started with Direct3D Contains architectural descriptions, drawings of 3-D conventions, discussion of Direct3D devices and resources, and step-by-step tutorials. Code snippets are used throughout to clarify the usage of Direct3D components. - Microsoft.DirectX.Direct3D Contains the reference pages for the Direct3D namespace. This includes the syntax for methods, properties, and data structures. It includes an explanation of how the Direct3D component works, and often includes code snippets. - Microsoft.DirectX Contains the reference pages for the Microsoft DirectX utility namespace. This namespace provides utility operations and data storage for DirectX application programming, including exception handling, simple helper methods, and structures used for matrix, clipping plane, quaternion, and vector manipulation. - How Do I ...? Explains typical tasks you may encounter in developing DirectX applications, with short snippets of C# code.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms920686.aspx
CC-MAIN-2018-17
en
refinedweb
Ubic::UA - tiny http client version 1.48_02 This module is a tiny and horribly incomplete http useragent implementetion. It's used by Ubic::Ping::Service and it allows ubic to avoid dependency on LWP. This is considered to be a non-public class. Its interface is subject to change without notice. Construct new useragent. Fetch a given url. Returns a hashref with body, status and some others and some other.
http://search.cpan.org/~mmcleric/Ubic-1.48_02/lib/Ubic/UA.pm
CC-MAIN-2018-17
en
refinedweb
This is a derived work based on the ideas published by Sergey Ryazanov in his article “The Impossibly Fast C++ Delegates”, 18 Jul 2005. I found the idea interesting, especially after reading the criticism in the discussion section. Even though the code and some approached do have certain problems, if not defeat the purpose of the delegates, at least partially, the idea of making the delegate very fast seems very fruitful, as well as the main technique. I hope I re-worked it into something really usable. The code is written from scratch, based exclusively on the text of the original article where the idea is clearly expressed: the use of function stubs and filling the stub pointer from the template parameters of the factory methods. It is obvious that the types of the call parameters and the return type should be further abstracted out as template parameters. Naturally, it requires arbitrary number of parameters. So, as a first step, I added the generalization for the class templates based on C++/11 variadic templates, combined with partial template specialization, to create what Sergey called “preferred syntax”, <RET(PARAMS…)>, completely eliminating all the preprocessor code. <RET(PARAMS…)> Notably, in general case, there are two levels of template and template instantiation: first, the delegate profile is instantiated by specifying the return and parameter types. On top of that, a desired factory function is instantiated by specifying the class type and its static or instance function. This way, the instantiation of a delegate profile and the target of invocation are carried apart in a near-optimal way. As to the factory functions, first thing to do was to note that the can be given the same name (so called “overloading”), in my choice, “create”. create I also added the practically important support of lambda expressions in the style similar to std::function. The delegate of the same time could be assigned to an instance of a lambda expression and called later. Importantly, the closure capture performed by a lambda expression is preserved in the delegate instance. std::function All of the above is covered by a single delegate template class. I also added one more template, multicast delegate, in .NET style. delegate multicast delegate I also added semantic comparison between delegate instances of both types and comparison with null pointer, assignment operators giving the compiler the possibility to implicitly instantiate correspondent method templates through type inference, and similar small features. Notably, the instances of both delegate types can be created as “empty”. It reflects the main paradigm of the delegate usage, when the delegate instance is hosted by some class; and the code using the class sets or adds its own handlers in the course of this usage. Performance comparison was done with the use of std::function. In all cases where the time measurements might be considered as relatively valid (very roughly, starting from a hundred of delegate instances each called a hundred of times), the delegate type has shown superior performance compared with std::function. Roughly, depending on many factors, the gain in delegate/std::function creation time was from 10 to 60 times, and performance gain in the call operations was from 1.1 to 3 times. I performed the measurements on Windows in two platforms, x86 (IA-32) and x86-64, with Clang, GCC and Microsoft compilers — see also Compatibility and Build. delegate/std::function class Sample { public: double InstanceFunction(int, char, const char*) { return 0.1; } double ConstInstanceFunction(int, char, const char*) const { return 0.2; } static double StaticFunction(int, char, const char*) { return 0.3; } }; //class Sample //... Sample sample; delegate<double(int, char, const char*)> d; auto dInstance = decltype(d)::create<Sample, &Sample::InstanceFunction>(&sample); auto dConst = decltype(d)::create<Sample, &Sample::ConstInstanceFunction>(&sample); auto dFunc = decltype(d)::create<&Sample::StaticFunction>(); // same thing with non-class functions dInstance(0, 'A', "Instance method call"); dConst(1, 'B', "Constant instance method call"); dFunc(2, 'C', "Static function call"); int touchPoint = 1; auto lambda = [&touchPoint](int i, char c, const char* msg) -> double { std::cout << msg << std::endl; // touch point is captured by ref, can change: return (++touchPoint + (int)c) * 0.1 - i; }; //lambda decltype(d) dLambda = lambda; // lambda to delegate // or: //decltype(d) dLambda(lambda); if (d == nullptr) // true d(1, '1', "lambda call"); //won't d = dLambda; // delegate to delegate if (d == dLambda) // true, and also d != nullptr d(1, '1', "lambda call"); //will be called By the way, compare this usage in the cases of class/struct instance function with the same thing using std::function: //... Sample sample; using namespace std::placeholders; std::function<double(double(int, char, const char*))> f = std::bind(&Sample::InstanceFunction, &sample, _1); The confusing part is the use of std::placeholders and _1 (which is used to express the notion of the instance pointer passed as the first implicit parameter to the instance function call), which hardly looks obvious. std::placeholders _1 multicast_delegate<double(int, char, const char*)> md; multicast_delegate<double(int, char, const char*)> mdSecond; if (md == nullptr) // true md(5, '6', "zero calls"); //won't // add some of the delegate instances: md += mdSecond; // nothing happens to md md += d; // invocation list: size=1 md += dLambda; // invocation list: size=2 if (md == dLambda) //false std::cout << "md == dLambda" << std::endl; if (dLambda == md) //false std::cout << "dLambda == md" << std::endl; if (md == mdSecond) //false std::cout << "md == mdSecond" << std::endl; //adding lambda directly: md += lambda; // invocation list: size=3 md(7, '8', "call them all"); The above examples of multicast delegate usage discard the objects returned from each operation. All the code samples shown above can work with void return type. What to do with the return objects? They can be somehow accumulated; some of the values can be discarded, and so on. So, what solution would be the universal? It can be done by supplying a handler called on each return. void In addition to the operator(), the invocation with handling can be performed with a separate invocation template operator() with additional parameter — a handler for the returned objects: operator() double total = 0; md(9, 'a', "handling the return values:", [&total](size_t index, double* ret) -> void { std::cout << "\t" << "index: " << index << "; returned: " << *ret << std::endl; total += *ret; }); Note that the handler shown here is the instance of the delegate template class created from a lambda expression. There is another form of the handler based on std::function. Interestingly, no function template instantiation is required, as the type of the handler can be deduced (inferred) by a compiler from the context. This code sample demonstrates the effect of enclosure capture used to accumulate the returned values in total. Of course, any other logic can be used; see also “DelegateDemo.h”. total The basic idea is explained in the article by S. Ryazanov. The mechanism is fast because good part of work is delegated to the compile-time phase of the product life time. The delegate invocation call, operator (), has only one level of indirection, a call to one of three stub functions (I added one more to support lambda). The address of an original method is not stored in the delegate class instance; instead, it is created during compile time, template instantiation. This way, each fragment of code creating an instance of a delegate based on a distinct function, instantiates a separate version of the stub. In each stub, the address of the function to be called is presented to the compiler as an immediate constant. Only one pointer is passed during run time: the pointer to the object used as “this” call argument (with the overhead of passing nullptr for static functions), which I later started to reuse as a pointer to a lambda expression instance, to support lambda. operator () this nullptr Important performance factor here is the absence of any runtime check which could be used to distinguish all four cases: instance function of a class, constant instance function of a class, static function and lambda expression. According to my brief and not very accurate research, such check would almost double the execution time related to the invocation mechanism overhead. This is the technique used to provide the structured function-like syntax for template parameters: template <typename T> class delegate; template<typename RET, typename ...PARAMS> class delegate<RET(PARAMS...)> final : private delegate_base<RET(PARAMS...)> { //... }; The specialization delegate<RET(PARAMS…)> creates the convenient profile for template instantiation, similar to the template std::function: delegate<RET(PARAMS…)> delegate<double(int, const string*)> del; delegate<void(double&)> byRefVoidDel; // ...and the like The idea behind the lambda is to reuse the “this” pointer in the delegate instance data. In other cases, this pointer is used to hold the instance pointer of the class which instance method is used in the delegate, to pass it as the first (normally implicit) parameter of the method call. To perform the lambda expression call, I added one more stub function, lambda_stub (see “Delegate.h”): lambda_stub template <typename LAMBDA> static RET lambda_stub(void* this_ptr, PARAMS... arg) { LAMBDA* p = static_cast<LAMBDA*>(this_ptr); return (p->operator())(arg...); } The reason for such solution is this is related to what I already explained above — too expensive overhead of possible check of the different cases. In passing the lambda instance to the delegate instance, the most important problem is the support of the major lambda, closure capture. Notably, this feature is lost when a lambda instance is copied by value (if the capture set is not empty, the copy throws exception at its call). To me, such lambda design is questionable, but this is a standard behavior. Passing the instance by pointer created by the caller works, but this hardly could be a viable design, due to the need of dealing with null pointers. So, the only reasonable solution is to pass the lambda instance by constant reference and creation of the pointer inside the factory function. This is how the factory function looks: template <typename LAMBDA> static delegate create(const LAMBDA & instance) { return delegate((void*)(&instance), lambda_stub<LAMBDA>); } This is the formal way to instantiate the template for this function: auto d = delegate<double(int, char, const char*)> ::create<decltype(lambda)>(lambda); (See the declaration of d and lambda above.) d lambda However, there is no a need to do it, because the lambda type will be deduced (inferred) by a compiler from the delegate type. So, it will work if <decltype(lambda)> is omitted from the code fragment shown above. Moreover, it could be done through the assignment operator defined for the delegate class: <decltype(lambda)> delegate<double(int, char, const char*)> dl = lambda; This is possible because of the template copy constructor and template assignment operator. Again, the template instantiation is not needed (and not possible for a constructor), because the template parameters are deduced (inferred) from delegate and lambda types. First of all, as multicast delegate represent the set of handlers in the form of invocation list, and the heap is used (this is the only piece of code where heap is used), much higher intrinsic performance cost of the list operation support and the list iteration totally absorbs fine performance detail of the list item call. And yet, the invocation list item holds the same pair of this/stub pointers as in delegate, not the pointer to a delegate instance. this/stub A multicast_delegate instance is created with an empty invocation list, which can be then populated with items using a set of “+=” operators from other instances of multicast_delegate, delegate and from lambda expressions of matching profiles. When existing list items used, they are cloned. multicast_delegate += Yes, they are, despite the statements made in Sergey’s article. “Comparison” is not a fully accurate term in this case; all the talking is actually about the equality or identity relation. As soon as this is meant by “comparison”, delegates are “comparable” — please see the set of “==” and “!=” operators. Several operators represent all cases of equality checks: each of the classes delegate and multicast_delegate can be equal or not equal to the instance of its own or another type, additionally, an instance of each type can be equal or not equal to nullptr. Taking into account commutativity, it gives 12 cases. For all of the purposes of such relation, this is a perfectly valid set of operators. == != Sergey argued that “a delegate doesn’t contain a pointer to method”. But why? It actually does contain such pointer, only this pointer is not passed to a delegate instance during run time. Instead, all the template instantiations generate the all the method addresses in the form of immediate constants, so the comparison of such pointers is done correctly but indirectly, through the comparison of different stubs. If two stub pointers are different, it always means that underlying function pointers are different, and visa versa. Two delegate instances created from the same function or the same class and same “this” pointer compare as identical. The same goes with the delegate instances created from some lambda expression instance. If, by some reason, someone manages to compile some fragment of source code independently in different compilation units and make those units link together successfully, it yields different classes and function pointers, not the same. Likewise, two separate lambda expressions in the same stack frame with identical code still produce two different types, which can be easily checked up; and this is done for a reason. In both cases, the delegate instances instantiated from these not-really-identical objects simply must compare as not identical. After all, the set of “==” and “!=” operators defines the relationship on the set of delegate instances which matches the definition of equivalence relation: it is reflective, symmetric (commutative) and transitive — all that matters. All the delegate/multicast_delegate solution is contained in just three files: delegate/multicast_delegate they include each other in the given order and can be added to any project. The compiler should support C++11 or later standard. For GCC, this is an option which should be set to -std=c++11 or, say, -std=c++14. -std=c++11 -std=c++14 The demo and benchmark project is provided in two forms: 1) Visual Studio 2015 solution and project using Microsoft C++ compiler and Clang — see “CppDelegates.sln” and 2) Code::Blocks project using GCC — “ CPPDelegates.cbp”. For all other options, one can assemble a project or a make file by adding all “*.h” and “*.cpp” files in the code directory “CppDelegates”. MIT License #include <stdio.h> #include <stdint.h> #include <Delegate.h> SA::delegate<void()> call() { int32_t i = -1; double d = 2.5; uint64_t s = 6; return [i, d, s](){ printf("hi mom %d, %g, %d\n", (int)i, d, (int)s); }; } int main() { SA::delegate<void()> fn = call(); fn(); // produces hi mom -1, 6.95305e-310, -1977571696 return 0; } main printf #include <functional> #include <stdio.h> #include <stdint.h> std::function<void()> call() { int32_t i = -1; double d = 2.5; uint64_t s = 6; return [i, d, s](){ printf("hi mom %d, %g, %d\n", (int)i, d, (int)s); }; } int main() { std::function<void()> fn = call(); fn(); // produces hi mom -1, 2.5, 6 return 0; } #include <Delegate.h> #include <functional> #include <stdio.h> #include <stdint.h> SA::delegate<void()> call(uint64_t s) { int32_t i = -1; double d = 2.5; static thread_local std::function<void()> retval; return retval = [i, d, s](){ printf("hi mom %d, %g, %d\n", (int)i, d, (int)s); }; } int main() { call(6)(); // produces hi mom -1, 2.5, 6 call(7)(); // produces hi mom -1, 2.5, 7 return 0; } #include <Delegate.h> #include <stdio.h> #include <stdint.h> struct C { void test(uint64_t a,double b,int c) { printf("%d %g %d\n", (int)a, b, c); } // This compiles but doesn't work. I think it is using the LAMBDA overload for operator= //SA::delegate<void(int,uint64_t,double)> d = SA::delegate<void(uint64_t,double,int)>::create<C,&C::test>(this); // This works: SA::delegate<void(uint64_t,double,int)> d = SA::delegate<void(uint64_t,double,int)>::create<C,&C::test>(this); }; int main() { C c; c.d(1,2,3); // this works even though the signature is bad... because a temporary is still around? SA::delegate<void(int,uint64_t,double)> d = SA::delegate<void(uint64_t,double,int)>::create<C,&C::test>(&c); d(4,5,6); return 0; } struct _delegate {}; // new constant-type base for is_base_of? template<typename RET, typename ...PARAMS> class delegate_base<RET(PARAMS...)> : _delegate { template <typename LAMBDA, typename = typename std::enable_if<!std::is_base_of<_delegate, LAMBDA>::value>::type> delegate(const LAMBDA& lambda) { assign((void*)(&lambda), lambda_stub<LAMBDA>); } //delegate template <typename LAMBDA> // template instantiation is not needed, will be deduced (inferred): typename std::enable_if<!std::is_base_of<_delegate, LAMBDA>::value, delegate &>::type operator =(const LAMBDA& instance) { assign((void*)(&instance), lambda_stub<LAMBDA>); return *this; } //operator = delegate::isNull() isNull ==(void* ptr) template<typename RET, typename ...PARAMS> class delegate<RET(PARAMS...)> final : private delegate_base<RET(PARAMS...)> { public: ... RET operator()(PARAMS... arg) const { return (*invocation.stub)(invocation.object, std::forward(arg)...); } //operator() ... }; std::forward template<typename T, typename ... Args> T create(Args&& ... args){ return T(std::forward(args)...); } double InstanceFunction(int, char, const char *) { return 0.1; } Sergey Alexandrovich Kryukov wrote:I have no idea who nominated it and why. 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/1170503/The-Impossibly-Fast-Cplusplus-Delegates-Fixed
CC-MAIN-2018-17
en
refinedweb
1 I've been trying to figure out this problem for a week. I've searched all sites for if else statements, and I can't figure out why !!!!!!!!!!!!!!!!! What's wrong with my statements ?? Help me out !!!!!!!!!!! please. #include<iostream> #include<string> using namespace std; void main() { char hsg; //Highschool Graduate char hs=0; //Highschool Student string prince; //Pricipal do{ cout << "\n" << "Are you in Highschool now ?(y or n) : "; cin >> hs; if(hs == 'y') { [COLOR="Red"]Problem Start from here :[/COLOR] do{ cout << "\n" << "Do you have principal's permission ?(y or n) : "; cin >> prince; if(prince == 'y') { cout << "Then, you are able to take class.\n"; } else if(prince == 'n') { cout << "Bring the permission letter from your Pricipal.\n"; } }while(!(prince == 'y' || prince == 'n')); [COLOR="red"]Problem Finish here :[/COLOR] } else if(hs == 'n') { cout << "\n"; cout << "Are you a Highschool Graduate ?(y or n) : "; cin >> hsg; } }while(!(hs == 'y' || hs == 'n')); } Edited by mike_2000_17: Fixed formatting
https://www.daniweb.com/programming/software-development/threads/238593/problem-with-if-else-if-statements
CC-MAIN-2018-17
en
refinedweb
Customizing Office 2003 Research Services: 15 Answers to Common Issues Mark Iverson Douglas Laudenschlager Microsoft Corporation February 2005 Applies to: Microsoft Office 2003 Editions Summary: Read answers to common issues facing developers when customizing the Office 2003 Research Services, including tips about formatting data, scaling images, and encoding data. (7 printed pages) Contents Introduction Getting Started Using the StartAt and Count Values in the Response Namespace Encoding Content in My Response Using HTMLEncode Identifying Users and Tracking Logon Status Sending Hidden Data to the Server Using a Local Research Service Returning Multiple Range Elements Specifying Non-Default Fonts in the Research Task Pane Formatting Content in Tables Indenting Hierarchical Data in the Research Task Pane Understanding Line Wrapping and Truncation Scaling Images Inserting Formatted Data into Documents Launching Documents from the Research Task Pane Using the Context Attribute with Smart Tags Using Research Task Pane Smart Tags with PowerPoint Conclusion Introduction Microsoft Office Research Services, one of the features of Microsoft Office 2003 Editions, allows you to search public, corporate, or subscription databases without leaving your Office application or Microsoft Internet Explorer. Hopefully you have used it and perhaps even experimented with it. If you have, some of its rich features may result in a question or two. This article addresses a few of the most frequently asked questions about Research Services. We do not answer all questions here, but we make a strong effort to address the ones we see frequently. Give it a read to learn a helpful tip or two, and perhaps we'll answer your question as well. Do you have a question that we don't address here? Send us an e-mail message and we may include it in an update to this article. Getting Started The following is a list of resources to help you develop custom solutions using Research Services and the Microsoft Office System. - Research Services Downloads - Enhancing Office 2003 Research Services with Graphics and Fancy Fonts - Getting Started with the Research Service Development Extras Toolkit for Office 2003 Editions - Introduction to the Office 2003 Research Services Class Library - Connecting to Databases Using the Office 2003 Research Service Class Library Wizard - Building Wizard Data Provider Plug-ins for the Office 2003 Research Service Class Library How Do I Use the StartAt and Count Values in the Response Namespace Two of the values in the Microsoft.Search.Response namespace are StartAt and Count. They first appear when the Research service sends them to the client with the first batch of results. Do you wonder what the client does with these values? We were asked whether the client returns the same values that the Research service sent in order to maintain state or whether the client sends back an incremented StartAt, such as StartAt + Count. StartAt and Count values apply when the Research service sends them to the client with the first batch of results. Next, the client sends new, incremented values back to the server. More specifically, when the client requests a second batch of results, the Research task pane sets the new value of StartAt to the previous value of StartAt plus the value of Count. You can use Count as your normal page size without worrying about cases where the new value of StartAt + Count - 1 may exceed TotalAvailable. Encoding Content in My Response Using HTMLEncode You may want to encode custom content into the Research service response packet as HTML. Several people doing so have wondered about the most prudent approach to this. The answer lies in using a method, such as HTMLEncode, for all content written into the XML response packet to ensure any special characters (<, >, &, ", ',) are converted to XML-appropriate character entities (such as < > & " '). If a service is extracting information from another system (such as a database, LDAP, and so on), then such a method eliminates problems when the system return un-encoded special characters. If the service generates all the strings internally, or it knows that the external system does not return any problem characters, then there is no need to encode content. Identifying Users and Tracking Logon Status Sometimes the Research service is set to require a logon for customer tracking or for-pay content. A couple of questions about this scenario have been asked. One involves how to identify users after they log on. The proper way to do this is to use cookies. You can use cookies after logon to identify the user and the user's logon status. If cookies associated with a paid service are lost, the user is prompted to log on again and gets only the free previews or basic experience until an identifying cookie is re-sent by the server. A second question involves preventing the Research task pane from re-displaying the logon screen after the user logs on. This primarily concerns those with a pay-per-transaction model because it works by requiring users to log on when they want to access premium content. Therefore, to prevent re-displaying the log on screen, consider not charging per transaction because it can be problematic. Sending Hidden Data to the ServerSending Hidden Data to the Server If you're trying to send hidden data, such as the contents of a hidden form field, to the server, you can do it two different ways: - You can send hidden data back to the server using a cookie. - You can use the RequeryContext element, located in the Response namespace, to send hidden data back to the server. Using a Local Research Service You may be wondering if, when hosting a Research service on your local computer, you still need to use SOAP to communicate with the service. You may also need to know if you can still search the Research service when your computer is not connected to the Internet. With regard to the first question, yes, you can only communicate with a Research service using SOAP. However, you can host a Research service on your local computer, and you do not need to be connected to the Internet to search it. Usually you need to be connected to the Internet to register a new service because the registration process checks for online status. You can work around this requirement by making the necessary registration entries manually provided you know the required values. This topic is discussed in detail in Building Office 2003 Research Services That Work Offline. For more information about local services and service registration, see the Microsoft Office Research Service Software Development Kit (SDK). Returning Multiple Range Elements The Microsoft.Search.Response namespace allows multiple instances of a Range element. This prompts the question: When does my Research service return multiple ranges? The answer is that it should not return multiple ranges. The Research task pane never generates multiple ranges in its query packets, so research services responding to queries should not include multiple ranges in their responses. Specifying Non-Default Fonts in the Research Task Pane Many of you want to know about the possibility of changing the default font used by the Research task pane. For example, can you specify a font for the text of a heading in the Content namespace? With a small amount of code and the use of the QueryService and StringImage classes, yes, you can. The details are too lengthy to include here. However, you can find explicit instructions for how to do this in the article Enhancing Office 2003 Research Services with Graphics and Fancy Fonts. Formatting Content in Tables You may want to display some data returned by your Research service in a table format. For example, a stock quote retrieved from the MSN Money Stock Quotes service would benefit from an attractive table. The question is, how to make such a table. The answer is demonstrated here using the portion of an XML response packet from the MSN Money Stock Quotes service that lays out the table of quote information. A custom smart tag action is also shown. <?xml version="1.0" encoding="utf-8"?> <ResponsePacket xmlns="urn:Microsoft.Search.Response" revision="1" providerRevision="5510"> <Response domain="{2ef9ba38-c64d-4d08-8287-eb9b2f34d0e9}" xmlns="urn:Microsoft.Search.Response"> <QueryId>{3DC06195-A3DA-4978-9430-C4ED2E32E1C8} </QueryId> <Range id="result"> <Results> <Content xmlns= "urn:Microsoft.Search.Response.Content" revision="1"> <P light="true">Quotes delayed at least 20 min</P> <Heading level="1"> <Text>Microsoft Corporation (US:MSFT)</Text> <Tabular> <Record borders="true"> <Name bold="true"><![CDATA[Last]]></Name> <Value bold="true">26.64</Value> </Record> <Record borders="true"> <Name><![CDATA[Change]]></Name> <Value>0.11</Value> </Record> <Record borders="true"> <Name><![CDATA[% Change]]></Name> <Value>0.41 %</Value> </Record> <Record borders="true"> <Name><![CDATA[Previous Close]]></Name> <Value>26.53</Value> </Record> <Record borders="true"> <Name><![CDATA[Day's High]]></Name> <Value>26.72</Value> </Record> <Record borders="true"> <Name><![CDATA[Day's Low]]></Name> <Value>26.50</Value> </Record> <Record borders="true"> <Name><![CDATA[Volume]]></Name> <Value>32,011,528</Value> </Record> </Tabular> <P light="true">Financial data in USD</P> <Line> <Actions> <Insert> <Text>Insert Price</Text> </Insert> <Data>US:MSFT 26.64</Data> <Custom url= "? FamilyId= D20E2CA8-9F26-4EF6-8F07-F0EF37D3D35B&displaylang=en" xmlns: <st1:StockDataUS:MSFT</st1:StockData> </Custom> </Actions> </Line> <P bold="true">More on MSN Money:</P> . . . </Content> </Results> </Range> <Status>SUCCESS</Status> </Response> </ResponsePacket> Indenting Hierarchical Data in the Research Task Pane Just how many levels of indentation are possible in the Research task pane? When I try to use the multiple levels of indentation to display my results, the fourth level isn't indented from the third level preceding it. The Research task pane supports five levels of indentation—the first level is reserved for the service title, and the remaining four levels are available for use in the results that you send from your custom service. However, the fifth or last level, the fourth level that you may use in your content, is not indented further than the previous level due to the limited screen width available in the Research task pane. You can confirm that your fourth-level content is indeed a child of the third level by collapsing its parent (third-level) heading and observing that the fourth level items are hidden. Understanding Line Wrapping and Truncation More than a few people have observed that when you place text and a hyperlink that you want to appear together within a <Line> element, it sometimes wraps to a second line, and the text that does not fit on these two lines is truncated. This is expected behavior—mixed text and hyperlinks may not wrap as expected in the Research task pane, which is a result of a limitation of the current display interface. Scaling Images A source of a few questions is how the Research task pane sizes and scales images that display in the task pane. The task pane scales images in a different manner than Internet Explorer. The browser relies on screen resolution of 96 pixels per inch. Therefore, a 200-pixel x 100-pixel image displays in the browser as approximately 2.08 inches x 1.04 inches. The Research task pane, in contrast, relies on the native resolution at which the image was saved. This metadata is stored within the image file itself. For example, if the 200-pixel x 100-pixel image was saved at 400 x 200 resolution, then it displays as a half-inch square in the Research task pane. Inserting Formatted Data into Documents To insert formatted data from the Research task pane into your document, there's one important thing to know: You must use a smart tag action to insert formatted data from the Research task pane into an Office document. Launching Documents from the Research Task Pane It is not uncommon to want to open an Office document from the Research task pane, and several people have asked how to do this. To do this, simply display a hyperlink to the file location. Remember that the user may see security warnings about opening a file or running an application. Alternatively, you can use a custom action with a smart tag. However, when you click the link to an Office document, the document may open in Internet Explorer instead of its native application. Users who want to modify this behavior need to change a registry entry as explained in Knowledge Base article 162059—How to Configure Internet Explorer to Open Office Documents in the Appropriate Office Program Instead of in Internet Explorer. Using the Context Attribute with Smart Tags You may know that the context attribute can allow you to use the same smart tag to work with data in both the Research task pane and the main Office document. The following section describes how to do this: Consider a smart tag that is triggered by the following XML returned from the server and displayed in the Research task pane: <StockData xmlns="stockinfo"><Company>Microsoft</Company></StockData> This smart tag can perform actions in the Research task pane by inserting data into the document and inside the document itself, for example, by changing the appearance of the data. You want to code both actions within a single smart tag. When the smart tag inserts into the document the XML data that was passed to it, it adds the context attribute. This enables it to distinguish between XML passed by the document and XML passed by the Research task pane, because all other parameters are the same. <StockData xmlns="stockinfo" context="doc"><Company>Microsoft</Company></StockData> You can describe the processing logic used by the smart tag as follows: - If @context does not exist, - Assume the data is being passed by the Research task pane. - Offer the action to insert the data. - When inserting the data into the document, add the @context attribute and set it to "doc." - Else If @context is set to "doc," - Offer the action to change/refresh the data. - Be sure to preserve the @context attribute. Using Research Task Pane Smart Tags with PowerPoint If you attempt to use a smart tag with the Research task pane, remember that the Research task pane passes an Application pointer to smart tags when in Microsoft Office PowerPoint 2003, not a Range pointer, which it passes when in Microsoft Office Word 2003 or Microsoft Office Excel 2003. For this reason, your smart tag that works in Word and Excel does not work in PowerPoint. Conclusion Research Services offers a rich and flexible variety of options for customization. Often you can incorporate other technology, such as smart tags. By combining Research Services with compatible technology, the possibilities increase dramatically. You can format data in tables, insert formatted data into your document, or launch documents from the Research task pane. This article reviews some of the common issues faced when building custom solutions with Research Services. Do you have a question that we don't address here? Send us an e-mail message and we may include it in an update to this article.
https://msdn.microsoft.com/en-us/library/aa159924(office.11).aspx
CC-MAIN-2018-17
en
refinedweb
(Analysis by Nick Wu) The grid is big enough that it is not possible for us to merely try all possible paths. We simply care about how many ways there are to get to a given square though. Let $f(x,y)$ be the number of ways there are to get to row $x$ and column $y$. Note that $f(x,y)$ is simply the sum of all $f(i,j)$ where $i < x$, $j < y$, and the numbers in those squares don't match. This gives us an $O(R^2 C^2)$ algorithm, which is fast enough for our purposes. Here is my Java code that implements this, with the only difference being that it computes the DP in the reverse direction. import java.io.*; import java.util.*; public class barnjump { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new FileReader("barnjump.in")); PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("barnjump.out"))); StringTokenizer st = new StringTokenizer(br.readLine()); int r = Integer.parseInt(st.nextToken()); int c = Integer.parseInt(st.nextToken()); int[][] grid = new int[r][c]; for(int i = 0; i < r; i++) { st = new StringTokenizer(br.readLine()); for(int j = 0; j < c; j++) { grid[i][j] = Integer.parseInt(st.nextToken()); } } final int MOD = 1000000007; int[][] dp = new int[r][c]; dp[0][0] = 1; for(int i = 0; i < r; i++) { for(int j = 0; j < c; j++) { for(int k = i+1; k < r; k++) { for(int l = j+1; l < c; l++) { if(grid[i][j] != grid[k][l]) { dp[k][l] += dp[i][j]; dp[k][l] %= MOD; } } } } } pw.println(dp[r-1][c-1]); pw.close(); } }
http://usaco.org/current/data/sol_hopscotch_silver.html
CC-MAIN-2018-17
en
refinedweb
Matlab Toolbox Implementation For Ldap Computer Science Essay Published: LDAP is a distributed directory service protocol, and is based on a client-server model and runs over TCPIP. It can be used to access standalone directory servers or X.500 directories. The Lightweight Directory Access Protocol (LDAP) is being used for an increasing number of directory applications. Applications include personnel databases for administration, tracking schedules address translation databases for IP telephony, network databases for storing network configuration information and service policy rules[1][2]. This work attempts to build a matlab toolbox for accessing an LDAP server. We have tried to make use of JNDI classes in Matlab and Apache DS has been used as an Active directory server. Keywords- LDAP, Active Directory, Matlab, Authentication, Tree Searching, Apache DS Introduction A directory service is a simplified database. Typically, it does not have the database mechanisms to support transactions. Directories allow both read and write operations, but are intended primarily for high-volume, efficient read operations by clients. LDAP is a distributed directory service protocol, and is based on a client-server model and runs over TCP/IP. It can be used to access standalone directory servers or X.500 directories. [3] LDAP defines a communication protocol. It means that the Lightweight Directory Access Protocol (LDAP) is an application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP). Professional Essay Writers Get your grade or your money back using our Essay Writing Service! The Lightweight Directory Access Protocol (LDAP) is being used for an increasing number of directory applications. Applications include personnel databases for administration, tracking schedules address translation databases for IP telephony, network databases for storing network configuration information and service policy rules. LDAP working A client starts an LDAP session by connecting to an LDAP server, called a Directory System Agent (DSA), by default on TCP port 389. [3][4] The client then sends an operation request to the server, and the server sends responses in return. With some exceptions, the client does not need to wait for a response before sending the next request, and the server may send the responses in any order. An application client program initiates an LDAP message by calling an LDAP API. But, an X.500 directory server does not understand LDAP messages. In fact, the LDAP client and X.500 server even use different communication protocols (TCP/IP vs. OSI). The LDAP client actually communicates with a gateway process (also called a proxy or front end) that translates and forwards requests to the X.500 directory server (see Figure 2). This gateway is known as an LDAP server. It services requests from the LDAP client. It does this by becoming a client of the X.500 server. The LDAP server must communicate using both TCP/IP and OSI. This way, clients can access the X.500 directory without dealing with the overhead and complexity which X.500 requires. Structure of LDAP. In LDAP, object classes are used to group related information.[5] Typically, an object class models some real-world object such as a person, printer, or network device. The definition of an LDAP object class includes the following pieces of information: • An object identifier (OID) that uniquely identifies the class; • A name that also uniquely identifies the class; • A set of mandatory attributes; • A set of allowed attributes. Attributes (also requiring both an OID and a name) that an object class definition includes must be unique throughout the entire directory schema. The set of mandatory (required) attributes is usually fairly short or even empty. The set of allowed (optional) attributes is often quite long. It is the job of each directory server to enforce attribute restrictions of an object class when an entry is added to the directory or modified in any way. One object class can be derived from another, in which case it inherits the Characteristics of the other class[6] This is sometimes called sub classing, or object class inheritance. It includes the following object classes: • top: - The top object class is an abstract class. All other object classes are subclasses of top. top has just one mandatory attribute: the object Class attribute. • subschema: - The subschema object class is an auxiliary object class. It contains the schema (for example object classes, attribute types, matching rules, and so on) for the LDAP directory server. Comprehensive Writing Services Plagiarism-free Always on Time Marked to Standard • extensibleObject:- The extensibleObject object class is an auxiliary object class. It contains every attribute defined by a directory server's schema • replicaObject :- The replicaObject object class is an IBM-defined structural class that is used to represent a directory server replica. It contains attributes used to control directory server replication • referral:- The referral object class is a structural object class that presents a referral directory entry. It contains a single attribute • cacheObject :- The cache Object object class is an auxiliary object class that allows a time-to-live attribute, ttl, to be associated with a directory entry. • container :- The container object class is a structural object class that can contain other objects. • linkedContainer:- The linkedContainer object class is an abstract object class with a DN-valued property pointing to another container to search if the desired object is not found in the current container. A component of a name is called a relative distinguished name (RDN).[7] An RDN represents a point within the namespace hierarchy. RDNs are separated by and concatenated using the comma. The order of RDNs in an LDAP name is the most specific RDN first followed by the less specific RDNs moving up the DIT hierarchy examples of valid distinguished names written in string form: • o cn=Joe Q. Public, ou=Austin, o=IBM This is a name containing three relative distinguished names (RDNs). • ou=deptUVZS + cn=Joe Q. Public, ou=Austin, o=IBM This name containing three RDNs in which the first RDN is multi-valued. • cn=L. Eagle, o=Sue Grabbit and Runn, c=GBA Basic Toolbox Implementation LDAP Query Structure Query 1: ldapsearch -h localhost -b "dc=organization-name,dc=gr" "uid=avakali" Query 2: ldapsearch -h localhost -b "ou=people,dc=organization-name,dc=gr" "businesscategory=Assistant Professor" The LDAP functional model includes the following operations in general. * * Abandon - abort a previous request * Modify Distinguished Name (DN) - move or rename an entry * Extended Operation - generic operation used to define other operations * Unbind - close the connection Methodology The proposed functional toolbox is intended to implement these operations thereby providing it the functionality to connect and interact with an active directory server. We have used an instance of an Apache Directory server 2.0 created using Apache Design suite. Fig 1 shows a snapshot of the server instance in Apache Design suite window. LDAP - ou=system - ApacheDS 2 Fig. Screenshot of the Apache DS used as an LDAP and LDAPS server The test data that has been fed into the server is provided below in Table I [8] TABLE LDIF FILE For Test Data dn: dc=example,dc=com objectClass: domain objectClass: top dc: example dn: ou=Users,dc=example,dc=com objectClass: organizationalUnit objectClass: top ou: Users dn: ou=Groups,dc=example,dc=com objectClass: organizationalUnit objectClass: top ou: Groups dn: cn=Adan Abrams,ou=Users,dc=example,dc=com objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: person objectClass: top cn: Adan Abrams sn: Abrams description: 19741108000000Z employeeNumber: 7 givenName: Adan telephoneNumber: 254-323-1920 telephoneNumber: 902-451-7619 uid: aabrams userPassword:: c2VjcmV0 dn: cn=Chuck Brunato,ou=Users,dc=example,dc=com objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: person objectClass: top cn: Chuck Brunato sn: Brunato description: 19650324000000Z employeeNumber: 3 givenName: Chuck telephoneNumber: 169-637-3314 telephoneNumber: 907-547-9114 uid: cbrunato userPassword:: c2VjcmV0 Based on the LDAP functional model, we propose to implement the following functions(Client end only) LDAP_URL: A tool for generating LDAP based URL's This Essay is a Student's Work This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.Examples of our work LDAP_search: A tool for searching LDAP Directories LDAP_LoginPassword: A tool for changing LDAP passwords LDAP_modrdn : Tool to modify an entry's RDN using LDAP LDAP_modify: Tool to modify or add entries using LDAP LDAP_exop: a tool for performing well-known extended operations LDAP_delete: Tool to delete an entry using LDAP LDAP_compare: LDAP compare tool common : Common routines for the ldap client tools Authenticating to the LDAP by Using the JNDI The implementation has been achieved making use of the lesser known property of MATLAB to make use of JNDI classes (Java naming Directory Interface) of Java. In the JNDI, authentication information is specified in environment properties. When you create an initial context by using the InitialDirContext(in the API reference documentation) class (or its superclass or subclass), we need to supply a set of environment properties, some of which might contain authentication information. We can use the following environment properties to specify the authentication information. Context.SECURITY_AUTHENTICATION: ("java.naming.security.authentication"): Specifies the authentication mechanism to use. For the Sun LDAP service provider, this can be one of the following strings: "none", "simple", sasl_mech, where sasl_mech is a space-separated list of SASL mechanism names. Context.SECURITY_PRINCIPAL("java.naming.security.principal"). Specifies the name of the user/program doing the authentication and depends on the value of the Context.SECURITY_AUTHENTICATION property. Context.SECURITY_CREDENTIALS("java.naming.security.credentials").Specifies the credentials of the user/program doing the authentication and depends on the value of the Context.SECURITY_AUTHENTICATION property. When the initial context is created, the underlying LDAP service provider extracts the authentication information from these environment properties and uses the LDAP "bind" operation to pass them to the server. A sample script for the password tool has been provided below in fig 2 function [dctx, sc] = ldap_LoginPassword(curUser, pwd) env = java.util.Hashtable(); sp = 'com.sun.jndi.ldap.LdapCtxFactory'; env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, sp); ldapUrl = 'ldap://company.com:389'; env.put(javax.naming.Context.PROVIDER_URL, ldapUrl); env.put(javax.naming.Context.SECURITY_AUTHENTICATION, 'simple'); env.put(javax.naming.Context.SECURITY_PRINCIPAL, ['CN=' curUser ',OU='upper(curUser(1)) ',OU=Useraccounts,OU=Abt,DC=de,DC=company,DC=com']); env.put(javax.naming.Context.SECURITY_CREDENTIALS, pwd); dctx = javax.naming.directory.InitialLdapContext(env, []); sc = javax.naming.directory.SearchControls(); attributeFilter = {'department'}; sc.setReturningAttributes(attributeFilter); sc.setSearchScope(javax.naming.directory.SearchControls.SUBTREE_SCOPE); Fig. 2 Sample Authentication tool The connection is done on the default port 10389 for LDAP and 10636 for LDAPS. The sample search tool has been given in Fig 3 function result = getDepartment(user,dctx,sc) base = 'DC=de,DC=company,DC=com'; filter = sprintf('(| (cn=%s) (cn=%s))', lower(user), upper(user)); results = dctx.search(base, filter, sc); if results.hasMore(); result = results.next(); else result = ''; end dctx.close(); Fig. 3 Sample Search tool Conclusion This work is an attempt to construct a comprehensive toolbox for Matlab which enables socket based connection from Matlab environment to LDAP server. The toolbox when implemented to its fullest can enable designers to design LDAP based applications using MATLAB as an environment and making use of the rich toolboxes available in Matlab.
https://www.ukessays.com/essays/computer-science/matlab-toolbox-implementation-for-ldap-computer-science-essay.php
CC-MAIN-2016-50
en
refinedweb
Hey guys, pretty confused about what a "pass-by-reference" function is and does. No one will put it into simple English for me and Google has become my worst enemy on the topic. What the Program has to do is convert the five-numbers of a zip code (for example: "64110") into words ("Siz Four One One 0"). It has to display the First and last name of the resident, their street, city, state, and then the zipcode. HERE IS THE KICKER: It must all be read from an input file! Below is my coding so far. It will not compile in Visual Studio (2008), and as you can tell from it being cut-off, I don't know what to do: #include <iostream> #include <fstream> #include <iomanip> #include <cmath> #include <string> using namespace std; bool checkFileInput (ifstream &fin); bool checkFileOutput (ofstream &fout); int changeZipcode (string firstName, string lastName, int houseNumber, int street, int city, int state, int zipcode, int zipChange, string fullzipcode); int main() { ifstream fin("program5.txt"); ofstream fout("output5.txt"); fin.open("program5.txt"); fout.open("output5.txt"); if(! checkFileInput(fin)) { exit(2); } if(! checkFileOutput(fout)) { exit(3); } cout << "Go check the output file\n" << endl; fin.close(); fout.close(); } int changeZipcode (int zipcode, int fullzipcode) { return 0; } bool checkFileInput (ifstream &fin) { if(fin.good()) { return true; } else { cerr << "Unable to Open file\n"; return false; } } bool checkFileOutput (ofstream &fout) { if(fout.good()) { return true; } else { cerr << "Unable to write to Output file\n"; return false; } } int changeZipcode (string firstName, string lastName, int houseNumber, int street, int city, int state, int zipcode, int zipChange string fullzipcode) { while (fin >> firstName >> lastName >> houseNumber >> street >> city >> state >> zipcode) { if(zipcode>=10000) { zipChange=(zipcode/10000) } if(zipChange=1) { zipChange = one; } if(zipChange = 2) { zipChange = two; } if(zipChange = 3) { zipChange = 3 } if(zipChange=4) { zipChange = four; } if(zipChange=four) { zipChange = four; } if(zipChange=5) { zipChange = five; } } As you can see, the number one problem I am having is using a "pass-by-reference" function to change the zipcode. I don't even know what it does or how to use it! But I have to use it. Because I thought that at least I'd be getting somewhere, I went ahead and put the information into the int function "changeZipcode". But, now I'm having trouble figuring out how to get the program to read each individual number and then convert it into words! Can anyone help me?
https://www.daniweb.com/programming/software-development/threads/152061/writing-a-program-using-pass-by-reference-functions
CC-MAIN-2016-50
en
refinedweb
This action might not be possible to undo. Are you sure you want to continue? for abbreviation) abbreviate (to -) abbreviation abc abc abdicate (to -) abdication abdomen abdominal abdominally abduction abductors aberrancy aberrant aberration abhor (to -) abhorrence abject ablation ablative ablution abnegate abnegation abolish (to -) abolishment abolition abolitionist abominable abominate (to -) abomination aboriginal aborigine abort (to -) abortion abortionist abortive abound (to -) aboveboard abrasion abrasive abridged abrogate (to -) abrupt abruptly abscess abscess absolute absolutely absoluteness absolution absolutism absolve (to -) absorb (to -) absorbed absorbent absorber absorbing absorption absorve (to -) abstain (to -) abstainer abstemious abstention abstinence abstinent abstract abstracted abstraction abstruse absurd absurdity absurdity absurdly abundance abundant abundantly abuse abusive abusively abysmal abyss advocacy advocate affluent aperture April attack a problem (to -) attorney barrister battered bee below beneath birch boo (to -) bored boring brace brogue bumblebee bumpy can opener cheapen (to -) compost covert creek cuddle curtail (to -) dejected dejection dereliction down downcast downhearted embrace (to -) fan in fan out fertilizer fir forlorn grandfather grandma grandmother grandpa grandparent granny haddock hatch ( to -) hemlock honeybee hug humdrum laden lawyer lee loathe (to -) loathing loathsome ludicrous miscarriage miscarry (to -) motley not at all open (to -) open opener opening openly outfitter overcoat overt plentiful pollack preposterous pulmonary abscess quit (to -) rapt relinquish (to -) rife scorching season ticket shorthand sketchy slit soften (to -) solicitor spruce tedious topcoat unlock (to -) utter utterly variegated vaulted vent abidance about about academic academically academician academy ACC (abbr. for accumulator) accede (to -) accelerate (to -) accelerated acceleration accelerator accent accentuate (to -) accentuation accept (to -) acceptability acceptable acceptably acceptance access (to -) accessible accessories accessory accident accidental accidentally acclaim (to -) acclamation acclimate acclimation acclimatization acclimatize (to -) accommodate (to -) accommodation accompaniment accompanist accompany (to -) accord accordance accordion accordionist accredit (to -) accreditation accredited accumulate (to -) accumulated accumulation accumulative accumulator accusation accusative accusatory accuse (to -) accused accuser accustom (to -) accustomed acerbity acetate acetic acetone acetylene acidify (to -) acidity acidosis acknowledgment acne acolyte acoustic acoustics acre acrid acridity acrimonious acrobat acrobatic acrobatics acrophobia acrylic act acting actinium action activate (to -) active actively activist activity actor actress actuate (to -) acupuncture advisable advise (to -) agree (to -) agree (to -) agreed agreement air-conditioning allowable appendage approachable approved aquarium aquarium Aquarius aquatic aqueduct aquifer aquiferous arraign (to -) arraignment arrange (to -) attitude battleship borrow brighten (to -) camp (to -) camping cantonment cardan coupling caress caret carrier sense multiple access cartage casually casualty certification certify (to -) chicory chord clearing cliff coinage colza oil compromise concerning conditioner cotton-seed oil coupling crash creditor CSMA (abbr. for carrier sense multiple access) cumulative current currently curtailment customary deed end (to -) escarpment event finish finishing fixing flared gesture grape stone oil graphic accelerator green pickled olives green table olives groundnut oil happening harry (to -) headless heartbroken heartburn hit holly impeach impeachment indict (to -) indictment jerky joining line conditioning linseed oil linseed oil minutes mortgagee nerveless oil oily olive olive-residue oil ordinary oil palm oil pavement present present-day proceedings protocol quicken (to -) quilted quilting quiz recommend (to -) retrofit a system (to -) roundabout scathing scheduled action seasoned olives sensitization shared access shareholder shorten (to -) sidewalk sluice snuggle (to -) sourness soybean oil stalwart starlet steel steelwork steely stock stockholder stunted sunflower seed oil throttle tipsy trig update update updating upgrade (to -) usher usherette watery acquire (to -) acquired acquirement acquisition acquisitive adagio adapt (to -) adaptability adaptable adaptation adapter adaptive addict addiction addition additional additionally additive adduce (to -) adenocarcinoma adept adequate adequately adhere (to -) adherence adherent adhesion adhesion adhesive adhesiveness adieu adipose adjacent adjectival adjective adjudge (to -) adjunct administer (to -) administration administrative administrator admirable admirably admiration admire (to -) admirer admiringly admissible admission admit (to -) admittance adolescence adolescent adopt (to -) adoption adoptive adorable adoration adore (to -) adorer adorn (to -) adornment adrenalin adrenaline . for color graphics adapter) color graphics adapter corrupt (to -) customs customs drowse (to -) drowsiness enclosed farewell fitting fixture flatter (to -) forth fortune-teller forwards foster furthermore gesticulation good-bye groupie grown-up grownup herewith indoctrinate (to -) indoors inlet intake manager mismanage (to -) moneyed .adsorption adulate (to -) adulation adult adulterate (to -) adulteration adulterer adulteress adulterous adultery advance advancement advent adventitious adverb adverbial adversary adverse adversely adversity ahead append (to -) attach (to -) attach (to -) attachment becoming besides board (side -) boyhood bye-bye CGA (abbr. moreover naturalization onward paraphernalia pickling port (to -) port postmaster quartermaster resource manager siding summing tailored teen teenage teenager teens trained trainer training trimming trimming upstart warn (to -) warning wealthy webmaster whither window manager worshipper aerodrome (UK) aerodynamic aerodynamics aeronautic aeronautics aeroplane aerosol aerospace airdrome (US) airport airship streamlined addiction affability affable affably affect (to -) affectation affected affection affectionate affectionately affiliate affiliation affinity affirm (to -) affirmation affirmative affirmatively afflict (to -) . affliction affluence affront Afghan aficionado African aggrieved ail (to -) amateur aphorism aphrodisiac companionable complaint edged edgy effeminate famed fond fondness fortunate fortunately grieve (to -) hobby joining letdown lucky outside outskirts secure (to -) sharp sharpen (to -) sharpener shave (to -) shave shaving sorrowful sorry state (to -) trouble tuner whet (to -) yachtsman acidic acuity acute acutely acuteness add (to -) agency agenda agent agglomerate agglomeration agglutinate (to -) agglutination aggrandize (to -) aggravate (to -) aggravating aggravation aggravation . aggregate (to -) aggregate aggression aggressive aggressively aggressiveness aggressor agility agitate (to -) agitated agitation agitator agnostic agnosticism agonize (to -) agonizing agony agoraphobia agrarian agreeably agricultural agriculture agriculturist agronomic agronomy applejack aquamarine August avocado beta-adrenergic agonist bittersweet blood drawing and transfusion needle calendar carcinogen careworn choppy cling (to -) cloudburst columbine congenial conglomerate cower (to -) crouch (to -) depletion downpour eaglet enjoyable enlargement exhaust (to -) exhausting exhaustion flurry fluster fret gable garfish gill goad (to -) grab (to -) grapple (to -) . grasp (to -) grateful grievance grip (to -) group (to -) grouping grubby harrowing hectic hold hole husbandman husbandry hypodermic needle jaded keenness limewater maggoty mead needle needlefish nice nimbleness omen optical hole pierce (to -) pleasant pleasing pleasurable rainfall rough sharp shrewdness sleet sour sparkling water stamina steeple stylus surveyor swather thank (to -) thankful thankfulness unperforated needle water choke (to -) deepen (to -) drown (to -) forked godson hanging now save (to -) saving savings (plural) stifle (to -) stifling there aerate (to -) . powered accommodation achieve (to -) admiral admiralty aileron Alabama alarm alarmed alarming alarmist Alaska Albania Albanian albino albumin alchemist alcohol alcoholic alcoholism alcove aldehyde ale alert alert Alexander the Great alfalfa alga algebraic ALGOL (abbr. for algorithmic language) algorithm alias alienable .air airbag airy detached insulate (to -) insulating insulation insulator irate isolate (to -) isolation isolationism seclusion adjust (to -) adjuster adjustment anklet calibrate (to -) checkered chess curve fitting fit (to -) fitting garlic resolution setting size (to -) tight AC . alienate (to -) alienation alignment aliment alimentary alimentary alkalinity Allah allay (to -) allegation allege (to -) alleged allegoric allegorical allegory allegro allergen allergic allergy alleviate (to -) alleviation alliance allied alliteration alliterative allocation alloy allude (to -) allusion allusive alluvium ally almanac almond Almoravid aloofness alpaca alpha alphabet alphabetic alphabetical alphabetize (to -) alpine Alps Alsace altar alter (to -) alteration altercation alternate (to -) alternate alternate alternating alternation alternative alternative altitude altruism altruist altruistic . alum alumina aluminum alumnus anybody anyone apparently apricot around artichoke aside assuage (to -) at random backwards bailiff baked barbed wire bathrobe battery powered battlement beacon beans (plural) bedroom beside blithe brawler bricklayer bronze bream buckwheat bulk storage calendar camphor caraway carpet carpet shell carpeting cash ceasefire ceramist cheer cheerful cheerfully cheerfulness clam clamp commendation conscript (to -) conscription constable coping corrupted cotton culvert cut-sheet feeder data encryption standard dawn daybreak DES (abbr. for data encryption standard) Dinaric Alps earthenware . eaves elk elongate (to -) elongation encourage (to -) encouraging enlist (to -) enlistment enroll (to -) ever exhilarate (to -) exhilaration feed (to -) feeding fibrous pad fin finally flap flipper flush right form feed fuss gaiety garble gay German Germany gilt sardine glad gladden (to -) gladly gladness glee gleeful golden carpet shell clam almeja margarita grader grooved carpet shell clam almeja fina haggle hallelujah hallucinate (to -) hallucination hamlet happy hassock haycock hayrick haystack hearten (to -) height henna hi-fi high high resolution high resolution high resolution high-fidelity highness hilarious hodgepodge host (to -) . housing hubbub instantly jabber jollity joy joyful kelp knocker larch larger spotted dogfish lark laud (to -) left-wing lengthen (to -) lesser spotted dogfish lift (to -) lighten (to -) literacy lodging loftiness lofty loudspeaker lumberyard lunch (to -) lunch luncheon lupin mall mason masonry merriment merry minaret mirth moose mountaineering musk musky nourish (to -) nourishment nurture nutriment oil mill outdoor overjoyed pad pander pillow pimp pin play (to -) pliers potter pottery pound (#) power (to -) praise procurer pull tractor . push tractor ramdomly rampage random randomly range razorbill reach (to -) rejoice (to -) relief rent (to -) rent repository rick rioter riotous rug rumpus scope seabird seaweed senior officer sewage sheriff shrike slick (to -) smooth (to -) smooth venus smoothing some somebody someday someone something sometime soothe (to -) sorrel soul Spanish bream speaker spirits starch starchy stature stockable stop storage store (to -) store and forward (to -) storehouse storeroom stowage stretch (to -) student surroundings swapping tall tar tarpaulin tarpaulin . tenancy there thither tiled tuck unburden (to -) unselfish uproar upside-down white tuna white tunny-fish wing wire wiring yellow clam addition admonish (to -) admonishment admonition aegis AM (abbr. for amplitude modulation) amalgam amalgamate amalgamation amass amatory ambidextrous ambient ambiguity ambiguous ambition ambitious amble ambrosia ambulance ambulant ameba amen amenity America American Americanism Americanize amiability amiable amicability amicable amicably amity ammonia ammonium amnesia amnesty amniocentesis amoeba amoral amorous amorphous amortization amortize . amour amp amperage ampere ample amplification amplify (to -) amplitude amply ampoule amputate (to -) amputation Amsterdam amulet amygdala antrograde amnesia aspiring bitter bitterly bitterness bladder blister bombastic both broad broadly charm comprehensive convivial crony cruet cushion (to -) darling deaden (to -) dearly embitter (to -) enlarge (to -) enlargement enlarger environment environmentalism extend (to -) extended filling friend friendliness friendly friendship furnish (to -) gag (to -) horsewoman housekeeper housewife kind kindly kindness knead (to -) likable likeable love . love lovely lover loving lowering magnifier mannerism marbled master menace mooring mutineer nice niceness poppy retrogade amnesia rue strafe (to -) suckle threat threaten (to -) threatening tonsil tonsillitis tonsils walled yellow A/D (abbr. for analog to digital) abnormal abnormality abnormally advertise (to -) advertisement advertiser aerial aforementioned aforesaid agog alumna (US) alumnae (US) amphibian amphibious amphitheater anachronism anachronistic anaconda anaemia (UK) anaemic (UK) anaesthesia (UK) anaesthetic (UK) anagram anal analgesia analgesic analitical analogical analogous analogue analogy analysis . analyst analytic analytical analyze anarchical anarchism anarchist anarchy anathema anatomical anatomist anatomy ancestor ancestral anchor anchor anchorage anchorite anchovy ancient Andalucia Andalucian Andorra androgens androgynous anecdotal anecdote anemia (US) anemic (US) anemometer anemone aneroid anesthesia anesthetic angelic angelical angina angina pectoris angled Anglican Anglicanism Anglo-Saxon angora anguish anguished angular angularity aniline animal animate (to -) animated animation animism animist animosity anion anise aniseed anisette annalist . annals Anne Boleyn annelid annex annexation annihilate (to -) annihilation anniversary announce (to -) announcement announcer annual annual annually annuity annul (to -) annullable annulment anomalous anomaly anonymous anorexia antagonism antagonist antagonistic Antarctic Antarctic antecedent antechamber antediluvian antelope antenna anterior anteroom anthology anthology anthracite anthracoid anthropocentric anthropoid anthropological anthropologist anthropology anthropomorphic anthropomorphism anthropophagous anti virus anti-inflamatory antiaircraft antiallergic antiasthmatic antibacterial antibiotic antibodies Antichrist anticipate anticipation anticlerical anticlimax anticoagulant . antidepressant antidote antiinflammatory antilogarithm antimony antinuclear antipathy antipode antiquarian antiquary antiquated antique antiquity antiseptic antisocial antithesis antitoxin antonym anxiolytic anxious baby elver background bandwidth before bier biochemical analysis blood analysis blood count blue fish blueprint bracket breadth broad broken-hearted brood of eels buckskin cache (memory) cancel (to -) canceled cashew cheer (to -) computer animation contraception contraceptive croup dock doeskin eager earlier eel elver embolden (to -) encourage (to -) entertainer feeler fishhook forbear forearm forebears (plural) forefather . foregoing forestall (to -) former formerly frog's legs gosling hanker (to -) hankering heartbreak hook host illiteracy illiterate jam-free jubilee kink knot (to -) ledge lobby logged longing longstanding mallard nameless narrow nestle (to -) network analysis nightfall notation notice nullification nullify (to -) obverse old old-fashioned opponent out-of-date overgrown painkiller perk up (to -) pet phobic anxiety previous prior publicize (to -) record (to -) record register (to -) renal failure ring rump runner scaffold scaffolding seniority sidle (to -) slouch (to -) small elver stiffen (to -) suede . for A Programming Language) aplomb apocryphal apogee apologetic apologetically apologist apophysis apoplectic apoplexy apostasy apostate apostatize apostle apostolic apostrophe apostrophe apostrophize apotheosis .swath tattered thoroughbred Token Ring torch uneconomic ungrammatical usable width void walk wide width width worried yearbook yearly yearn (to -) yearning zestful addendum affix append (to -) bluing (US) next year year aorta abscess acme adjournment adjustable support aim (to -) aloof ante apart apartheid apartment apathetic apathy Apennines aperitif API (abbr. for application program interface) APL (abbr. apparatus apparition appeal appear (to -) appearance appease (to -) appeasement appeaser appendectomy appendicitis appendix appetite appetizer appetizing applaud (to -) applause applet applet appliance applicable application applied apply (to -) apposite apposition appraisal appreciable appreciate (to -) appreciation appreciative apprehend (to -) apprehension apprehension apprehensive apprehensive apprentice apprenticeship approach (to -) approach approbation appropriate appropriation approval approve (to -) approved approximate approximately approximation apt aptitude aptness automatic shutdown backing barely batter bet blood pressure control unit blood pressure monitor buffet capability . for computer-based learning) celery close computer based learning computer-based learning cram crusher crushing customer support digestive system dismount (to -) dun (to -) fear fearful fitness flat flatten (to -) gentleness grief-stricken handle handshake hardly hasten (to -) hasty last name learn (to -) learning listless look and feel nickname occurrence off off overview overwhelming palm rest parking pass (to -) passionate pinch postpone (to -) postponement power off procrastinate (to -) profitable prompt (to -) proxy qualification quench (to -) respiratory tract rigging screening seemingly shut down (to -) shutdown sideboard slanted smashing smelly .captor CBL (abbr. spinal apophysis squash (to -) squeamish squeeze stab (to -) stack (to -) stacking strait subsidence supply support (to -) support surname tackle tamp (to -) tight tighten (to -) tract trainee transverse apophysis underpin (to -) validation wager worrier xiphoid appendix aquiline here herein hither those yonder ablaze above adventurously afire aloft arabesque Arabia Arabic arachnid Aragon arbitrage arbitrary arbitrate (to -) arbitration arboreal arboriculture arc arcade arch archaeological archaeology archaic archaism archangel archbishop archdiocese arched archer archetype . archipelago architect architectural architecture archive (to -) archive archivist ardent ardor arduous arena Argentina Argentine (the -) Argentine argon argument argumentative aria aridity Aries aristocracy aristocrat aristocratic Aristotle arithmetic arithmetics Arizona ark Arkansas armada armadillo armament armature Armenia armistice armor armory aroma aromatic arrange (to -) arrangement array arrest arrogance arrogant arrythmias arsenal arsenic art arterial arteriosclerosis arteriosclerosis artery arthritic arthropod arthrosis article articulate (to -) articulate articulation . artifact artifice artificial artificially artillery artilleryman artisan artist artistic artistically assuming at (@) Attached Resource Computer Network attune bandy bedstead boot (to -) boot bow brook bunker burlap burning bush cabinet cable harness cannoneer carry over casket chancy chandelier chest chipmunk clay clayey closet cocky coiled commodity contraption coo corrugation craftsman craftsmanship cranberry crawl (to -) creep (to -) crinkle crumple (to -) cupboard dash dental arcade designing dig up (to -) disgorge (to -) drag & drop (to -) drag (to -) drag and drop (to -) drawn eject (to -) . engine enrapture (to -) ermine extort (to -) fiery file (to -) file file firearm fix (to -) framework gadget gaff gargantuan kludge gopher gravel grit gritty gun gunner gunnery gunsmith handicraft harangue (to -) Harlequin harmonic harmonica harmonious harmonium harmonize harmony harness harness harp harpist harpoon harpy haul (to -) hazardous herring hoop item jay jeopardize (to -) joint (to -) joint jointed kneel (to -) lease lease leasing lessee ling loamy lullaby man-made media art media art Mediterranean ling ordnance . for system network architecture) snatch spider spotted weaver squirrel start (to -) start-stop start-up (to -) start-up stoat storage archive stream supercilious switch on (to -) tenant .outburst overtone plot plough plow pucker (to -) pusher quicksand rainbow rapturous raze records (plural) red gurnard reef remorseful rental renter repent (to -) repentance repentant rice rill ringlet risky rooted ruination rumple ruse sacking sand (color) sandy sapling scuff (to -) seedling setup shared file shelve (to -) shipbuilder showman shrew shrivel (to -) shrub shrubbery signature file sild SNA (abbr. thespian tinker (to -) top (on -) up upstairs virtual art vocalize (to -) weapon weaponry weaver wrest wrest wrinkle wrinkled abruptness accession ace acknowledge (to -) acknowledgment acquiesce (to -) acquiescence adviser advisor affair afraid allocate (to -) allocation amaze (to -) amazed amazement amazing asbestos ascend (to -) ascendancy ascendant ascenders ascending ascension ascent ascetic asceticism ASCII (abbr. for American Standard Code for Information Interchange) asepsis aseptic asexual Asia Asian Asiatic aspect asperity aspersion asphalt asphyxia asphyxiate (to -) asphyxiation aspirant aspirate (to -) aspiration aspirator aspire (to -) . for asynchronous) attacker attainable attend (to -) attendance .aspirin ass assail (to -) assassin assassinate (to -) assassination assault assembly assemblyman assent assertion assertive asseverate (to -) asseveration assiduity assiduous assiduously assign (to -) assignable assignation assimilate (to -) assimilation assist (to -) associated association assonance assume (to -) assumption assure asterisk asteroid asthma asthmatic astigmatic astigmatism astonish (to -) astonishing astonishment astound astounding astragalus astrakhan astral astrologer astrological astrology astronaut astronomer astronomical astronomy astrophysics astute asylum asymmetric asymmetry async (abbr. backseat bash (to -) beset broil (to -) carrying handle category assignment challenger charwoman chip (to -) chip convocation crafty cutthroat donkey eerie elevator ember ensure (to -) flabbergast (to -) formatting foxiness frighten (to -) guile handhold handle harshness haven hireling horned insure (to -) insured insurer jackass jumpy killer lift liken (to -) loophole map (to -) misstatement mugging murder (to -) murder murderer murderess murderous nastiness neat neatly onslaught pillion pole promote (to -) relief roast roaster routing salaried sawmill sawyer . for asynchronous transfer mode) atmosphere atmospheric atoll atomic atomize (to -) atonal atony atrium atrocious atrocity atrophy atropine attach (to -) attack (to -) attention attentive attentively attenuate (to -) attenuation attest (to -) attestation attire attract (to -) attraction attractive .scare (to -) scared scary seat seating secured shiftiness shipyard slaughterer so spit splinter subject suction apparatus suffocate (to -) suitor thus toilets topic upload apparel arrear ascribe (to -) ascription assailant atheism atheist Athenian Athens athlete athletic athletics Atlantic (Ocean) atlas ATM (abbr. attractiveness attributable attribute (to -) attribute attribution attributive atypical back backwardness behind behindhand bond (to -) bottleneck bout caution coffin courteous crowded cutoff daredevil daring dimmed distraught engaging entrap (to -) entrench (to -) entrenchment extenuate (to -) extenuating fastening fetching file attribute fit getup godless harass (to -) harebrained heed heedful hoarder holdup hysterics ictus epilepticus impudent jam jam in paper feed lag (to -) lectern madcap mindful mollify (to -) moron observant onset override past due peek (to -) pert recklessness regardful . retarded scatter-brained stoke (to -) stuck (to -) stun (to -) stunt (to -) tantalize (to -) terrify (to -) terrify (to -) terrorize (to -) terrorize (to -) terrorized testify thoughtful thunderstruck tie (to -) tormented trapped tuna tunny tunny fish venturesome vouch (to -) watchtower absence absent absentee accrue (to -) albeit although ancillary atrium audacious audacity audible audio teleconferencing audiovisual audition auditorium auditory augment (to -) augmentation augur august aural aurora auscultation auspice austere austerity Australia Australian Austria Austrian authentic authenticate (to -) authentication authenticity author authoritarian . authority authorization auto autocode autodecrementing autoincrementing automation automatism autonomic auxiliary boldly boot (to -) boot bus car charioteer classroom data highway earphone empower (to -) genuineness grim headphone headset helper hitch-hiking hitchhiker howl (to -) howl howler increase increase increase speed (to -) information superhighway licensed licensing motorcar motorist motorway omnibus parkway permission raise self-checking self-determination self-government self-service speedway though tryout turnpike abashed abbash (to -) advanced adventure adventurer adventuress adventurous aeroplane (UK) aircraft . a machine) breakdown cantankerous caution cupidity disgust distaste eagerness embarrass (to -) enliven (to -) excel (to -) filbert flier flyer forward fowl grasping hazel headway hornet jet miser miserly notice oat oatmeal ostrich out of service plane shamefaced sophisticated system breakdown venture victual (to -) vinegary warning wasp armpit axis adjutant aid aide alas assist (to -) assistance assistant copulation fasting help (to -) help online help yesterday air stewardess Azerbaijan .airliner airman airplane (US) ashamed avalanche avenue break down (to -. Aztec blue bluebird bluish chance flog (to -) hoe hook lily navy blue (color) scourge (to -) spade stewardess sugar sugary sulfur thrash (to -) windswept acrophobia analitical balance auger baccarat bachelor bacilli bacillus bacteria bacteriologist bacteriology bacterium balcony bale ballad ballerina ballet ballistic ballistics balmy baluster balustrade bamboo bandit banjo bank banker banking banquet baptism baptismal Baptist baptize barbarism barbecue barbel barber barbiturate barge baritone barium barometer barometric . baron baroness barony baroque barrage barrel barricade barrier basalt basaltic base based baseness basilica basilisk basis basketball bass (singer) bassoon bastard bastion bat bath bath bathe (to -) bather bathing bathtub batiste baton batsman battalion battery battle baud Bavaria bayonet bazaar beard bearded beater belly bench bench benign berry bevy bib binary base binary base bleat blood bank blue whiting boat boatman braggart brigandage bullet bulwark cambric . for management information base) moronic mud neighborhood outlaw paunch .cane cannonball catfish cheap cheaply cheapness chin christened coaster cod codfish codling connecting rod connecting shaft couch's whiting crab pincers cringing dance (to -) dance dancer dangle (to -) decrease volume (to -) distributed database download (to -) download drill drivel economical enough ensign external database fallow fallow field false albacore flag flock garbage germ germicide gully handrail hereunder highwayman ice-cream cone inexpensive jigger junk litter little tuna little tunny loaf low Lower Saxony mackerel tuna MIB (abbr. pew pew plenty pool poutassou punt rack raft rail railing rampart ramrod ravine reasonably rod rubbish sailboat salver sandbank scale scavenger school of fish scrollbar shaft sheepskin ship shoal shoulder strap shuffle (to -) slash slash slimy slobber sloop slug slum smock spleen splutter stick suffice (to -) sweep (to -) sweeper sweeping swing (to -) swinging teeter thonine tollgate trash tray tread tub turn down (to -) under underfoot underhand varnish varnishing waffle . warship waste land whale whaler whisk windward yam BBS (abbr. for bulletin board system) acorn babe baby bacon beast beastly beatification beatify (to -) beautiful beautifully beauty Belgian Belgrade Belize bellicose belligerence belligerent belligerently benediction benefaction beneficence beneficent beneficial benefit benevolence benevolent benevolently benign benignity benzene benzine Berlin Bern beryl Bessarabia bestial bestiality beverage bless (to -) blessed blessedness blessing bliss boon brig cockle common bream common cockle common prawn drink (to -) drink (to -) drinker . drinking drunk eggplant flare flat guzzler hallowed kiss (to -) kiss liana militancy nightshade proceeds (plural) profit pugnacious quaff (to) roach russet scholarship shoeshine (US) vermilion warring aright banknote beefsteak Belorussia benefactor benefactress bi-directional Bible bibliographical bibliography bicameral bicarbonate bicentennial bicycle bidet bidirectional biennial bifocal bifurcate bifurcation bigamy bijouterie bike bilateral bile bilingual bilious bill billet billfold billiard billiards bimetallic bimonthly (every two months) bimonthly (twice a month) binary binomial biochemistry . biodegradable biofeedback biographer biographical biography biologic biological biologically biologist biology biophysics biopsy biotechnical biplane biscuit bisect (to -) bisexual bismuth bison bistable bistoury bivouac bladder knife BPS (bits per second) brachial biceps branch (to -) branch (to -) branching bug Burma Burmese Byelorussia Byzanz canister consumer goods cross-eyed diverge (to -) encore fine fork gall goods greenback hinge hodgepodge librarian library logical branching moustache mustache okay pleural biopsy pulmonary biopsy real state realty scalpel scone shapely steak surgical knife . for capitals lock) chalky conduction block cynosure deadlock line art locking mushy notepad shield shielded sketchbook soft target white whiten (to -) whiting bmp (abbr.ticket trillion vermin welfare well well-being well-done whelk armored blanch (to -) bland blaspheme blasphemer blasphemous blasphemy bleach (to -) blister pack block blockade blockhouse blouse caps lock (abbr. for bitmap) anchovy ankle boot Atlantic bonito backwoods bag beautiful bellboy beret blackball blot blur boa bogue Bohemia Bohemian bolero bolero jacket Bolivia Bolivian bomb bombard . bombardier bombardment bomber bombshell bonbon bonito boot booty booze border Bosnia Boston botanical botanist botany bottle bottle rack botulism boutique bovine bowler hat boxer boycott boycotted breast pocket bridal brim brink bulb bulletin bun buoy button cellar centrifugal pump climbing shoes coil constrictor cud curb cusk (USA) deface (to -) delete (to -) deleted dinghy drunk drunkard edge efface (to -) embroider (to -) embroidery erase (to -) European lobster file deletion firefighter fireman food poisoning forest gape gasp . goiter goodness green wrasse grey gurnard grove gunwale gurgle gusty head cellarman herbalist hoax hydrant intoxicated kind kind-hearted kindliness kindness lifeboat lightbulb lobster logic bomb loot manhole mouth mouthful mouthpiece newsletter newsletter nice ninny nipper nozzle obliterate (to -) outline ox-eye pocket pocketful pouch pretty prone puff pump reel remove (to -) roll rough lay-out rowboat rummy sandwich sea-bream seethe sketch smack snack snowball spool (to -) spool spooler spurt squally . for bits per pixel) bps (abbr.straight boot sultriness sultry tassel ticket toot tooth-root elevator tuna turbo button verge vogue wedding wood woodland yawn (to -) yawn yawning bpp (abbr. for bits per second) abruptly agleam arm armful armlet barque bellow bloomer bluntly bluntness bracelet braise (to -) Brandenburg Bratislava Brazil Brazilian breach bream breaststroke breeze Bremen brevity bridle briefly briefness brigade brightness brilliance briquette Britain British Brittany broach brocade broccoli bromide bronchitis bronchography bronchopneumonia bronchoscope bronchoscophy . bronchoscopy bronchus bronze brooch brucellosis brush brusque brusquely Brussels brutal brutality brute brutish bud chronic bronchitis clasp dietitian farmworker fastener fathom foggy forkbeard gambol gap glaring glimmer (to -) glint glossy greater forkbeard hag heath hellcat hoax hop jest jester joke knave knavery larger forkbeard lesser forkbeard mettlesome minx mist moonfish outbreak pleasantry rascal red bream roughly scoundrel shine (to -) shine shining shiny shortly simple bronchitis skewer Spanish bream sprout . suntan tan teaser toast torsk tusk twine underpants villain witch witchcraft apple murex asinine banter boisterous boomerang boulevard bourgeois bourgeoisie bowline (knot) brothel bubble bubbly bubo bubo bubo bubonic buccal buccaneer Bucharest bucolic Budapest Buddhism Buddhist buffalo buffer buffoon bulbous Bulgaria bulge bulk bulldog bullock bundle bungalow bureaucracy bureaucrat bureaucratic burette (UK) Burgundy burlesque bust bustle buzzard deride (to -) dive (to -) diver donkey doughnut edible crab . farcical find next (to -) fritter gentility gibe good good afternoon good evening good evening good luck good morning goodnight goodnight goodwill jeer kilter letterbox lightship look for (to -) loop mailbox merchantman mock (to -) mockery muffler nested loops (plural) node overalls oxen pager plunger postbox postbox prospector pudding scarf search (to -) search engine seek (to -) seeker sneering steamboat steamship swag vulture whorehouse willingness byte (by eight) ability able acetabulum cavity airfield alley alligator almost amount apiece auburn babysitter backbone (cable) . backlog bald baldness bale loader bankbook barmaid barman barroom bartender base camp bask basket battering battlefield battleground bay be quiet (to -) beaver becalm (to -) bed bedpan beef belfry bell big red shrimp billboard bin binder bobbin bolster bomber jacket bone stem boulder box bream breeches breed bridgehead briefcase broth bruise bucket buggy burden bush jacket butcher butchery byway cabalistic cabana cabaret cabin cabin cabin cable cacao cache (memory) cackerel cackle cacophony . cactus CAD (abbr. for computer aided design) cadaver cadaverous caddie cadence cadet cadmium caducity CAE (abbr. for computer aided manufacturing) Cambodia camel . for computer aided engineering) cafe cafe cafeteria caffeine caiman caisson calamary calamitous calamity calcaneus calcareous calcification calcified calcify calcify calcination calcined calcium calculable calculate (to -) caldron calendar caliber calibrate (to -) calibrated calibration calico California Californian caliph calisthenics calk (to -) calligrapher calligraphy callous callus calm calmative calmly calmness caloric caloric calorie calorimeter calumniate (to -) calumny Calvary CAM (abbr. camellia cameo cameraman camouflage camp campaign camper campus Canada Canadian canal canalization canalize (to -) canary canasta cancel (to -) cancerous candelabrum candidacy candidate candidature candidness candleholder candlestick candor candy canine cannibal cannibalism cannon cannonade canoe canon canonical canonization canonize (to -) cant canteen cantina canyon capability capable capacitate (to -) capacity cape capelan capelin caper capilary blood vessel capillary capital capital capitalism capitalist capitalization capitalize Capitol capitulate (to -) capitulation caplin . data) caramel caramelize (to -) caravan caravel carbide carbine carbohydrate carbon carbon carbonaceous carbonate carbonic carbuncle carburetor carcass carcinogen carcinogenic carcinogenic carcinoma cardia cardiac cardiac cardinal cardiogram cardiologist cardiology cardiovascular cardioversion caress cargo Caribbean caribou caricature caricaturist caries carillon carload Carlovingian carnage carnal carnival carnivore carnivorous carol Carolingian .capon caprice capricious capriciously Capricorn capstan captain captaincy captious captivate (to -) captivating captive captivity capture (to -) capture (to -. an idea. carom carotid carp carpenter carpentry carpus carriage carrion cart cart cartel carter Cartesian cartilage cartload cartographer cartographic cartography cartomancy carton cartoon cartoonist cartridge cascade case caseation caseous cashier cashmere cashmere casino cask casserole cassette castanet castanets (plural) caste castigate (to -) castigation Castile Castilian castle castrate (to -) castrated castration casual casualness cataclysm catacomb Catalan catalepsy cataleptic catalog (to -) catalog catalogue (to -) catalogue Catalonia catalysis catalyst catalyze (to -) . catapult cataract catarrh catarrh catastrophe catastrophic catatonic catechism catechist catechize (to -) categoric categorical categorically categorize (to -) category catharsis cathartic cathedral Catherine of Aragon catheter Catholic Catholicism catkin Caucasian caudal cauldron caulk (to -) causal causation cause causeway cauterize cautery cautious cautiously cautiousness cavalcade cavalier cavalry cavern cavernous caviar cavity cavity cellarman chain chalky chambermaid chameleon champion championship chancellery chancellor change (to -) change change to (to -) changeable channel channel chanson . chant chanteuse chantry chaos chaotic chapel chaperon chaplain chaplaincy chapter character characteristic characterization characterize (to -) characters per inch charcoal charcoal charge (to -) charge chariot charisma charismatic charitable charitableness charitably charity Charlemagne charred chaser chaste chasten chastise (to -) chastisement (to -) chastity chateau cheesy chemise chestnut chieftain chime chivalrous chivalry chock chuck chute cinder cinnamon clear soup cloak coal coal fish coating coaxial cable cockatoo cockpit cocoa cocoon coffee coffeepot coley . common carp common prawn common shore crab compositor composure computable compute (to -) comrade comradeship condominium conduit cope corpse cottage cotyloid cavity country folk countryside cowl crab cramp crash crate crayfish crimson crockery croon (to -) crossbreed crotchet crotchety cub dale dandruff data throughput dearth decalcomania delve (to -) dipper dogfish download DQ (abbr. for draft quality) draft quality drawer dray driving license duct dugout easel edging emasculate (to -) encampment endearing English Channel esophagic carcinoma every expensive expire (to -) expired face fairway fall (to -) . falling farm track farmer farmland feature field field flake flesh fleshy flighty flower bud folder font cartridge footwear forecastle foreman fourteen fowling fraught freakish freight freighter fuggy gauge (to -) gelding gentleman gentlemanly gig gingerly glen go-cart goat goatherd goldfish golfcourse golly gourd green green shore crab gridiron (US) gristle gristly grizzled guesthouse gunboat gutter halter handbell handcart haphazard hardwired haunch head headboard headrest headstrong heat (to -) heat heater . heating helmet highway hip hoary homemade hood hoof horse horseflesh horsepower horsy hosier hosiery hot hot hotly hourly house household householder hovel hulk humerous head hunt (to -) hunter hunting huntsman huss impasse jailer joiner kaleidoscope kaleidoscopic kangaroo kaolin kapok ketchup king crab knight knighthood knightly lack (to -) lack landlady landlord large-eyed dente layer leather carp letter quality letup lien limestone limey line load load (to -) load loaded loading locker . for near letter quality) nominee number cruncher number crunching nutcracker offal outfield overheat (to -) overload overseer overtire padlock pageant pallet pan passbook path pawnshop peacefulness peanut peasant peasantry penalize (to -) periwinkle personality picarel pill-box hat pinhead pipe placard . for letter quality) lull lumber jacket mackerel mailman mainspring mapping maroon married marry (to -) matchbox maximum capacity maximum quantity meat meaty menu midsummer mincemeat minefield mirror carp miscalculate (to -) mustang mutton near letter quality nearly nightgown nightshirt nightwear NLQ (abbr.lodge lorry LQ (abbr. poach pocketbook pollock (USA) poor cod pork portfolio poster postman prance pricey professor promfet pumpkin (color) punish (to -) punishment pup puppy purse pushcart qty (abbr. for quantity) qualification qualifier qualify qualifying quality quantity quarry quicklime quietly quiver rabble racing ram rate red sea scorpion redeem (to -) redemption reed renaming requiem shark rigg road road roadway rowdy rubber rubberize (to -) rubble saithe sake saucepan sawbuck sawhorse sconce scurry sea-bream second channel secondary channel secretive sedative . seizure settee shakedown shanty shielding layer shift (to -) shirt shoehorn sing (to -) singer singer skipper slander slanderous slot (table -) smare snail snooze sock song songstress songstress spay specifications (pl) spinous murex squash squid stand stateroom static electricity charge steeplechase stomach cramp street strenuous stretcher strongbox stub swap swapping swelter sweltering switch to (to -) switchback system cache T-shirt tabard taster teller thingamajigs thistle thoroughgoing tired tiresome tiring to canonize (to -) toggle tool box toolbox toothed bream tope . for compact disk) ale ash ashen ashtray ashy bait barley basket basket beer beeswax blindness brain brewer brewery bristle bristly brush .toss-up tournament trampoline trance tripe Trojan horse truck trudge tumble twisted pair cable underpin (to -) undershirt upload (to -) upload vertebral duct void vole wagon waiter waitress wallet warily warm warmth wary waterbed waterfall waterfall wayfarer weariness weary wed (to -) wed (to -) wheel godet wheelbarrow whelk whenever whimsical wine tasting wine vault wineglass CD (abbr. for Conseil Europeen pour la Recherche Nucleaire) certainty certifiable certificate certificated certification certified certifier certify certitude .cease (to -) cease cedar cedarwood cede (to -) celebrate (to -) celebration celebrity celerity celestial celiac celibacy cell cellophane cellular cellulitis celluloid cellulose cement cemetery censor censored censorship censure (to -) census centaur centenarian centenary centennial center (to -) center centered centerpiece centigrade centimeter central centralize (to -) centrifugal centrifuge (to -) centurion cephalic ceramic ceramic ceramics cereal cerebellum cerebral ceremonial ceremonious ceremony CERN (abbr. cervical cervix cesarian cesium cessation cession chandler cherry chive churchyard cipher clannish clinging close (to -) close closed condemnable core cull dine (to -) dinner downtown drive lock electronic mall encircle (to -) encirclement enclosure eyebrow fawn fence frown grain graveyard hairbrush halfback hamper hawking heavenly hog hover (to -) hundredth jangle jealous jealousy lattice lisp live bait lock lock locksmith mastermind match midst midstream naught near nearby NIC (abbr. for Network Information Center) onion outskirts . for private automatic branch exchange) PBX pig pork primer reassurance relent (to -) retrench (to -) rye Sardinia scepter scowl sea-spider sentinel sentry sequin shut (to -) shut down (to -) sieve sift (to -) sifter (to -) sludgy sow spider crab spinous crab spiny crab sup (to -) supper swine switchboard toothbrush twinkle (to -) wax zeal zealot zealous zebra zenith zero CGI (abbr.PABX (abbr. for common gateway interface) amateurish babble backgammon bauble bedbug blab (to -) black goby black sea-bream blackmail blackmailer blazer boy bump bungle bungler cantor cardigan chalet chalet chamberlain . champagne champagne chancre chancroid charade charlatan chassis chat (to -) chat chatter chauffeur chauffeur chauvinism chauvinist Chechen Chechenia check checkbook cheque Chicago Chicano chicle Chile Chilean chili chimney chimp chimpanzee China Chinaman chinchilla Chinese chitchat chocolate clapboard clipper chip coat collide (to -) cotter cranky crash (to -) crash cutlet Czech Czechoslovakia dotage dote downfall driver fluke fumble (to -) funny gabble gibber gibberish girl goodies (plural) groundnut grouper gush . hut impinge (to -) jackal jacket joke littleneck lollipop mob mountebank nonnat nuts old wife parsnip plated puddle quackery quilted waistcoat racketeer racy rattle real time chat reefer sandblast sauerkraut scallion scapegoat scintillate (to -) scream (to -) screech sea-perch sear (to -) shack shallot shampoo shawl shilling shocking shriek shrill shrilly singe snap sneak spark sparkle sparkling spate spiv squeal squirt sting-ray stone bass suck (to -) swash sweat shirt sweat suit talebearer talk tattle tattletale . tawdry thumbtack tracksuit transparent goby tyke veneer vest villa waistcoat wisecrack wreck wreck fish appointment belt bicyclist blind blindly blood circulation buck centipede certain certainly chip chisel ( to -) chisel cicada cicatrization cigar cigar cigarette ciliary cinch cinema cinematic cinematography cineraria circuitry circulate (to -) circulating circulation circulatory circumcise (to -) circumcision circumference circumflex circumlocution circumscribe (to -) circumscription circumspect circumspection circumstance circumstantial circumstantially circus cirrhosis cistern cistitis citadel citation cite (to -) . for cybernetic organism) cyclamate cycle cycling cyclist cyclone cyclotron cylindrical cynicism cynophobia cypress cystitis cystography cytoplasm date decimal places deer delay circuit digit Dublin bay Dublin bay prawn encoded encryption feedback circuit fifty five girth group appointment headband healing heaven hundred IC (integrated circuit) kinetic kinetics lockout movie theater movies net runner netizen netizen Norway lobster pelvic waist plum (color) .citizen citizenship city civil civilization civilize (to -) civilized closing cob convolution coriander crank crypt (to -) cyanide cybernetics cyberspace cyborg (abbr. prawn prune PVC (abbr. for permanent virtual circuit) quagmire quotation quote red band fish rendezvous ribbon scampy scar schism schismatic sciatica science scientific scientist scimitar shutdown sightless silt sky stork subpoena summit summon surely surgeon surgery surround (to -) surrounding swan tab tape top town undoubted Vatican City virtual circuit waist waistband waistline weed welt apparent brooder bugle bugler chlorate chloride chlorine chloroform chlorophyll churchman clairvoyance clairvoyant clamor clamorous clan clandestine . clandestinely claque claret clarification clarify (to -) clarinet clarinetist clarity class classic classical classicism classicist classifiable classification classify (to -) claudication clause claustrophobia claustrophobic clave clavicle clearly clearness clearsighted clef clemency clement clergy clergyman cleric clerical clericalism cliche cliché click (to -) click clientele climate climatic climax clinic clinical clone clone clonic clove cluck coaching collarbone context clause customer dowel downright glade harpsichord key keystone kleptomania kleptomaniac . for attachment unit interface) authoritative authoritatively . for Coalition for Networked Information) abetment abridge (to -) access control according accountancy accountant accounting acknowledge (to -) acquaintance acquaintances acquiescent advanced program-to-program communications advice advisement adviser affecting affiance aftermath against agreeable agreement air-conditioned airmail alibi allowance alto analog voltage comparator annotate (to -) annotation annotator apiary APPC (abbr.middle-class moonshine of course ordering outspoken peg ranking reverend sewer skylight sort (to -) sort sorter tabulate (to -) thin (to -) triage unclouded CNI (abbr. for advanced program-to-program communications) applesauce approvingly as assemble (to -) assembly assurance attachment unit interface AUI (abbr. avow (to -) back-up back-up backbone backup file baffle bafflement barnyard basic skills bass (instrument) bche de mer beaker bedfellow bedspread bedspread beehive befit (to -) befitting beginning behave (to -) behavior bile duct bile duct abscess bind (to -) blackout blueprint boathouse boatswain bob bodice bodily bogeyman bookie bookkeeper bookkeeping bootlace bootleg (to -) boundary brand-new brandy bribery bridged broadside brokenly broker brokerage buddy buffer pool build (to -) builder bullfight bunny burly butte buttress buy (to -) buyer bèche de mer cabbage caliper . for compression and decompression) coded codeine coder codicil codification codify (to -) . for chief executive officer) chancel charger chat (to -) chat check (to -) checkup chef chilelithiasis choir cholecystitis choleric cholesterol cholesterol chop choral chord choreographer choreography chorister chorus chum classmate clotting coach coachman coagulant coagulate coagulation coast coastal cobalt cobra cocaine coccigeal coccyx cochineal cocktail coconut coddle (to -) codec (abbr.camaraderie camber candied candy (to -) Cantabrian Mountains capacitor car caretaker carouse (to -) caseous catch (to -) catching cauliflower CEO (abbr. coeducation coefficient coerce (to -) coercion coercive Coeur de Lion (Richard -) coexist (to -) coexistence cognition cognitive cognitive cognizance cohabit (to -) coherence coherent cohesion cohesive cohort coincide (to -) coincidence coincident coincidental coition coitus coke cola colander cold (a -) colitis collaborate (to -) collaboration collaborator collapse collation colleague collect (to -) collecting collection collective collectively collectivism collectivize (to -) collector collegiate collision collocate (to -) collocation colloid colloquy collusion collyrium Cologne Colombia Colombian colon colonel colonial colonialism colonialist colonist . colonize (to -) colonizer colonnade colony color Colorado coloration colored colossal colour (UK) Columbia Columbus (Cristopher -) column coma comatose combat combatant combative combination combine (to -) combine harvester combustibility combustible combustion comedy comet comfort commandant commander commando commemorate (to -) commemoration commemorative commence (to -) commencement commensal commensurable commensurate comment (to -) comment commentary commentator commerce commercial commercialism commercialize (to -) commercially commiserate (to -) commiseration commissary commission commissioned commissioner commit (to -) commitment committal committee commodious commodore common . commonwealth commotion communal commune communicable communicant communicate (to -) communication communicative communion communiqué communism communist communistic community commutation commute commuter companion companionship company comparable comparative comparatively compare (to -) comparison compartment compass compassion compassionate compassionately compatible compatriot compendium compensate (to -) compensation compensator compensatory compete competence competency competent competently competition competitive competitor complacency complacently complement complementary complete completely complex complexity compliance compliance complicate (to -) complicated complication comply (to -) . component compose (to -) composer composite composition compote compound comprehend comprehensible comprehension comprehensive comprehensive compress compressed compressibility compression compression compressor comprise (to -) compulsion compulsive compulsory compute (to -) computer con concatenation concavity concede (to -) conceivable conceive (to -) concentrate (to -) concentration concept conception conceptual concert concerted concertina concerto concession conch conciliate (to -) conciliation conciliator conciliatory concious concise concisely conciseness conclude (to -) conclusion conclusive conclusively concomitant concord concordat concourse concrete concretely concretion . concubine concur (to -) concurrence concurrency concurrent concussion condemn (to -) condemnation condensation condense (to -) condenser condescension condiment condition conditional conditionally conditioned condole (to -) condolence conducive conduct conduction conductivity conductor conductor cone confection confectioner confectionery confederacy confederate confederation confer (to -) conference conference conferment confess (to -) confession confessional confessor confetti confidant confidante confide (to -) confidence confidential confidentially confidently configuration configure (to -) confine confirm (to -) confirmation confiscate (to -) confiscation conflagration conflict conform conformer conformist . conformity confound (to -) Confucian Confucianism confuse (to -) confused confusion congeal congealment congenital congenitally conger conger-eel congest (to -) congested congestion conglomeration Congo congratulatory congregate congregation congress congruent conifer conjectural conjecture conjugal conjugate (to -) conjugated conjugation conjunct conjunction conjunctivitis conjuncture conjuration conjure (to -) connect (to -) connected Connecticut connection connector connivance connive (to -) connoisseur connotation connote (to -) conquer (to -) conqueror conquest conscience conscientious conscious consciously consciousness consecrate (to -) consecration consecutively consensus consent consequence . consequent consequential conservation conservatism conservative conservative conservatory conserve (to -) conserve consider (to -) considerable considerably considerate considerately consideration consignee consignment consist (to -) consistency consistent consistent consistent consistent consistently consolation consolidation consonant consort consortium conspiracy conspirator conspire (to -) conspirer constancy constant Constantinople constantly constellation consternation constitute (to -) constitution constitutional constitutive constraint construct construction constructive constructively constructor consular consulate consult (to -) consultant consultation consulting room consume (to -) consumed consumer consummate consummation . consumption contact contagion contagious contain (to -) container contaminate (to -) contamination contemplate (to -) contemplation contemplative contemporaneous contemporary contend contender content contented contention contention contentious contents contents contest contestable context continence continent continental contingency contingent continual continually continuation continue (to -) continued continuity continuous continuously continuum contortion contortionist contour contraband contraception contraceptive contract contracted contractile contraction contractor contractual contradict (to -) contradiction contraindication contralto contrary contrast (to -) contravene (to -) contribute (to -) contribution . contributor contrite control (to -) control controllable controller controversy contusion convalesce (to -) convalescence convalescent convection convene (to -) convenience convenient conveniently convent convention conventional conventionally converge (to -) convergence convergent conversation conversationalist converse (to -) conversion convert (to -) convertible convex convexity convict conviction convince (to -) convincing convoke (to -) convoy convulse (to -) convulsion convulsive cook cook cooker cookery cooking cooperate (to -) cooperation cooperative cooperatively coordinate coordination coordinator Copenhagen copier copious copiously copper Copt Coptic copulate (to -) copulative copy (to -) copy copy from (to -) coquetry coquette coral cord cordage cordial cordiality cordially cordon cordovan cork cornetist cornice cornucopia Cornwall corolla corollary corona coronary coronary coronation corporal corporation corpulent corpuscle corral correct correction corrective correctly correctness correlate (to -) correlation correlative correspond (to -) correspondence correspondent corresponding corridor corroborate (to -) corroboration corroborative corrode (to -) corrosion corrosive corrugation corrupt corruptible corruption corruptive corsage corsair corset cortege cortisone corvette cosine cosmetic cosmopolitan cosmos cost (to -) cost costly cotangent coterie cotillion council councilman councilor counsel counselor count (to -) counterattack counterbalance countereangle counterespionage countermand counteroffensive counterpoint countersign countertenor counterweight countess countryman county county county court court-martial courteously courtesan courtesy courtship coverage covet (to -) covetous coward cowardice coxal coyote cravat craven cripple croaker croaker crocodile crop cropper crossly crown crowning crush crust crux cuckold cuisine curator curt curtain curtsy cushion custom cut (to -) cutting cutting damnable damnation dastardly data communications DATACOM (abbr. for data communications) debonair defray (to -) delegation demeanor deportment desirability devote (to -) devoted dialup digest diner dining room DIP switch directorate disapproval disapprove (to -) discuss (to -) doe double quote doubly downward compatibility draftee drawstring dressmaker drive (to -) driver duct dumfound (to -) duress e-mail (electronic mail) earl easiness eat (to -) eatable ECG monitoring edible editing elbow electronic mail enclose (to -) encode (to -) encoded encoding enfranchise engage (to -) ensemble ensnare (to -) entire entrust (to -) environs ergot erode erosion excise (to -) expedience expediency expedient expensively expound (to -) express eyetooth eyewash facial conjunct fairly fang fantail farmyard feelingly fellow fellowship file backup file conversion filthy firewall fishtail flavoring floating point floodgate follow-up food food foothill foray forcible forcing forfeit (to -) forfeiture freeze (to -) freezer frostbite frostbitten frozen fucking fuel full general practice geniality genteel glass glue goblet gossip gossipy gracious graciously grant granting greed (to -) greediness gripping groceries group hack (to -) haircut hall hallmark halting hamper (to -) hang (to -) harvest hatch Haver's ducts HDLC (abbr. for high-level data link control) hearse heart heartfelt hearty helmeted hew (to -) high-level data link control hill hire (to -) hive hobble hobnob (to -) hock hook and eye horny horsetail howsoever hunch hungrily inasmuch incessantly indulge (to -) ingratiate (to -) ingratiating installment purchase intercept (to -) intercourse intricacy involve (to -) janitor jewfish jewfish jointly junk mail kickback kitchen kitchenette kite know (to -) knowledge Koran Korea Korean lace lamb lame landslide leash leathery lecture lecturer legged limp line log in (to -) logical connector loll long distance phone call longhorn lop MAC (abbr. for media access control) made to measure mail mainland mantis map marketable match matching mate mattress meagre meagre meal membership memorial merchandising merchant merchantable message switching metastasize (to -) misconception mislay (to -) mix (to -) mix-up monitor (to -) mow (to -) mystification nearsighted necklace necktie networking nosey notational conventions nudge nunnery obliging ok ongoing ostracize (to -) packet switching pal partake (to -) for private enhanced mail) pen knife penknife pensionable perambulator percolate (to -) percolator pigtail pillar pimply pipe piping pitying playmate plight plotter plywood pocket knife police station polite politeness poll (to -) pollutant pollute (to -) pose (to -) positioning post potluck pram preserve (to -) preserve proceed (to -) proofread (to -) proper properly purchase (to -) purchase purchaser purely purse purser put down (to -) QBE (abbr. for query by example) quail qualification query (to -) query queue queue quilt quote (to -) quotient rabbit racer raid realize (to -) reciprocate (to -) .pass password pattern PEM (abbr. for synchronous data link controller) sea cucumber sea slug seam seamy seashore seasonable SEC (abbr.reconciliation reconvalescence recruiting regarding reliance reliant relish rely (to -) remark remote login repast replicate reply (to -) reply resource sharing response responsible resume (to -) retain (to -) rib ribbing right riptide rocket rookery roommate rosin rouge rousing run (to -) runner rushed safely scab scabby scamper (to -) scarred scenario schoolboy schoolfellow schoolgirl schoolmate SDLC (abbr. for single edge connect) seize (to -) sequel set settings settler sew (to -) sewing shadefish shadefish share . shared shared costs shed shell shipbuilding shipmate shire shoelace shopper shopping short shortsighted shrift shutter sidekick (US) sideseam simmer sizable sizeable skyrocket sliding smuggler smuggling snail mail snowflake soothing speed control speller spinal column spread spunk square bracket squatter standard comments start (to -) steed stitch (to -) stockyard stoned strain strainer strap string stringy successfully suitability surmise swallowtail sweepstakes switch (to -) switch switching sympathetic tail tailoring tap into (to -) taxpayer teammate tell (to -) telnet (to -) . tender terminal controller testing thing thong thoroughly throughout tickle ticklish tie tinker (to -) Tory trade trader tradesman treetop troupe trust trustful turnout tusk undercurrent undercut (to -) understandable understanding unit cost unsuspecting upkeep use up (to -) vamp verification verify (to -) versus vitiation waddle warren watchword watercourse weasel wedge shell well-known whereas whitefish wholesaler whopper with with me with you womanhood woo (to -) cpi (abbr. for characters per inch) accreditation badge beige belief believable believe believer breeder breeding . brood carping Christ christen (to -) Christendom Christian Christianity chromatic chrome chromium chromosome chronic chronicle chronicler chronological chronology chronometer chrysalis chrysanthemum chrysanthemum chrysanthemums confiding crack cracker crackle cranial cranium crater creak (to -) creaking creaky cream creamy create (to -) created created by creatine creation creative creativeness creature credence credibility credible credit credo credulity credulous creed cremation creosote crepe crescendo crescent crest Crete cretin cretinism cretonne criminologist . criminology crisis crisp crispy criteria criterion critic critical critically criticism criticize (to -) critique Croatia crochet croquette cross crossbred crossing crossroads crossword croupier crucial crucible crucifix crucifixion crucify (to -) crude crudeness crudity cruel cruelty cruise cruiser crunch crusade crusader crustacean crusty cryogenic cryosurgery crypt cryptogram cryptography crystal crystalline crystallization crystallize (to -) crystalloid crêpe double breasted dusk expanding faultfinder faultfinding gas chromatography glassware gloaming grow (to -) growing grown . handmaid hatchery housemaid increasing interbreed intersect (to -) Krakow lotion maid maidservant manservant menial overgrowth peak penology plausible pupa rattlesnake raw reviewer ruthless selection criteria servitor sheepman skull thrive (to -) timekeeper twilight uncooked valet zipper accomplished accomplishment afterdeck any anything arable barrack barracks basin bassinet bathroom bead bend biopsy curette birthday blameworthy body bottleneck bowl bowstring brother-in-law bucket cadre care careful carefully cash crop casing cave . cleaver cockroach collar complexion compliment comply (to -) contour corps cot countdown coupe coupon course cover (to -) cowhide cradle crib crook crooked crow Cuba Cuban cube cubicle cubism cubist cuboid cuckoo culinary culminate (to -) culmination culpability culpable culprit cult cultivate (to -) cultivated cultivation cultivator cultural culture culture cultured cumulative cuneiform curable curative curd curdle (to -) cure cure curio curiosity curious curry curvature curve curve custodian custody . cutaneous cuticle cutler cutlery cutter darkroom deck den detachable collar dewy double rope downhill dropper dry cultivation fault fluffy fortieth forty four fourfold fourth fulfill (to -) fulfillment gash gooseneck grower guilt guiltily guilty headquarters healing high collar hilltop hindquarter hod horn how much hub incline infield infighting inquiring inquisitiveness issue issues knife Kurdish Kurdistan ladle leather Lent Lenten logbook neck non-irrigated notebook pail painting pastern perform (to -) . picture priest quadrangle quadrant quadraphonic quadrate quadratic quadrature quadriceps quadrilateral quadroon quadruped quadruple quadruplet quadruplicate (to -) Quakerism qualitative quantify (to -) quantitative quantum quarantine quart quarter quartet quartile quartz quaternary questionable quota raven razor reckoning roach room rope scalp scoop seminar sickroom side cover sister-in-law skilled skin test slash slope snow-capped spoon spoonful square stable story strand summit switchboard tablespoon tablespoon tablespoon tablespoonful tableware tale . for Defense Advanced Research Projects Agency) dart datagram datum dice emphasize energize (to -) enforce (to -) equivocate give (to -) given giver harm (to -) harm impair (to -) .tally tannery teaspoon teaspoon teaspoonful teaspoonsful tend (to -) tenor tightrope tillage topic towline tumbler turtle neck tutorial vertebral body wedge whatever when when whenever which whichever whisper whose worship bestow (to -) bounteous bountiful bridesmaid buff (to -) checkers craps (US) dagger dahlia damage damages damask dame damsel dancing Dane Danish Danube Dardanelles (the -) DARPA (abbr. for automatic request) arteriosclerosis dementia ascertain (to -) askance askance astray attrition balk banish (to -) banishment bare barefaced barefoot bareheaded bareness BCD (abbr.jilt (to -) lady overtake randomize (to -) raw data realize (to -) reckon render (to -) roundelay screened data thank welcome (to -) dB (decibel) abandonee abash (to -) abeam aberration abhorrent abrade (to -) abreast accordingly acquit acquittal addressee adeptness adjudicate (to -) adroitness advisedly afresh after after after afterward afterwards again alluvial appellation appoint (to -) apron arithmetic shift arouse (to -) ARQ (abbr. for binary coded decimal) before beforehand behead (to -) . beheading behind belie (to -) below beneath bereavement betroth (to -) bewilder (to -) bewildered bewildering bewilderment binding birthright blasting blatant blind (to -) blinding bloodshed blurt (to -) bottom fuller brassy brazen break breakdown breakfast broad spectrum buttery bypass carefree careless carelessly carelessness castaway castoff casual wearing celiac challenge (to -) challenge challenging change description cheeky chlorination choosy claimant clearance (customs) clerk clutter collapse colorless comfortless complimentary comprehensive computer crime consign (to -) contempt contemptible contemptuous contemptuously copyright craft . for data carrier detected) de facto deactivate (to -) dealer dean debacle debasement debate debilitate (to -) debility debt debtor debug (to -) debugger debut debutante decade decadence decadent decaffeinated decamp (to -) decant (to -) decapitate (to -) decapitation decay decay decease decency decent decentralize (to -) decibel decide (to -) decided decimal decipher (to -) decipher (to -) decision declamation declaration declension decline (to -) decline declining decode (to -) decode (to -) decoder decoding decompensation decompose (to -) decomposition .craving crime criminal crumble (to -) daintily daintiness dainty daze (to -) dazzle dazzling DCD (abbr. decompression decongestant decontaminate (to -) decontamination decorate (to -) decoration decorative decorator decorous decorum decreasing decrepit decry (to -) decrypt (to -) decubitus dedicate (to -) dedication deduce (to -) deduct (to -) deductible deduction deductive defeat (to -) defeatist defecate (to -) defecation defect defection defective defend (to -) defender defensible defensive deference deferential defiance defiant deficiency deficient defile defilement define (to -) defined definite definitely definition definitive deflate (to -) deflation deflect (to -) defoliate (to -) deforest (to -) deform (to -) deform deformed deformity defraud (to -) defy (to -) degausser degausser . degeneracy degenerate (to -) degeneration degenerative deglute (to -) degradation degrade (to -) degrading dehydrate (to -) dehydration deify (to -) deism deity Delaware delectable delegate deleterious deliberate deliberately deliberation deliberative delicacy delicate delicious delight (to -) delightful delimit (to -) delineate (to -) delinquency delinquent delirious delirium delouse (to -) delta deltoid demagnetization demagogue demarcation demented dementia demerit demilitarize (to -) demo (abbr. for demonstration) demobilize democracy democrat democratic demographic demolish (to -) demolition demon demonstrable demonstrate (to -) demonstration demonstrative demonstrator demoralize (to -) demoralized demyelinating denature (to -) . denigrate (to -) denim denominate (to -) denomination denominator denote (to -) denouement denounce (to -) dense denseness density dental dentifrice dentist dentition denture denunciation deodorant deoxidize (to -) departmental depend (to -) dependence dependency dependent depletion deplorable deplore (to -) deploy (to -) depolarization depopulate (to -) depopulation deport (to -) deportation depose (to -) deposit deposit depositary deposition depositor depository depot deprave (to -) depravity deprecate (to -) depreciate (to -) depreciation depredation depress (to -) depression depressor derail (to -) derange (to -) deregulation derelict derivate derivation derive (to -) dermatological dermatology dermis . derogatory descend (to -) descendant descender descending descent describe (to -) description descriptive desegregation desert deserter desertion desideratum designate (to -) desirable desire (to -) desire desirous desist (to -) desolate desolation despair despairing desperate desperately desperation despicable despise (to -) despondent despotic despotism destination destine (to -) destiny destitute (to -) destitution destroy (to -) destroyer destruction destructive detach (to -) detail detain (to -) detect (to -) detection detection detective detector detention deter (to -) detergent deteriorate (to -) deterioration determination determine determined determinism detest (to -) detestable . dethrone (to -) detonate (to -) detonation detonator detour detriment devaluate (to -) devaluation devalue (to -) devastate (to -) devastation develop (to -) development deviate (to -) deviation devious devoid devotee devotion devour (to -) devout dexterity dilapidation disable (to -) disable (to -) disabuse (to -) disadvantage disadvantageous disagreeable disappear (to -) disappearance disappoint (to -) disappointment disappointment disarm (to -) disarmament disarray disassemble (to -) disaster disastrous disburse (to -) discard (to -) discard discharge (to -) disclose (to -) disclosure discolor (to -) discomfiture disconcert (to -) disconnect (to -) disconnected disconsolate discontent discount discourage (to -) discouragement discourteous discourtesy discover (to -) discoverer . discovery discredit discreditable discuss (to -) discussion panel disdain disdainful disembark (to -) disembarkation disenchant (to -) disengaged disentangle (to -) disfigure (to -) disfigurement disfigurement disgrace disgraceful dishearten (to -) dishonesty dishonor dishonorable disillusion disinfect (to -) disinfectant disinherit (to -) disintegrate (to -) disintegration disinterested disjointed dislike (to -) dislodge (to -) disloyal disloyalty dismantle (to -) dismay dismember (to -) dismemberment dismiss dismissal disobedience disobedient disobey (to -) disorder disorderly disorganize (to -) disorientation disparage (to -) dispassionate displace (to -) displacement displease (to -) disposable dispossess (to -) disproportion disproportionate disregard disreputable disrepute disrobe (to -) dissatisfaction . distasteful distill (to -) distillation distillery distrust distrustful disunite (to -) disuse diversion divert (to -) divest (to -) divestiture dog's teeth dolphin dowdy downclimbing download (to -) downstairs downward downward drain drainage drift drop off (to -) duly duty early detection earthen easy wearing edict effrontery eighteenth elaborate embezzle (to -) endogenous depression enfeeble (to -) espousal espouse (to -) evergreen evict (to -) eviction evince (to -) evolve (to -) exchangeable exhaust exile extravagant extricate (to -) factorize (to -) fading faint (to -) fainting fancy fashionable fate fault faulty faze (to -) feebleness fell (to -) . fend (to -) fiend fifteenth finger flank (to -) flashing flay (to -) forefinger foremost forsake (to -) forward fourteenth frailty fretfully from from full time give back (to -) glare (to -) gleam glide (to -) graceless grudgingly guard (to -) halt hand-to-hand hapless hatch (to -) head-on headfirst helpless henceforth henceforward hereafter hereinafter hidebound highlight (to -) homework hopeless hopelessly hustler ill-omened impairment impanel (to -) in agreement inadvisable inarticulate inauspicious inconsiderate indebted indebtedness indented indoors inequality infelicitous informer inordinate insane inside inside . intermission itemize (to -) jagged jetlag jobless laceration landing landslide larder lay-off layoff leaden lean leave (to -) leeway legation lifelong lifesaving liner linger (to -) loft long-range lopsided low-class luckless luscious malcontent malnutrition messy middle-aged misadventure misdemeanor miserable miserably mishap mislead (to -) misplace (to -) missal misshapen misstep mistrust (to -) morgue mortgagor move (to -) move down (to -) move up (to -) must (to -) mutate (to -) naked nakedness naughtiness neglect (to -) neglectful negligible nineteenth nude nudity occasionally of offal . offence (UK) offend (to -) offender offense (US) offhand otherwise ought (to -) outbuilding outlandish outlay overflow overflowing overlook overnight overthrow (to -) owe (to -) p. pantry parade perplex (to -) pinky pitiless plow (to -) posse predator progeny pronouncement proprietary rights protrude (to -) prove (to -) proxy punitive purge (to -) purge purposeful queenly quest quits rant rave (to -) raving readily rebuff redness refuse reject release relieve (to -) repository request reservoir rest (to -) rest retaliate (to -) retrace (to -) return (to -) right right rightly roundhouse .m. rouse (to -) rout royalties rumble (to -) salesclerk salesgirl sartorial sartorial saucy say (to -) scorn scornful scornfully scrap (to -) scrap screwdriver scrolling secondhand secretarial sectional seemly senile dementia serrated seventeenth sewerage shall (to -) shambles (in -) shameless shedding shift (to -) shredder (paper -) shunt silken since sixteenth skill skim (to -) slight slighting slim slither (to -) slovenly slowly slump sneer software developer somehow soulless southeastern southerly southern southwestern spawn (to -) spell (to -) spendthrift spill (to -) spoil sport sporting sportsman . sporty spotting squandering squeamish (to -) standard deviation standard deviation state of the art statement stools (plural) stop (to -) stop doing (to -) stranger strip (to -) strong-minded substandard suddenly sue (to -) supervisory swerve swill swoon swoop take off (to -) takeoff tasteful teething tell (to -) thaw (to -) thaw (to -) thereafter thimble thin thirteenth thirteenth this point forward thumb tidal tiptoe toe too toothed toothed bream tootherd gilthead toothy touring transitional trashy traveling unarmed unattended unaware unbalanced unblushing unbutton (to -) unchecked uncivil uncoil (to -) unconnected uncover (to -) uncover (to -) . under underneath undernourished underrate undoing undress (to -) unearth (to -) unemployed unemployment unequal uneven unfasten (to -) unfavorable unfold (to -) unfortunately unfurl ungainly ungroup (to -) unhappily unheeded unhinge (to -) unhook (to -) uninhabited unkempt unknown unload (to -) unlocking unloose (to -) unlucky unmask (to -) unmatched unoccupied unpack (to -) unpack (to -) unpleasant unplug (to -) unpropitious unprotect (to -) unrecognizable unroll (to -) unscrew (to -) unseat (to -) unsettle (to -) untidy untie (to -) unveil (to -) unwind (to -) unwonted unwrap (to -) upright uproot (to -) upward upward compatible user-friendly vacate (to -) vanish (to -) vat vicarious vis a vis volley . wake up (to -) wakeful waken (to -) warm-hearted wastage weaken (to -) weakness wear and tear weatherbeaten weathering whence whence whereupon wilderness willing willingly wish wish wishful withhold (to -) within within wooden wrecker (US) wretch zealot abatement absent-minded absentminded absolute address absurdity address adeptly adroit AED (abbr. for automatic engineering design) ageism alacrity alphanumeric display unit alternate input device amuse (to -) apologize (to -) apology argue (to -) argument arrange (to -) artfully availability available back-up disc bandmaster behavioral device bicker bickering blissful borough breakdown breakup broadcast (to -) broadcast byword cash CD (abbr. for compact disc) clustered devices cog compact disc concealed condescend (to -) conductor constituency contention controller coronet crosstalk currency currency daily dam dandelion deacon deaconess debatable deceased December decimate (to -) decrease defamation defamatory defame (to -) defer deferment deferred defunct deign (to -) deluge Denmark design designer deterrence deterrent detract (to -) developer devil devilish devilment devise dexterous diabetes diabetic diabolic diabolical diacritical diadem diagnose (to -) diagnosis diagnosis diagnosis diagnostic diagonal diagram dial dialect dialog dialogue dialysis diameter diametrical diamond diaphragm diaphysis diarrhea diarrhoea diary diatribe dictate (to -) dictation dictator dictatorial dictatorship diction dictionary didactic diet dietary dietetics differ (to -) differed difference different differential differentiate (to -) differentiation differently difficult difficulty diffuse diffusion digestible digestive digital digital to analog digitalis digitalization digitalize (to -) digitize (to -) dignified dignify (to -) dignitary dignity digress (to -) digression dihedral dike dilatation dilate (to -) dilation dilemma dilettante diligence diligent diligently dilute (to -) dilution dime dimension diminish (to -) diminution diminutive dinosaur diocese diode diphtheria diploma diplomacy diplomat diplomatic dipsomaniac direct direction directive directly director directorship dirigible disagree (to -) disagreement disband (to -) disc disc drive discern (to -) discernible discernment disciple disciplinary discipline disciplined disclose (to -) disco discord discotheque discourse discreet discrepancy discrepancy discrete discretion discretional discretionary discriminate (to -) discriminate discrimination discriminatory discursive discuss (to -) discussion disgruntle (to -) disguise disk diskette dislocate (to -) dislocation disparate disparity dispel dispensary dispensation dispense (to -) dispenser dispersal disperse (to -) dispersion displeased displeasure disposable disposal dispose (to -) disposition disputable dispute dissatisfy (to -) dissect (to -) dissemble (to -) disseminate (to -) disseminate dissension dissent dissertation dissidence dissident dissimilar dissipate (to -) dissipated dissipation dissociate (to -) dissociation dissolute dissolution dissolve (to -) dissonance dissonant dissuade (to -) distance distant distend (to -) distend (to -) distension distention distinct distinction distinctive distinctly distinguish (to -) distinguished distort (to -) distortion distract (to -) distracted distraction distribute (to -) distributed distribution distributive distributor district diuretics diurnal diva divan diverge (to -) divergence divergent diverse diversify (to -) diversion diversity divide (to -) divided dividend divine divinity divisible division divorce divulge (to -) draftsman draw (to -) droll dynamic dynamics dynamite dynamo dynasty dysentery dyslexia dysphonia dyspnea détente eighteen enjoy (to -) entertainment exclusive external hard drive FDDI (abbr. for fiber digital device interface) fiber digital device interface fiendish fire (to -) flood flow diagram flowchart flowchart fun gas discharge display God goddess guideline guidelines gunshot hard disk head-cleaning device headmaster headmistress heedless high-density disk host address imp inattentive inconspicuous Internet address intervertebral disk IP address jag keyboard layout leadership libelous lintel locating device malign (to -) manageress managerial marketing manager midriff minded misdirect (to -) mitotic division money monitor (to -) moot nineteen obscure (to -) onion diagram outspreading pattern peerage picking device pitch plan pointcasting popularization predicament privacy procrastination prong quandary remarkable removable hard drive resign (to -) resignation riot saying scattered scattering seventeen shoot (to -) sixteen slide spead out (to -) split (to -) spread sprocket squabble stagecoach stealth steerage strife supervise (to -) swell (to -) system disc tactful ten thesaurus tiny tooth tracer trigger trinket tuneless unlike unloading unit unobservant upset worthy wrangle DNS (abbr. for domain name system) ache (to -) ache aching ailment archived file asleep back-end backache bedroom C (note) canopy copy buster distress distressful doctor doctoral doctorate doctrinal doctrine document documentary documentation dogma dogmatic dogmatism dolorous domain domestic domesticate (to -) domicile dominance dominant dominate (to -) domination domineer domineering dominion domino . donate (to -) donation donor donor doping dormitory dorsal dosage dose double strike dowry doze (to -) dozen earache endow (to -) endowment endue (to -) fold gifted gild (to -) gilding gilthead gilthead bream gold bream golden grievous gross headache heartbreaking heartsick hem henpeck (to -) hurt (to -) in-house maiden masterful mastery migraine mourner overlord (to -) overrule (to -) oversleep (to -) pain painful public domain rainbow wrasse range sleep (to -) sore sorrow stave (to -) subdue (to -) subjugation Sunday tamable tame (to -) tame tameable tamed taming . for data transfer ready) abiding callousness candy disbelieve (to -) doubt (to -) doubt douche dual dual scan dualism dubious Dublin duchess duchy duel duelist duke dukedom dulcet dune duplicate (to -) duplicate duplication duplicity durability durable duration during elf fudge .toothache twelve twice two twofold where wherever denim dope dragon drainage drama dramatic dramatically dramatist dramatize (to -) drastic drastically dredge Dresden driver dromedary drug druggist drugstore halyard playwright stoned DTP (abbr. for desktop publishing) DTR (abbr. for electrocardiogram) echo echocardiography echography echolalia echolalia echopraxia echopraxia eclectic eclecticism eclipse ecogram ecographer ecological ecology economic economically economics economist economize economy Ecuador Ecuadorian ecumenical eczema environmentalist equation equator equatorial fuck housewifery jetsam jettison (to -) .goblin hard hardness hob last (to -) lasting owner puck shower sleeping sprite sweet sweetly sweetness time twelfth unkind unkindly boiling cabinetmaker cabinetmaking drunken inebriate joinery affordable ecclesiastic ecclesiastical ECG (abbrev. scarf sparing teethe (to -) thrift thrifty ultrasonic ecogram upstage adulthood age building civics edema EDI (abbr. for United States of America) actual cash effect effective effectively effectiveness effectual effervescence efficacious efficacy efficiency efficient efficiently effigy ephemeral securities side-effect egoism egoist egoistic egotism egotist egregious Egypt Egyptian fresh haddock haddock . for Electronic Data Interchange) edification edifice edify Edinburgh edition editor editorial educate (to -) educated education educational educator linkage editor linker manners oedema politeness publisher upbringing USA (abbrev. for application service elements) chic choose (to -) classy constituent dandy dressy ECG electrode El Salvador elaboration elastic elasticity elation Elbe elect (to -) election elective elector electoral electorate electric electrical electrically . a program) shaft spindle x-axis y-axis ACSEs (abbr. for application common service elements) agreement application common service elements application service elements ASEs (abbr.selfish selfishness hey army axis axle backbone comprehension (UK) example executable execution executive executor exemplary exemplify exercise (to -) exercise exert (to -) exertion foreclosure instance instance medium axis military osseous axis perform (to -) performer printout run (to -. electrician electricity electrification electrify (to -) electrocardiogram electrocardiograph electrocardiography electrochemistry electrocute (to -) electrocution electrode electroencephalograph electroencephalography electrolysis electrolyte electrolyte electromagnet electromagnetism electron electronic electronics electrostatics electrotherapy elegance elegant element elemental elementary elephant elephantiasis elephantine elevate (to -) elevated eligibility eligible eliminate (to -) elimination elixir ellipse ellipsis ellipsoid elliptic elliptical elocution eloquence eloquent eloquently elucidate (to -) elude (to -) eulogize (to -) eulogy fancy graceful heighten (to -) hydroelectricity lithe nutrient outdoors oval polling . raise to the power of (to -) remove (to -) resilience resilient SASE (abbr. for specific applications service elements) she soar (to -) springy stilted stylish the themselves they uppermost welt which ambassador ambush baler beautification beautify (to -) begin (to -) belittle (to -) bewitch blunt boost bottleneck bottleneck bottling boxing broadbill brutalize (to -) census cloying common carrier company confirmed conspicuous cumbersome daub (to -) draw drench (to -) drunkenness dull emanate (to -) emanation emancipate (to -) emancipation embalm (to -) embargo embark embarkation embassy embed (to -) embedded embedded embellish (to -) embellishment emblem embolism . emboly embroil (to -) embryo embryonic emerge (to -) emergence emergency emergent emigrant emigrate (to -) emigration eminence eminent eminently emir emissary emission emit (to -) emitter emolument emoticon emotion emotional emotionally emperor empiric empirical empiricism emplacement employ (to -) employed employee employment emporium emulsion enroll (to -) enterprise enterprising entrepreneur feathered filling firm funnel hash (to -) hustle imbibe (to -) impale (to -) impetigo impoverish (to -) impoverished impoverishment impresario instep intoxicant intoxicate (to -) issue issued issuing jog jostle . location match (to -) mating migrant migrate (to -) migration misty mortician muddy pack (to -) packaging packer packing palisade pop-up (to -) pregnancy pregnant push (to -) push ravishment sender sequester (to -) shipping shove (to -) showman site soggy splice staff stalemate start (to -) stockade stonewall swordfish tarnish terminal emulation thrill thrilling thrust traffic jam undertake (to -) worsen (to -) abaft abed abroad absolutely not acquaint acute disease Aeneas Aeneid (the -) aflame aggrandizement aging aglow ailing ajar alight aloud Alzheimer disease amend . amendment amid amid amidships amidst among amongst amusement amusing anger angry antagonize (to -) anywhere approach approximation archway ashore ASM (abbr. for computer-based training) chained chaining charm . for assembler) assay (to -) assay assemble (to -) assembly assembly astir autoimmune disease automatic scroller bacterial disease bamboozle bedevil (to -) beget (to -) beguile (to -) beguiler bejewel (to -) between betwixt bind (to -) bind (to -) bindery binding boarding bookbinder bookbinding bookmaker broaden (to -) budding burial bury burying busybody caged cajole (to -) cajolery canned canner cardiac disease carnation CBT (abbr. charmer charming chattel chronic disease circumvent (to -) clockwise cloister (to -) cloistered clustered commend (to -) computer-based training confinement confront (to -) confrontation constrained constriction cove cringe crispness crisscross critical disease Crohn's disease crosspost current dashing data link daydream deafen (to -) deafening deceit deceitful deceive (to -) deceiver deception deceptive delightfully deliver (to -) deliverance delivery delude (to -) delusion dirge disease diseased disorder dispatch dovetail (to -) driveway dual in line package dwarf education effective effective from elsewhere emaciated embedded embodiment embody (to -) emphatic encase (to -) . encefalitis encefalum enchant (to -) enchanting enchantment enchantress enclave (to -) enclose (to -) enclosure enclosure encounter (to -) encyclical encyclopedia endemic endocrine endogenous endorse (to -) endorsement endorser endoscope enema enemy energetic energetic energy enervate (to -) enervating enervation enfold (to -) enforcement engender (to -) enigma enigmatic enmity ennoble (to -) enormity enormous enrage (to -) enrich (to -) enroll (to -) enroll (to -) enshrine (to -) entangle (to -) enter (to -) entertain (to -) entertaining enthronement enthusiasm enthusiast enthusiastic entire entirely entity entity entomology entrails entrance entrant entry entwine (to -) . enumerate (to -) enumeration enunciate (to -) enunciation envelop (to -) envelopment enviable envious envoy (to -) envy (to -) enzootic enzyme essay essayist everywhere exactly express delivery fallacious fan fatten (to -) find (to -) flaming flawless flex (to -) fluorescent endoscope flush (to -) foe forewoman frame (to -) galore gateway gearing gingiva gory gum hamper (to -) harden (to -) header hereupon hoax hoist (to -) hoodwink (to -) hooked huff huffy idle ignite (to -) ill illness IMHO (abbr. for in my humble opinion) impound (to -) imprison (to -) imprisonment in in lieu in-depth inbetween incantation incarcerate (to -) incarceration . incarnate incarnation incoming increasingly indorse infatuated infirmary infirmity influx infuriate (to -) infuriated innards input instead instead of integer inter (to -) intercurrent disease interdict interleave interloper interment intermingle (to -) intertwine (to -) interview (to -) interview interviewer interweave (to -) into intonation involvement January jumbo juniper keen kindle (to -) king-size lace leggionaire's disease liaison lighted link (to -) link lockup loveliness lovesick mad (US) madden (to -) maddening mail (to -) mail (to -) malady masked meantime meanwhile meddle (to -) meddlesome meddling meet (to -) mend (to -) . Menier's disease mess metabolic disease mezzanine midget misapprehend (to -) misleading misunderstand (to -) mouthwash muddle mystify (to -) nowhere numb (to -) numbness nurse occupational disease oiler ok ok on on on-line onto opaque enema opposite outbound outpatient over packing paneling partly phony pickle PIO (abbr. for program input output) plug and play plug and play poisoner power on preserved prying puny puzzle questionnaire quits redden (to -) rehearsal rehearse (to -) respiratory disease riddle rinse (to -) router router sadden (to -) salad salivate (to -) send (to -) send mail (to -) serial sheathe (to -) ship (to -) . ship to (to -) shipment shipshape shrink (to -) shrinkage shrug shrunken sick sickbay sicken (to -) sickly sickness sinecure slink (to -) sloppy slushy SMAEs (abbr. for system management application entity) socket soil (to -) somewhere spar (to -) squarely squint (to -) stand-by straighten stupefy (to -) subsume (to -) sufferer sulk (to -) swaddle swarm sweeten tailored tangle tarpaulin tarpaulin teach (to -) teaching then thereby therein thirdly ticket toughen (to -) trainer trespass trickery trim tubby turn on unbend (to -) under construction under way underskirt understand (to -) undertaker unhealthy unnerve (to -) unsound unwell . for data terminal equipment) . for automatic test equipment) auxiliary equipment backup equipment baggage balance (to -) balance blunder data terminal-circuit equipment DCE (abbr. for with respect to) zealous adrenalin epicure epidemic epidermal epidermis epidermoid epidymis epigastrium epiglottis epigram epilepsy epileptic epilogue epiphysis Episcopal Episcopalian episode epistaxis epistle epitaph epithet epitome smelt smelt sparling accouter (to -) add-on equipment ADPE (abbr. for data terminal-circuit equipment) DTCE (abbr. for automatic data processing equipment) ancillary equipment ancillary equipment ancillary equipment ATE (abbr. for data terminal-circuit equipment) DTE (abbr.upon wad (to -) watchful water inlet wheedle (to -) wherein while you wait whitewash (to -) whole whopping widen (to -) wind energy workout wrap (to -) wrap wrapping WRT (abbr. equate (to -) equidistant equilibrium equinox equip (to -) equipment equipment equitation equivalence equivalent equivocal equivocation fair fairness hardware horsemanship kit luggage misapprehension misread (to -) misspell (to -) mistake mistaken misunderstanding outfit par poise rig tantamount team amiss belch burp checksum error era eradicate (to -) erect erectile erection erectness erector erg ergometer ergometry ergonomic erosion erotic err (to -) errant erratic erroneous error eructation erudite erudition eruption erysipelas fault hedgehog hermit . hermitage lore miscount misfire misprint miss (to -) mistake outbreak rounding error scholar sea-urchin syntax error tingle transient error vagabond wandering abscond (to -) abutment accolade actuary AES (abbr. for application environment specification) aesthetic aesthetics aghast agree (to -) America American appall (to -) appalling appraise (to -) asparagus back backbone (FIG) backbone backside bacterial spore baldly banner barrenness basin be (to -) beautician beetle beholder bide (to -) blackhead blank bondage bookcase bookish bookshelf boom brash brastbone breastbone broom bulrush bureau bushy buttress . bystander cache canvass capacious cape carefulness case study catatonic schizophrenia charter choke (to -) choose (to -) chosen clangor claymore climb (to -) climb clinker closely compunction conformation conscientiously constipate (to -) constipated constipation constrict (to -) corking corner cowshed craggy crass creepy cuspidor de facto standard dear decamp (to -) decimation dedicated desk desktop diddle (to -) dramatic dullard dullness dung east eavesdrop (to -) echelon effete effort electronic storefront elongation elope (to -) emerald (color) emery enamel encouragement encumber (to -) encumbrance endeavor enlightenment enslave (to -) enslavement enthrall (to -) escalate (to -) escalator escape (to -) escape (to -) escapement escort (to -) escutcheon esophagus esoteric especial Esperanto espionage essential essentially establish (to -) establishment esteem estimable estimate (to -) estimation Estonia estrogen estuary excoriation expatiate (to -) expect (to -) expectancy expectation expertise explode (to -) fencing fidget (to -) figurine fixed spacing foam foamy footstool foreshortening foul (# food) frame status free climbing frighten (to -) frightful frost frosted froth frothy frothy FS (abbr. for frame status) fuse genus glean (to -) gray scale grisly guess (to -) handcuff hard clam hark (to -) have a cold (to -) havoc hawthorn hearken (to -) heave hebephrenic schizophrenia hidden hide (to -) hide (to -) hide-and-seek hide-out hindrance hoarfrost hope (to -) hope hopeful hotbed husband in other words indenture intersperse (to -) intrude (to -) Istanbul knowledgeable ladder ladder layout life expectancy link listen (to -) longhand loophole lumpish lunge lurk lurking manure manuring mar (to -) masonry mat meagre mirage mirror mitral stenosis mouse case muck narrow oat-grass oesophagus onlooker out of service outline painstaking paranoid schizophrenia peal pond pop pounce premiere prickly proportional spacing rale stertor random rapier rating raucous rawboned refrain ridge rime roomy round clam rugged rung scalability scalable scald (to -) scale scale scalene scaling scaling scalpel scaly scan (to -) scandal scandalize (to -) scandalous scanner scant (to -) scanty scaphoid scapula scapular scapulohumeral scarab scarce scarcely scarceness scarcity scarecrow scarlatina scarlet fever scarp scatter (to -) scattering scenario scene sceptical scepticism schema schematic scheme schizophrenia scholastic school schoolhouse scoop Scorpio scorpion Scot Scotch Scotland Scots Scotsman Scottish scribbler scribe script scripted scriptural scripture scriptwriter scrotem scrotum scruple scrupulous scrutinize (to -) scrutiny sculptor sculptural sculpture scum scurvy scuttle season seasonal set (to -) setting settle (to -) shale shatter (to -) shattered shear (to -) shearer shelf shelving shield shin shirk (to -) shiver shiver shortage shotgun simple schizophrenia skeleton skeptic skeptical skepticism sketching ski skier skiing skimp (to -) skirmish skirmisher Slav slave slavery Slavic slender slogan Slovak Slovakia Slovene Slovenia sneeze (to -) sneeze snob snobbery snuck (to -) sojourn solid state sophomore souse spacing spacious spades spaghetti Spain Spaniard Spanish Spanish mackerel sparse (to -) spasm spatial spatula spatulate special specialist specialization specialize (to -) specialty species specific specifically specification specify specimen (to -) specious spectacle spectacular spectator specter spectral spectrum speculate (to -) speculation speculative speculator speculum speleology sperm spermatozoid spermicide sphenoid sphere spherical spheroid sphincter sphinx sphygmomanometer spice (to -) spice spike spinach spinach spine spine spinet spiny spiral spire spirit spiritual spiritualism spiritualist spirituality spirochete spirometer spirometry spit (to -) splendid splendor splenius sponge spongy spontaneity spontaneous spooky sporadic spore spore spouse sprain sprat spreader spreading sprinkling spur spurious spy squad squadron squalid square squire stability stabilization stabilize (to -) stable stadium stagnant stagnate (to -) stagnation stair staircase stairs stairway stake stalactite stalagmite stall stamen stamped stampede standard standardize (to -) standby stanza staphyloccocia staphylococcus starboard stardom starfish starling starred starry state state of the art statesman static station stationary statistic statistical statistician statistics statuary statue statuesque statuette stature status statute steady state stellar stepladder steppe stereophonic stereoscope stereotype sterile sterility sterilization sterilize sterlet sterling sternum sternum stethoscope stew stewed stigma stigmatize (to -) stimulant stimulate (to -) stimulation . stimulus stipend stipulate (to -) stipulation stirrup Stockholm stoic stoical stole stolid stomach stopover Strait of Gibraltar strangle (to -) strangler strangulate (to -) strangulation stratagem strategic strategist strategy stratification stratify (to -) stratosphere stratum street corner streptococcus streptomycin stress stress stretch (to -) stretch strew (to -) stria striated strict strictly stridency strident stringency strive (to -) strontium structural structure structuring Stuart stucco student studied studio studious study (to -) stunning stupefaction stupendous stupidity stupor sturgeon style stylist . stylistic stylize (to -) stylus suds survey swab swastika swindle swindler sword swordsman terrifying that these thick thicken (to -) thickness this this thorn thorny those tight tin tobacconist tonight tummy tuxedo type (to -) undergraduate underlie (to -) understaffed unfruitful uproarious vaudeville viewer wait (to -) wait waiting wake wart venus shell weever wife worsted writ write (to -) writer writing written yarn zany ageless eternal eternally eternity ethanol ethereal ethernet etiology etiquette . etmoid etymology everlasting label labeled netiquette tag terminal phase timeless undying eucalyptus eugenic eugenics eunuch euphonious euphoria Europe European euthanasia assess assessment capital flight escapade eschew (to -) evacuate (to -) evacuation evacuee evade (to -) evaluate (to -) evaluation evanescent evangelical evangelist evaporate (to -) evaporation evasion evasive eventual eventuality evident evidently evocation evoke (to -) evolution evolutionism gospel loophole noncommittal obvious obviously obviousness possibly preclude (to -) reminisce (to -) reminiscent vaporize (to -) abaxial accuracy acreage alien . atone (to -) atonement backtrack (to -) barred barring blast blood examination bulldozer butt colloquialism comprehensive correctness debauch demanding dig (to -) disbar (to -) dispatch dispatcher display dossier eccentric eccentric eccentricity ecstatic end esplanade estrange (to -) Estremadura exacerbate (to -) exacerbation exact exacting exaction exactly exaggerate (to -) exaggeration exalt (to -) exaltation exam examination examine (to -) examiner exasperate (to -) exasperation excavate (to -) excavation excavator exceed (to -) exceedingly excellence Excellency excellent except (to -) except exception exceptional excess excessive excessively excitable . excitation excite (to -) excited excitement exciting exclaim (to -) exclamation exclude (to -) exclusion exclusive exclusive exclusively excommunicate (to -) excommunication excrement excrescence excrete excretion excursion excursionist excusable excuse execrable execrate (to -) exegesis exempt exemption exhalation exhale (to -) exhausted exhaustive exhibit (to -) exhibition exhibitionism exhibitionist exhibitor exhort (to -) exhortation exhumation exhume (to -) exigency exigently exiguousnes exile exist (to -) existence existent existentialism exogenous exonerate (to -) exoneration exorbitance exorbitant exorcise exorcism exorcist exotic exotoxin expand (to -) expandable . expanse expansion expansive expatriate (to -) expectant expectorate (to -) expedite expedition expeditionary expeditious expel (to -) expend (to -) experience experienced experiment experimental experimentation expert expiate (to -) expiation expiration expire (to -) explain (to -) explanation (to -) explanatory expletive explode (to -) explode (to -) exploitation exploration exploratory explore (to -) explorer explosion explosive exponent exponential export (to -) exportation exporter expose (to -) exposed exposition expository exposure express expressionism expressive expressiveness expressly expropriate (to -) expropriation expulsion expurgate (to -) exquisite extant extend (to -) extend (to -) extended extension . for multimedia extensions) nervy odd oust (to -) outdo (to -) outer outer outermost outward outwardly overage overdo (to -) overgrown .extensive extensively extensor exterior exterminate (to -) extermination external extinct extinction extinguish (to -) extinguisher extirpation extol extortion extra extract (to -) extract extraction extractor extradite (to -) extradition extraneous extraordinarily extraordinary extrapolate extraterritorial extravagance extreme extremism extremities extremity extrude (to -) exuberance exuberant exude (to -) foreclose (to -) foreign foreigner hike hortatory infuriating king-size limbs (pl) luxuriance luxuriant meagre misplaced MMX (abbr. for row-column scanning) row-column scanning scan (to -) scan (to -) scanning scout shipper showing sideshow skilled spiritless splay spoliation squeeze (to -) straggle (to -) strange stretch (to -) successful super surf (to -) surplus test (to -) test tip titillate (to -) unofficial unsurpassed variable expression view (to -) weird widely widespread wingtip ejaculate (to -) ejaculation ejection annoyed bassoon bassoonist bib bill billing bluff boredom bother (to -) bragging brisket .overkill overrun (to -) overseas overstate (to -) overstated overstatement overwork picnic preemptive quiz read out (to -) remarkable removable (unit) roco scanning (abbr. celebrated chemist coat-tail colloquial colloquially counterfeit counterfeiter crash data diddling de demise diffidence disrespect drugstore ease empower (to -) F (note) fabricate fabrication fabulous facade facet facial facilitate (to -) facility facsimile (& fax) facsimile facsimile faction factor faculty faggot fail (to -) failure fakir fallacy fallibility fallible false falsehood falsely falseness falsetto falsification falsify (to -) fame familiar familiarity familiarize (to -) family famous fanatic fanatical fanaticism fanfare fantasia fantastic fantastically fantasy farad . farce fascinate (to -) fascinating fascination fascism FAT (abbr. for file allocation table) fatality fatally fateful fatigue fatuous fault fault faun fauna favor (to -) favor favorable favorably favored favorite favoritism fax feasible flattening flaw fluency forgery foul ghost ghostly girdle glamorous harassment headlamp headlight humbug inattention indelicacy insincerity invoice irk (to -) kilt lap lectern lighthouse maker making manufacture (to -) manufacturing minion mire misalignment mischance mismatch misrepresent (to -) misrepresentation mistake nonpayment paper out . petticoat phalangette phalangine phalanx phallus phantom pharmaceutical pharmacist pharmacological pharmacology pharmacy pharynx phase pheasant phyringitis portability portability pout power failure practicable product family promote (to -) provide (to -) puting risk factor sash shoddy skirt splurge spook stage swashbuckler system failure tease (to -) undignified untrue untruth untruthful wearisome whitting pout wildlife zealotry FDD (floppy disk drive) arrival date blissfully calendar dates celebration chenille congratulate (to -) congratulation current date date date of birth dated dead line deadline due date end date expected date expiration date . faecal faith febrile February fecund federal federalism federate (to -) federation felicitate (to -) felicity feline felon felony felp feminine femininity feminist femoral ferment fermentation ferocious ferociously ferocity ferrous fertility fertilization fertilize (to -) fertilizer fervency fervent fervently fervor festive festivity festoon fetal fetish fetus feud feudal feudalism feverish feverishly fierce foetal happiness happy hardware manor misdeed phenomenon plush railroad start date ugliness ugly unsightly wildly womanish . womanly abend (abbr. for abnormal end) acrylic fibre auricular fibrillation backer bail bogus bondsman cardfile closure colagenous fiber decisive dependability dependable digital fingerprint digital signature dummy ED (abbr. for end of file) eventually faithful faithfully feast feign (to -) feint felt festival fever fiber fibre fibres fibril fibrous fiction fictitious fidelity fiesta figurative figuratively figure figured file file filial filibuster filigree Filipino fillet filter (to -) filter final finale finalist finally finance financial . for end delimiter) end end of file endearment ending EOF (abbr. financier fineness finite Finland Finnish firm firmly firmness fiscal fission fissure fixation fixed fixer hang up (to -) hay feber hectic fever holiday land lot leakage line loyal lurking nerve fever nicety percolation permeate (to -) Philadelphia philanthropic philanthropist philanthropy philatelist philately Philippine Philippines Philistine philological philologist philology philosopher philosophical philosophize (to -) philosophy physicochemical physiognomy physiological physiologist physiology physiotherapy pollen asthma pretend (to -) pry (to -) record reliability reliable roadbed row screen security flaws sequential file . settled sham (to -) sign (to -) signature signing staunch steadfast steadily steadiness sturdiness tight token trustee trustworthiness trustworthy trusty typhoid fever ultimately undulant fever undulant fever unflinching unmoved unswerving unwavering weekend afloat arrow bit stream blood flow bloom blooming blooming blossom buoyancy buoyant custard flabby flaccid flagrant flatulent fleet flexibility flexible flexor flirt (to -) flirtation floater flora floral florid Florida florist flotation flourish (to -) flourishing flow (to -) flow flower flowering flowing . fluctuate fluctuation fluent fluid fluidity fluorescent fluoroscope flute flux freight fringe gaunt guilder halibut lax limber loose loosely outflank phebotomy phlebitis phlegm phlegmon piccolo piper pliable pliant skinny slack slack sluggish thread thread array (to -) array background bottom brochure campfire flounder focal focus fodder foliage folio folklore follicle foment (to -) fontanel fontanelle forage forced forge (to -) forge forger form form formal formality formalize (to -) . formally format formation formative formidable formulate (to -) formulation fornicate (to -) fornication fortification fortify (to -) fortitude fortress fortuitous fortune forum fossilization fossilize (to -) front fontanel fuck up fund funding funds fundus hair follice handout jib limelight lining moat outpost outsider pamphlet phobia phoneme phonendoscope phonetic phonetics phonograph phonology phosphate photo photocopier photocopy photoelectric photoengrave photoengraving photogenic photograph photographer photographic photography photophobia photosensitive photosensitivity photosynthesis plumber rear fontanel roadstead roughage . seal shape sheathing silage stoker stranger strengthen (to -) stronghold struggle sturdy berserk blare border borderline brake brotherly brow bur candid chill chilliness chilly cold coldly coldness cool coolness din directness drill failing failure fiasco flannel flask flop flunk foliate fore forehead forthright fractal fraction fraction fractional fracture fragile fragility fragment fragmentary fragmentation fragrance fragrant frail franc France franchise frank frankly frankness . frantic fraternal fraternity fraternization fraternize (to -) fratricidal fratricide fraud fraudulent fraudulently French Frenchman frenetic frenzied frenzy frequency frequent frequently fresco fresh freshness friar Fribourg fricassee friction fried frieze frigid frigidity frigidly fringe frivolity frivolous frond front frontal frontier frontispiece fructify (to -) frugal frugality fruit fruitful fruition frustrate (to -) frustrated frustration heart frequency heart-to-heart icily iciness leafy mop notorious phrase postage psichosis puffin raspberry (color) redolent . rub (to -) scrub scullery sentence shard sink sniper splitting strawberry (color) tailcoat thwart (to -) unresponsive vis a vis anonymous FTP arithmetic function bellows boil bouncing boxcar (US) brawn broken campfire coalesce (to -) cogency consolidated dithering doughty elopement entertainment feature fire fleeting font footing force fort found (to -) foundation founder foundry fount fountain fugitive fugue fulcrum fulminate (to -) fulmination fumigate (to -) fumigator function (to -) function functional functionality fundamental fundamentally funeral fungicide furious furuncle fury . future futuristic futurology groundwork headwaters (plural) leak loud mail-merging melt meltdown merge (to -) merge merging mortuary off-line officer offside operate (to -) operation out out of service outside pillowcase power radiance runaway running sheat slow fire sly smelt (to -) smoke (to -) smoker smolder sneaky stamina stealthy strapping strength stretch pants strong strongly undertaking van vitally alveolar gas bagpipe battlements beau blue dog blue mouth bonded bug cabinet candy (to -) carafe cat cattle cattleman chamois chamois leather chevron chickpea chiffon choker clamp claw closet club cock cockerel collateral cookie cracker cudgel decanter diesel (fuel) dory Peterfish drudge earn (to -) earnings erosive gastritis expenditure expense eyeglasses finery gabardine gain (to -) galaxy galena Galician gallant gallantry galleon gallery galley gallon gallop galloping galvanize (to -) gambit gamut gamut gander ganglion gangrene gangrenous garage gardenia gargle garrulity garrulous gas gas gas station gasoline gassy gastritis gauze gazette geese gland glasses golden mullet goose gorge gourmet grazing cattle greyhound gruel guarantee guarantor guaranty gull gullet hen heron hi-end hook hooked hound house cat incidentals jimmy John Dory johndory kitten kitty livestock lope lymph gland lymph node mantis shrimp megrim mush Norway haddock ocean perch (US) paw perky petrol petrol station (UK) picked dogfish pink shrimp prawn profit puss pussy range red fish redbarsh redbream rooster scrabble (to -) scrawl (to -) scribble seagull security shabby shrimp specs spend (to -) spending spent spiny dogfish spurdog stockbreeder stockman streamer tabby talon throat thug tomcat trigger truncheon turret uppercut Wales warrant waste (to -) Welsh Welshman whiff wildcat win (to -) winner worn-out yelp Gb (gigabit) GB (gigabyte) altogether bighearted comely courteous folk gel gem gemelli gene genealogical genealogy general generality generalization generalize (to -) generally generalship generate (to -) generation generator generic generosity generous genetic geneticist genetics genital genius genocide gentile genuflection genuine geographer geographical geography geology geometer geometric geometry geophysical geophysics Georgia Georgics (the -) geranium geriatric germ germinate (to -) germination gerund gestation gesticulate (to -) gracefulness groan jellied jello jelly manage (to -) management manager manager managing moan networking people power management QM (abbr. for queue manager) selfless temperament twin blubber Geneva giant gibbon GIF (abbr. for graphics interchange format) gigabit gigabyte gigantic GII (abbr. for global information infrastructure) gin gym gymnasium gymnast gymnastic gymnastics gynaecological gynecological gynecologist gynecology gypsy gyrate (to -) gyration gyroscope hunchback jig mammoth overdraft rotation spin (to -) spin tour twirl whimper whine (to -) whirl adrenal gland adrenal gland balloon blood corpuscle blood corpuscle comprehensive Cowper's gland eyeball glacial glacier gladiator gland glandular global globe globular globulin glomerulus glorification glorify (to -) glorious glory gloss glossary glucose glutinous glutton gluttonous gluttony glycogen gobbler gormandizer gourmand icing lesser cuttlefish little cuttlefish parotid gland red corpuscle salivary gland square sweat gland white corpuscle gnome bang Bay of Biscay beat bonnet bottleneck cadge cap cap cap with earflaps chirp clout coup dab dint dribble drip (to -) dripping drop droplet enjoyment eraser fat flick foolscap golf gondolier gong gonorrhea gonorrhoea goody gorilla GOSIP-A GOSIP-C GOSIP-F GOSIP-S GOSIP-T gout gouty govern (to -) government governor governor-general governorship gudgeon gulf gummy hit (to -) hit hooligan housekeeping joyous knitted cap knock leakage pound (to -) raindrop rap rubber ruler ruling schooner shellac slam smite (to -) sparrow stroke swallow swat sweet sweetmeat thump trickle wallop antic barn bawl (to -) big bleacher bloc Britain chart chink cleavage cleft clip clot clotted clump coarseness context-free grammar crack (in rock) crane cranny crevasse cricket croak crying degree demure derrick discussion group emboss (to -) engrave (to -) engraver engraving etch (to -) etching farm farmer farmhouse farmstead fatty faucet fissure flu fracas free free funny garner garnet goodly gooseberry . grace gradation grade gradient gradual gradually graduate graduated graduation grail grain gram (US) grammar grammarian grammatical gramme (UK) gramophone granary grand grandeur grandiloquent grandiose grange granite granular granulate (to -) granulated granulation granule graph graphic graphical graphically graphite graphology gratis gratitude gratuitous gravel gravel gravely graven gravitate (to -) gravitation gravity gray grayish grease greasy great Great Britain greatness Grecian Greece Greek Greenwich gregarious grenade grenadier grenadine . griffin gringo grippe grossly grossness grotesque grotto grouch grouch group growl grumpy grunt guild hail hailstone hailstorm honk hoot huge influenza kernel large large-scale lobby mainframe newsgroup newsgroup outcry peppercorn pimple pitch pomegranate quack (to -) ranking raunchy record (to -) recorder ribald romable rook rude scale (to -) scatter graph scream (to -) scream seed seedy serious shackle shout (to -) shouting sizable sizeable snarl sound recorder split squawk staple stapler . for global system for mobile communication) batting bodyguard bouncer cloakroom cobble cobblestone dash earthworm fender forester gamekeeper garland garnish garrison gatekeeper gauntlet ghetto gingham glove good-looking governmental Guam guano guard guardian guardsman Guatemala Guatemalan guava guerrilla GUI (abbr. for grafical user interface) guidance guide (to -) guide guillotine guinea guise guitar guitarist guru gusto guttural handsome haunt hawser hyphen joker keep keeper .stoneware tape (to -) tax thank you thanks thick tier UG (abbr. for user group) yell (to -) yell GSM (abbr. keeping kindergarten lair lead (to -) like (to -) liking midshipman nursery owner's guide pea pebble product guide ranger rompers save (to -) scallop script scythe shunter signalman silkworm stew stow (to -) switchman taste throaty troubleshooting guide tutorial user's guide wadding war wardrobe warfare warrior William of Orange William the Conqueror worm wreath abaft ago axe back up (to -) backward bake beech bundle chatty cheeseburger chopper cleverness click (to -) cloy (to -) coax (to -) discuss (to -) do (to -) doer double click (to -) eastward enable (to -) erupt (to -) . exploit fairy falcon falconry famine famished find (to -) finding flour habilitate (to -) habitable habitation habitual habitually Habsburg Hague (The -) Haiti Haitian halibut halo halogen Hamburg hamburger hammock hangar Hanover harem hasheesh hashish hatchet Hawaii hawk hawker heretofore hitherto homeward hunger hungry implode (to -) incise (to -) inhabit (to -) inhabitable inhabitant inhabited inure (to -) livable logger loop (to -) make (to -) mealy oatmeal outwards pause (to -) phreaker (abbr. for phone hacker) proficiency revitalize (to -) room scoff see you later sheaf . shred (to -) single room skill speak (to -) speech starvation starving talk (to -) talkative tenement tickle (to -) till to to left to right toward towards townsman until until unto up upward wank workmanship airtight APT (abbr. for automatic programming tools) armorial authoring tools beautiful binhex (abbr. for binary hexadecimal) blacksmith blood cell counter boil (to -) boiled bracken brethren brother brotherhood buckle cleavage cleave (to -) cleft crevice deed done fact fairness feat feces female fern fissure freeze (to -) freeze frosty frozen grassy haematoma haemogram . haemophilia haemorrhage haemorrhoids handmade handsomeness harbinger hay hayfield hayloft Hebrew hectare hedonism hegemony heir heiress helical helicopter helium Hellenism helminth Helsinki hematuria hemiplegia hemisphere hemoglobin hemophilia hemorrhage hemorrhoid heparin hepatic hepatitis herald heraldic heraldry herbaceous herbal herbarium herbivorous hereditary heredity heresy heretic heretical heritage hermetic hernia heroic heroically heroin heroine heroism herpes hertz Herzegovina Hesse heterogeneity heterogeneous heterosexual hexadecimal hexagon . hexagonal hurt ice cream icy inherit (to -) inheritance inheritor injure (to -) ironwork ironworks lees (plural) marmor bream matter-of-fact rift shingles shingles sibling sibling sister sisterhood slot smith smithy sorcerer sorceress sorcery sore sorority stench stepbrother stink (to -) stinker stinking stricken striped bream tight tightly tool witch witchdoctor wizardry wound wounded acrophobia anthem assumption baste (to -) bloat (to -) bloated carbohydrate daughter dropsy embedded hyperlink endogenous depression fig grass herb hiatus hibernate (to -) hibernation . hibiscus hiccup hilariousness hilarity Hindu Hinduism hippopotamus Hispanic histogram historian historic historical historically history histrionic hyaline hybridization hydrate hydraulic hydrocarbon hydroelectric hydrogen hydrometer hydrophilic hydrophobia hydrophobic hydroplane hydrotherapy hyena hygiene hygienic hygienist hymen hymn hymnal hyoid bone hyperactivity hyperbola hyperbole hypercritical hyperglucemya hyperlink hypersensitive hypersensitivity hypertext hypertrophia hypertrophy hypnosis hypnotic hypnotism hypnotist hypnotize (to -) hypoactivity hypochondria hypochondriac hypocrisy hypocrite hypocritical hypodermic hypotenuse . hypothalamus hypothesis hypothetical hypotrophia hypoxemia hysterectomy hysteria hysterical ice iron ivy line lint medical record milestone mortgage NiMH racecourse sanitation seaplane son sonny spinner spinning spun stepchild stepdaughter subcutaneous swell (to -) swelling swollen thread (to -) thread thread wire yarn ant anthill approval baggy bake (to -) bedtime blade blood-curdling bonfire browse (to -) businessman concrete counterpart crematory crotch deep dimple dire dreadfully Dutch Dutchman electric range end time fag . fireplace fireside flake fork fork freeman fungi fungus furnace gallows ghastly gully hairpin hearth hello hi hideous Holland hollow holocaust hologram holograph holography homage home homeostasis Homer homestead homicidal homicide homily homogeneity homogeneous homogenize (to -) homograph homologous homonym homonymous homophone homosexual homosexuality Honduran Honduras honest honestly honesty honor honorable honorary horde horizon horizontal hormonal hormone horoscope horrendous horrible horribly horrify (to -) horror . horticultural horticulture horticulturist hospitable hospital hospitality hospitalization hospitalize (to -) hostile hostility hotel hour hydrangea inimical kiln lawman leaf leaflet loafer man man-at-arms manhood manslaughter mealtime men muzzle namesake nowadays oarlock oven overtime pane peak time pierce (to -) pit pitchfork planning horizon playtime pothole reputable rush hour sandwich man schedule shoulder shoulder blade shoulder pad sickle sling snout soot spreadsheet start time start time stove time time of the day timetable tinware today upstanding . for hypertext transmission protocol) abase (to -) abasement boarder bone comedown dampen (to -) dampness egg elusive ferret filch (to -) fingerprint flee (to -) footprint fume guest human humanism humanist humanitarian humanity humanly humble humbleness humidifier humidify (to -) humidity humiliate (to -) humiliating humiliation humility humor humorist humour humus Hungary hurricane larceny lodger lowly mankind meanness moisten (to -) moisture mood motherless orchard orphan pilfer (to -) pilferage poker recess sag scrawny sinecure . for Hypertext Markup Language) HTTP (abbr.validate (to -) validated validation HTML (abbr. for Internet Architecture Board) IANA (abbr. for hertz) AI (abbr. for artificial intelligence) IAB (abbr. for Institute of Electrical and Electronics Engineers) church equal equality .smoke smoky smother spindle stealing steaming steamy strike striker sunken theft time zone track Hz (abbr. for Internet Assigned Number Authority) iceberg icon iconoclast icterus jaundice contrive (to -) de going id (abbr. for identity) Idaho idea ideal idealism idealist idealistic idealization idealize ideally identical identifiable identification identify (to -) identity ideological ideology idiocy idiomatic idiosyncrasy idiosyncratic idiot idiotic idolater idolatrous idolatry idolize idyll idyllic language IEEE (abbr. for identification) ID (abbr. equalize (to -) equalizer equally equate (to -) ignition ignominious ignominy ignoramus ignorance ignorant kirk likewise not to know sameness uninformed flank (to -) boundless enlighten enlightened iliac Iliad (the -) ilium illegal illegality illegible illegibly illegitimacy illegitimate illicit illimitable Illinois illogical illuminate (to -) illumination illusion illusionist illusive illusory illustrate (to -) illustration illustrative illustrator illustrious lighting limitless sunlit unbounded undamaged unharmed unhurt unlawful unlimited accusation amount beardless commanding condensed printing dauntless dot matrix printer dot printer . driving empire enforce (to -) enjoin (to -) eventful extemporaneous extempore extemporize (to -) fake faker fanciful flippant flippantly form handicap hinder (to -) hit hot-headed hothead hotheaded image imagery imaginable imaginary imagination imaginative imagine (to -) imam imbecile imbecility imitate (to -) imitation impact impalpable impart (to -) impartial impartiality impassive impatience impatient impeccable impedance impede (to -) impediment impel impenetrability impenetrable impenitence impenitent imperceptible imperfection imperial imperialism imperialist imperialistic imperious imperishable impermeable impersonal impersonator . impertinence impertinent imperturbable impervious impetigo impetuous implacable implant (to -) implantation implicate (to -) implication implicit implied implore (to -) implosion imply (to -) imponderable import (to -) import importance important importation importer importunate importune (to -) importunity impose (to -) imposing imposition impossibility impossible impossibly impostor imposture impotence impotent impracticable impractical impregnate impregnation impress (to -) impression impressionable impressionism impressive imprint improbability improbable impromptu improper impropriety improvidence improvident improvise (to -) imprudence imprudent impudence impugn (to -) impulse impulsive . impunity impure impurity impute (to -) inappropriate indiscernible infliction injudicious inkjet printer inline image involved irrelevance lack of foresight laser printer magnet merciless mimic mimicry momentous odd pester (to -) powerless prat pretender print (to -) print printer printer printing raincoat rainwear relentless remorseless shock significance surtax tax taxation twit unbiased undefiled unforeseen ungodly unlikely unmerciful unpaid unpardonable unpolluted unpredictable unprejudiced unpremeditated unproductive unproductiveness unprofitable unpronounceable unpunished unrepentant unseemly unsuitable unsuited . for advanced control power interface) adamant additional information adjoining amazingly application (form) application engineer apprise (to -) arson arsonist artful attempt (to -) badge beginning bent bestir (to -) bigot bigoted bigotry blankly bleakness blinking boldness boot (to -) boot bottom bow (to -) bowel bowels brainy break (to -) brew brief brilliant browbeat (to -) built-in calculating callously casual ceaseless changeless childish childlike collate college completeness comprehensive comprehensive school (UK) comptroller computer graphics computerize (to -) computing . for application binary interface) accrual ACPI (abbr.untainted unutterable unwise urge visualize (to -) waterproof ABI (abbr. concerned concoction congestive heart failure contiguous contrivance cordless countless cracker cremate (to -) cross-examine (to -) daunt (to -) deathless desensitize (to -) desultory detachable disability disable (to -) discomfort discontinue (to -) disqualification disqualify (to -) disquiet (to -) dormant doubtless drawback droop dummy instruction endless engineer engineering England Englishman Englishwoman enquire (to -) enter (to -) entice (to -) entirety exception report exchange facilities (plural) facility failure faithless fearless fearlessness fickle fickleness fiddling fidgety figment fireproof fitful flammable food poisoning forecasting report formless forthwith fruitless gap gauge . GIX (abbr. for global Internet exchange) glasshouse global Internet exchange governess graft grafting greenhouse groin groundless guiltless gullible gut halt handicap hard-hearted harmless hash hatching heart failure heatstroke heckle hell hellish highbrow hint hinterland hot house hothouse hyphenation ignoble immaculate immanent immaterial immature immaturity immeasurable immediacy immediate immediately immemorial immense immensity immersion immigrant immigrate (to -) immigration imminence imminent immobile immobility immobilization immobilize (to -) immoderate immodest immodesty immolate (to -) immoral immorality immorally immortal . immortality immortalize (to -) immovable immune immunity immunization immunize (to -) immunological immunosupressors impassable impending imperative implement impregnable imsomnia in situ (latin) in vitro in-house inability inaccessibility inaccessible inaccuracy inactive inactivity inadequacy inadequate inadmissible inadvertence inadvertent inalienable inane inanimate inanity inapplicable inapt inaudible inaugural inaugurate (to -) inauguration inborn inbred Inca incalculable incandescence incandescent incapability incapable incapacitate (to -) incautious incendiary incense incentive incessant incest incestuous incidence incident incinerate (to -) incineration incinerator . incipient incision incisive incisor incite (to -) incitement inclemency inclement inclination inclined inclose (to -) include (to -) included included including inclusion incognito incoherence incoherent incombustible income income incommensurable incomparable incompatibility incompatible incompetence incompetent incomplete incomprehensible incomprehension inconceivable incongruity incongruous inconsequent inconsequential inconsiderable inconsistency inconsistent inconsolable incontestable incontinence incontinent inconvenient incorporate (to -) incorporated incorporation incorrect incorrigible incorruptible increase incredible incredibly incredulity incredulous increment (to -) increment incremental incriminate (to -) incrimination . incrust (to -) incubate (to -) incubation incubator inculcate inculcation incumbency incur (to -) incurable incursion indecency indecent indecision indecisive indefatigable indefensible indefinable indefinite indefinitely indelible indelicate indemnification indemnify (to -) indemnity independence independent independently indescribable indestructible indeterminate index (to -) India Indian Indiana indicate (to -) indication indicative indicator indifference indifferent indigence indigenous indigent indigestible indigestion indignant indignate (to -) indignation indignity indirect indirectly indiscreet indiscretion indiscriminate indiscriminately indispensable indisposed indisposition indisputable indistinct . indistinguishable individual individualism individuality individualize (to -) individually indivisible indolence indolent indomitable indoor indubitable induce (to -) induced inducement induct (to -) inductance induction inductive indulgence indulgent industrial industrialism industrialization industrialize (to -) industrious industry ineffective ineffectual inefficiency inefficient ineligible inept ineptitude inequitable inert inertia inescapable inestimable inevitable inevitably inexact inexcusable inexhaustible inexorable inexperience inexperienced inexpert inexplicable inexplicably inexpressible inextricable infallibility infallible infamous infamy infancy infant infanticide infantile . for information) infoaddict inform (to -) inform informal informant information informative informed infraction infrastructure infrequent infringe (to -) infringement infuse (to -) infusion ingenious ingenuity ingenuous ingenuousness ingest (to -) .infantry infarction infaust infect (to -) infection infectious infer (to -) inference inferior inferiority infernal inferno infertile infest (to -) infestation infidel infidelity infiltrate (to -) infinite infinitely infinitesimal infinitive infinity infix inflame (to -) inflamed inflammable inflammation inflammatory inflate (to -) inflated inflationary inflection inflexibility inflexible inflict influence (to -) influence influential info (abbr. ingestion ingestión ingrain (to -) ingrained ingratitude ingredient ingress inguinale inhalation inhale (to -) inherent inhibit (to -) inhibition inhospitable inhuman inhumane inhumanity inimitable iniquitous iniquity initial initialization initialize (to -) initially initiate (to -) initiation initiative initiator inject (to -) injection injurious injustice inland innate inner innocence innocent innocuous innovate (to -) innovation innuendo innumerable inoculate (to -) inoculation inoffensive inoperable inoperative inopportune inorganic inquisition inquisitive inroad insatiable inscribe (to -) inscription inscrutable insect insecticide insecure insecurity . inseminate (to -) insemination insensibility insensible insensitive inseparable insertion inset inside insidious insignia insignificance insignificant insincere insinuate (to -) insinuation insipid insist (to -) insistence insistent insistently insolation insolence insolent insolubility insoluble insolvable insolvency insolvent insomnia inspect inspector inspiration inspire inspiring instability install (to -) installation installment instantaneous instigate (to -) instigation instill (to -) instill (to -) instinct instinctive institute institution institutional instruct (to -) instruction instructions instructive instructor instrument instrumental instrumentalist insubordinate insubordination insubstantial . insufferable insufficiency insufficient insular insularity insulin insult (to -) insult insulting insuperable insurgency insurgent insurmountable insurrection insurrectionist intact intangible integral integrate (to -) integration integrity intellect intellectual intelligence intelligent intelligibility intelligible intemperance intemperate intense intensification intensifier intensify (to -) intensity intensive intensively intent intention intentional interaction intercede (to -) intercept (to -) interception intercession intercessor interchange interchangeable intercom intercommunicate (to -) interconnect (to -) interconnection interdependence interdiction interest interested interesting interface interface interference interject (to -) . interjection interlude intermediary intermediate interminable intermission intermission intermittent intern internal internal international internationalism internationalist internationalization internationalize internaut internee Internet internist internment internment interoperability interplanetary interpolate (to -) interpolated interpolation interpose (to -) interposition interpret (to -) interpretation interpretative interpreter interpreting interrecord gap interregional interregnum interrelate (to -) interrelation interrelationship interrogate (to -) interrogation interrogative interrogatory interrupt (to -) interruption intersection interstate interstellar interval intervene (to -) intervening intervention intestate intestinal intestine intimacy intimation intimidate (to -) intimidation . intolerable intolerance intolerant intoxication intra-uterine intraarticular intractable intranet intransigent intransitive intravenous intrepid intrepidity intricate intrigue intrinsic introduce (to -) introduction introductory introspection introspective introversion introvert intruder intrusion intubation intuition intuitive inundate (to -) inundation invade (to -) invader invalid invalidate (to -) invalidation invalidity invaluable invariable invariably invasion invective invent (to -) invention inventive inventor (to -) inventory inverse inversion invert invertebrate inverted invest (to -) investigate (to -) investigation investigator investiture investor inveterate invincibility invincible . for Internet packet exchange) irrespective (of) jitter kerning large intestine leaning leniency lenient leverage lifeless listing literate livelock lower maladjusted malaise maskable interrupts middleman misconstrue (to -) misdemeanor misfortune misinform (to -) misinterpret (to -) mistimed MIT (abbr. for Massachusetts Institute of Technology) motionless mover naive nave naïve needless nefarious nifty nod nonchalance nonchalant noncompliance nondescript nonpartisan numberless objectionable obtrusion on-demand report on-site open-air operation .inviolability inviolable invisibility invisible invitation invite (to -) invocation invoke (to -) involuntary involution invulnerability invulnerable inward inwardly IPX (abbr. for ring indicator) rundown scheduled report schemer schooling SD (abbr.overawe (to -) overflow (to -) overflow overseer overview parallel interface peer to peer planning report pointer poisoning polling privacy profitless questioning raider range receipts regardless renal failure reparation report (to -) report reprieve research researcher restless returns revenue reversal reverse revile (to -) revolting RI (abbr. for start delimiter) seamless senseless serial interface shaky shapeless shell shifty sideways single singles singly skew slant sleeplessness small intestine smart snapshot speedometer spineless start up (to -) starter starvation . step stoop strings submergence submersion subsume (to -) sunstroke swap swapping switch tactless takings tap into (to -) tasteles tasteless tenant thankless tilt timeout tireless training try (to -) unable unacceptable unaccountable unalterable unaltered unambiguous unanswerable unapproachable unassailable unattainable unavailing unavoidable unbearable unbelievably unbeliever unbending unceasing uncertain uncertainty unchangeable unchanged unchanging uncomfortable uncompromising unconcerned unconditional uncongenial unconscionable unconscious unconsciously unconstitutional uncontrollable undecipherable undefeated undefined undeniable undervalue (to -) undeserved . undesirable undetermined undisciplined undivided undocumented undoubtedly undue unearned uneasy uneducated unending unequivocal unerring unexceptionable unexpected unexpectedly unexplained unexplored unfading unfailing unfair unfaithful unfathomable unfeeling unfinished unfit unforgettable unfortunate unfounded unfulfilled ungrateful unguarded unheard unimaginable unimpaired uninjured unintelligible unintentional uninterested uninterrupted unjust unjustifiable unjustified unmanageable unmentionable unmerited unmistakable unnecessary unnegotiable unnoticed unobtainable unpalatable unprincipled unpublished unqualified unquenchable unquestionable unremitting unrest unrighteous . unripe unruly unsafe unsavory unscathed unseasonable unserviceable unsettled unskilled unsociable unsolvable unspeakable unstable unsteady unsuccessful unsure unsuspected unsympathetic untamed untenable unthinkable untimely untiring untold untouchable untouched untoward untranslatable untutored unvarying unwarranted unwitting unworthy unyielding useless vapid variable vastly weightless winter wintry wireless wiring wit witty wretched wrongful ion ionize (to -) Iowa IP (abbr. for Internet Protocol) blameless demur disrespectful fretful galling go (to -) go to (to -) go up (to -) grating . for interrupt request) irrational irreconcilable irrecoverable irredeemable irrefutable irregular irregularity irregularly irrelevant irreligious irreparable irreplaceable irrepressible irreproachable irresistible irresolute irresponsibility irresponsible irretrievable irreverence irreverent irreversible irrevocable irrigate (to -) irritability irritable irritant irritate (to -) irritated irritating irritation jaggies leave (to -) motoring nettle (to -) Northern Ireland rashness rile (to -) shop (to -) testy unbreakable unbroken unreal unreasonable unsolvable .Iran Iraq irascible IRC (abbr. for Internet relay chat) ire Ireland iridescence iridescent iridium Irish Irishman ironic ironical irony IRQ (abbr. wrath Balearic Islands Canary Islands Caroline Islands Faeroe Islands Iceland Islam Islamic island islander isle islet ISO (abbr. for value added tax) left left left left-winger leftist leftwinger boar boast (to -) boaster boastful boastfully boastfulness brag (to -) breathless breathlessly cage checkmate coop garden gardener gardening ham hyacinth jacaranda jade jaguar Jamaica jamb Japan Japanese jar . for International Standards Organization) isobar isosceles isotherm isotope isquium Israel Israeli isthmus radiactive isotope radioactive isotope radioisotope Italian Italy itinerant itinerary VAT (abbr. jasmine javelin jazz jug jug lather marbled mug nag revel reveler soap soapy swagger syrup tankard vase vaunt wheeze wheezy boss chief ginger hierarchical hierarchy hieroglyphic jargon Jersey Jerusalem Jesuit Jesus Jesus Christ lingo marshal (US) marshal (US) postmaster pullover ringleader sheik sheikh Sherry slang stationmaster syringe cuttlebone cuttlefish equestrian giraffe goldfinch horseman jingoism jujitsu rider squid dropout facetious fuck fucking full-time hockey . hump humpback hunch hunchback hunchback iota jack (in cards) jewel jeweler (US) jeweller (UK) jewelry jocular jocularity jocund jolly jovial joviality rollicking stripling wage young youngster adjudication adjudicator alongside bean bender bowler bowling bunion court courthouse dally (to -) deem (to -) equitable fair frisky gamble gambler gambling game girlish golfer horse-mackerel jamboree jerkin Jew Jewess Jewish Jewry John Lackland joint jonquil joust jubilant Judaism judge judgment judicial judicious . for Thuersday) Thursday together toy trial twiddle (to -) youth youthful Kansas karate kayak Kazakhstan Kb (abbr. for kilobyte) kbps (abbr.judiciousness juggle juice juicy julep Julius Caesar July juncture June junta juridical jurisprudence jurist juror jury juryman justice justifiable justification justify justly justness juvenile kittenish linesman misjudge (to -) oath play (to -) player playful plaything pool pun punter retired retirement rightful rollick (to -) scad set sportive suite swear (to -) swearing that's right thu (abbr. for kilobits per second) . for kilobit) KB (abbr. Kentucky KHz (abbr. for kilohertz) bandstand kilo kilocycle kilogram kilohertz kilometer kilowatt Kishinev Kishinyov kiwi mileage starter kit Kremlin A (note) ballast bark bedside bemoan (to -) bewail (to -) big prawn big red prawn bind brae brainwash brainwashing brazier brick burglar cagey can carve (to -) cast cry farming flash (to -) fleecy foil footman granger green lobster green lobster grub heartbeat hillside housebreaker housework hurl hurtle (to -) king prawn lab labial laboratory laborious labyrinth lace lacerate (to -) laceration lachrymal . laconic lacquer lacrimosity lactase lactobacilli lactose lagoon laity lake Lake Constance lament (to -) lamentable lamentation laminate LAN (abbr. for local area network) lance lance languish (to -) languor lank lanky lanolin Laos lapse laptop lariat larinx larva larval laryngitis larynx lascivious lassitude lasso latency latent lateral Latin latitude laudable laudatory launch launch program launcher launching launderette laundress laundromat laundry laundryman laureate laurel Lausanne lava lavatory laxity lengthy lick (to -) limpet lip . lixiviation lizard lobster loch locust long loopback lute maggot maze motorboat mountainside mugger noose nursing osseous scale pitiable pitiful plaintive ploughman plowman ponderous praiseworthy prawn prurient rambling regret (to -) regrettable robber rock lobster rueful rustler sand-eel scoot sea-lamprey seacrawfish shaft shaggy sheeting shoplifter side sidelong slab spear speedboat spiny lobster suckling ( (baby) suckling teardrop thief throb thrower tillage tiller tin tissue scale toilsomely unweaned (baby) wail (to -) wailing . wash (to -) washer washer washerwoman washing whitefish wool woolly work in the fields afar afield arise (to -) artificial language authoring language authoring language baneful bedrock bequeath (to -) bequest cam catchword caustic soda common sole condensed font creamery dairy dairyman deathbed Dover sole fabled far faraway firewood fourth-generation language frock coat get up (to -) grout grouting halibut Hansen's disease harrier injury kerned letters language language latrine Latvia Latvian law lawful layman leaven legacy legal legality legalization legalize (to -) legally legatee legendary . legibility legible legion legionary legislate (to -) legislation legislative legislator legislature legitimacy legitimate legitimize (to -) Leninism lens lentil leopard leper leprosy leprous lesbian lesbianism lesion lesson lethargic lettering lettuce leukaemia leukemia leviathan levitation levity lexicographer lexicographic lexicographical lexicography licking lift (to -) lifter lightness limewash lion lioness litany log lower-case letter loyalist loyalty lumberjack lyric milk milkman motto oozy probate (to -) read (to -) readable reader reading reading rise . seabed sequin shyster sign signboard slow slowly slowness slumber sound spangle sweetbread tongue uphold (to -) uplift (to -) upper-case letter uprising woody yeast abut (to -) alms ancestry appointment list bachelor batten berth bill bind (to -) birdlime blandish (to -) blarney bobcat book booklet bookseller bookshop bookshop bookstore bootblack bound (to -) boundary ridge boundary ridge bounty bunk checklist checklist clean (to -) clean cleaner cleaning cleanliness cleanly cleanness cleanse (to -) cleanser clear (to -) cleat clever coastline constrain (to -) . cookbook crippled cute dab daybook debauchery disclaimer dormouse duty-free emancipator file ( to -) file filing flashlight flatterer flattery flax free freedom freely garter hotlist hotlist index list lacing lantern leaching league leaping grey mullet lecher lechery ledger lemon lemon sole lemonade lexiviation libation libel liberal liberalism liberality liberalize (to -) liberate (to -) liberation liberator libertine liberty libidinous Libra libretto license licentious licentiousness lichen Liechtenstein Liffy ligament ligament ligature lightly . limbo lime limitation limited Limmat limousine line lineage lineal linen lingot lingual linguist linguistic linguistics liniment linoleum linseed lipocyte liquefy liqueur liquidate liquidation liquidity liquidize liquor lira Lisbon list (to -) list liter literal literally literary literature lithograph lithography Lithuania Lithuanian litigant litigation litigious litograph (to -) littoral liturgical liturgy lymph lymphatic lynch (to -) lynching lynx lyre lyricism mailing list moderated mailing-list mullet neatness output bound paperback parentage . parole pound pretty push-down list push-up list quid ready release (to -) released resourceful rid (to -) riddance roster seaboard shortcoming silt sleazy sleek slightly slime smooth spotless stainless stationer stint stripe-bellied bonito striped tuna suspenders sweetish swimmingly textbook uncontrolled unconventional unrestrained unsoiled vacant verbatim wipe (to -) yellowtail flounder arrival arrive (to -) beckon (to -) become (to -) blaze blazing call (to -) call calling carry (to -) convey (to -) cry (to -) dolphinfish drizzle fill (to -) flame flash flat flatness full key . latchkey lead (to -) llama lug (to -) mist mist mourn (to -) newsy (US) panicky plain plainness plantain pour rain (to -) rain rainy replenish (to -) showery so-called sore spanner staring stopcock striking tearful tire tote (to -) transact (to -) weep (to -) weeping winder wrench absurdity accomplish (to -) achievement announcer ASAP (abbr. for as soon as possible) attain (to -) attainment blossom bundle buxom canvas china cockney commendable commendably conversational crazed crazy creditable eel-pout find (to -) flagstone footage full length insanity knoll local localization . for lines per inch) archive site bass birthplace blinker bright daylight fight (to -) fight firefly firelight glitter glossiness honeymoon .localize (to -) locally locate (to -) location locomotive locomotor locution lodge logarithm logistics logo logotype loin London longevity longitude longitudinal loquacious loquacity Lorraine lot lotion lottery lotus lunacy lusty madly madman madness most mud newscaster parrot rasher search (to -) slice sliver slop slosh sludge sufficiency thriving troubleshooter (US) wavelength white hake wolf LPI (abbr. jackfish jake lecherous lewd lieutenant light Louisiana lubricant lubricate lubrication lubricity Lucerne lucidity lucrative lucre lumbago lumbar luminary luminosity luminous lunar lunatic lust lustful lustrous Lutheran luxation Luxembourg luxurious luxuriousness luxury mole mon (abbr. for Monday) Monday moon moonlight moonlit moonstruck mourning pike pike-perch place scuffle sea-wolf sheen (to -) shimmer standing starlight stead sunlight venue villager wrestle (to -) wrestler wrestling linfa Lyon abattoir accursed Adriatic Sea . ADU (abbr. for automatic dialing unit) Aegean Sea airsick apple armless auto-dial baboon bad badly badness ballan wrasse Baltic Sea bedlam besmirch (to -) birthmark Black Sea blanket blemish blotch bookmark (to -) bookmark bookmark bookmark bossy brand brown brushwood bulkhead bully bunch bundle burrow butler butter butterfish butterfly capital caps casement caterwaul chalk chamomile chart chew (to -) chewable chewer churn clatter clickable image map cob commandment conjurer corn corn cornstarch crab apple crabby crank craze curse . cursed cutlass daisy damaged damn damned dank dapple (to -) dappled dial-up (to -) disrepair dot matrix dough driftwood drove dungeon e-mail (to -) elder elderly embezzlement enrollment errand evil extent fade (to -) fax (to -) fibrous muff fleck flowerpot forenoon frame fretfulness fucking gavel gear gentle glum go (to -) godmother greater than green wrasse ground grumpy haggard half-baked hammer (to -) hammer hammering hand handbag handbook handful handle handling handwriting hank hardwood herd hollyhock honeysuckle . for milliampere) macabre macaroni macaronic macaroon mace Macedonia macerate (to -) maceration machete machinate (to -) machination machinery machinist macho mackerel shark macro macrocosm macrocosmic Madrid madrigal maestro Mafia magic magician magisterial .hoodlum hose husband ill-bread ill-mannered impolite impoliteness inky insulating material intermarriage Irish Sea jaw jawbone jetty jinx judiciary juggler kill (to -) killing kingfisher knack ladybug land-mass landlubber lard largely ling loam log magnitude lovesickness lower maxillary lumber lumbering lumberman mA (abbr. for metropolitan area network) manage (to -) manageable mandarin mandate mandible mandolin mandrel maneuver mango maniac maniac-depressive manicure manicurist .magistrate magnanimity magnanimous magnate magnesia magnesium magnetic magnetism magnetization magnetize magneto magnificence magnificent magnify (to -) magnitude mailing Maine maintain (to -) maize maize majestic majestically majesty major Majorca majority make-up makeup malar malaria male malefactor malevolence malevolent malice malicious malign malignancy malleable mallet malt maltreat (to -) maltreatment mama mammal mammy MAN (abbr. manifest manifestation manifesto manipulate (to -) manipulation manipulator manna mannequin manner manometer manpower manual manually manufacture (to -) manuscript map marathon march March margarine marge margin marginal marijuana marine mariner marionette marital maritime marked marker marketing marquee (US) marriage Mars Marseille marshal marsupial martial Martian martini martyrdom marvel marvelous Marxism Marxist Maryland mascot masculine masculinity mash masochist masochistic masonry masquerade mass Massachusetts massacre massage masseter . slave masticate mastication mastiff masturbate (to -) masturbate masturbation material maternal maternity mathematical mathematician mathematics matinee matrass matrimonial matrimony matrix matron matter mature (to -) maturity maul mausoleum maximize (to -) maximize May mayonnaise mayonnaise meager mean Mediterranean ling Mediterranean Sea meek meekness mellow meow mesh mesmerize (to -) mew miaow misappropriate (to -) misconduct mishandle (to -) mismanagement mistreat (to -) misuse Mohammad Mohammed Mohammedan mollycoddle mom mommy moody morning .masseur masseuse massive massive master master. Morocco morose morrow mother motherhood motherly motorman muff Muhammad mum mumble (to -) munch (to -) naughty navy North Sea nuance on-site maintenance OSI (abbr. for open system interconnection) pacemaker page frame palatial pasta peevish percussor pier plaid pockmark popcorn porpoise postmark pound (to -) pressure gauge princely publishing (desktop -) putty raw material remedial maintenance reverse rim ringmaster ripe ripen (to -) sailor satchel schoolmaster schoolmistress sea seafarer seafaring seafood seagoing seaman seasick seasickness seaworthy send (to -) senior service shades (plural) shambles . shaver shellfish shrivelling skein slaughter slay (to -) sleeve slur smear smudge spa spanking speck spot spotted squander (to -) stain stateliness stately stationery stepmother steward stuff stuffy sucker suitcase sulky sullen sunspot superb support (to -) tablecloth taint tame tamper (to -) tangerine (color) taper teacher textbook thicket tide tights timber tomboy tomorrow touch tone dialing trademark trademark tue (abbr. for Tuesday) Tuesday tuition tutorial undergrowth underpaid undersell (to -) undisguised unmannerly unsecured unwelcome unwholesome . for megabits per second) about-face admixture ameliorate amelioration average average beggar beggary better betterment blend blended blue mussel brainless bubble memory buffer buffer businesslike cantaloupe canter cerebrospinal meningitis cheek clockwork coats common mussel core memory courier denim dent deserve (to -) deservedly deserving drapery . for megabit) MB (abbr.upper case upper maxillary valise waste of money wasteful way wedlock wicked wickedness wield (to -) wilt (to -) wither (to -) withered wizard wonder wonderful wonderfully wondrous wood woodwork wrong wrongdoer wrongdoing wrongly Mb (abbr. for megabyte) mbps (abbr. dusky perch dwindle (to -) ebb (to -) enhance (to -) enhanced entourage environmental European hake external cache memory facilities (plural) fib fibrous membrane filmy finicky frigate mackerel fussy gauge (to -) goal godsend grapeshot grouper haberdasher haberdashery hake half half-breed half-day half-height half-holiday half-hour half-mast halfpenny halftone haw hodgepodge improve (to -) improvement information message jam jellyfish jumble junior least lemon sole less less than lesser letterhead liar lie (to -) lie locket lying mane maraud (to -) marauding market marketing marmalade mart . mean meander means (plural) measurable measure measurement mechanic mechanical mechanics mechanism mechanization mechanize (to -) Mecklenburg Mecklenburg-West Pomerania medal media media medial median mediate (to -) mediate mediation mediator medicament medicate (to -) medication medicinal medicine medieval mediocre mediocrity meditate (to -) meditation meditative Mediterranean medium medley mega megacycle megahertz megalomania megaphone meiosis melancholia melancholic melancholy melanocyte melanosoma mellifluous melodic melodious melodrama melodramatic melody melon membrane membranous memo memoir memorable . memorandum memorize (to -) memory menage mendacious mendacity mendicant meningitis meningococcus meniscus menopause menses (plural) menstrual menstruate (to -) menstruation mensuration mental mentality mentally menthol mention mentor menu mercantile mercenary merchandise mercurial Mercury mercury mere merely meridian meringue meritorious Merovingian mesentery messenger messiah messianic metabolism metabolization metacarpus metal metallic metalwork metamorphosis metaphor metaphoric metaphysical metaphysics metatarsus meteor meteoric meteorite meteoroid meteorological meteorologist meteorology meter (to -) meter . for queue telecomunications access method) quadratic mean quicksilver quince rocker rocking chair serviceman shrink (to -) sinovial membrane slaver spearmint stocking . for Most Valuable Player) next month nick noon noonday object-oriented ore peach (color) peppermint plain bonito plateau pole-dab pop-up menu prowl push media put (to -) QTM (abbr.methane methodical Methodism Methodist methodology methyl meticulous metonymy metronome metropolis metropolitan Mexican mezzo-soprano mid midday middle middling midnight mind mingle (to -) minor minus mirthless mix mixture molasses (plural) mongrel month monthly mosque Most Valuable Player mussel MVP (abbr. subside (to -) subway table table tableland treacle tune typewritten typing typist underprivileged upgrading upturn wag waggle wane (to -) ware warning message weatherman whiting wick wiggle wildcard witch MFLOPS MHz (abbr. for billion of instructions per second) blackbird collier colliery cornfield crinoline crumb data mining docket dread E (note) electron microscope envisage (to -) fear fondle (to -) fright gaze glance glower goggle grackle half handicapped handset honey hysteria leer lessen limb look at (to -) lurker . for megahertz) behold (to -) billion billion BIPS (abbr. meanwhile member merciful mercy Miami Michelangelo micro microbe microbiological microbiology microchip microcosm microelectronics microfiche microfilm microgram micrometer micron micronize (to -) microorganism microprogramming microscope microscopic microsecond miction midway mielyn migraine migratory mike Milan mile mile militant militarism militarist militarize militate (to -) militia militiaman millennial millennium millet milliampere milligram milliliter millimeter million millionaire millionth MIME (abbr. for multipurpose Internet mail extensions) mime miner mineral mineralogist mineralogy miniature miniaturize minimize (to -) minimize (to -) . mining ministerial Minnesota minority minuet minuscule minute minutely minutiae MIPS (abbr. for million of instructions per second) miracle miraculous miscellaneous miscellany missile mission missionary Mississippi Missouri mitigate (to -) mitigation mitosis mitral mitt mitten my myocardium myopia myopic myriad myrtle mysophobia mysophobia mysterious mystery mysticism myth mythology pamper (to -) phase-contrast microscope poverty prosecution regard (to -) retailer same scope searching self shit stare (to -) sundries telephone handset thorough thousand thousandfold thousandth tribesman trouper uncanny undermine (to -) . very voyeur (French) wed (abbr. for Wednesday) Wednesday wee while whilst wicker mnemonic MNP (abbr. for constructive cost model) coin colour monitor (UK) counter deadly deathly derision die (to -) display (to -) doubtful dumbwaiter dunk (to -) dwell (to -) dweller dwelling engrossing fashion flecked fly foreign currency gag grind (to -) grinder grinding grinding . for Microcom Networking Protocol) annoy (to -) annoyance annoying answer-only modem antler ape assembly backpack balderdash base model bite (to -) bite boiler suit bologna bother (to -) bothersome boundary stone brandish brat brunette budge (to -) chagrin champ (to -) chignon clientserver model COCOMO (abbr. grist hassle haversack heap hookup housefly huddle idiom inconvenience instant jumpsuit kernel mode knapsack landmark manners (plural) measured mechanical saw mildew mill miller milling mobility mobilization mobilize (to -) moccasin modal mode model modeling moderate moderately moderation moderator modern modernize (to -) modest modestly modesty modification modifier modify (to -) modulate (to -) molar mold mold Moldavia moldy molecular molecule molest (to -) molestation mollusk moment momentarily momentary momentum monarch monarchic monarchist monarchy . monastery monasticism monetary moneybag monitoring monk monkey monkish monocle monogamous monogamy monogram monograph monolith monolithic monologue monophonic monopolist monopolize monopoly monosyllabic monosyllable monotone monotonous monotony monsignor monsoon monster monstrosity monstrous Montana Montenegro monument monumental moraine moral morale moralist morality moralize (to -) moratorium Moravia moray morbidity mordant morgue moribund Mormon Mormonism morphia morphine morphology mortal mortality mortar mortification mortify (to -) mortise mosaic Moscow . Moses mosquito motel motif motility motion motivate (to -) motivation motive motor motorbike motorcycle motorcyclist mould mouldy mound mount (to -) mount mountain mountaineer mountainous mounted mounting movable move (to -) movement Mozarab mucus mummify (to -) mummy musket musketeer mustard (color) musty mutiny nibble nuisance nun obnoxious obtrusive pattern pesky pile purse QAM (abbr. for quadrature amplitude modulation) reason ride (to -) rucksack rust rusty show (to -) shroud skunk slacken (to -) snot snotty sodden soppy spotted starve (to -) . for dual tone multifrequency) dual tone multifrequency dumb dummy dunghill fine flake furnishing furniture girl grimace grimy grin grindstone highly huss joggle lad lassie lots maim many .stir streamlining stud swarthy taunt (to -) tawny toothpick troublesome trying unassuming unfreeze (to -) unobtrusive unpretentious vex (to -) vexation vexatious waiter walrus wet windmill ammo ammunition backbite (to -) bailey bluestocking boy boyhood brawny businesswoman changability changeability chap crowd crutch dead death dogfish doll DTMF (abbr. ammo ammunition backbite (to -) bailey bluestocking boy boyhood brawny businesswoman changability changeability chap crowd crutch dead death dogfish doll DTMF (abbr. for dual tone multifrequency) dual tone multifrequency dumb dummy dunghill fine flake furnishing furniture girl grimace grimy grin grindstone highly huss joggle lad lassie lots maim . many artless bdelygimia birth born browser buttock Christmas cream daffodil jackknife nadir nanosecond naphtha narcissism narcissus narcosis narcotic narrate (to -) narration narrative narrator nasal nascent natal nation national nationalism nationalist nationality nationalization nationalize nationalized native nativity natural naturalist naturalize naturally . naturalness nature nausea nauseate (to -) nauseous naval Navarre nave navigability navigable navigate (to -) navigation navigator Nazi net surfing nil nobody nose nothing nought nylon orange (color) pearly queasy rapporteur razor razor shell sailing shipwreck sickening spacecraft spaceship stillborn surf (to -) surfer swim (to -) swimm (to -) swimmer swimming trifle turnip NCSA (abbr. for National Center for Supercomputing Applications) bargaining black blackish boldface business business counteract (to -) counteraction deniable deny (to -) fog fool hazy icebox intersticial nephritis jib jittery lobar pneumonia . for NetBIOS extended user interface) neural neuralgia neurologist neurology neuron neuronal neurosis neurotic neuter neutral neutrality neutralization neutralize neutron Nevada pneumatic pneumococcus pneumonia .malpractice mist mnemonic mnemonic Nebraska nebula nebulous necessarily necessary necessitate (to -) necessity necromancy nectarine need need needful needs (plural) needy negate (to -) negation negative negatively negativism negligee negligence negligent negotiable negotiate (to -) negotiation neologism neon neophropaphy neoplasia nephron nepotism Neptune Nero nerve nervous nervousness net NetBEUI (abbr. refrigerator refusal require (to -) retread rib rookie sinew sinewy snow (to -) snowfall tire tot access level aerie babyhood babysitter child childhood fog grandchild granddaughter grandson haze kid level (to -) level LLC (abbr. for newtonmeter) American arresting behalf betrothal betrothed boyfriend bride bridegroom commonly designation . for link level control) nanny neither nest Nicaragua Nicaraguan niche nicotine nitrate nitrogen nitroglycerin none nor not even nymph previous level priority level sea-level sharpness slush snow standing toddler Nm (abbr. fad first name flagrantly footnote forename freshman full name girlfriend groom ground rules hickory homesick homesickness host name ignore informal invalid local node misnomer name (to -) name nay nevertheless newness news (plural) news newsreel newsworthy night nightly nighttime ninetieth ninety ninth no Noah nobility noble nobleman nobleness nocturnal nocturne node nomenclature nominal nominate nomination nominative nominator non-aggression non-combatant non-profit non-proliferation non-standard noncombatant nonetheless norm normal normality normalization . normalize (to -) normally normative north northeast northeastern northerner northwest Norway Norwegian nostalgia not not ready not ready notable notably notary noted noteworthy noticeable notification notify (to -) notion noun nova novel novelette novelist novelty November novena noxious obituary observable ordinarily out of service owner name policy regular remark (to -) remarkable remarkably rule sound note standard standard standardization standardize (to -) steer strikingly sweetheart tamper-proof tenderfoot tidings unabashed unadvisable unappreciated unasked unauthorized unavailable . for nanosecond) anew butterfly knot cloud cloudiness cloudy daughter-in-law double fisherman's knot double knot figure of eight (knot) foggy gnarl gnarled knot knotty knuckle medalist nape never nevermore new New York newfangled nil nine nourishing nourishment nuclear nudist null numbering .unborn undetected undigested undistributed undrinkable uninsurable uninsured unmarketable unmitigated unmounted unprintable unread unregistered unreliable unresolved unsaid unsatisfied unseen unsold unspecified untrained untried unused unworldly unwritten username valentine valentine we ns (abbr. numerate (to -) numeration numeric numerical numerous nuptial nut nutrient nutrition nutritious otter our overcast (to -) reorder slipknot spic-and-span threaded overhand (knot) unworn walnut water knot oasis allegiance askance bar (to -) bawdiness bawdy beholden bishop bishopric BLOB (abbr. for binary large objects) blockage blue collar workers bottleneck compel (to -) cross-purposes cynosure dutiful enforce (to -) engagement farmworker handwork howitzer laborer liability longshoreman mandatory masterpiece metalworker obedience obedient obediently obelisk obese obesity obey object objection objective objectivity objector . obligate (to -) obligation obligatory oblige (to -) oblique oblong oboe obscene obscenity observance observation observatory observe (to -) observer obsess (to -) obsession obsolescence obsolescent obsolete obstacle obstetrical obstetrician obstetrics obstinacy obstinate obstruct (to -) obstruction obtain (to -) obtuse obvious obviously opinionated pig-headed remarks ribaldry smut somber sprite stargaze (to -) stonework stoppage stout treat wafer worker workman Xobject afterthought befall (to -) boar fish busy byte (by eight) conceal (to -) concealment dawdler eight eighth eighty eyeglass goings-on . happen (to -) hidden hide (to -) hiding idle idleness idler leisure occasion occasional occident occidental occipital occlude (to -) occlusion occult occupancy occupant occupation occupied occupier occupy (to -) occur (to -) ocean oceanic ocher octagon octal octane octave October ocular oculist Pacific Ocean sunset western abhorrence dentistry hate (to -) hate hateful hatred heinous invidious ode odious odium odophobia Odyssey (the -) OEM (abbr. for original equipment manufacturer) west befriend (to -) bid clerk offence (UK) offense (US) offensive offer (to -) offer offering . office official officially officiate ophthalmic ophthalmological ophthalmoscope post office ogre Ohio ohm bulging eyes buttonhole eye eyelet keyhole warhead billow boiler breaker elm flair forget (to -) forget (to -) forgetful forgetfulness fuggy kettle oblivion oblivious odor odorous oleaginous olfactory oligarchy oligoelement olive cultivation olive grove olive grower olive grower pot scent smell (to -) smell sniff (to -) wave almighty navel ominous omission omit (to -) omnipotence omnipotent omnipresence omnipresent omniscience omniscient omnivorous skip (to -) billowy . N. for United Nations) undulate undulation wave wavy antagonize (to -) assignment operator available choice cameraman chance choice contestant contradictory convenient default felicitous floating point operation housekeeping lineman logical operator opacity opaque operand operate (to -) operating operation operative operator operetta opinion opium opportune opportunism opportunist opportunity oppose (to -) opposed opposite opposition oppress (to -) oppression oppressor opt (to -) optimist optimistic optimize (to -) option optional optional optometry opulence .corrugate (to -) corrugated ECG waveform eleven onomatopoeia onomatopoeic ounce ripple rounce U. (abbr. for network computer) nostril notebook oracle oral orangutan oration orator orb orbital orchestra orchestral orchestrate (to -) orchestration ordain (to -) ordeal orderliness orderly ordinal ordinary ordinate ordination Oregon organdy organic .opulent overbear (to -) switch (of a program) sysop timely agenda all-purpose computer analog computer arrange (to -) assort (to -) briefcase computer bubble sort bullion caterpillar command computer directional disciplinarian drain hole drain hole ear eastern edge five-part forms flowchart gold haughtily haughtiness haughty hole home computer key-to-disk computer laptop milk off (to -) milker NC (abbr. for personal computer) pray (to -) prayer pride prideful primal proud remote computer roadside ruggedized computer shore sort (to -) sorting sorting speaker spellbinder spelling tidiness tidy urinate (to -) urine WMC (abbr. for warning and maintenance computer) x value anteater bear blackness common oyster dark darken (to -) darkness dim .organism organist organization organize (to -) orgasm orgy orient oriental orientate (to -) orientate (to -) orientation orifice origin original originality originally originate (to -) originator ornament ornamental ornamentation ornithology orphanage orthodox orthodoxy orthographic orthopaedic (UK) orthopedic (US) palmtop computer PC (abbr. for Open Systems Interconnection) Oslo ossification ossify (to -) ostensible ostentation ostentatious osteoblast osteopath ostracism oyster Portuguese oyster shadowy sway again another autumn autumnal else other other otitis otoscope ewe oval ovary ovation ovulation sheep Oxford oxidize (to -) oxygen oxygenate (to -) oxygenation listener ozone aisle alignment pin applications package backlit screen backyard bacon baggy pants baker bakery bale of straw ballot bandanna banister .dingy dusky flaunt gaudy gloom gloomy koala obscurity oscillate (to -) oscillation oscillator OSI (abbr. barium pap barrow Basque Country beating big-eyed tuna bilge bill fish bitmap display blotter bog bonus boor bow-tie bowlegged bracket bread breastwork brightness lever broadcloth broiler broomstick brown bud bumper bus stop bygone cake candlewick childbirth chips (plural) civilian clap clapper clique cloven clown clubfoot computer paper contrast lever cookie corduroy couch's sea bream couch's sea bream country couple couplet courtier courtyard crowbar cyberpark dad daddy depart (to -) departure diaper display disposable nappies dough dove drab . drapery drumstick duck duckling Easter employer endurance enduring even even parity everglade facing fairground farmyard father fatherhood fatherland fatherly fax (to -) flash (to -) flicker footstep forbearance forbearing foreleg forever forward (to -) front panel FYI (abbr. for for your information) gab gang gangway gateway getaway glare-free screen godfather grill grizzly hallway halt halve (to -) handkerchief hangnail happen (to -) heathen heathenism herdsman high end of a range homeland honeycomb horseplay in-law information packet jackstraw jaunt jeans jodhpurs joystick kerchief kin . kindred kinfolk kinship kinsman kinswoman lampoon land lot landscape landscape leisurely lever loge look (to -) loon lout low end of a range lurid mail gateway mall mansion marsh meadow midwife midwifery morass muffin multipart forms mumps neckerchief Netherlands (the -) newsprint odd parity onionskin outmoded overpass pa (FAM) pa pace pacific pacification pacifier pacifism pacifist pacify (to -) package packet pact pagan pagoda paid pair pair palace palatal palate paleness paleontological paleontologist paleontology palette . for personal area network) panacea Panama Panama hat Panamanian pancake panda pandemonium pannier panoply panorama panoramic pant panther panting pantomime pants panty papa papacy papal papaya paper papilla papist papyrus parable parabola parachute parachutist paradigm paradise paradox paradoxical paradoxically Paraguay Paraguayan parallel parallelism parallelogram paralysis paralytic paralyze (to -) paramedic parameter paranoia parapet paraphrase parasite parasitic paratrooper .palletization palliative pallor palm palpable palpably palpitate (to -) palpitation palsy PAN (abbr. paratroops paratyphoid parcel parental parenthesis parenthood parents parietal Paris parish parishioner Parisian parity park parliamentarian parliamentary parochial parody paroxysm paroxysmal parry parsimonious parsimony part partial partiality partially participant participate (to -) participation participle particle particular particularize particularly partisan party pass (to -) pass passable passage passage passageway passenger passing passion passive passport past pasta paste pastel pasteurize pastime pastor pastoral pastry pasturage pasture pat . for plasma display panel) peace peaceable peaceful peacemaker peacock peer pie pigeon pitch planking playground plot popcorn Pope popery porgy porgy potato prepaid prepay (to) .patch patch a program (to -) patent patented paternal paternity pathetic pathogen pathogeny pathological pathologist pathology pathos patience patient patio patriarch patriarchal patrician patriot patriotic patriotism patrol patron patronage patronize (to -) pattern pattern patty pause (to -) pause pave (to -) pavilion paw pay (to -) pay-per-view payable paymaster payment PDP (abbr. prepayment promenade promissory puck quickstep raisin ramble (to -) rattler rear panel red bream relative resemblance resemble (to -) riding role saunter sauri scenery scooter seem (to -) setting settlement shepherd shepherdess shovel shovelful side planking sideburn skate (to -) skate skateboard skater skating slacks slap slob slob smuggle (to -) span spank spar speaking split (to -) split screen sponsor (to -) sponsor sponsoring spree stationery step stepfather stick stop (to -) stop (to -) stop to do (to -) STP (abbr. for shielded twisted pair) straggler straw stride stroll . for unshielded twisted pair) velveteen wall walloping wallpaper whereabouts windscreen windshield wonderland word yard adjusting period afford (to -) alimony allow (to -) allowance allowed angler angling appointee appurtenance apropos assessment assessor atherine atmospherics backstitch ball .stroller strut sufferer supertwist display supporter suspend (to -) swamp swampy swimmer crab switch to (to -) tambourine tap taste bud thereabouts thrashing throbbing tilting screen titmouse toothpaste toothpaste top touch touching tramp travesty trousers trowsers turkey tweed umbrella underpass unfashionable UTP (abbr. barnacle belong (to -) belonging beseech (to -) bit bitch blind body penetration bolt bore (to -) bosom breast broadbill bubonic plague burdensome but call for papers camel-hair cartoon character catchy catfish cement character chase (to -) chase chaser chest chiropodist cogitate (to -) coiffure collie comb combing condone (to -) confounded continuance crave (to -) cucumber cur customize (to -) cutlassfish damaging danger dangerous dangerously davit dawdle (to -) demand (to -) demand detrimental dickey disservice distressing disturb (to -) disturbance disturbingly divorcee dog dogfight drained weight . FAM) flank (to -) flint fluff fop forgive (to -) forgiveness freckle freckled frostfish furlough gluey goatee goose-barnacle GOSIP (abbr. for Government OSI Profile) Government OSI Profile grief hair hair-tail hairdo hairdresser haired hairless hairpiece hairy hammerhead handball hanger hardship haunting hazard heavily heaviness heavy heavyweight heft hefty hit (to -) horsehair hot dog hotdog hurtful .earring embarrassing enhancement eyelash farsighted faultlessly featherweight fibula fight (to -) film firecracker fish (to -) fish fish fisherman fishery fishing fishmonger flame (to -. husk impersonate (to -) impersonation inquest insider insight insightful jaywalker John Dory journal journalism journalist journalistic keen kennel key punch knob lash latch lazy leafstalk let (to -) lightweight little lose (to -) loser losing lost manger maximum weight minnow missing mope morsel movie mysophobia newspaper newspaperman nightmare nip (to -) nipple oil (crude -) order outlast (to -) outlook outstanding overstitch paediatric (UK) painful pansy parakeet pardon pare (to -) parsley partridge pasted pawn pear pearl pearly . peculiarity pecuniary pedagogue pedagogy pedal pedestal pedestrian pediatric (US) pediatrician pediatrics pedigree peduncle peel peeling pejorative pelican pellet pelvic pelvis penal penalty penance pence (plural) pendant pending penetrate (to -) penetrating penetration penicillin peninsula peninsular penis penitence penitent penitentiary Pennines Pennsylvania penny penologist pension pensioner pensive pentagon penury peon percale perceive perceptible perception perch perch percussion perdition perennial perfect perfection perfectly perfidy perforate (to -) perforation . perforator perfume perfumery perfusion pericardium peril perilous perimeter perineal period periodic periodical periodical periodically periostium peripheral periphery perish (to -) perishable peritonitis perjure (to -) perjury permanent permanently permeability permeable permissible permission permit (to -) permutation pernicious peronist perpendicular perpetrate (to -) perpetual perpetually perpetuate (to -) perpetuity perplexed persecute (to -) persecution perseverance persevere (to -) persevering persist (to -) persistence persistent person personage personal personality personalize (to -) personally personification personify (to -) personnel perspective persuade (to -) persuasion persuasive . for request for comment) robin roost sand-melt scented schuck scroll scruff sheepdog .pertain (to -) pertinent perturb (to -) Peru Peruvian perverse perversion perversity pervert pessary pessimism pessimist pessimistic pest pestilence pestilential petition petitioner petrify (to -) petroleum petty piece pierce (to -) pierce (to -) piercing pilgrim pilgrimage pip platoon pole-and-line fishing poodle prejudicial profile prospect puncture pursue (to -) pursuit puzzlement quarrelsome rack ragamuffin redheaded regretful relevance relevant remain (to -) renal pelvis request (to -) request requisition retriever RFC (abbr. shiftless silver eel silverside sin sinful sinner slacker sloth slothful small smallness sorely sourpuss spaniel speckle speckled sprocket holes squab squabbler stalk stem sticker sticking sticky stray streamline stump swap swordfish teeny think (to -) thinker thinking thought thoughtful tiresome toilsome token toll tough tracker trough unbecoming underdog unflagging unwieldy user request vista wallflower watchdog weakling weigh (to -) weight weighty whisker wig wink woe wolf-fish worse . worst write protect notch airstrip allspice battery beak bearskin biopsy forceps bite blackboard blood diluting pipette bullfinch calfskin chaffinch chalkboard chessman clue cornerstone depict (to -) devotional fake fur fireworks floor foot footer footfall fur goatskin godliness godly graffiti greenhorn gunman guttersnipe hack (to -) hacker handgun hash hogshead holster hone ice axe itch (to -) jab jot leather leg louse lousy millstone mince (to -) modicum nosedive paint (to -) paint painter painting pajamas paprika part . peck pelt penguin pepper peppery pianist piano picket pictorial picturesque pier piety pigment pigmentation pigmy pigskin pike pillage pillar pilot pincers Pindus (Mountains) pine pineapple PING (abbr. for packet Internet groper) pinnacle pint pioneer pipe pipette piracy pirate Pisces pisiform pistachio pistil pistol piston pituitary pity pivot pizza plunder pool prongue pumice pungent pygmy pylon pyramid pyramidal pyre Pyrenees pyrophosphato pyrotechnics python quaint racecourse racetrack rascal . redskin rind rink rock roguery runway sandstone skin slate software piracy spades spicy spout sprig stack sting stone style suede suede swimming pool swivel tank tine track trample (to -) tweezers urchin villous whetstone whit added value American plaice approach banana beach board chat (to -) chat collapsible commoner crease culture plate dab dead line design dish duster escrow feather feathery flat flounder fluke fold (to -) fold folding gangplank glider glut . griddle insole installment iron (to -) jib lawsuit layout lead mangle midwinter nameplate pallbearer parquet pen pen-style piazza placebo placenta plagiarism plagiarist plagiarize (to -) plague plaice plait (to -) plan planet planetarium planetary plankton planning plant plantain plantation plasm plastic plate plateful platform platinum Plato pleasure pleat (to -) pleating plebeian plebiscite pleurisy pleuritis plotter plumage plumb plume plural Pluto plutonium policy quill rough-back sand-crab saucer schedule (to -) . for acceptable use policy) bearer because become rancid (to -) bedridden beggarly bidder blacklist (to -) bobby buckshot can (to -) carrier carrier chick chicken china cogent colt compact computing power consequently containerize (to -) controversial controversy conveyor cop cornet decay default (by -) dessert doorman draw well dust dusty endanger (to -) enqueue (to -) few filly flying squid foal foothold for .scheduling silver silverware silvery sneakers sole square stencil tablet template term time-out turntable white fluke across addle alike at least AUP (abbr. for) per percent percent percentage pigpen pigsty please Po podium poem poet poetic poetical poetry Poland polar polarity Pole pole .forceful forcibly fuck gaudiness goalpost guidepost hence hind holder host hostel hostelry imperil inconclusive inelegant inn ins last lay (to -) location lodge lot luckily may (to -) mightily mighty misbehave (to -) moth muck negative percent odds (plural) of course OOP (abbr. for object oriented programming) overboard overland owlet paper patrolman pauper payee pct (abbr. for post office protocol) poplin populace popular popularity popularize (to -) popularized populate (to -) population porcelain porch pore pornographic pornography porous port portable portal porter portion Portugal Portuguese position .polemic police policeman policy poliomyelitis Polish political politician politics polka pollen pollination pollution polygamous polygamy polyglot polygon polymorphic polynom polynomial polynomial polyphony polysemic polysyllabic polytechnic polyvalent pomp pomposity pompous ponder (to -) pontiff pontificate pontoon pony poop poor poorly POP (abbr. positive positively possess (to -) possession possessive possessor possibility possible possibly postal postdate posterity postgraduate postoperative postpartum postpone (to -) postpone (to -) postscript posttraumatic postulate postural posture postwar potassium potency potent potentate potential potentiality potentialization potentiation potion poultry poverty powder powdery power power powerful presenter presently prostrate pruning punch put (to -) putrid queue (to -) queuing receivable rot rotten roughen (to -) shallow shallowness signpost sky rocket (to -) sourpuss spokesman spokesperson sports centre . for point-to-point protocol) accounting software accrual accuracy accurate adage adjourn ADP (abbr. for dots per inch) PPP (abbr. for automatic data processing) advancement advisability advisably aforethought aim (to -) algorithmic process allegedly alpha test .squat (to -) stake stance stanchion stand start (to -) start up (to -) stern sty thereby therefore this way through thud town unaccommodating unanswered unattractive uncharitable uncomplimentary unconvincing underdone unethical unfamiliar unfriendly unimportant uninteresting unnatural unorthodox unreliable unsatisfactory unscrupulous unsophisticated untrustworthy update (to -) upgradeability vector wattage weighting West Pomerania whereby why wicket dpi (abbr. for bootstrap protocol) bootstrap protocol BOP (abbr. for automatic receiver program) array processor ask (to -) augur auspicious automatic programming average background program ban bearing beginner beginning benchmark program benchmark test benchtest bereave (to -) bereaved beta test betoken bias bias bias binoculars bit orientated protocol blood pressure blurb bode (to -) BOOTP (abbr. for bit orientated protocol) bridgeware bridging software broadcaster browser budget budgetary budgeting bulge canned software CAT (abbr. for common management information protocol) . for computer aided testing) cater (to -) caution chairman chairperson chairwoman chancel chiefly clench cliff CMIP (abbr.anon antenatal AP (abbr. for automatic programming) applet application applications package applications programmer apportion (to -) apportionment ARP (abbr. for array processor) AP (abbr. for compressed serial line protocol) custom software customized software cutaneous test de debar (to -) deeply deepness deprivation deprive (to -) depth desecrate (to -) diagnostic program digital signal processor DP (abbr. for frequently asked questions) fated first first-class firstly foodstuff forbid (to -) forbidden forbidding forebode (to -) foreboding forecast (to -) forecast forecast forego (to -) foregone . for data processing) draft drawl (to -) dressing DSP (abbr. for electronic data processing) enact (to -) enactment enquiry erstwhile estate evangelism evidence expected fallout fancied FAQ (abbr.coming command-driven software common management information protocol compressed serial line protocol computer aided testing conceit conceited concern concoct conformable copyrighted courseware cousin CSLIP (abbr. for digital signal processor) dupe EDP (abbr. foreground foreground program foreordain (to -) forerunner foresee (to -) foreseeable foreshadow (to -) foresight foreskin foretell (to -) forethought forewarn (to -) foreword forwardness freeware freeware front-end processor fundamental gage grassland gratuity groupware guardhouse guardianship handbill haste headgear headlong hog program hold hooker hurry ICMP (abbr. for manufacturing automation protocol) meadow menu-driven software . for link access procedure for modems) lavish lawn LCP (abbr. for Internet service provider) jackpot LAPM (abbr. for link control protocol) LDAP (abbr. for Internet control message protocol) imperfect inbreed (to -) inception indictable inquire inquiry intend (to -) Internet service provider ISP (abbr. for light directory access protocol) leading lend likelihood likely lingering loan main mainly makeshift MAP (abbr. misgiving mispronounce (to -) moneylender mostly nab NCP (abbr. for network control protocol) nearness neckwear next nominate (to -) novice occupational onset outcast overpower overture own owner ownership paddock page make-up program parent parser pawnbroker planner playback (sound) pledge practical practically practice (to -) practice practitioner pragmatic pragmatism Prague prairie prank program preach (to -) preacher preamble prearranged precarious precaution precede (to -) precedence precedent precept precious precipice precipitate precipitation precipitous precise precision precocious precocity precognition predecessor predefined predestination . predetermine (to -) predicate predict (to -) prediction predilection predispose (to -) predisposition predominant predominantly prefabricate (to -) prefer (to -) preferable preference prefix prehistoric prejudice prejudiced prelate prelude premarital premature prematurely premeditate (to -) premier premise premium premonition prenatal preoccupation preoccupied preoccupy (to -) preparation preparation preparatory prepare (to -) preposition prepuce prerogative Presbyterian prescribe (to -) prescription presence present presentable presentation presentiment preservation preservative preset (to -) preside (to -) presidency president presidential press pressure prestige presumably presumption presumptuous presuppose (to -) . pretense pretension pretentious pretext prevail (to -) prevalence prevalent prevent (to -) preventative preventive previous previously prey priapism price primarily primary primary primary primate (to -) prime primeval primitive prince princess principal principality principle priority priory prism prismatic prison prisoner pristine private privately privatization privatize privilege privileged privy prize probability probable probably probation problem problematic procedure procedure proceeding process processing processing procession proclaim (to -) proclamation proclivity procreate (to -) . procreation procure (to -) procurement prodigal prodigious prodigy produce (to -) producer product production productive productivity profane profanity profess (to -) profession professional professionalism profound profoundly profundity prognosis prognosis prognosis program programmer programming progress progression progressive prohibit (to -) prohibition prohibitive project projectile projection projector proletarian proliferate (to -) proliferation prolific prologue prolong (to -) prolongation prominence prominent promiscuity promiscuous promise (to -) promising promontory promote (to -) promote (to -) promoter promotion pronator prone prone pronoun pronounce (to -) . pronounced pronunciation proof propaganda propagate (to -) propagation propel (to -) propensity properly property prophecy prophesy (to -) prophesy prophet prophetic propitious proportion proportionate proposal propose (to -) proposition proprietor propulsion prosaic prose prosecute (to -) proselyte proselytism prospecting prospective prospectus prosper (to -) prosperity prosperous prostata prostate prosthesis prostitute prostitution protagonist protect (to -) protected protective protector protectorate protege protest (to -) Protestant Protestantism prothesis protocol proton prototype protuberance protuberant proverb proverbial provide (to -) providence providential . province provincial provision provisional provisionally provocation provocative provoke (to -) provost prow prowess proximity prudence prudent public domain software purpose question rambling ratio readiness ready relocatable program remonstrance RTP (abbr. for simple network management protocol) software soon spring sputum test stickler streetwalker strumpet substantiate (to -) substantiation suggest (to -) suggested supplier taste (to -) teacher tentative tentative test (to -) test tested tip tried trouble . for real time protocol) rush scaling schedule scheduled screw press sermonize (to -) setup program shareware shelfware shell shrapnel skin test smallholder SNMP (abbr. troubleshooting try (to -) UDP (abbr. for user datagram protocol) unholy unsparing utterance vendor vocational volunteer (to -) weir whore winning worried worry (to -) yielding pseudo psichosis psyche psychedelic psychiatric psychiatrist psychiatry psychic psychoanalysis psychological psychologist psychology psychomotor psychopath psychosis psychosomatic psychotherapy advertising airlift approximation arrowhead atomizer babyish biting booth boyish boyishly bracelet brad breakpoint bridge buffer bypass (to -) checkpoint childishness click (to -) click cougar cuff cuff curled octopus cursor deadlock door doorway . doorway dot dots per inch drawbridge fist flea foible gate harbor headland hilt inch job jumper kick knitwear leek lung marksmanship musky octopus NAP (abbr. for network access point) natty neat octopus pang pass peaked pneumonia point pointed polish porcupine port poulp press (to -) prick prop puberty pubes publican publication publicist publicity publicize (to -) publish (to -) publishable publishing puerperium pulmonary pulp pulsate (to -) pulsation pulse pulverize puma punctual punctuality punctuate (to -) punctuation puncture . for service access point) score seaport sheer sinless sliding door sluttish spike spiky sprayer spurn stabbing stand standpoint startup stipple (to -) stitch stitch stitching sundown teem (to -) thumb tip tiptoe top score tramp twinge unblemished unmixed viewpoint village ward white octopus bankrupt bankruptcy beloved blight brittle brown shrimp burn (to -) burn burner carat chasm cheese .pupil pure puree purgative purgatory purge purification purify (to -) purist puritanical purity pus putrefaction putrefy (to -) rot SAP (abbr. chemical chemically chemist chemistry chemotherapy cherished cherub chiromancy chiropractor common shrimp complain (to -) complaint cyst dear discriminating downplay (to -) drafty fifteen fifth fiftieth fortnight fortnight fortnightly gist gripe gulch hunderweight hundredweight jaw jowl karat keel keratin keratinocyte kerosene ketch kimono kiosk maybe newsstand operating theatre palmistry perhaps priceless quantum quasar quiescent quietness quietude quinine quintal quintessence quintet quintillion quintuple quintuplet quorum remain (to -) remove (to -) scorch . for Internet security scanner) lined monk mouse mousetrap nosegay odd oddball oddity offshoot peculiar pickpocket pilferer .stay (to -) stillness sunburn sunburned surgical take away (to -) tarry (to -) want (to -) wanting what which which who whoever whom worthwhile abduct (to -) abduction abductor Allison's tuna allmouth angler angler fish autumn albacore beaming bizarre bough bouquet bout branch (to -) branch (to -) branch broadcasting brown scorpion browse (to -) bunch buttercup cluster erasure expansion slot feature frayed freak frog frog-fish grater harlot ISS (abbr. pilfering portcullis predatory queer quirk rabbi rabid rabies race racial racialism racialist racism racist racket racquet radial radiant radiate (to -) radiation radiator radical radicalism radically radio radioactive radioactivity radiograph radiography radiological radiotherapy radious radium radius rage raging rake rake ramification ramp ranch rancher rancid range range values rank rapacious rapacity rapidity rapine rapture rare rarefy (to -) rarely rarity rasping rat ratification ratify (to -) ratio . ration rational rationale rationalism rationality rationalization rationalize (to -) rationing ravish (to -) ravishment ray ray rayon rays razorfish reason reasonable reasoning red scorpion rend (to -) rhapsody rickets rickety rip root satin scoop scoring scrape scraper scratch sea-devil abbot seldom sensible sensibly serving side slit skate skate sky-scraper skyscraper slit snowshoe snuff speed split spoke squall stale streak streaky stripe striped strum (to -) stubble suddenness tail tantrum tear (to -) thornback ray . thunderbolt trace (to -) trace trait trowsers crease twig uncommon unusual VRAM weird x-ray (to -) x-ray yellow-finned tuna yellowfin tuna B-ISDN (abbr. for broadband ISDN) broadband ISDN RD (abbr. for Attached Resource Computer Network) assemblage assembly asset auto-answer backhand backlash backlighting backrest backspace (to -) backtracking beet benchmarking blame blood cell counting blow booking born-again botch bounce braise (to -) brawl bray breath . for receive data) abjuration abjure (to -) abode abridgement abstract accountability accountable acknowledge (to -) actual actuality actually admittedly advert (to -) aftereffect aftertaste allocation allot (to -) allotment answer ARCNet (abbr. breathe (to -) breathe breather breathing buffer bunker carriage return carry out (to -) casting caucus (US) check (to -) check in chide (to -) chide (to -) chock-full chubby chunky circular clinch clincher clipper clipping clock coat (to -) coat (to -) cold collect (to -) collected collector columnist commandeer (to -) compilation compile (to -) compiler completion comprehensive (UK) conductor confessed confutation constraint container contraction conversely cooling count courtly cover (to -) cover (to -) cowlick crawler curb cutback Czech Republic D (note) dare debase (to -) decline (to -) decline (to -) decrease speed (to -) decrease speed (to -) . film) disallow (to -) disavow (to -) disavowal disclaim (to -) disgusting disown (to -) disprove (to -) dodge (to -) dutifully e-zine (abbr. for electronic magazine) ebone eddy edit (to -) editor efficiency elate (to -) electronic magazine emphasize (to -) emphasize (to -) enhance (to -) exceptionable exult (to -) fill (to -) filling flail (to -) flashback flashy flinch (to -) floodlight forego (to -) forward (to -) forward (to -) forward (to -) freenet freshen (to -) frisk (to -) frolic fully distributed network gather (to -) gathering gearing gears German Democratic Republic germane get-together gift glare gloat (to -) glow (to -) glowing gnash (to -) grate grid grid grouch .delay delay demean (to -) denial develop (to -. grovel (to -) grudge gruesome grumble (to -) grumbler haggle (to -) hairnet hairspring harvest heirloom hierarchical network highland highlight hold (on -) hostage hourglass injunction inmate jailbird jib journal joyfulness keepsake king kingdom kingly kingship kinky lag lagged laugh (to -) leaky ledge leftover levee liable licorice lightning live-in loath log log file loiter (to -) magazine mantelpiece markdown mbone meeting memento message mirror mnemonics mountain rescue multiple-reply multistar network muster mutinous neigh neighborly net . network newborn newcomer newly newlyweds (plural) North Rhine-Westphalia oar ooze (to -) ornate outcome outgrow (to -) outhouse overhaul (to -) overhaul overheat (to -) padded padding paddle patchy payment performance periodical pick (to -) pickup pique ploughshare plowshare policy portrait portray (to -) portrayal pray (to -) precinct prescription profitability profitable proprietary proxy qualification queen quite rally rancor rancorous ransom rapport re-create (to -) re-do (to -) reabsorption react (to -) reaction reactionary reactivate (to -) reactivation reactor readjust (to -) readmit (to -) reaffirm (to -) real realism . realist realistic reality realizable realization reallocate (to -) reallocation realm ream reanimate (to -) reappear (to -) reappraisal rearm (to -) rearrange (to -) rearrangement rearward reassignment rebate rebel rebellion rebellious rebirth reboot (to -) rebound rebuild (to -) rebuilding rebuke rebut (to -) rebuttal recalcification recalcitrant recalibrate (to -) recant (to -) recantation recap (to -) recapitulate (to -) recapitulation recast (to -) recede (to -) receipt receipt receive (to -) received receiver receiving recent recently receptacle reception receptionist receptive receptor recession recharge recidivist recipe reciprocal reciprocation recital recitation . recitative recite (to -) reclaim (to -) reclamation recline (to -) recluse recognition recognize (to -) recoil recollect (to -) recollection recommence (to -) recommend (to -) recommendation recommended recompense reconcilable reconcile (to -) recondite recondition (to -) reconnaissance Reconquest (the -) reconsider (to -) reconstitute (to -) reconstitution reconstruct (to -) reconstruction record (to -) record recorder recount recoup (to -) recourse recover (to -) recover (to -) recoverable recovery recreate (to -) recreation (to -) recriminate (to -) recrimination recruit (to -) rectal rectangle rectangular rectification rectify (to -) rectitude rector rectory rectum recumbent recuperate (to -) recuperation recur (to -) recurrence recurrent recurrent recursion recursive . recycle (to -) redeem (to -) redeemer redeeming redemption redemptive redistribute (to -) redo (to -) redo (to -) redouble redoubt redound (to -) redraft redraw (to -) redress reduce (to -) reduced reduction redundancy redundant refection refer (to -) reference referendum refill refine (to -) refined refinement refinery reflect (to -) reflection reflective reflector reflex reflexive reforest (to -) reform reformat reformation reformatory reformer refract refraction refractive refresh (to -) refresher refreshment refrigerate refrigerator refuge refugee refund refund refundable refurbish (to -) refurbishment refuse (to -) refute (to -) regain (to -) regal . regale (to -) regards (plural) regency regenerate (to -) regeneration regenerative regent regiment region regional register (to -) register registered registration regress regression regressive regroup (to -) regular regularity regularize (to -) regularly regulate (to -) regulated regulation regulator regurgitate (to -) rehabilitate (to -) rehabilitation rehash reign reimbursable reimburse reimbursement reincarnate reincarnation reindeer reinforce (to -) reinforcement reinstall (to -) reinstate (to -) reinstatement reinsure (to -) reinvest (to) reiterate (to -) reiteration reject (to -) rejected rejection rejoicing rejoin (to -) rejoinder rejuvenate (to -) rekindle (to -) relapse relate (to -) related relation relationship relative . relative to relatively relativity relax (to -) relaxant relaxation relaxed relay relegate (to -) relevant relic relieve (to -) relieved religion religious reload reloading relocate (to -) relocation relocation reluctance reluctant remainder remaining remains (plural) remand remediable remedy remember (to -) remembrance remind (to -) reminder reminiscence remiss remit (to -) remittance remnant remodel (to -) remorse remote remunerate (to -) remuneration remunerative renaissance render (to -) rendition renegade renew (to -) renewal renounce (to -) renouncement renovate (to -) renovation renown renowned renumber (to -) renunciation reopen (to -) reorganization reorganize (to -) . rep repaint (to -) repair (to -) repairable reparation repatriate (to -) repay (to -) repayable repayment repeal repeat (to -) repeated times repeatedly repeating repel (to -) repellent repercussion repertoire repertory repetition repetitious repetitive replacement replant (to -) replete repletion replication reply reply reporter repose repossess (to -) reprehend (to -) reprehensible reprehension represent (to -) representation representative repress (to -) repression repressive reprimand reprint reprisal reproach reproachful reproduce (to -) reproduction reproof reprove (to -) reptile reptilian republic republican republication repudiate (to -) repudiation repugnance repugnant repulse . repulsion repulsive reputation repute reputed require (to -) requirement requisite rerouting resale rescind (to -) rescission rescue (to -) rescuer resell (to -) resent (to -) resentful resentment reservation reserve (to -) reserved reservist resetting resettle (to -) reshape (to -) reside (to -) residence residency resident residential residual residual residue resignation resigned resin resinous resist (to -) resistance resistant resistor resize (to -) resolute resoluteness resolution resolve resolved resonance resonant resonate resonator resort resound (to -) resource respect (to -) respectability respectable respectful respective respectively . respiration respiratory respire (to -) resplendent respond (to -) response responsibility responsible restart (to -) restate (to -) restaurant restitution restock (to -) restoration restorative restrain restraint restrict (to -) restriction restrictive restructure (to -) restructuring result resultant resume (to -) resumption resurgence resurgent resurrect (to -) resurrection resuscitate (to -) resuscitation retain (to -) retake (to -) retard retention reticent retina retire (to -) retiring retort (to -) retouch (to -) retract (to -) retraction retreat retrenchment retribution retrievable retrieval retrieve (to -) retroactive retrograde retrogress (to -) retrogression retrospect retrospective retry (to -) retry return reumatic . reunion revaluation revalue (to -) revamp (to -) reveal (to -) revelation reverberate reverberation reverence reverend reverent reverential reversible reversion revert (to -) review (to -) review revise (to -) revised reviser revision revival revival revive (to -) revocation revoke (to -) revolt revolution revolutionary revolutionist revolutionize (to -) revolve (to -) revolver revue revulsion revulsive reward reweigh (to -) rewind (to -) reword (to -) Reykjavik rhetoric rhetorical rheumatic rheumatism Rhineland-Palatinate ricochet rightness riposte (to -) riveter romp round (to -) round rounded rounding roundly rove (to -) rower royal royalist . royalty rub (to -) rule ruler ruminative scavenge (to -) scold (to -) scolding scour (to -) scramble scrambled scrap screen grid searchlight seclude (to -) seep (to -) sender set back (to -) setback shelter show (to -) shrewish shun (to -) slice (to -) slip (to -) slippery snort snub soak solvable solve (to -) solving problems souvenir spare spat (to -) spider network spite spiteful spotlight spring sprinkler squeak (to -) squirm (to -) stanch (to -) stand-by steep (to -) stir (to -) stockpile stocky stores straight straight on straightness structured walkthrough stub stub network stubby stuffing submit (to -) subtract (to -) . for value added network) verso vial vindicate (to -) vindication vindictive virtual reality voice recognition waste watch watch watchmaker welcome (to -) whinny whirlpool Wise Men (plural) withdraw (to -) withdrawal withstand (to -) wording wrap-around wreckage wren wriggle (to -) wring wristwatch writhe .sugar beet summarize (to -) summary sundial supersede (to -) surrender swirl tadpole thickset throughput throwback thunderbolt timepiece toilet tow (to -) towed towing trailer trailer trim (to -) tug typify (to -) undelete (to -) undertow undisciplined unfaltering unforgiving unhesitating United Kingdom unwilling upbraid (to -) upshot value added network VAN (abbr. yield (to -) yield absurd berate chuckle cliff crag crimp curl curling curly fray giggle guffaw hazard irrigation jeopardy kidney laugh laughable laughter moneybelt nook overhead irrigation quarrel raffle rate rein Rhine rhino rhinoceros rhyme rhythm rich riches (plural) richness rickettsia ridicule ridiculous rifle rigidity rigor rigorous risk rite ritual rival rivalry riverside rivulet snicker sprinkler irrigation stiffness swath vie (to -) watering wealth able-bodied baseboard bedclothes . bedding beg (to -) brainteaser break (to -) breakable breakage breakwater brill broken burglarize (to -) burglary burgle (to -) caption chafe clear land (to -) clothes clothier clothing coil conundrum crack a code (to -) crash (to -) dabble (to -) detour dew disrupt (to -) doughnut douse (to -) encompass entreat (to -) friction gnaw (to -) graze grog hardy hoarse housebreaking huskiness knee lettered limestone lingerie lozenge menswear oak paleface pink plow (to -) prowl (to -) purr ragged rash raucous ravishment red reddish revolving Rhode ripoff rob (to -) . robbery robot robotics robust rocky rodent rodeo roll roller rolling Roman romance romantic Rome rosary rose (color) rosebush rostrum rosy rotary rotate (to -) rotate (to -) rotation rotational rotatory rotor Rotterdam rotund rotunda rotundity roundup ruddy rum rupture rut scabies skate skid skirting-board slice sliver smash snore (to -) snore spray (to -) spray sprinkle sprinkler sprinkling sputter steal (to -) steelyard surround tear (to -) theft thieve (to -) thread turbot underclothes (plural) undergarment . underwear undies visage background noise bearings blatant blond blonde blowout blush blushing breakthrough clash cogwheel debris dilapidated disruption fizzle flush (to -) flush German measles grind gruff gurnard gurnet hearsay loudly loutish nightingale noise noisy path ramshackle ravage rhubarb roar Romania roulette route rubella ruby rude rudeness rudiment rudimentary ruffian rugby ruin ruinous Rumanian ruminant ruminate (to -) rumor rune rupture Russia Russian sea-robbin (USA) treadmill vestigial . wheel ballroom beagle bleed (to -) bleeding blood bloodhound bloodstream bloodsucker bloodthirsty bloody bolt bounce (to -) brackish bran brine briny cadge cadge canny cape lobster cheers churchwarden chute cognizant complacent corkscrew costumer courtroom dequeue (to -) elicit (to -) exit (to -) exit fetch (to -) flavor foyer gird gloat (to -) gold bream gold lined bream gold sea-bream goldline gore grasshopper gratification gratify (to -) gravy greet (to -) greeting hale hall hallow (to -) heal (to -) healer health healthful healthy holiness holy hucho . indent (to -) indent indentation indentation jiffy jounce jump (to -) jump jumper jut kickoff kipper know (to -) leap (to -) leap learned leave leech lifesaver little lobster living room long-finned grey mullet galupe looting lounge lurch mailbag mange mangy measles mouth-watering mullet negligee outgoing outgoings output outset padre palatable paper throw pilchard politic poolroom priest priestess priesthood prurient psalm quip quit (to -) ransack (to -) rash rash red mullet rowlock Saarland Sabbath saber sable sabotage saboteur . sack sackful sacral sacrament sacramental sacred sacrifice sacrificial sacrilege sacrilegious sacrum sadism sadomasochist safari (color) safari jacket safeguard sagacious sage Sagittarius saint sainthood saintliness saintly salacious salamander salient saliva salivary sallow salmon salon salt saltcellar salty salubrious salutary salutation salute (to -) Salvadoran Salvadorian salvage salvation salvo San Marino sanatorium sanctification sanctify sanctimonious sanction sanctity sanctuary sandal sandbag sane sanguine sanguine sanitarium sanitary sanity sap . Sarajevo sarcasm sarcastic sarcolemma sarcophagus sardine sardonic sargo sartorial Satan Satanic satellite satiate (to -) satin satirical satirize (to -) satisfaction satisfactorily satisfactory satisfied satisfy (to -) saturate (to -) Saturn sauce sausage savage savageness savagery savanna save (to -) savior savor savory Saxony saxophone scabies screen saver seasoning sergeant sexton shake (to -) shibboleth skip (to -) sleuth somersault spatter spice (to -) spittle splash (to -) splatter St. Petersburg start striped mullet sucrose suitable sunrise surgery tailor taste tasty . for connection-oriented network service) comber combine harvester common management information services communications server confident connection-oriented network service continue (to -) coronary sinus cottonseed countenance cryptic cue cuttlefish decoy detachment disengage (to -) doom dried drought dry (to -) . for common management information services) CNS (abbr.toad uncivilized venous blood verger vestry vine shoot wage water outlet white sea-bream white-bream whittle (to -) wholesome wild wisdom wise abduction abductor accommodating akin alluring arithmetic statement asunder background be being bias bookmark brains branch (to -) briefing burster cachet calmly cavernous sinus certain chaperone child city clerk CMIS (abbr. dry dryer earnest earnestly earnestness easement Esquire essence feel (to -) feeling file server floss follow (to -) follower foolproof footpath gaper gentlemen gentry guileless handsaw harvester hedge henchman hijack (to -) hijacker homely host indicator informality insurance joint jungle kidnap (to -) kidnaper kidnapper kidnapping lactate (to -) lane likeness list server lord lure madam Madame mainframe middle name miss missus mister mistress mower mushroom napkin northern paranasal sinus parting path path pathway . for secure electronic payment protocol) segment segmental segmentation segregate (to -) segregation .playoff point (to -) primary selection prone pseudonym raw silk reap (to -) reaper redwood regret (to -) reliable remarriage responsive s (second) safe safeness safety saw seal (to -) seated secede (to -) secession second secondary secrecy secret secretariat secretary secretary secretary secretion sect sectarian section sector secular secure server security sedan sedate (to -) sedate (to -) sedation sedative sedative sedentary sediment sedimentation sedition seditious seduce (to -) seduction seductive seed (corn) seed-harrow SEEP (abbr. Seine select (to -) selection selective selector semantic semanticist semantics semaphore semblance semen semester semi-quaver semicircle semiconductor semifinal semilunar seminal seminar seminary senate senator senatorial senile senility senility sensation sensational sense sensibility sensible sensitive sensitivity sensitize (to -) sensor sensory sensory sensual sensuality sensuous sentiment sentimental sentimentality separable separate (to -) separate separated separately separation separatist separator September septicaemia (UK) septicemia (US) sepulcher sepulchral sequel sequelae sequential Serbia . serenade serene serenity series serious seriously sermon serpent serpentine serratus serve (to -) server service serviceable servicing servile servility servitude session setter seventieth seventy sever (to -) severally severance severe severely severity Seville sex sexism sexist sextant sextet sexual sexuality sexually sexy sign signal signet signposting silk silky similar similarly simple sine sinus sit (to -) sitting six sixpence sixth sixtieth sixty slanted slanting slavish snake . for Standardized Generalized Markup Language) shantung shock acronym ACS (abbr.sowing split squid staid stallion stamp stark stringent subordinate suet sure sureness surety sylk tallow terminal server thirst thirsty thousands separator timing signals toadstool toilets trackball tracking trail unadorned unaffected underlie (to -) unostentatious warning signal week weekly weekly SGML (abbr. for administrative terminal system) attendant authoring system authoring system authoring system B (note) Baetic Cordillera baseless batch system besiege besieged besieger boneless bottomless . for automatic computing system) AIDS aimless alienist always anyhow anyway armchair armhole ATS (abbr. for message handling system) . for Campus Wide Information System) decision support system DSS (abbr.brimless bucksaw bundled system but cad callow camouflaging careless caret Central Sierras (in Spain) century chair charming childless cider cloudless concurrent CWIS (abbr. for high performance file system) hush Iberian Cordillera impecunious lawless legacy systems locale locality locus loosely coupled system loveless maid make-believe matchless meaningful meaningless mermaid metric system MHS (abbr. for decision support system) dummy embedded system fail-safe system faultless featureless following forestry friendless further half-hearted harvest haymaking heartily heartiness heartless high performance file system highland hiss homeless host system however HPFS (abbr. minus sign mockingbird nap NetBIOS (abbr. for network BIOS) next next available number next number nice nitwit no control no-frills noiseless nonsensical open-ended system outright place plain pleasant purport rather respiratory track roofless saddle saw seamless secrete (to -) seed (corn) serf servant seven Shinto Shintoism shocker sibilance Sicilian Sicily siege sign signal signaling system signatory significant significant significantly signification signify silence silencer silent silently silhouette silicon silo silure-sheat-fish similar similarity simpleton simplicity simplification simplify (to -) . simply simulate (to -) simulated simulation simulator simultaneity simultaneous simultaneously sincere sincerely sincerity sinecure single singular singularity sinister sinuous sinusitis siphon siren sirocco site situate (to -) situation sleeveless smokeless SMP soundless sowing stand-alone system starless stateless straightforward subsequent succeeding swish sycamore sycophant syllabic syllogism symbiosis symbolic symbolism symbolize (to -) symmetrical symmetry sympathize (to -) sympathy symphonic symphony symposium symptomatic synagogue synchronize (to -) synchronous syncopate syndicate synergistic synonym synonymous . synopsis syntactic syntax synthesize (to -) synthetic syphilitic system systematic systematize (to -) systemic tightly coupled system tongueless toothless trackless tuner tuning turnkey system unabridged unaddressed unadvised unaided unalloyed unannounced unassisted unbundled system unceremonious unconsolidated uncorrected uncovered undated undisclosed undressed unenlightened unfurnished unglazed union unleaded unparalleled unpaved unprecedented unprotected unreserved unsalted unseaworthy unshaven unsorted unsupported untaught unused valueless voiceless warning system waterworks website wheelchair whether whistle (to -) whistle windless without . worthless X-window system Zion zip SLIP (abbr. for serial line IP) evening suit SMTP (abbr. for Simple Mail Transfer Protocol) above alone applicant application application form apply (to -) armpit associate bachelor bachelorhood bandbox bear (to -) bearable bedspring blower blowpipe bowler hat bra bracket brassiere braze (to -) bribe (to -) bribe bribery company composed couch davenport deaf deaf-mute deafness dream (to -) dreamy drowsy endure (to -) especially flap flush G (note) hat hatbox hatter help hold (to -) hunch infantryman land lot lapel leavings (plural) leeward lone loneliness lonely . for operating system) outclass (to -) outlive (to -) overburden overcharge overdose overdraw (to -) overestimate (to -) overfeed (to -) overlap (to -) overlap (to -) overload overshadow (to -) overstrike overtype (to -) overweight overwrite (to -) overwrought parasol partner partnership plaice poll (to -) probe put up with (to -) quell (to -) quibbler request requested restful rope seconds shade shaded shading shadow sharp sherbet single single sip sirloin sizzle sleepwalker sleepy smile smiling smirk smirke sniffle sob (to -) .loner lonesome loosen (to -) looseness mainstay milliner nephew niece only OS (abbr. sober soberness sobriety sociability sociable socialism socialist socially society sociological sociologist sociology soda soda sodium sodomite sodomy sofa Sofia solace solar solarium solder (to -) soldering soldering iron soldier soldierly solely solemn solemnity solemnize (to -) solenoid solfeggio solicit (to -) solicitation solicitous solicitude solidarity solidification solidify (to -) solidity soliloquy solitaire solitary solitude solo soloist solstice solubility soluble solvable solvency somatic somnambulism somnolence somnolent sonar sonata sonnet sonority . sonorous sop sophistical sophisticated sophistication soporific soporific soprano sorghum sound (to -) sound sounding soup sovereign sovereignty Soviet soya soybean spinster startle (to -) startling steady (to -) subjection submit (to -) suffocate (to -) suffocating sun sunny sunshade sunshine supercargo superhuman superimpose (to -) supernatural superscribe (to -) supportable surcharge surpass (to -) surplus surprise surprise surprised surprising (to -) surprisingly survive (to -) suspect (to -) suspect suspicion suspicious suspiciously sustain (to -) tattler tirolean hat trooper troubleshoot tube tureen twang underdo (to -) unearthly . unmarried weld (to -) welder welding spray Mr Mrs Ms stand TSTN (abbr. for Triple STN) abeyance acclivity add (to -) adder addition adequacy adrenalin appealing assorted assortment assume (to -) assumed assumption assumption auction auctioneer background beseechingly caption checksum chemicals climb consecutive costliness cursory dejaggies dirt dirty dole dream emphasize (to -) ensue (to -) event extremely fasten (to -) father-in-law filth filthy finesse floor flooring foul furrow gentle gently ground guess (to -) guess happen (to -) immerse (to -) . increase volume (to -) its limey soil line surge livelihood loose luck lush mild mildly mildness ministration monitor (to -) mother-in-law muck mucky nasty occurrence overcome (to -) overlap (to -) overlay (to -) overlay paramount perspire (to -) plead (to -) presume (to -) prompt provide (to -) quibble replace (to -) replacement rise (to -) riser rising rustle salary seesaw sensitivity sequence serum shock shrewd sigh sleepiness smooth (to -) smooth softly south southeast southerner southwest suave suavity sub.element subconscious subcontract subcontractor subdivide (to -) subdivision subheading . subjective subjectivity subjugate (to -) subjunctive sublease (to -) sublet (to -) sublimate (to -) sublimation sublime subliminal submarine submerge (to -) submersible submissive subnet subnormal subordination subroutine subscribe (to -) subscribe (to -) subscribed subscriber subscriber subscription subsection subsequently subservience subservient subset subsidiary subsidize subsidy subsist (to -) subsistence subsoil substance substance substantial substantially substantive substitute (to -) substitute substitute substitution substrate substratum subsystem subterfuge subterranean subtitle subtle subtlety subtotal subtract (to -) subtraction suburb suburban subvention subversion subversive . subvert succession successive successor succulent succumb (to -) suction sudation sudation suffer (to -) sufferance suffering sufficient sufficiently suffrage suggest (to -) suggestible suggestion suggestive suicidal suicide suite sulfone sulfuric sulfurous sulphate sultan sultanate summation summing superabundance superficial superficiality superfluity superfluous superintendence superintendent superior superiority superlative superman supermarket supernumerary superpose (to -) superstition superstitious supervision supinatur supplant (to -) supple supplement supplementary supplicant supplicate (to -) supply (to -) supply suppose (to -) supposed supposedly supposition . suppository suppress (to -) suppression suppuration suprapubic supremacy supreme supremely supurative surf surface surge (to -) surpassing surplus surreptitious surrogate survival survivor susceptibility susceptible suspense suspension suspensory sustenance suture sweat sweat shirt sweater sweaty Swede Sweden Swedish Swiss Switzerland taxable their theirs total touchiness touchy twerp unattached unclean underemployed underexpose undergo (to -) underground underline (to -) underling underlining underlying underrate (to -) underscore (to -) understudy underwrite (to -) underwriter upload (to -) utmost wage waste substances . for bit error rate) board bore (to -) breadboard cab cabdriver cake card carve (to -) carver carving cheapie cheapskate checkbook chessboard chopping chore chunk compactness control panel coverlet CT-scanner cup dais daughter board deletion doily drape (to -) drill drum drummer evening fare file allocation table footstool hangup heel heel jar job lackadaisical late lid neither noodle panel paste up board penurious pie piggyback board plain bonito plank platform .windfall your access card afternoon also artistry belated BER (abbr. time) talc talcum talent talented talisman tamarind tampon tangent tangible tango tank .plug postcard pub rate reckoner reference card saloon sampling rate score septum shingle shorthand shorthanded slab speakeasy splint stagger stalemate (in chess) stalk stammer (to -) stammerer stem stenographer stenography stinginess stingy stool stopper stub stutter (to -) stutterer such surfboard tabernacle table table of contents tabloid taboo tabulate (to -) tabulation tabulator tachometer tachycardia tachyon taciturn tack tact Tagus take (to -. for transmission control protocol/Internet protocol) advanced technology allure (to -) AT (abbr. for advanced technology) badger be entitled (to -) beware (to -) blacken (to -) blank control boilerplate bondholder buzzword cablegram calf caps lock key cartilagenous tissue ceiling climbing shoes .tanker Taoism Taoist tapestry tapioca tapir tarantula tardy tariff tarot tarsus tart tartan tartaric task tattoo Taurus tautology tavern tax taxi taxicab taxidermy teacup teeter Thai Thailand tightwad tobacco upholster (to -) upholsterer upholstery valuator valuer vat ventricular septum ventricular tachycardia wallcovering wobble wobbly workroom workshop TCP/IP (abbr. clod cloth cobweb compact osseous tissue completion compromise connective tissue control unit terminal covering current topic CUT (abbr. for control unit terminal) detachable keyboard dither dodder (to -) done down arrow key dramatics dreadful dye (to -) early earth ball earthly earthquake earthy elastic cartilagenous tissue electric ray embankment end-plate enticement eyewitness fabric fear (to -) fearful fearsome fibrocartilagenous tissue fibrous tissue fingering foolhardy fork front man function key gossamer grocer grope (to -) hamstring hard-headed have (to -) heady hialinous cartilagenous tissue hoard home key impermanent input (to -) Internet phone jitter key in (to -) keypad knit knitting know-how . for multiple logical terminal) moorland numeric keyboard oilskin osseous tissue phone porous osseous tissue possession princers quake quaver reckless redoubtable refractory remedial retch (to -) roof roof scroll lock key shift key shirting shopkeeper shudder social soft key soft key state of the art technology stickiness strain stubborn subject succeed (to -) taut teak teapot teat technocracy technologic technological technologically technology tediously tedium telecast (to -) telecom telecommunication telefilm telegram telegraph telegraphic telegraphy .landholder landowner lieutenant log off (to -) loom lump lung tissue memory sniffing mettle MLT (abbr. telemeter telepathic telepathy telephone telephonist telephony telephoto teleprinter telescope telescopic teletext teletypewriter televiewer televise television television temerarious temerity temperament temperamental temperamentally temperance temperate temperature tempered tempest tempestuous Templar temple tempo temporal temporarily temporary tempt (to -) temptation tempter tempting tenacious tenaciously tenaciousness tenacity tench tendency tenderness tending tendon tenebrous Tennessee tennis tennist tenor tense tension tentacle tentative tenure tera terabyte tergiversate (to -) tergiversator . terminate (to -) termination terminological terminology termite ternary terrace terrain terrarium terreplein terrestrial terrible terribly terrific territorial territory terror terrorism terrorist tertiary test testament testes testicle testimony testis testosterone tetracycline tetracyclines tetrafluoride Texas text textile textual texture theater theatrical theism thematic thematic theme theocracy theologian theologic theological theology theorem theoretical theorize (to -) theory therapeutic therapist therapy thermal thermometer thermonuclear thermos thesis Thessaly third . for virtual terminal) watchdog timer weave weaver web (to -) wickerwork witness yew access time aperture time archery bell blood typing braces chalk cheat (to -) cheat cheater clink clippers delicatessen doorknob downtime downtime dry-cleaner dye dyer earth earwig elapsed time entitle (to -) exchange rate falter (to -) field flowerpot fondly font gram-negative grime (to -) . for television) twill typescript unrelenting up arrow key veal velvet videoondemand VT (abbr.ticker tighten (to -) tiler tint (to -) tissue tit tongs treasure treasurer treasurership tremble tremble tremor TV (abbr. for signal ground) shark sharpshooter shears shinbone shiver (to -) shooting shot shyness slingshot smutty snip snipe (to -) soil soothingly stamping sticking plasters (plural) stiff store strip suspenders tender tense tent .grocery grocery store guy haul headline helm helmsman highland hitch hue idle period incumbent ink jerk jingle kettledrum land latency licensee lowland lukewarm marksman marmoset merry-go-round part-time peacetime pluck process type pull (to -) real-time red (wine) response time rudder run-time scissors seek time SG (abbr. throw thyroid (gland) tiara tibia tibial tic tick tiger tigress time timidity timidnes tinge tinkle tint Tirana tisane titanic titular toss treble twitch type typesetter typhoid typhoon typhus typographer typographic typography tyrannical tyrannize (to -) tyranny tyrant Tyrol uptime vat wartime weather wrench yank abide (to -) all all all dates all day analitical sampling ankle begma bending blockhead blunderer boorish borrow (to -) boudoir bull bullfighter butterfingers cake cellarman . circuitous clumsiness clumsy coarse contort (to -) corncake cough (to -) cough coughing curfew dab daft decision making dunce everybody everyday everyone everything folly foolery foolish foolishness fully gauche gawky gorse grapefruit half-wit hoax hopper hue hulking indirection inflect iridescent keg klutz knell (to -) lathe maladroit mindless mole molehill nonsense not yet nozzle oaf oatcake omelet outlet play (to -) ptomaine reveille robe screw silliness silly simple-minded simpleton Sitting Bull . snag still storm stormy stump stupid sunbathe (to -) sunburnt surveying take (to -) Thomas Moore thoracentesis thrush thunderstorm toast toasted toaster toboggan Tokyo tolerable tolerance tolerant tolerate (to -) toleration tomato tome ton tonal tonality tone tonnage topaz topographer topographic topographical topography topology torment tornado torpedo torrent torrential torsion torso torte torticollis tortoise torture tossis total totalitarian totalitarianism totality totally touch (to -) touch tournament tourniquet towel tower . for cathode ray tube) . for automatic send and receive) asynchronous transmission background banal banality bargain bargaining barter bathing costume behind betray (to -) betrayal BFT (abbr. for binary file transfer) binary file transfer blunderbuss bobsled braid breech bring (to -) broadcast brook trout brook trout brown trout char cheerless chicanery circumvention clamber (to -) climber clog clover commonplace construct construe (to -) conveyance costume court crew crossbar CRT (abbr.toxicity toxicomania toxin trade off turner turnstile turret turtle turtle twist (to -) uncouth vise wheel whirlwind wholly whooping cough whooping cough yet TPS (abbr. for transactions per second) after ASR (abbr. access and management) gob grandstand grey trout gulp gut gut handiwork handling headwork hunk hustings hyaline impish insides interpreter jawbreaker job jolt joyless labor (to -) labor lake trout leash lump machine translation minstrel mischief mischievous misery newt peasant dress perspiration perspire (to -) piece pitfall plotter port (to -) port . for file transfer.data traffic deal dealing decanting dicker dismal doleful double-cross (to -) draught dreary drudgery drum plotter elapse (to -) exultant fallopian tube fault ferry file transfer flatbed plotter flue foresail FTAM (abbr. porthole prank protractor quarter quarterly quiet rag rainbow trout rambling raster ready made suit rear reassure (to -) reassuring removable respite roll in (to -) roll out (to -) sad sadness salmon trout sea trout see-through shamrock sled sledge sleigh snare springboard start-stop transmission streetcar stumble suit swap swig swimsuit tailleur suit tailored suit TD (abbr. for transmit data) teamwork telecommute (to -) tether thirteen thirtieth thirty three threesome thresh thresher thrice throne thunder (to -) thunder togue toil touladi touladi trabecula tracheostomy tracing . traction tractor tradition traditional traditionalism traffic traffic trafficker tragedian tragedy tragic tragicomedy tragicomic train traitor traitorous trajectory tram tramway tranquil tranquilize (to -) tranquilizer tranquilizer tranquillity tranquilness transaction transatlantic transcend (to -) transcendence transcendent transcendental transcontinental transcribe (to -) transcript transcription transfer (to -) transfer transfer transferable transfiguration transfigure (to -) transfix (to -) transform (to -) transformation transformer transfuse (to -) transfusion transgress (to -) transgression transgressor transient transistor transit transition transitory translatable translate (to -) translated translation translator . transliteration translucent transmigrate (to -) transmigration transmission transmit (to -) transmittable transmitter transmutation transmute (to -) transnational transpacific transparency transparent transpire (to -) transplant transplant transplantation transport transportable transportation transpose (to -) transsexual transverse transvestite transvestite transvestite Transylvania trap trapecium trapeze trapezist trapezium trapezius trapezoid trauma traumatic traumatism traumatize (to -) traverse traverse trawler treacherous treachery treason treatise treatment treatment treaty tremendous trench trenchcoat trepidation triad triangle triangular tribal tribe tribulation tribunal . tribune tributary tribute triceps trick tricycle trigonometry trillionth trilogy trimester Trinidad trio triple triplet tripod trite triumph triumphal triumphant trivial triviality trombone troop trophy tropic tropical trot trotter trout truce trump trumpet trumpeter trunk tube turpentine undercarriage undisturbed uneventful unhappiness unhappy untroubled weft wheat windpipe wiper woof work work worker workingman wreathe befuddle (to -) biopsy duct tube bluefin tuna boisterously collecting tubes embarrassment grave guardian . inning marrow medulla node nut peat pipe shift sightseeing sightseer swelling swelling Thuringia tomb toucan toupee tourism tourist tuba tube tubercular tuberculoid tuberculosis tuberculous tubing tubular tularemia tulip tulle tumor tumor tumour tumult tumultuous turban turbine turbo turbojet turboprop turbulence turbulent Turk Turkey Turkish Turkmenistan turmoil tutor AU (abbr. for arithmetic unit) MAU (abbr. for intensive care unit) Ukraine (the -) outrage outrageous ulcerous ulterior ultimatum . for medium attachment unit) allocate a variable (to -) ubiquitous ubiquity udder ICU (abbrev. for protocol data unit) PU (abbr. for automatic calling unit) address calculating unit adjoin (to -) again an anoint (to -) arithmetic unit attach (to -) CD-ROM reader coalescence coalition cohere (to -) college disk unit drive eleventh even evenness general purpose hoofed hyphenate intensive care unit intensive care unit interfacing join (to -) junction linkage LU (abbr. for service data unit) smear (to -) somewhat Soviet Union (the -) unanimity unanimous unanimously unction . for maximum receive unit) MTU (abbr. for logical unit) mating measure unit merge (to -) MRU (abbr. for maximum transmission unit) ointment once once more one PDU (abbr. for physical unit) regimentals salve SDU (abbr.ultraviolet ululate (to -) Ulysses greyling shady sill threshold umbilical a a bit a little ACU (abbr. for universal resource locator) urn urticaria Uruguay Uruguayan warp authorized user encroach (to -) end user misapply (to -) USB (abbr. for universal resource identifier) urinal URL (abbr. for universal serial bus) use (to -) use used user usual usually usurer .unicast unicorn unification uniform uniformed uniformity unify (to -) unilateral union unionist uniqueness unisex unison unit unit of measure unite (to -) unite (to -) united unity universal universality universe university varsity versatile fingernail nail toenail grouse magpie miction pressing shrine uranium Uranus urban urea ureter urgency urgent URI (abbr. for intensive care unit) uvular Uzbekistan aground assessment average bard Basque blood vessel blood vessels boggle bravado brave bravery bravery buffer flush bum capillary vessel caster change chinaware courage courageous cow cowboy cowshed crock dairy cow deplete (to -) depletion drinking glass emptiness empty environment variables flatcar flicker flush (to -) .usurp (to -) usurpation usurper usury wear you (formal) you (informal) abnormal use helpfulness kitchenware usable use (to -) usefulness Utah utensil uterine utilitarian utility utilization utilize (to -) UUCP (abbr. for Unix-to-Unix copy program) currant grape (color) ICU (abbrev. ford forefront glass groggy heifer hemstitch hesitancy hesitant hesitate (to -) hesitation hobo hurdle integer value it's worth it jeans (plural) lymph vessel magic wand manly mannish milch-cow miscellaneous mitral valvulopastry numeric variable ok overrate pod pointless pole rambling ratable rating reassess (to -) roam (to -) rover scabbard several shamble sheath software vaccine spearhead specific value starting value steam steamer sundry underestimate (to -) vacancy vacation vaccinate vaccination vaccination vaccine vacillate (to -) vacillation vacuity vacuous vacuum vagina vaginal vagrancy . vagrant vague vaguely vain vainglorious vainglory valiant validate (to -) validation validity valley valor valorous valuable value vampire vandalism vanguard vanilla (color) vanity vapor vaporization vaporizer variability variable variance variance variation varicella varicose varicose vein varied variety various varying vasectomy vassal vassalage vast Vatican vaticinate (to -) vessel vessel voucher wade (to -) waltz wand wander (to -) wanderer wanderings (plural) Warsaw watt waver (to -) worth yardstick abashing advantage advantageous advantageously aeration . airing band bandage bashful bashfulness beaten beta version blackjack bladder blindfold blizzard bluster breezy campaigner candle car window check (to -) checkroom clothe (to -) codger come (to -) conversant corb croaker dizzy dodo downy dress due dump excruciating executioner factual fan (to -) fan fleece forthcoming fuck off fuzzy gale gall gall bladder gall-bladder garb garment gate gown green greenery greengrocer greenish greens grille habiliment hallway hangman headband heroics indeed ken (to -) . lode mainsail marketable neighbor neighborhood neighboring neurogenic bladder newsboy peddle (to -) peddler pinafore dress poison poisonous really refresh rate retail retaliation revenge revengeful revere (to -) sail sale salesgirl saleslady salesman salesperson saleswoman see self-conscious sell (to -) seller selling seminal vesicle shame shameful shed (to -) small capitals spar speed spillway split window stag summer surmount (to -) swathe swift torturer true truly truth truthful twenty two-piece dress ubrine unfeigned upgrade vane vanquish (to -) vantage vector . vegetable vegetal vegetarian vegetarianism vegetate (to -) vegetation vehemence vehement vehicle veil vein veined Velasquez velocipede velocity vena cava venal venality vendor venerable venerate (to -) veneration venereal Venezuela Venezuelan vengeance vengeful venial Venice venison venom ventilate (to -) ventilation ventilator ventricle ventriloquism ventriloquist venture Venus veracious veracity veranda verb verbal verbalize verbena verbiage verbose verbosity verdant verdict verdigris verisimilitude veritable verity vermifuge verminous Vermont vermouth vernacular . for vacuum fluorescent display) aged airiness alertness alive belly binding Biscay blustery bottom view briskly briskness caller cellist cello clamminess clammy conspicuously crone dapper details view dowager dwellings entail eyesight feasibility fiddle fiddler flamboyant flutter Friday front view .versatility verse versed versification versify version vertebral vertebral vertebrate vertical vesicle vestibule vestige vestment Vesuvius veteran veterinarian veterinary veto vicinity victor view (to -) villous vintage wart wholesale window windy VFD (abbr. fuggy girder glass glaze glazed glazing glimpse (to -) gorgeous grapevine hardiness hurrah in effect invigorate (to -) jaunty joist journey life lifetime live (to -) liveliness lively liveness liveness manful manliness mink monitor (to -) old oversee (to -) oversight overview paltry parrot-fish periwinkle pilgrim's scallop pock rafter rape (to -) rape ravishment righteous scallop seeing seer showy sight sighted sizing smallpox sprightly spry spunky stamina superintend (to -) supervision surveillance tend (to -) travel (to -) travel traveler . traveller trek trip twentieth veer (to -) viability viable viaduct vial vibrant vibrate (to -) vibration vibrator vibratory vicar vice vice-consul vice-president vice-versa viceregal viceroy vicious vicissitude victimize (to -) victorious victory victuals vicuña cloth videodisk videogame videotext Vienna viewer vigil vigilance vigilant vigor vigorous vigorously vile villainous villainy vine vinegar vineyard vineyard vinyl viol viola violate (to -) violation violence violent violently violet (color) violin violinist Virgil virgin virginal . Virginia virginity Virgo virile virtual virtually virtue virtuosity virtuoso virtuous virulence virulent virus visa visceral viscose viscosity viscous visibility vision visionary visit (to -) visitation visitor visor visual visually vital vitality vitalize (to -) vitamin vitiate (to -) vitrify (to -) vituperate (to -) vivacious vivacity vivify (to -) viviparous vivisection voyage voyager walkover warden watching watchman widow widower widowhood wind wine bulky cantilever capsize (to -) coarsen (to -) fly (to -) handspring maelstrom maximum volume poll queen scallop . for Virtual Reality Modeling Languaje) domestic flight domestic flight flight loop overturn turnaround voodoo vulgar .ravenous reapply (to -) restart (to -) restart (to -) return revert (to -) revisit ruffle shuttlecock thou tip-cart topple (to -) turn (to -) undertone vocabulary vocal vocalist vocalization vocally vocation vociferate (to -) vociferation vociferous vodka voice volatile volatility volcanic volcano volition volleyball volt voltage volubility voluble voluminous voluntary voluptuous volute voracious vote (to -) vote voter voting vow vowel voyeur (French) wayward will willful you (formal) VRML (abbr. for wide area network) Washington whiskey whisky WYSIWYG (abbr.vulgarity vulgarization vulgarize (to -) vulnerable vulva WAIS (abbr. for wide area information server) WAN (abbr. for what you see is what you get) xenophobia xylophone already anymore iatrogenic sprawl (to -) yacht yak Yankee barren bleak bud burgeon gypsum mare plaster son-in-law yolk I iodine iodize (to -) anvil gunny judo jugular jute juxtapose (to -) juxtaposition oxteam yoke Yugoslav Yugoslavia blackberry bramble carrot chintz cobbler curlew czar dip ditch gold sea-bram guzzle (to -) plunge sapper Saragossa scallop shank shoe . shoemaker slipper sneaker sneakers stilt swain Zagreb Zagrev zap (to -) chump fox foxy hotspot time zone vixen zodiac zonal zone zoo zoological zoologist zoology zoom burr buzz buzzer darn (to -) darning drone hum (to -) hum humming juice ringing tingle . This action might not be possible to undo. Are you sure you want to continue? We've moved you to where you read on your other device. Get the full title to continue reading from where you left off, or restart the preview.
https://www.scribd.com/document/49405760/ingles
CC-MAIN-2016-50
en
refinedweb
Next: Zero Length, Previous: Fixed-Point, Up: C Extensions As an extension, the GNU C compiler, and RL78 __flashqualifier will locate data in the .progmem.datasection. Data will be read using the LPMinstruction. Pointers to this address space are 16 bits wide. __flash1 __flash2 __flash3 __flash4 __flash5 .progmemN .datawhere N refers to address space __flashN. The compiler will set the RAMPZsegment register approptiately before reading data by means of the ELPMinstruction. __memx RAMPZset according to the high byte of the address. Objects in this address space will be located in .progmem.data. Example char my_read (const __flash char ** p) { /* p is a pointer to RAM that points to a pointer to flash. The first indirection of p will read_i (void) { return i; } #else #include <avr/pgmspace.h> /* From avr-libc */ const int var PROGMEM = 1; int read_i (void) { return (int) pgm_read_word (&i); } #endif /* __FLASH */ Notice that attribute progmem locates data in flash but accesses to these data will read from generic address space, i.e. from RAM, so that you need special accessors like pgm_read_byte from avr-libc. Limitations and caveats __flashor __flashN address spaces will show undefined behaviour. The only address space that supports reading across the 64 KiB flash segment boundaries is __memx. __flashN address spaces you will have to arrange your linker skript. extern const __memx char foo; const __memx void *pfoo = &foo; The code will throw an assembler warning and the high byte of pfoo will be initialized with 0, i.e. the initialization will be as if foo was located in the first 64 KiB chunk of flash.; When the variable i is accessed, the compiler will generate special code to access this variable. It may use runtime library support, or generate special machine instructions to access that address space.
http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Named-Address-Spaces.html
CC-MAIN-2016-50
en
refinedweb
HMS: Towards Hierarchical Mapping System for ID/Locator Separation Recently, Internet Default Free Zone (DFZ) is facing a scalability problem due to the double use of the current Internet Protocol (IP) namespace. IP namespace is used for both the location finding and host identification. However, scalability is not the only problem, mobility is difficult to achieve due to the dual use of IP. Therefore, Identifier and Locator separation is proposed and discussed in the research community as a way to solve the above problems. But, this solution further creates a big challenging issue in designing a mapping system to support efficient mobility of users while providing scalability. In this paper, the authors propose a hierarchical mapping system based on today's IP allocation/assignment.
http://www.techrepublic.com/resource-library/whitepapers/hms-towards-hierarchical-mapping-system-for-id-locator-separation/?scname=mobile-wireless-communications
CC-MAIN-2016-50
en
refinedweb
New build is ready. Patch-update is not available, so start the download before you continue. We skipped the blog&twitter announcements for the previous one (126.260) and it looks like it has not received the desired attention, so here is a summary: - the PS team was focused on performance and bug fixing. We made our best to eradicate all reported exceptions, so please be sure to submit all new problems to our Exception Analyser (click on flashing red light in status bar). Plus, in case of something reproducible please submit report to our issue tracker. - PHP inspection performance dramatically improved for (previously) worst cases – huge files and huge batch inspection runs. - PHP completion for all cases involving namespaces is being reworked now. You should see significant improvements, but there is a set of known issues pending. - the Web team continues to pour new features: JS libraries concept was totally reworked (for the good), File Watchers got presets for popular tools, Emmet for CSS is available and more. Details available in WebStorm announcements 126.254 and 126.309 All teams are working on tutorials on all the new wonderful features added, stay tuned. As usual, bear in mind that you are getting a snapshot of work in progress and product will undergo series of technical and cosmetic changes. Develop with pleasure! -JetBrains Web IDE Team This!
https://blog.jetbrains.com/webide/2013/02/phpstorm-6-eap-build-126-339/
CC-MAIN-2016-50
en
refinedweb
0 I know how the ++ operator and -- operator works.This is my code to count the no of digit in an integer and it works perfectly. import java.util.Scanner; public class modified_sepadigit { public static void main(String args[]) { Scanner input=new Scanner(System.in); System.out.println("Enter a number"); int no=input.nextInt(); int noOfDigit=0; int tempNo=no; while(tempNo>=1) { tempNo=tempNo/10; noOfDigit++; } System.out.println("No of digits:"+ noOfDigit); } } But if i change noOfDigit++ in the while loop to noOfDigit=noOfDigit++, then i always get ouput as 0. Now i know that it is meaningless to write noOfDigit=noOfDigit++ when i can simply write noOfDigit++ What i think is that If that statement worked then i should get input as the (total no of digits in an number) -1 beacause of the way post increment works. Can anybody tell me why i am getting output as 0 always if i change noOfDigit++ in the while loop to noOfDigit=noOfDigit++ ?
https://www.daniweb.com/programming/software-development/threads/426719/doubt-regarding-operator
CC-MAIN-2016-50
en
refinedweb
! Betting more BOBJ customers on business analytics I must admit, I was left a little confused by SAP’s Tuesday announcement on business analytics. Why would SAP hold a big press conference, call in the big guns in Bill McDermott and introduce a bunch of new vertical applications that didn’t really leverage (at least yet) any of the technology principals SAP espoused at Sapphire — on-demand, in-memory and mobile? To be fair, SAP’s working with HP to put these applications in the cloud, and that likely means that they will in some way leverage HANA — the in-memory appliance that SAP’s working on with HP. Plus, SAP said they would support mobile in the second half of 2011. So I posed my question to a couple of my sharpest SAP shop pals. I don’t cover business analytics all that often. I know people want business analytics. But is there some huge demand for these that I haven’t caught on to that’d make SAP push them out now? What I got was an interesting history lesson. For 10 years or so, SAP has sold industry-specific software as it relates to ERP. You’re familiar with it — Apparel and Footwear, Public Sector, Utilities, etc. This is meant to accommodate potential customers whose business processes weren’t covered by the R/3 functionality, one of my pals said. Physically, these are add-ons to standard R/3/ECC architecture. Some of them extend standard tables and programs, and some are ‘non-modifying’, completely in their own namespace. But when it comes to BI and BW content, these customers are sometimes left behind, because that content is based on the standard R/3 scenarios. Historically, they were not able to run ETL or report on data that’s in the vertical add-ons without custom development. SAP has put a lot of the vertical content in BW, but the BOBJ stuff is still pretty new. So these new vertical apps present very appealing SAP BusinessObjects bait for those customers that run those “Industry Solutions”, like AFS or the Utilities. It allows those apps to access content in that industry-specific software without a whole bunch of custom development. It must be why the SDN-type folks at that press conference kept asking the question over and over again — how much custom development is involved in this? They were schooled in their history lessons. No doubt business analytics is the hot sell right now. Surveys across our TechTarget sites reveal it is a top IT initiative for customers in 2011. I’ll return to a theme I’ve repeated a lot on this blog — is it cheaper to keep an existing customer or go out and get a new one? SAP of course wants to sell BOBJ into the existing customer base. And of course, many customers don’t want to buy something that requires a bunch of custom-development. Perhaps this is a case where the BOBJ content was custom-developed in-house for certain customers to meet specific business requirements, and then readied to be packaged and sold, my pal said. Savvy, SAP. But how many of the verticals can they actually deliver this type of functionality for? We shall see. SAP?
http://itknowledgeexchange.techtarget.com/sap-watch/page/11/
CC-MAIN-2016-50
en
refinedweb
1 Riff: Understanding Component-Entity-Systems Posted by evolutional, 02 April 2013 · 3,014 views riff component gameobject entity This journal entry is a riff of that theme. For those who don't know, Unity 3d is based heavily on the Entity-Component model. The root "entity" in Unity is the "GameObject", which along with a whole load of other things, is a container for components. Unity has a load of components ready-made out of the box, which shows how powerful this model can be. Complex GameObjects are composed from these myriad of simple objects! So taking Boreal's article and Unity's model, it got me thinking - "how would you implement a similar system in your .NET own projects?". I'm using C#/.NET, which gives us a whole load of lovely type inference, but you can do something similar in C++ with some hacks/tweaks/black magic. I won't discuss that here, as I expect Boreal Games will cover this. First of all, let's start with the basic definition if a component. In .NET I've defined it as very simple interface: public interface IComponent { string Name { get; } } It's probably about as simple as you can get. It simply exposes its name, which is a friendly name for the component. From here, I took a look at Unity's API documentation for the GameObject class. The following major component methods were obvious: - AddComponent - a factory method, creates a new component instance and adds to the object - GetComponent - a generic method which returns the added component of type TComponent, or null if it doesn't exist - GetComponents - returns all components associated with the object To do this, I specified a IComponentCollection interface. public interface IComponentCollection { TComponent GetComponent<TComponent>() where TComponent : class, IComponent; IEnumerable <IComponent> GetComponents(); TComponent AddComponent<TComponent>() where TComponent : class , IComponent, new(); void RemoveComponent<TComponent>() where TComponent : class , IComponent; } This is relatively simple; it allows the Add, Remove and Retrieval of components which conform to the IComponent interface we specified earlier. There's a bit of .NET generic foo which says the component type must be a class and have a default constructor, but other than that, it's simple. So we have our component interface and our collection interface, let's implement them. For simplicity's sake, I chose to base my IGameObject interface on IComponentCollection. IGameObject has a bunch of other stuff in it, such as the InstanceId Guid and some other things you might want to add. You could choose to implement IComponentCollection in your own class if you needed, but for this example it wasn't needed. public interface IGameObject : IComponentCollection { bool IsActive { get; } Guid InstanceId { get; } void SetActive(bool status); } In this demo, I chose to pick a couple of obvious properties from Unity to demonstrate that the GameObject is more than just a component collection. You could very easily add some of the nice "helper" properties you saw on the Unity GameObject, which actually return existing component instances (via GetComponent). Great. All the key interfaces are created, let's create an implementation of GameObject. public class GameObject : IGameObject { Dictionary<string, IComponent> components; public GameObject() : this(Guid.NewGuid()) { } public GameObject(Guid instanceId) { this.InstanceId = instanceId; this.components = new Dictionary<string, IComponent>(); this.IsActive = true; } public bool IsActive { get; private set; } public Guid InstanceId { get; private set; } public TComponent GetComponent<TComponent>() where TComponent : class , IComponent { IComponent res = null; var t = components.TryGetValue(typeof(TComponent).Name, out res); if (t == false) return null; return res as TComponent; } public IEnumerable<IComponent> GetComponents() { return this.components.Values; } public TComponent AddComponent<TComponent>() where TComponent : class, IComponent, new() { var existing = this.GetComponent<TComponent>(); if (existing != null) throw new ComponentExistsException(typeof(TComponent).Name); // Factory method var newComponent = new TComponent(); this.components.Add(newComponent.GetType().Name, newComponent); return newComponent; } public void SetActive(bool status) { this.IsActive = status; } public void RemoveComponent<TComponent>() where TComponent : class, IComponent { var found = this.GetComponent<TComponent>(); if (found == null) throw new ComponentNotFoundException(typeof(TComponent).Name); components.Remove(typeof(TComponent).Name); } } This class is really simple. It keeps an internal Dictionary of component type name and the instance. - GetComponent simply looks up the type name requested on the generic method and returns it if it exists; failing that, it returns null. - GetComponents simply returns the values in the dictionary. - AddComponent checks to see if the component is already there, if so throws a custom exception. If it's not there, we create a new instance from the IComponent implementation's default constructor and add to the dictionary. - RemoveComponent allows us to remove an existing component if it exists; if not, we throw a custom exception. So with this in place, let's create a custom component. Picking the simplest possible thing we can that many (if not all) GameObjects will have is the "Transform" component. In Unity, this is relatively complete - in our example I've simply created it to have a Position of Vector3d type. Realistically, your type will be more like Unity's and have a Rotation, various orientation vectors and matrices which help with using this in a 3d world. Our TransformComponent looks something like this: public class TransformComponent : IComponent { public string Name { get { return "Transform"; } } public Vector3d Position { get; set; } } Very, very simple. As you see, it implements the IComponent interface, and adds it own properties to that. We could add properties, methods, events, whatever we need. As another example, I added a simple test component for the sake of unit testing, public class TestFakeComponent : IComponent { public string Name { get { return "this is a test"; } } public string SayHello() { return this.SayHello("Component System"); } public string SayHello(string who) { return string.Format("Hello {0}", who); } } As long as we inherit from IComponent we're all good. Let's see this in action. Here's some code adapted from my unit tests to show usage.... var go = new GameObject(); var transform = go.AddComponent<TransformComponent>(); transform.Position = new Vector3d(1000, 2000, 3000); We create a new GameObject, add a new transform component to it, then modify the Position on it. After this, we can find the transform and do something with it... var found = go.GetComponent<TransformComponent>(); Simple. I've packaged up my Visual Studio 2012 solution for you to play with. It contains the basic implementation detailed here and some simple MSTest-based unit tests. Have fun. Attached Files GameObjectComponentSystem.zip (17.06KB) downloads: 219 Could you post this an article?
http://www.gamedev.net/blog/49/entry-2256246-riff-understanding-component-entity-systems/#comment_2255273
CC-MAIN-2016-50
en
refinedweb
Agenda See also: IRC log <msporny> <benadida> <scribe> scribe: ShaneM <benadida> Scribe: ShaneM <benadida> ScribeNick: ShaneM <benadida> actions -> <scribe> ACTION: Ben to respond to comment on follow-your-nose [recorded in] -- continues <scribe> ACTION: Manu to add test cases for @instanceof combined with hanging @rel [recorded in] --done <scribe> ACTION: [DONE] Manu to put together set of test cases for hanging @rel [recorded in] <scribe> ACTION: Ralph followup with Dublin Core on what's going on with their namespace URI [recorded in] [CONTINUES] <scribe> ACTION: [DONE] Ben check that browsers do preserve whitespace in attribute values [recorded in] Whitespace is always preserved in all attribute values. set up a proper scribe schedule [recorded in] [CONTINUES] <scribe> ACTION: Michael to create "Microformats done right -- unambiguous taxonomies via RDF" on the wiki [recorded in] [CONTINUES] <msporny> <msporny> Test Case 46... <scribe> ACTION: Shane to add anchors to rdfa-syntax spec for element and attribute definitions [recorded in] <markbirbeck_> I can't quite hear properly...are we on test 46? ben and mark agree on an interpretation, but that does not match the current version of the test. There are two bnodes generated. manu seems to get what they are saying. this test remains on hold. <msporny> Test Case 51... <Ralph> Shane: isn't @about="" the default? <Ralph> Mark: yep Purpose of the change is to set the type of the entire document. Mark is concerned that this test is not using the *right* way to set the document type. Ralph says that is probably true, but this test case is still valid. Shane agrees. Mark is conerned that the right way to set document type (@instanceof on head) is probably not being tested yet. <Ralph> +1 to adding another test for the HEAD alternative to the @about="" @instanceof case The title of test 51 is also misleading. It should be single property and about. Ben restates the philosophy that "more test cases is better than too few". If the title is misleading, we should change it. <markbirbeck_> <head instanceof="foaf:Document"> <markbirbeck_> ... <markbirbeck_> </head> <scribe> ACTION: Manu create an additional test case where @instanceof on head is used to set the global document type. [recorded in] Mark: this works because @about="" is implied on the head element. <msporny> <msporny> Test Case 56... Everyone agrees that this is fine. Approved. Test Case 57... This one also seems fine. Approved. Test Case 58... <Ralph> The SPARQL needs to have the angle brackets removed from the bnodes. Approved modulo fixing the SPARQL (remove angle brackets from bnodes) <Ralph> Test Case 59... <Ralph> proposed test 59 Manu asks of @instanceif applies to @resource. Ben says it does not, and Mark agrees. Discussion about @src and whether it should be a subject or an object..... <benadida> ACTION: Ben to write up example and explanation of @src as subject for IMG [recorded in] <markbirbeck_> This is from Ivan's email: <markbirbeck_> - an old use case for @instanceof was the <markbirbeck_> <div about="#a" > <markbirbeck_> <img rel="a:b" src="" instanceof="w:p"/> <markbirbeck_> </div> <markbirbeck_> where we wanted rdf:type to apply on <>. My reading from <markbirbeck_> these rules is that this will not happen... <markbirbeck_> It's in the thread called "New processing rules", and is his first reply to me. This test case is consistent with the current rules. Approved, but note that interpretation might change if Ben's action results in a change. <markbirbeck_> Would be interesting to know if Ivan would be happy with: Test Case 60... <Ralph> proposed test 60 <markbirbeck_> <div about="#a" rel="a:b"> <markbirbeck_> <img src="" instanceof="w:p"/> <markbirbeck_> </div> Ralph likes this test! No objections. Approved. Test Case 61... <Ralph> proposed test 61 The SPARQL is slightly wrong - the prefix for default CURIEs is Approved, after fixing the default prefix. Test Case 62... Shane notes that the href should really be for "prevChapter", not "nextChapter". Mark suggests we use a relative URI for the next test / previous test as part of the test. <Ralph> proposed test 62 <scribe> ACTION: Manu to add test cases to ensure URLs are resolved relative to base correctly against @about, @resource, and @href. [recorded in] Change the @href in test case 62 to 0063.html for the "prev". Also change the text in the document so it is more consistent. And the vocab URI prefix. URI in the SPARQL should be 0063 as well ( we are a "rev" of a "prev") Manu requests this remain on hold 'cause there are a lot of changes. Test Case 63... <Ralph> proposed test 63 Change title to "empty prefix". Change CURIE default prefix to vocab#. Also change the rel to reference the next test case. Approved after making the above changes. Test Case 64... <Ralph> proposed test 64 Shane was confused about where "_:dan" lives. It doesn't really live in this example, but that's okay. Ralph suggests we change the example to use foaf:mbox instead of foaf:knows Ben suggests we leave it alone - its a valid test as is. Simplest change is to get away from a mailto Approved modulo changing the URL to an href for Libby. <scribe> ACTION: Ralph to check with Libby and make sure it is okay for us to use her address. [recorded in] Test Case 65... <Ralph> proposed test 65 Approved with the change that there should be no nagle brackets around bnodes in the SPARQL. Test Cases 47, 48, 52, and 53... These tests have @instanceof apply to @resource. Since this is no longer the case... Ben asked if anyone objects to the path we are going down. No one did. <benadida> PROPOSE that we accept the Birbeck Chaining Rules (with some edge cases to be worked out soon) RESOLUTION: we accept the Birbeck Chaining Rules (with some edge cases to be worked out soon) Ben asked when we will have a draft with the new rules? Mark says nearly done. Tomorrow? Okay - Mark will have his changes done sometime tomorrow - Ben and Shane will review over the weekend. Others are invited to review as well. <Ralph> [I'm not finding a FOAF URI for Libby Miller -- even DanBri foaf:knows [ a foaf:Person, foaf:mbox mailto:libby.miller@bristol.ac.uk]; without giving her a URI <Ralph> [so perhaps our test should be _:Danbri foaf:knows <>. This is scribe.perl Revision: 1.128 of Date: 2007/02/23 21:38:13 Check for newer version at Guessing input format: RRSAgent_Text_Format (score 1.00) Succeeded: s/Ralpha/Ben/ Succeeded: s/of/if/ Succeeded: s/0061/0063/ Succeeded: s/:inbox/:mbox/ Found Scribe: ShaneM Found Scribe: ShaneM Found ScribeNick: ShaneM Default Present: [IPcaller], ShaneM, benadida, markbirbeck, Ralph, Simone, +1.540.641.aaaa, Manu Present: [IPcaller] ShaneM benadida markbirbeck Ralph Simone +1.540.641.aaaa Manu Agenda: Got date from IRC log name: 13 Dec 2007 Guessing minutes URL: People with action items: ben manu michael ralph shane WARNING: Input appears to use implicit continuation lines. You may need the "-implicitContinuations" option.[End of scribe.perl diagnostic output]
http://www.w3.org/2007/12/13-rdfa-minutes.html
CC-MAIN-2016-50
en
refinedweb
For example when using Preconditions.checkArgument, is the error message supposed to reflect the passing case or the failing case of the check in question? import static com.google.common.base.Preconditions.*; void doStuff(int a, int b) { checkArgument(a == b, "a == b"); // OR checkArgument(a == b, "a != b"); } For precondition checks, stating the requirement in the exception detail message is more informative than simply stating the facts. It also leads to a lot more naturally reading code: The documentation provides the following example: This allows constructs such as if (count <= 0) { throw new IllegalArgumentException("must be positive: " + count); } to be replaced with the more compact checkArgument(count > 0, "must be positive: %s", count); Two things are of note: Following that example, a better message would be: checkArgument(a == b, "a must be equal to b"); // natural! You can even go a step further and capture the values of a and b in the exception message (see Effective Java 2nd Edition, Item 63: Include failure capture information in detail messages): checkArgument(a == b, "a must be equal to b; instead %s != %s", a, b); The alternative of stating facts is less natural to read in code: checkArgument(a == b, "a != b"); // awkward! checkArgument(a == b, "a is not equal to b"); // awkward! Note how awkward it is to read in Java code one boolean expression, followed by a string that contradicts that expression. Another downside to stating facts is that for complicated preconditions, it's potentially less informative, because the user may already know of the fact, but not what the actual requirements are that is being violated.
https://codedump.io/share/srsMAukGdImv/1/what-is-the-proper-error-message-to-supply-to-google-guava39s-preconditions-methods
CC-MAIN-2016-50
en
refinedweb
What to Expect from Yii 2.0By Arno Slatius. A tiny bit of history The first version of Yii became popular quite fast after it was released in 2008. It’s founder, Qiang Xue, previously worked on the Prado framework and used experience and feedback from that to build Yii. Yii uses many ideas from other frameworks, languages and libraries: Prado, Ruby, jQuery, Symfony and Joomla are all acknowledged as sources of inspiration. The first commits for Yii 2.0 date back to 2011 but the development picked up last year. The team did a rewrite with an aim to become the state of the art new generation PHP framework. It adopts the latest technologies and features, such as Composer, PSR, namespaces, traits, and more. Something worth mentioning is that according to the download page Yii version 1.1 support will end on December 31, 2015, so we do get some time to start thinking about making the transition. Requirements. Installation Yii is now installable from Composer. We’ll go through this installation method soon. Currently, there are two application examples available. There is a basic example containing a few pages, a contact page and a login page. The advanced example adds a separate front and backend, database interaction, signup and password recovery. Getting started I’ll start with the basic example. If you’ve looked at Yii before, you’ll recognize the same basic webapp that Yii 1.1 came with. Install the basic example with Composer using the following command: composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic You can then check if your server meets the requirements by opening up. The actual application will then run from. This is the first important thing to notice: the idea is that you set the document root of your application to the /path/to/application/web, much like with Symfony. The directory layout changed a bit from version 1.1. If you look closely, the change makes sense and will improve the security of your application. Previously, all the application components (models, views, controllers, framework and vendor libraries) would live under the document root in the protected folder. That way the security depended on .htaccess files to be respected, which meant your application was 100% insecure by default on Nginx. Moving all the application components away from the document root prevents the web server from sending your application components to a user. You might find yourself looking for the actual framework sources. The framework is a component that was installed using Composer, so it’ll reside under the vendor\yiisoft\yii directory. Here you’ll find a lot more, but for now, we’ll just leave it at that. For now, let’s change the local web server configuration and set the document root to /path/to/application/web. I added a virtualhost, but do as you see fit for your own situation. The default configuration is set to hide the script file in the URL. If you’re using Apache, you’ll need to add an .htaccess file to the web directory to instruct Apache to do rewriting, it’s not there by default. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php A look at the basic Yii application Now that we have the basic application running, some congratulations are in order… Thanks! No rocket science so far. You’ll start with start page, a static about page, a contact page and a login page. The contact page and login form have the same functionality available as before; captcha code, form validation and two users available for logging in. Logging in does the same as before; close to nothing. Still, it is a good start. The design of the basic application changed dramatically. Previously you’d get an application built on the Blueprint CSS framework whereas now we start off with Twitter Bootstrap. Improvement? It probably is compared to Blueprint, but then again Bootstrap is a lot more than Blueprint ever tried to be. Bootstrap will give you all sorts of application components and will speed up building an application. Some might argue on the other hand that all sites look the same with Bootstrap (themes only fix this partially) and it will also make your site larger size-wise. Either way, the integration with Yii 2.0 is done with the yii2-bootstrap extension. This makes it very easy to integrate the Bootstrap components in your views. Another thing you’ll notice is the debug bar at the bottom. It is installed and activated by default, just like in Symfony. It allows for quick access to loads of information about your configuration, requests and application logging. It’ll keep a history of requests with debug information as well. Yii handles errors different than PHP normally would. Yii converts all errors (fatal and non-fatal) to exceptions. Those are handled by rendering an insightful output pointing you towards the point where you messed up or your code generated a notice. Even parse errors, for which Yii 1.1 would fall back to the basic PHP errors, get a nicely rendered overview of your code. This is something most of us will appreciate. Gii is also present again and activated by default. Gii will help you by generating code for you to start with, another great tool to help speed up your development. It will generate models and controllers for you. The CRUD generator will go one step further and generate a complete MVC set for all the actions. Gii will also generate code better suited for Internationalization (i18n) by immediately inserting the Yii::t() function where you’ll need it. The basic application now also comes with a simple command line application which you can build upon. Yii 1.1 already supported this but you’d have to get an example from the Wiki. That’s what you’ll find in the basic application. There is also an advanced application example available. It has a somewhat different structure but adds even more functionality to your application out of the box: - User authorization, authentication and password restore. - An application split into a front and backend. Continuing the look at the basic version, let’s take a closer look and dive into the code… What changed? A lot has changed. Some changes might confuse you at first, but I find most changes make sense and are easy to accept. Here are some of the changes that I found interesting, fun or puzzling. The PHP 5.4 requirement made some changes possible; the array short tags are available. It’s also safe to use the echo short tags in views because that doesn’t depend on configuration settings anymore. <?php $elements = array(1,2,3,4); //Yii 1.1 $elements = [1,2,3,4]; //Yii 2.0 ?> <?php echo $someVar; ?> //Yii 1.1 <?= $someVar ?> //always safe to use in Yii 2.0 A small change, but one you’ll run into fast; before, you’d use Yii::app() to access the application instance and it’s components. In Yii 2.0 this changed from a static function to a static variable Yii::$app. The translate function Yii::t() is still with us. It instructs Yii to use the i18n component to translate the supplied text to the current language used. You can also instruct it to substitute variables. <?php echo `Yii::t('app', 'Hello, {username}!', [ 'username' => $username, ]); ?> The placeholder formatting and styling has been seriously reworked allowing for more formatting options. Some examples: <?php echo \Yii::t('app', '{n, number} is spelled as {n, spellout}', ['n' => 81]); echo \Yii::t('app', 'You are {n, ordinal} in line, please hold.', ['n' => 3]); //Will echo "You are 3rd in line, please wait.". echo \Yii::t('app', 'There {n, plural, =0{are no cats} =1{is one cat} other{are # cats}}!', array( 'n' => 14, )); ?> Because of this placeholder formatting, the DateTimeFormatter is gone: <?php //Previously in Yii 1.1 Yii::app()->dateFormatter->formatDateTime(time(), 'medium', 'medium'); //In Yii 2.0 echo \Yii::t('app', 'The date is {0, date, short}', time()); //uses the pre-defined 'short' notation (i18n save) echo \Yii::t('app', 'The date is {0, date, YYYY-MM-dd}', time()); //or define your own notation ?> This functionality is supplied by the ICU library. The Yii documentation calls the original documentation for this: “quite cryptic”. I dare you to read it and try to understand it… Let’s hope the Yii documentation includes a more readable version in time. Controllers Before, accessControl() would be a function of your controller if you wanted to use the Yii access control functionality. With Yii 2.0, access control is part of the controllers behavior(): <?php public function behaviors() { return [ 'access' => [ 'class' => AccessControl::className(), 'only' => ['logout','login','signup'], 'rules' => [ [ 'allow' => true, 'actions' => ['logout'], 'roles' => ['@'], ], [ 'allow' => true, 'actions' => ['login', 'signup'], 'roles' => ['?'], ], ], ], ]; } ?> This is almost identical to the way it was in Yii 1.1. I did notice that the example code (not the framework itself!) is missing many docblocks and has a lot of @inheritdoc comments. This isn’t what you’d expect from an example but I assume that this will be fixed in time. Models The basic model (previously CModel) didn’t change much. Scenarios now allow you to change the enforcement of validation rules. You can change what needs to be validated based on your current scenario (i.e. a model with different rules when used from a front or backend). The derived ActiveRecord underwent some serious changes, though. The syntax for searching with ActiveRecord became more like writing queries because CDbCriteria is gone. It has been replaced by ActiveQuery making retrieving information easier: <?php $authors = Authors::find() ->where(['sitepointChannel' => $channel]) ->orderBy('lastName') ->all(); ?> Relations definition also changed dramatically. Lets take for example a site with bloggers that post articles on which users comment. The relations definitions for the authors table is described below. I’ll start with how it looked in Yii 1.1: <?php //Define the relations public function relations() { return array( 'posts' => array(self::HAS_MANY, 'Posts', 'authorID'), 'comments' => array(self::HAS_MANY, 'Comments', array('ID'=>'PostID'), 'through'=>'posts'), ); } //Querying an author with posts and comments $activity = Author::model()->with(array('posts','comments')->find('fullname = "Arno Slatius"'); $posts = $activity->posts; $comments = $activity->comments; ?> As you can see, you’d define all the relations of an Active record in a large array. In Yii 2.0 you’ll have to define getter methods that return an ActiveQuery object for all those relations. You’d have to use the keyword ‘through’ in a relation to define a relation between an intermediary table. You now have two options to define this; normally you’d use the via() method in a relation function. You can also define the relation using the viaTable() method if you only need the data in the table after the pivot table. Same example as above but now for Yii 2.0: <?php //Define relations by creating getter functions public function getPosts() { return $this->hasMany(Posts::className(), ['authorID' => 'ID']); } public function getComments() { return $this->hasMany(Comments::className(), ['ID' => 'PostID']) ->via('Posts'); } //If you'd only need comments you'd define it at once: public function getComments() { return $this->hasMany(Comments::className(), ['ID' => 'PostID']) ->viaTable(Posts::className(), ['authorID' => 'ID']); } //Querying an author with posts and comments $activity= Authors::findOne(['fullname' => 'Arno Slatius']); $posts = $activity->posts; $comments = $activity->comments; ?> This is a rather simple example. Defining the relations through the getter functions that return ActiveQuery objects allows for much more. You can, for instance, add a specific function that does a query for posts that get >50 comments by adding a where() call in the returned ActiveQuery. An interesting addition is the possibility to define cross DBMS relations. You can define relations between for instance MySQL and MongoDB or Redis and use them in your application as one object. Views The main thing to note in views is that $this doesn’t refer to the controller instance anymore. In a view, $this is an instance of the yii\web\View object. The controller is accessible through $this->context. As I said before; PHP 5.4 makes the short echo tag consistently available. This makes the views which consist of mixed PHP and HTML more readable; <h1><?= Html::encode($this->title) ?></h1> The render() and renderPartial() functions changed as well. Before it would echo the rendered output automatically and you’d have to add an additional parameter to get the rendered output as a string. Yii 2.0 will always return a string on render()-like calls making it more consistent with the way widgets behave. Upgrading from Yii 1.1 Should you consider upgrading your Yii 1.1 application to Yii 2.0 in time? Bruno Škvorc recently wrote about legacy code here on SitePoint. He argues that a rewrite that can be done in 2 months should be considered – especially if the software you’re using is business critical. I agree with him and would suggest you consider it if you feel seriously about your application and want to maintain it beyond the end of life of Yii 1.1. But as always; it depends on your situation. There’s a special page dedicated to upgrading Yii on the Yii website. The biggest problem, for now, are your extensions. If you rely on a lot of extensions, you’ll have a hard time because it’ll take some time for the community to take up (re)writing the extensions for Yii 2.0. If you’re a real pro, you could of course take a serious look at the extensions you’re using and consider (re)writing them. The migration manual has a section on running Yii 1.1 and Yii 2.0 together in an application. For large projects this is a good way to create a safe migration path. Migrate your generic code to Yii 2.0 and take your time on the more complex or extension filled parts. Conclusion Going over the The Definitive Guide to Yii 2.0 gets me more and more enthusiastic to get started with Yii 2.0. I already had to stop myself from using it in a new project because I couldn’t risk problems with pre-production code.! - masudianpour - Arno Slatius - dojoVader - Arno Slatius - Syed Zaeem ud Din - pentium10 - Syed Zaeem ud Din - Said Bakr - Loganatan - Zein Miftah - darkheir - Vincent - Michel - Carlos Mathers - Ahmed Mohamed - R22 - Bruno Skvorc - jovani - igorsantos07 - Arno Slatius - igorsantos07 - Arno Slatius - Jasper van der Hoeven - Arno Slatius - Jasper van der Hoeven - Arno Slatius - Jasper van der Hoeven - Arno Slatius - Jasper van der Hoeven - Arno Slatius - gondoSVK - jennifermorrison
https://www.sitepoint.com/expect-yii-2-0/
CC-MAIN-2016-50
en
refinedweb
In C++ AMP, the type char is part of the subset of the C++ language restricted from use on accelerators. Fortunately, it’s relatively easy to work around this restriction, and you may even get better performance to boot (though this is dependent on the code you’ve written and the GPU you are running on among other factors). For example, even with support for a character type, it is a much better idea to initialize an array using integer values rather than character values. Let’s take a look at this issue in more detail. Suppose you want to work with an STL vector of char type data containing size number of elements in C++ AMP. You cannot write the following because you cannot use unsigned char in the restricted scope: array_view<unsigned char> d_data(size, data.data()); // THIS WON’T COMPILE!!parallel_for_each(extent<1>(size), [=] (index<1> idx) restrict(amp){ // Example 1. Read each character in the vector ... = d_data[idx]; // Example 2. Increment each character in the vector d_data[idx]++; // Example 3. Add a value to each character in the vector d_data[idx] += val; // Example 4. Assign a value to each character in the vector d_data[idx] = val;});d_data.synchronize(); However, if the vector is very large and the data can fit in 8 bits, then an array of unsigned char values is exactly what you may wish to use. Without support for char and unsigned char in C++ AMP, you could use integers and unsigned integers to accomplish your task, but care must be taken to ensure that writing all 32 bits does not trounce on other concurrent writes. Let’s see how we can work around this restriction. In the example above, the first step is to define an array view of unsigned integers via a cast. Since each unsigned integer can represent four characters, you’ll have to divide size by four (rounding up) and cast the vector to a vector of unsigned integers: array_view<unsigned int> d_data((size+3)/4, reinterpret_cast<unsigned int*>(data.data())); The rest of the work-around involves arithmetic, bit masks, and atomic operations. If you’re not interested in the details, you can skip to the next section to see a set of functions that should help you treat an array, array_view, or C-style array as if the element type was char. Reading the 8-bit character value (d_data[idx]) is possible with the following expression: ((arr(idx[0] >> 2) & (0xFF << ((idx[0] & 0x3) << 3)))) >> ((idx[0] & 0x3) << 3) Note we have to use idx[0] rather than idx (though we could have indexed into the array directly with idx since division is overload over the index type). Let’s break this down with a picture: These bit manipulations allow us to find the 10th character by looking at the 2nd byte in the 3rd unsigned integer. In addition to similar bit manipulations and arithmetic, writing to an 8-bit character element involves the use of atomic operations. Although it may be safe to write to the 8 bits concurrently, using integers and unsigned integers requires writing to 32 bits. There is thus the potential for a data race since the neighboring characters may be written at the same time. So even if you wouldn’t need an atomic operation to write to the 8 bits, you will most likely need one since you have to write to 32 bits! (The exception is if you know that you're not concurrently writing to any of the neighboring characters in the same 32 bits. In that case, you don't need the atomic operation.) Incrementing an 8-bit character element (d_data[idx]++) is possible with the following line: atomic_fetch_add(&arr(idx[0] >> 2), 1 << ((idx[0] & 0x3) << 3)) As with the expression to read an 8-bit character, this line involves many of the same bit operations. The key is to align the value 1 with the character that needs to be incremented. Adding a value to an 8-bit character element (d_data[idx] += val) requires only a minor change to the above, and it can be computed with the following line: atomic_fetch_add(&arr(idx[0] >> 2), val << ((idx[0] & 0x3) << 3)) Note the change from 1 to val. Finally, writing a value to an 8-bit character element (d_data[idx] = val) can be done with two calls to atomic_fetch_xor. The trick is to change the 8 bits while leaving the others unchanged. We can thus zero out the 8 bits by xor’ing in the original value and then set the 8 bits to the desired value by xor’ing it. Here is the code for our example: atomic_fetch_xor(&arr(idx[0] >> 2), arr(idx[0] >> 2) & (0xFF << ((idx[0] & 0x3) << 3)));atomic_fetch_xor(&arr(idx[0] >> 2), (val & 0xFF) << ((idx[0] & 0x3) << 3)); Note that incrementing a character and adding a value to a character are atomic, but writing a character, as written, is not atomic. It uses atomic operations so that it can be completed concurrent to a write to a neighboring character, but it cannot be completed concurrent to a write to the same character since the whole operation is not atomic. It is possible to make the write atomic using an atomic compare-and-exchange operation. By reading the value, and then making sure that the write is completed before any other bits change, the value can be written atomically. For completeness, let’s take a look at this code as an aside: bool done = false;while (!done){ unsigned int orig = arr[idx / 4]; unsigned int repl = orig ^ (orig & (0xFF << ((idx[0] & 0x3) << 3))); repl ^= (val & 0xFF) << ((idx[0] & 0x3) << 3); done = atomic_compare_exchange(&arr[idx / 4], &orig, repl);} The following set of functions will let us rewrite the above code with minimal changes: // Read character at index idx from array arr.template <typename T>unsigned int read_uchar(T& arr, int idx) restrict(amp){ return (arr[idx >> 2] & (0xFF << ((idx & 0x3) << 3))) >> ((idx & 0x3) << 3);}// Increment character at index idx in array arr.template<typename T>void increment_uchar(T& arr, int idx) restrict(amp){ atomic_fetch_add(&arr[idx >> 2], 1 << ((idx & 0x3) << 3));}// Add value val to character at index idx in array arr.template<typename T>void addto_uchar(T& arr, int idx, unsigned int val) restrict(amp){ atomic_fetch_add(&arr[idx >> 2], (val & 0xFF) << ((idx & 0x3) << 3));}// Write value val to character at index idx in array arr.template<typename T>void write_uchar(T& arr, int idx, unsigned int val) restrict(amp){ atomic_fetch_xor(&arr[idx >> 2], arr[idx >> 2] & (0xFF << ((idx & 0x3) << 3))); atomic_fetch_xor(&arr[idx >> 2], (val & 0xFF) << ((idx & 0x3) << 3));}// Helper function to accept 1D indices of index<1> type instead of integers.template <typename T>unsigned int read_uchar(T& arr, index<1> idx) restrict(amp) { return read_uchar(arr, idx[0]); }template<typename T>void increment_uchar(T& arr, index<1> idx) restrict(amp) { increment_uchar(arr, idx[0]); }template<typename T>void addto_uchar(T& arr, index<1> idx, unsigned int val) restrict(amp) { addto_uchar(arr, idx[0], val); }template<typename T>void write_uchar(T& arr, index<1> idx, unsigned int val) restrict(amp) { write_uchar(arr, idx[0], val); } With these functions, we can write the code we wanted to write at the beginning as follows: array_view<unsigned int> d_data((size+3)/4, reinterpret_cast<unsigned int*>(data.data()));parallel_for_each(extent<1>(size), [=] (index<1> idx) restrict(amp){ // Example 1. Read each character in the vector ... = read_uchar(d_data, idx); // Example 2. Increment each character in the vector increment_uchar(d_data, idx); // Example 3. Add a value to each character in the vector addto_uchar(d_data, idx, 2); // Example 4. Assign a value to each character in the vector write_uchar(d_data, idx, 3);});d_data.synchronize(); These techniques and abstractions make it possible and easy to write char-based code on the GPU using C++ AMP. It’s worth noting that the ideas above also apply to C-style arrays declared as tile_static variables. Comments are welcome below and in our forum. Also if you have an interesting computation that benefits from using the char type, we'd be curious to see it. One common case where 8-bit data shows up is where you have an input device, such as a camera, that produces 8-bit data. Another case is this example of a 256-bin histogram. Do you have another computation that benefits from using 8-bit data on the GPU?
http://blogs.msdn.com/b/nativeconcurrency/archive/2012/01/17/c-amp-it-s-got-character-but-no-char.aspx
CC-MAIN-2013-48
en
refinedweb
This article explains the new features in Python 3.1, compared to 3.0. Regular Python dictionaries iterate over key/value pairs in arbitrary order. Over the years, a number of authors have written alternative implementations that remember the order that the keys were originally inserted. Based on the experiences from those implementations, a new configparser module uses them by default. This lets configuration files be read, modified, and then written back in their original order. The _asdict() method for collections.namedtuple() now returns an ordered dictionary with the values appearing in the same order as the underlying tuple indicies. The json module is being built-out with an object_pairs_hook to allow OrderedDicts to be built by the decoder. Support was also added for third-party tools like PyYAML. See also. The builtin format() function and the str.format() method use a mini-language that now includes a simple, non-locale aware way to format a number with a thousands separator. That provides a way to humanize a program’s output, improving its professional appearance and readability: >>> format(1234567, ',d') '1,234,567' >>> format(1234567.89, ',.2f') '1,234,567.89' >>> format(12345.6 + 8901234.12j, ',f') '12,345.600000+8,901,234.120000j' >>> format(Decimal('1234567.89'), ',f') '1,234,567.89' The supported types are int, float, complex and decimal.Decimal. Discussions are underway about how to specify alternative separators like dots, spaces, apostrophes, or underscores. Locale-aware applications should use the existing n format specifier which already has some support for thousands separators. Some smaller changes made to the core Python language are: Directories and zip archives containing a __main__.py file can now be executed directly by passing their name to the interpreter. The directory/zipfile is automatically inserted as the first entry in sys.path. (Suggestion and initial patch by Andy Chu; revised patch by Phillip J. Eby and Nick Coghlan; issue 1739468.) The int() type.) The string.maketrans() function is deprecated and is replaced by new syntax of the with statement now allows multiple context managers in a single statement: >>> with open('mylog.txt') as infile, open('a.out', 'w') as outfile: ... for line in infile: ... if '<critical>' in line: ... outfile.write(line) With the new syntax, the contextlib.nested() function is no longer needed and is now deprecated. (Contributed by Georg Brandl and Mattias Brändström; appspot issue 53094.) round(x, n) now returns an integer if x is an integer. Previously it returned a float: >>> round(1123, -2) 1100 (Contributed by Mark Dickinson; issue 4707.) Python now uses David Gay’s algorithm for finding the shortest floating point representation that doesn’t change its value. This should help mitigate some of the confusion surrounding binary floating point numbers. The significance is easily seen with a number like 1.1 which does not have an exact equivalent in binary floating point. Since there is no exact equivalent, an expression like float('1.1') evaluates to the nearest representable value which is 0x1.199999999999ap+0 in hex or 1.100000000000000088817841970012523233890533447265625 in decimal. That nearest value was and still is used in subsequent floating point calculations. What is new is how the number gets displayed. Formerly, Python used a simple approach. The value of repr(1.1) was computed as format(1.1, '.17g') which evaluated to '1.1000000000000001'. The advantage of using 17 digits was that it relied on IEEE-754 guarantees to assure that eval(repr(1.1)) would round-trip exactly to its original value. The disadvantage is that many people found the output to be confusing (mistaking intrinsic limitations of binary floating point representation as being a problem with Python itself). The new algorithm for repr(1.1) is smarter and returns '1.1'. Effectively, it searches all equivalent string representations (ones that get stored with the same underlying float value) and returns the shortest representation. The new algorithm tends to emit cleaner representations when possible, but it does not change the underlying values. So, it is still the case that 1.1 + 2.2 != 3.3 even though the representations may suggest otherwise. The new algorithm depends on certain features in the underlying floating point implementation. If the required features are not found, the old algorithm will continue to be used. Also, the text pickle protocols assure cross-platform portability by using the old algorithm. (Contributed by Eric Smith and Mark Dickinson; issue 1580) Added a collections.Counter class to support convenient counting of unique items in a sequence or iterable: >>> Counter(['red', 'blue', 'red', 'green', 'blue', 'blue']) Counter({'blue': 3, 'red': 2, 'green': 1}) (Contributed by Raymond Hettinger; issue 1696199.) Added a new module, tkinter.ttk for and bz2.BZ2File classes now support the context manager protocol: >>> # Automatically close file after writing >>> with gzip.GzipFile(filename, "wb") as f: ... f.write(b"xxx") (Contributed by Antoine Pitrou.) The decimal module now supports methods for creating a decimal object from a binary float. The conversion is exact but can sometimes be surprising: >>> Decimal.from_float(1.1) Decimal('1.100000000000000088817841970012523233890533447265625') The long decimal result shows the actual binary fraction being stored for 1.1. The fraction has many digits because 1.1 cannot be exactly represented in binary. (Contributed by Raymond Hettinger and Mark Dickinson.) The itertools module grew two new functions. The itertools.combinations_with_replacement() function is one of four for generating combinatorics including permutations and Cartesian products. The itertools.compress() function mimics its namesake from APL. Also, the existing itertools.count() function now has an optional step argument and can accept any type of counting sequence including fractions.Fraction and decimal.Decimal: >>> [p+q for p,q in combinations_with_replacement('LOVE', 2)] ['LL', 'LO', 'LV', 'LE', 'OO', 'OV', 'OE', 'VV', 'VE', 'EE'] >>> list(compress(data=range(10), selectors=[0,0,1,1,0,1,0,1,0,0])) [2, 3, 5, 7] >>> c = count(start=Fraction(1,2), step=Fraction(1,6)) >>> [next(c), next(c), next(c), next(c)] [Fraction(1, 2), Fraction(2, 3), Fraction(5, 6), Fraction(1, 1)] (Contributed by Raymond Hettinger.) collections.namedtuple() now supports a keyword argument rename which lets invalid fieldnames be automatically converted to positional names in the form _0, _1, etc. This is useful when the field names are being created by an external source such as a CSV header, SQL field list, or user input: >>> query = input() SELECT region, dept, count(*) FROM main GROUPBY region, dept >>> cursor.execute(query) >>> query_fields = [desc[0] for desc in cursor.description] >>> UserQuery = namedtuple('UserQuery', query_fields, rename=True) >>> pprint.pprint([UserQuery(*row) for row in cursor]) [UserQuery(region='South', dept='Shipping', _2=185), UserQuery(region='North', dept='Accounting', _2=37), UserQuery(region='West', dept='Sales', _2=419)] (Contributed by Raymond Hettinger; issue 1818.) The re.sub(), re.subn() and re.split() functions now accept a flags parameter. (Contributed by Gregory Smith.) The logging module now implements a simple logging.NullHandler class for applications that are not using logging but are calling library code that does. Setting-up a null handler will suppress spurious warnings such as “No handlers could be found for logger foo”: >>> h = logging.NullHandler() >>> logging.getLogger("foo").addHandler(h) (Contributed by Vinay Sajip; issue 4384). The runpy module which supports the -m command line switch now supports the execution of packages by looking for and executing a __main__ submodule when a package name is supplied. (Contributed by Andi Vajda; issue 4195.) The pdb module can now access and display source code loaded via zipimport (or any other conformant PEP 302 loader). (Contributed by Alexander Belopolsky; issue 4201.) functools.partial objects can now be pickled. (Suggested by Antoine Pitrou and Jesse Noller. Implemented by Jack Diederich; issue 5228.) Add pydoc help topics for symbols so that help('@') works as expected in the interactive environment. (Contributed by David Laban; issue 4739.) The unittest module now supports skipping individual tests or classes of tests. And it supports marking a test as a expected failure, a test that is known to be broken, but shouldn’t be counted as a failure on a TestResult: class TestGizmo(unittest.TestCase): @unittest.skipUnless(sys.platform.startswith("win"), "requires Windows") def test_gizmo_on_windows(self): ... @unittest.expectedFailure def test_gimzo_without_required_library(self): ... Also, tests for exceptions have been builtout to work with context managers using the with statement: def test_division_by_zero(self): with self.assertRaises(ZeroDivisionError): x / 0 In addition, several new assertion methods were added including assertSetEqual(), assertDictEqual(), assertDictContainsSubset(), assertListEqual(), assertTupleEqual(), assertSequenceEqual(), assertRaisesRegexp(), assertIsNone(), and assertIsNotNone(). (Contributed by Benjamin Peterson and Antoine Pitrou.) The io module has three new constants for the seek() method SEEK_SET, SEEK_CUR, and SEEK_END. The sys.version_info tuple is now a named tuple: >>> sys.version_info sys.version_info(major=3, minor=1, micro=0, releaselevel='alpha', serial=2) (Contributed by Ross Light; issue 4285.) The nntplib and imaplib modules now support IPv6. (Contributed by Derek Morr; issue 1655 and issue 1664.) The pickle module has been adapted for better interoperability with Python 2.x when used with protocol 2 or lower. The reorganization of the standard library changed the formal reference for many objects. For example, __builtin__.set in Python 2 is called builtins.set in Python 3. This change confounded efforts to share data between different versions of Python. But now when protocol 2 or lower is selected, the pickler will automatically use the old Python 2 names for both loading and dumping. This remapping is turned-on by default but can be disabled with the fix_imports option: >>> s = {1, 2, 3} >>> pickle.dumps(s, protocol=0) b'c__builtin__\nset\np0\n((lp1\nL1L\naL2L\naL3L\natp2\nRp3\n.' >>> pickle.dumps(s, protocol=0, fix_imports=False) b'cbuiltins\nset\np0\n((lp1\nL1L\naL2L\naL3L\natp2\nRp3\n.' An unfortunate but unavoidable side-effect of this change is that protocol 2 pickles produced by Python 3.1 won’t be readable with Python 3.0. The latest pickle protocol, protocol 3, should be used when migrating data between Python 3.x implementations, as it doesn’t attempt to remain compatible with Python 2.x. (Contributed by Alexandre Vassalotti and Antoine Pitrou, issue 6137.) A new module, importlib was added. It provides a complete, portable, pure Python reference implementation of the import statement and its counterpart, the __import__() function. It represents a substantial step forward in documenting and defining the actions that take place during imports. (Contributed by Brett Cannon.). (Contributed by Amaury Forgeot d’Arc and Antoine Pitrou.) Added a heuristic so that tuples and dicts containing only untrackable objects are not tracked by the garbage collector. This can reduce the size of collections and therefore the garbage collection overhead on long-running programs, depending on their particular use of datatypes. (Contributed by Antoine Pitrou, issue 4688.) Enabling a configure option named --with-computed-gotos on compilers that support it (notably: gcc, SunPro, icc), the bytecode evaluation loop is compiled with a new dispatch mechanism which gives speedups of up to 20%, depending on the system, the compiler, and the benchmark. module’s format menu now provides an option to strip trailing whitespace from a source file. (Contributed by Roger D. Serwy; issue 5150.) Changes to Python’s build process and to the C API include: sys.int_info that provides information about the internal format, giving the number of bits per digit and the size in bytes of the C type used to store each digit: >>> import sys >>> sys.int_info sys.int_info(bits_per_digit=30, sizeof_digit=4) (Contributed by Mark Dickinson; issue 4258.) The PyLong_AsUnsignedLongLong() function now handles a negative pylong by raising OverflowError instead.) Added PyCapsule as a replacement for the PyCObject API. The principal difference is that the new type has a well defined interface for passing typing safety information and a less complicated signature for calling a destructor. The old type had a problematic API and is now deprecated. (Contributed by Larry Hastings; issue 5630.) This section lists previously described changes and other bugfixes that may require changes to your code: The new floating point string representations can break existing doctests. For example: def e(): '''Compute the base of natural logarithms. >>> e() 2.7182818284590451 ''' return sum(1/math.factorial(x) for x in reversed(range(30))) doctest.testmod() ********************************************************************** Failed example: e() Expected: 2.7182818284590451 Got: 2.718281828459045 ********************************************************************** The automatic name remapping in the pickle module for protocol 2 or lower can make Python 3.1 pickles unreadable in Python 3.0. One solution is to use protocol 3. Another solution is to set the fix_imports option to False. See the discussion above for more details.
http://docs.python.org/release/3.1.5/whatsnew/3.1.html
CC-MAIN-2013-48
en
refinedweb
1 /*2 * @(#)NamingException.java 1.10 03/12/193 *4 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.6 */7 8 package javax.naming;9 10 /**11 * This is the superclass of all exceptions thrown by12 * operations in the Context and DirContext interfaces.13 * The nature of the failure is described by the name of the subclass.14 * This exception captures the information pinpointing where the operation 15 * failed, such as where resolution last proceeded to.16 * <ul>17 * <li> Resolved Name. Portion of name that has been resolved.18 * <li> Resolved Object. Object to which resolution of name proceeded.19 * <li> Remaining Name. Portion of name that has not been resolved.20 * <li> Explanation. Detail explaining why name resolution failed.21 * <li> Root Exception. The exception that caused this naming exception22 * to be thrown.23 *</ul>24 * null is an acceptable value for any of these fields. When null,25 * it means that no such information has been recorded for that field.26 *<p>27 * A NamingException instance is not synchronized against concurrent 28 * multithreaded access. Multiple threads trying to access and modify29 * a single NamingException instance should lock the object.30 *<p>31 * This exception has been retrofitted to conform to32 * the general purpose exception-chaining mechanism. The33 * <i>root exception</i> (or <i>root cause</i>) is the same object as the34 * <i>cause</i> returned by the {@link Throwable#getCause()} method.35 *36 * @author Rosanna Lee37 * @author Scott Seligman38 * @version 1.10 03/12/1939 * @since 1.340 */41 42 43 public class NamingException extends Exception {44 /**45 * Contains the part of the name that has been successfully resolved.46 * It is a composite name and can be null.47 * This field is initialized by the constructors.48 * You should access and manipulate this field49 * through its get and set methods.50 * @serial51 * @see #getResolvedName52 * @see #setResolvedName53 */54 protected Name resolvedName;55 /**56 * Contains the object to which resolution of the part of the name was 57 * successful. Can be null. 58 * This field is initialized by the constructors.59 * You should access and manipulate this field60 * through its get and set methods.61 * @serial62 * @see #getResolvedObj63 * @see #setResolvedObj64 */65 protected Object resolvedObj;66 /**67 * Contains the remaining name that has not been resolved yet.68 * It is a composite name and can be null. 69 * This field is initialized by the constructors.70 * You should access and manipulate this field71 * through its get, set, "append" methods.72 * @serial73 * @see #getRemainingName74 * @see #setRemainingName75 * @see #appendRemainingName76 * @see #appendRemainingComponent77 */78 protected Name remainingName;79 80 /**81 * Contains the original exception that caused this NamingException to82 * be thrown. This field is set if there is additional83 * information that could be obtained from the original84 * exception, or if the original exception could not be85 * mapped to a subclass of NamingException.86 * Can be null.87 *<p>88 * This field predates the general-purpose exception chaining facility.89 * The {@link #initCause(Throwable)} and {@link #getCause()} methods90 * are now the preferred means of accessing this information.91 *92 * @serial93 * @see #getRootCause94 * @see #setRootCause(Throwable)95 * @see #initCause(Throwable)96 * @see #getCause97 */98 protected Throwable rootException = null;99 100 /**101 * Constructs a new NamingException with an explanation.102 * All unspecified fields are set to null.103 *104 * @param explanation A possibly null string containing105 * additional detail about this exception.106 * @see java.lang.Throwable#getMessage107 */108 public NamingException(String explanation) {109 super(explanation);110 resolvedName = remainingName = null;111 resolvedObj = null;112 }113 114 /**115 * Constructs a new NamingException.116 * All fields are set to null.117 */118 public NamingException() {119 super();120 resolvedName = remainingName = null;121 resolvedObj = null;122 }123 124 /**125 * Retrieves the leading portion of the name that was resolved126 * successfully. 127 *128 * @return The part of the name that was resolved successfully. 129 * It is a composite name. It can be null, which means130 * the resolved name field has not been set.131 * @see #getResolvedObj132 * @see #setResolvedName133 */134 public Name getResolvedName() {135 return resolvedName;136 }137 138 /**139 * Retrieves the remaining unresolved portion of the name.140 * @return The part of the name that has not been resolved. 141 * It is a composite name. It can be null, which means142 * the remaining name field has not been set.143 * @see #setRemainingName144 * @see #appendRemainingName145 * @see #appendRemainingComponent146 */147 public Name getRemainingName() {148 return remainingName;149 }150 151 /**152 * Retrieves the object to which resolution was successful.153 * This is the object to which the resolved name is bound.154 *155 * @return The possibly null object that was resolved so far.156 * null means that the resolved object field has not been set.157 * @see #getResolvedName158 * @see #setResolvedObj159 */160 public Object getResolvedObj() {161 return resolvedObj;162 }163 164 /**165 * Retrieves the explanation associated with this exception.166 * 167 * @return The possibly null detail string explaining more 168 * about this exception. If null, it means there is no169 * detail message for this exception.170 *171 * @see java.lang.Throwable#getMessage172 */173 public String getExplanation() {174 return getMessage();175 }176 177 /**178 * Sets the resolved name field of this exception.179 *<p>180 * <tt>name</tt> is a composite name. If the intent is to set181 * this field using a compound name or string, you must 182 * "stringify" the compound name, and create a composite183 * name with a single component using the string. You can then184 * invoke this method using the resulting composite name.185 *<p>186 * A copy of <code>name</code> is made and stored.187 * Subsequent changes to <code>name</code> does not188 * affect the copy in this NamingException and vice versa.189 *190 * @param name The possibly null name to set resolved name to.191 * If null, it sets the resolved name field to null.192 * @see #getResolvedName193 */194 public void setResolvedName(Name name) {195 if (name != null)196 resolvedName = (Name )(name.clone());197 else198 resolvedName = null;199 }200 201 /**202 * Sets the remaining name field of this exception.203 *<p>204 * <tt>name</tt> is a composite name. If the intent is to set205 * this field using a compound name or string, you must 206 * "stringify" the compound name, and create a composite207 * name with a single component using the string. You can then208 * invoke this method using the resulting composite name.209 *<p>210 * A copy of <code>name</code> is made and stored.211 * Subsequent changes to <code>name</code> does not212 * affect the copy in this NamingException and vice versa.213 * @param name The possibly null name to set remaining name to.214 * If null, it sets the remaining name field to null.215 * @see #getRemainingName216 * @see #appendRemainingName217 * @see #appendRemainingComponent218 */219 public void setRemainingName(Name name) {220 if (name != null)221 remainingName = (Name )(name.clone());222 else223 remainingName = null;224 }225 226 /**227 * Sets the resolved object field of this exception.228 * @param obj The possibly null object to set resolved object to.229 * If null, the resolved object field is set to null.230 * @see #getResolvedObj231 */232 public void setResolvedObj(Object obj) {233 resolvedObj = obj;234 }235 236 /**237 * Add name as the last component in remaining name.238 * @param name The component to add.239 * If name is null, this method does not do anything.240 * @see #setRemainingName241 * @see #getRemainingName242 * @see #appendRemainingName243 */244 public void appendRemainingComponent(String name) {245 if (name != null) {246 try {247 if (remainingName == null) {248 remainingName = new CompositeName ();249 }250 remainingName.add(name);251 } catch (NamingException e) {252 throw new IllegalArgumentException (e.toString());253 }254 }255 }256 257 /**258 * Add components from 'name' as the last components in 259 * remaining name.260 *<p>261 * <tt>name</tt> is a composite name. If the intent is to append262 * a compound name, you should "stringify" the compound name263 * then invoke the overloaded form that accepts a String parameter.264 *<p>265 * Subsequent changes to <code>name</code> does not266 * affect the remaining name field in this NamingException and vice versa.267 * @param name The possibly null name containing ordered components to add.268 * If name is null, this method does not do anything.269 * @see #setRemainingName270 * @see #getRemainingName271 * @see #appendRemainingComponent272 */273 public void appendRemainingName(Name name) {274 if (name == null) {275 return;276 }277 if (remainingName != null) {278 try {279 remainingName.addAll(name);280 } catch (NamingException e) {281 throw new IllegalArgumentException (e.toString());282 }283 } else {284 remainingName = (Name )(name.clone());285 }286 }287 288 /**289 * Retrieves the root cause of this NamingException, if any.290 * The root cause of a naming exception is used when the service provider291 * wants to indicate to the caller a non-naming related exception292 * but at the same time wants to use the NamingException structure293 * to indicate how far the naming operation proceeded.294 *<p>295 * This method predates the general-purpose exception chaining facility.296 * The {@link #getCause()} method is now the preferred means of obtaining297 * this information.298 *299 * @return The possibly null exception that caused this naming 300 * exception. If null, it means no root cause has been301 * set for this naming exception.302 * @see #setRootCause303 * @see #rootException304 * @see #getCause305 */306 public Throwable getRootCause() {307 return rootException;308 }309 310 /**311 * Records the root cause of this NamingException.312 * If <tt>e</tt> is <tt>this</tt>, this method does not do anything.313 *<p>314 * This method predates the general-purpose exception chaining facility.315 * The {@link #initCause(Throwable)} method is now the preferred means316 * of recording this information.317 *318 * @param e The possibly null exception that caused the naming 319 * operation to fail. If null, it means this naming320 * exception has no root cause.321 * @see #getRootCause322 * @see #rootException323 * @see #initCause324 */325 public void setRootCause(Throwable e) {326 if (e != this) {327 rootException = e;328 }329 }330 331 /**332 * Returns the cause of this exception. The cause is the333 * throwable that caused this naming exception to be thrown.334 * Returns <code>null</code> if the cause is nonexistent or335 * unknown.336 *337 * @return the cause of this exception, or <code>null</code> if the338 * cause is nonexistent or unknown.339 * @see #initCause(Throwable)340 * @since 1.4341 */342 public Throwable getCause() {343 return getRootCause();344 }345 346 /**347 * Initializes the cause of this exception to the specified value.348 * The cause is the throwable that caused this naming exception to be349 * thrown.350 *<p>351 * This method may be called at most once.352 *353 * @param cause the cause, which is saved for later retrieval by354 * the {@link #getCause()} method. A <tt>null</tt> value355 * indicates that the cause is nonexistent or unknown.356 * @return a reference to this <code>NamingException</code> instance.357 * @throws IllegalArgumentException if <code>cause</code> is this358 * exception. (A throwable cannot be its own cause.)359 * @throws IllegalStateException if this method has already360 * been called on this exception.361 * @see #getCause362 * @since 1.4363 */364 public Throwable initCause(Throwable cause) {365 super.initCause(cause);366 setRootCause(cause);367 return this;368 }369 370 /**371 * Generates the string representation of this exception.372 * The string representation consists of this exception's class name, 373 * its detailed message, and if it has a root cause, the string374 * representation of the root cause exception, followed by375 * the remaining name (if it is not null). 376 * This string is used for debugging and not meant to be interpreted377 * programmatically.378 *379 * @return The non-null string containing the string representation 380 * of this exception.381 */382 public String toString() {383 String answer = super.toString();384 385 if (rootException != null) {386 answer += " [Root exception is " + rootException + "]";387 }388 if (remainingName != null) {389 answer += "; remaining name '" + remainingName + "'";390 }391 return answer;392 }393 394 /**395 * Generates the string representation in more detail.396 * This string representation consists of the information returned397 * by the toString() that takes no parameters, plus the string398 * representation of the resolved object (if it is not null).399 * This string is used for debugging and not meant to be interpreted400 * programmatically.401 *402 * @param detail If true, include details about the resolved object403 * in addition to the other information.404 * @return The non-null string containing the string representation. 405 */406 public String toString(boolean detail) {407 if (!detail || resolvedObj == null) {408 return toString();409 } else {410 return (toString() + "; resolved object " + resolvedObj);411 }412 }413 414 /**415 * Use serialVersionUID from JNDI 1.1.1 for interoperability416 */417 private static final long serialVersionUID = -1299181962103167177L;418 };419 Java API By Example, From Geeks To Geeks. | Our Blog | Conditions of Use | About Us_ |
http://kickjava.com/src/javax/naming/NamingException.java.htm
CC-MAIN-2013-48
en
refinedweb
Q. InfoQ: Dylan, could you give us a small overview of how you started developing Dojo, what was your initial vision and what has Dojo grown to become? In early 2004, Alex Russell began looking to hire a collaborator on DHTML (now known as Ajax) projects at Informatica and I became that collaborator. During our work on these projects, many members of the community were contacted with the goal of creating a toolkit that could be used freely across companies, without reinventing the wheel for every new effort. It was apparent that toolkits built to support Netscape 4 had too many inherent inefficiencies, so we decided to take the best ideas from a number of early projects (netWindows, BurstLib, f(m), etc.) and create a new toolkit that would make life easier when using JavaScript. While we saw the value in what we were doing, we had no idea of the reach or impact would have on the development community. InfoQ: Could you give us an architectural overview of the toolkit? What do we get by downloading Dojo version 1.1.1? Dojo is structured in 4 main projects: Dojo Core, Dijit, DojoX, and Dojo Utilities. Simply including the standard dojo.js gives you: - A very fast, lean (26KB gzipped) core packed full of APIs for XHR, events, DOM, query, animations, namespacing, and other highly used convenience functions. - Optional modules for dates, colors, back button/history, currency, and more In Dojo 1.2, we’ve actually provided an optional facility to get your base build down to 6KB and build up from there. The Dojo core also includes additional code that may be optionally included such as a behavior system, common regular expressions, date and currency APIs, and more. Dijit is both a widget system and a collection of common widgets, meaning that you get a nice set of widgets to use by default, and a powerful system for creating your own. All widgets in Dijit are fully accessible, internationalizable, and can be instantiated either through markup in an unobtrusive manner, or through a simple JavaScript instantiation. Dijit includes common form element upgrades, a calendar, editor, tree, sliders, and more. Everything in Dojo and Dijit are deemed production-ready and API compatibility will be one of our higher priorities as we work towards Dojo 2.0. DojoX, or Dojo extensions, contain features that are less widely, complex, or not yet production quality. Examples include encryption, additional Dojo data stores, dojo.gfx for native vector graphics support, charting, offline, grids and other widgets, and much more. Features in DojoX are not guaranteed to be backwards compatible across 1.x releases. DojoX contains a significant code base with great new additions arriving on a regular basis, most recently an XMPP client, JSON-Schema, JSON-Referencing, and a secure Ajax module, all of which will ship with Dojo 1.2 and are available in the current nightly builds. Dojo Utilities offers, as its name suggests, a number of useful utilities for JavaScript developers, including - A highly-flexible build system for combining JavaScript files, satisfying dependencies, and merging HTML and CSS files, based on a slightly customized version of Rhino - ShrinkSafe, a compression tool that removes comments, extraneous whitespace, and more, which also makes use of Rhino - DocTool, a highly advanced system for generating API documentation from source code, that also can resolve complex mixin inheritance structures and more - DOH, the Dojo Objective Harness, a unit test tool that works both in the browser and on the command-line Dojo is organized in a very modular manner, making it easy to just get the features you need so you don’t expend system resources for everything else in Dojo. Dojo is also an open-source foundation, and is home to other projects including Cometd, DWR, Open Record, and the Psych Desktop. InfoQ: Dojo seems to have had a lot of momentum this year, especially with the release of three new books by O’Reilly, Pragmatic Programmers and Addison Wesley, this summer. Why do you think that is? First, I think the books were possible because we released a stable version 1.0, and we were able to find some great authors interested in writing about Dojo. Feature-wise, companies such as IBM, Google, Sun, Blue Coat Systems, Nexaweb, and many others, along with our great individual contributor base, made significant and focused efforts towards creating a toolkit that is fast, powerful, and feature-rich. I think the best answer to the question is that we just have a great community that works hard and our hard work is starting to pay off after spending several months in 2007 on completely rewriting Dojo to be a faster leaner toolkit. A lot of this also comes from how we have grown our community. Being very open and transparent, using favorable licensing (BSD or AFL), and also using a CLA process for making sure there are no intellectual property issues with using source code. Dojo scores, by Dion Almaer’s standards, a perfect 100 points on the how open is your project scale. InfoQ: A few days ago SitePen released Dojo Toolbox, an AIR application for Dojo developers. Would you like to talk to us about that? Adobe, in an interesting move, released a platform that is WebKit-based, supports both Open Web technologies (HTML, JavaScript, CSS, Canvas, SVG, etc.) and its proprietary Flash/Flex stack. This gives developers some of the benefits of desktop applications including local file system access, better caching, and a single-deployment environment. They’ve achieved a great way for web developers to create installable web apps. Adobe approached SitePen first about refining Dojo’s support for AIR prior to the release of AIR, and then with the proposal to co-sponsor development of an application, which led to Dojo Toolbox. Dojo has such a large feature-set that creating a printable PDF of the API documentation or an easy-to-view structure is always a challenge, so we decided to bring the 18MB of Dojo documentation offline. We also knew that providing an easy way to create optimized versions of a Dojo build would be handy and AIR was a great solution. All of this was done under the BSD license. In the few short weeks this has been released, we’ve received a number of great feature requests and plan to increase the app’s functionality as a result. We’ve also created something that is modular enough that people can create their own customized toolbox builds or contribute their own modules back to the toolbox for consideration in the official release. InfoQ: Another popular way in the Java world for developing web application besides pure JavaScript libraries like Dojo, is GWT. The way it works is fundamentally different since it acts as a code generator that tries to keep developers away from checking all the different browser quirks. How do you think these two measure up? I think too often there’s a tendency to say that you have to choose X over Y, rather than giving developers the flexibility to choose combinations of what they like or what works best. We like giving people choices, and in fact, people are currently working on a project to bring Dojo to GWT. There’s a talk Alex Russell gave at this year’s Google I/O event titled “Can We Get There From Here”. One of his points was while GWT is open, the more it does, the harder it is to deconstruct. On the complexity scale, with HTML/CSS being the most transparent, Dojo is a little more complex than plain HTML or simple JavaScript with features such as namespaces, while Silverlight, GWT, and Flex are much more difficult to decompile. With Dojo, we’ve made an explicit decision that a compile step is purely optional. GWT does have a reload button, but that requires using an IDE. Their code optimizer gives it an additional performance boost that we hope to replicate with our JS Linker utility, but we decided that source code would remain extremely easy to comprehend for JavaScript developers. I urge people to experiment and determine the most productive choice for them, taking into account factors that matter to their business. InfoQ: There are several other JavaScript frameworks/toolkits out there that have had varying degree of success and adoption in the enterprise. What do you think differentiates Dojo from the rest? Dojo receives wide, practical, “we need this feature now” improvement from the likes of IBM, Sun, AOL, and many other companies including the clients of SitePen. Our open licensing, attention to the details important to enterprise, from IP issues to accessibility and internationalization support, makes us a great open source solution for companies looking to optimize their development power. Financial institutions, militaries, governments, and many other large organizations use Dojo throughout their web development models. Much of this work is Ajax “Dark Matter”, used behind the firewall. InfoQ: This year the organization responsible for the new ECMAScript, version 4 (AKA JavaScript 2) published a revised version of the language overview, that spawned much controversy and debate. How do you feel about the proposed changes to the language and their effects to JavaScript frameworks like Dojo? Kris Zyp of SitePen currently participates in the ECMAScript working group. To date, it has had little impact on the Dojo Toolkit itself because we’re pragmatic and wait until something is ready before we use it. In general, we’ve tried to be a voice of reason that is impartial to politics and focus on what JavaScript developers need most from a language. We’re pushing for features that we believe matter and recommending against changes that we think make development more difficult. InfoQ: When creating web UIs that heavily utilize JavaScript, there are many pitfalls that are not always apparent to the more inexperienced. Usability, search engines, “back button” behavior, browser performance etc. Which are the most common mistakes you see Dojo developers doing? A single browser page, or any web or software application for that matter, has access to a finite amount of system resources. In addition to the issues you’ve mentioned, a common trap is for new developers to not understand the implications of their work, e.g. implementing 100 dynamic charts in a page with a sub-second XHR polling implementation. With Dojo 1.0 and beyond, we’ve tried to be less “magical” so developers can better understand that each and every feature comes at some price, that the fastest toolkit is 0KB, and that most things that are difficult require challenging decisions and trade-offs. Another common mistake developers make is assuming that browsers are consistent and rational. Long-held opinions on the best way to do something are often incorrect and surprising. Simply “looking at the data” with tools like Firebug reveal performance bottlenecks and tell us more about the true performance behavior of browsers.. InfoQ: It has been suggested that the creation of elaborate JavaScript frameworks is a sign that the traditional "Web Platform" has reached its maximum potential and should be replace by something more modern. What do you think about that? I think this is simply a case of the rapid rate of invention over the past four years drastically outpacing the capacity of browser vendors to create better deployment environments. Browser vendors are often slammed for trying a non-standards-based approach, which is unfair because something can’t become a standard if there’s no room for experimentation and innovation. Flex and Silverlight have done a decent job with providing a good development experience, but don’t count out the Open Web yet. We believe that an evolutionary approach to constantly improving what we have today is a viable option. Take WebKit for example, and its success as a great environment for apps in the browser, inside Adobe AIR, on many mobile devices obviously including the iPhone, or Opera on the desktop, mobile devices, and the Nintendo Wii. JavaScript toolkits have done a great job of updating the web faster than browser vendors can, as have things like Google Gears. As browser vendors add new features and new capabilities, toolkits like Dojo defer to the native implementation, and then look for the next thing that needs to be improved across the web. InfoQ: How do you think pure-JavaScript frameworks measure up against plugin-based RIA solutions like Flex, OpenLaszlo or Curl? I think they hold up quite well. OpenLaszlo is in many ways more about being a compiler like GWT that can deploy to Flash or the Open Web. What’s interesting is that we’ve started to take things in another direction. For native vector graphics, dojox.gfx has supported SVG, Canvas, and VML for a while. Recently, we added support for Silverlight as a renderer because VML is terribly broken in the IE alpha builds, and we’ve been experimenting with Flash and Flex for rendering vector graphics and charts as well. We also support Flash’s local storage facility in browsers that don’t have native local storage. Again, I mention that it’s about choice and also pragmatism. InfoQ: It is commonly believed that there are certain things that you cannot do with JavaScript and have to turn to Flex/Flash. Some of those things are very pervasive, like charting. With the latest activity on charting and other areas it seems that Dojo is limiting the reasons to use other technologies. Do you think that as JavaScript libraries become more sophisticated and the support from browsers improves, the need for page components implemented from within plugins will be minimized? With Dojo, we believe that anything that cannot be done natively can still be done using Dojo, if so desired. Our native vector graphics and charting support is competitive with non-native options, but we give users choice rather than trying to lock developers into one solution over another. The future is hard to predict, but the role of the plug-in is generally to accomplish something that cannot be accomplished using native options and JavaScript. With native vector graphics support in all modern browsers, and dojox.gfx to hide the differences in implementations across browser, the need to use a plug-in for this feature is now just an option rather than a necessity. This is all part of the natural evolution of the Open Web. InfoQ: It has been said that IE 7 was a gift to designers since it had a better support for CSS, while IE 8 will be a gift to JavaScript developers. With all the publicity and the details that have been made available how do you feel about the upcoming version of IE? Is it a significant step forwards? How do you think it will affect JavaScript frameworks like Dojo? I think it is too soon to tell. The first release felt like two steps forward (6 connections instead of 2, secure cross-domain requests), one step back (severe bugs with VML), so we’re cautiously optimistic for the next release. InfoQ: After 2005 when AJAX became widely known, the latest buzzword is Comet. There are still people debating on terminology so I would like to ask you to give us your own definition. Comet is a collection of techniques, transports, protocols, servers, and clients to deliver low-latency data transit between the server and the client. The XHR is the least common denominator of Comet, and everything else is an attempt to improve upon the XHR to deliver faster, real-time applications. My definition intentionally avoids some points of the debate, as I prefer to be inclusive and broad, much as Ajax has come to represent everything dynamic in a browser to most people. InfoQ: An important components for enabling Comet applications seems to be the Bayeux protocol which facilitates routing JSON encoded events between clients and servers in a publish subscribe model. Would you like to elaborate on that? It seems that Bayeux is gaining de facto industry acceptance since it is unique, but do you feel it will be heading for a more formal standardization, e.g. through W3C? To date, I think the informal nature has been highly useful, though if there’s interest, I’m sure a standards-body will eventually pick it up. Bayeux is the standard protocol for servers and clients that are part of the Cometd project. XMPP is of course another popular protocol. I’m also quite interested in the recent draft WebSocket addition to the HTML5 efforts, and the API abstraction of this already implemented within the Orbited project. InfoQ: In the Java realm there are several ways to develop Comet applications at this moment. With the emergence of the Servlets version 3 spec (JSR 315) which defines a standard way of doing Comet, how do you think this genre of application will grow? In the Java space, a variety of open-source Comet server options such as Jetty, DWR, and GlassFish, as well as free versions of Lightstreamer and Caplin Liberator are available. The new servlets specification has already experimental support in Jetty and GlassFish, and I’m sure when the final specification is ready, everyone will make use of this. One interesting thing to emerge is the distinction between on-board and off-board Comet by Joe Walker at JavaOne. The language that your Comet server of choice is written in is less important than making sure you have client access (client being a web-based client, or a web server based client communicating with your Comet server) in your language of choice InfoQ: It has been suggested that since web applications target clients that understand JavaScript (browsers) it would make sense to have end-to-end JavaScript solution. What do you think about that? Do you see server-side JavaScript becoming mainstream? The emergence of Jaxer (by Aptana), Persevere (SitePen), AxiomStack (Axiom), Phobos (Sun), and others have shown that is becoming common. JavaScript is now the world’s most ubiquitous programming language, available just about everywhere. I think that for anyone that started out on the client-side, it’s a great way to get into the server-side without learning the syntax of PHP, Python, Java, or other languages (though most users of Dojo currently come to Dojo in the more traditional direction). I don’t know what the future holds, but I think it’s a great opportunity to use the same JavaScript code base everywhere. InfoQ: Although you can often find developers handling large Java code bases, it is not the same with JavaScript. Its dynamic nature and the fact that frameworks like Dojo target a varying set of clients (browsers) must impose unique restrictions and difficulties in the development process. Besides using Trac for issue tracking what are the tools and procedures that you have found particularly effective for this specific genre of software? I think you’d be surprised at the size of some JavaScript code bases! At SitePen, we recently switched from Trac to Redmine as it has kept the simplicity of Trac while adding the features we’ve missed for a long time (dependencies, projections, multiple projects). We still use Subversion as it has great support across a variety of tools. At SitePen, we use pretty much every text editor or IDE there is depending on which developer you ask. We use the Dojo DocTool and the utilities found in Dojo. Some of the less common development tools we use include: Windmill, Tito Web Studio, Charles, and Versions. I can’t say we have a standard across the board, here’s the best way to maintain and refactor a large codebase tool like you would have for Java, but I’m not sure the need is as great either. InfoQ: People have speculated that when Steve Yegge talks about what will be the next big language (if any) he refers to JavaScript. The fact that he has ported a significant part of the Rails framework from Ruby to JavaScript makes this speculation more solid. Having worked with this language do you see this kind of potential? Absolutely and I think this ties back to the question about JavaScript on the server. Persevere is another example of this type of approach. In short, Persevere is an open source set of tools for persistence and distributed computing using intuitive standards-based JSON interfaces of HTTP REST, JSON-RPC, JSONQuery, and HTTP Channels. InfoQ: How do you see Dojo evolving? What are your next steps and what can we expect in the following months? In the short term, we’ll continue to improve performance, widgets such as the grid, charting, tree and editor, the overall look and feel of Dijit, form and data validation, the stability of our Comet client, our validation system, and much more. We’re also starting to look towards Dojo 2.0, probably in 2010. It’s really about keeping Dojo useful, promising and efficient for developers who are interested in coding impressive web apps and providing excellent experiences for their users. InfoQ.com features more interesting articles on RIAs, JavaScript and Web 2
http://www.infoq.com/news/2008/07/dylan_schiemann_qna
CC-MAIN-2013-48
en
refinedweb
BakeBit - Servo From FriendlyARM WiKi Contents 1 Introduction - The BakeBit - Servo is a servo module which contains a DC motor and a transmission system. - Its input signal is PWM. The motor's steering angle changes according to PWM signals' changes. The input PWM's frequency is 50Hz and its width is 0.5ms—2.5ms. The motor's steering angle is 0 - 180°. - A PWM input steers the motor to an angle. When no input signals are applied the motor will stop. 2 Hardware Spec - Standard 2.0mm pitch 4-Pin BakeBit Interface Servo's dimension - Spec: - Pin Description: 3 Code Sample: Servo and Rotary Angle Sensor By running this code sample users can control a servo with the BakeBit - Rotary Angle Sensor module. The servo's streering angle is between 0~180 degrees. 3.1 Hardware Setup Connect the servo module to the NanoHat Hub's D5 and the rotary angle sensor module to the NanoHat Hub's A0: 3.2 Source Code import time import bakebit import random # Connect the servo to digital port D5 # SIG,NC,VCC,GND servo = 5 # Connect the BakeBit Rotary Angle Sensor to analog port A0 # SIG,NC,VCC,GND potentiometer = 0 # Reference voltage of ADC is 5v adc_ref = 5 # Vcc of the bakebit interface is normally 5v bakebit_vcc = 5 # Full value of the rotary angle is 180 degrees, as per it's specs (0 to 180) full_angle = 180 old_degrees = -1 bakebit.pinMode(potentiometer,"INPUT") bakebit.bakeBitServo_Attach(servo) while True: try: # Read sensor value from potentiometer sensor_value = bakebit.analogRead(potentiometer) # Calculate voltage voltage = round((float)(sensor_value) * adc_ref / 1023, 2) # Calculate rotation in degrees (0 to 180) degrees = int((voltage * full_angle) / bakebit_vcc) if degrees != old_degrees: print("sensor_value = %d voltage = %.2f degrees = %d" % (sensor_value, voltage, degrees)) bakebit.bakeBitServo_Write(servo, degrees) old_degrees = degrees except KeyboardInterrupt: bakebit.bakeBitServo_Detach(servo) break except IOError: print ("Error") 3.3 Run Code Sample Before you run the code sample you need to follow the steps in bakebit tutorial to install the BakeBit package. Enter the "BakeBit/Software/Python" directory and run the "bakebit_prj_Servo_And_RotaryAngleSensor.py" program: cd ~/BakeBit/Software/Python sudo python bakebit_prj_Servo_And_RotaryAngleSensor.py 3.4 Observation When you rotate the rotary angle module the servo will be steered between 0 to 180 degrees. 4 Resources - [Specification](BakeBit - Servo Specification.pdf) - [BakeBit Github Project Page]() - [BakeBit Starter Kit User's Manual]() 5 Update Log 5.1 December-14-2016 - Released English Version 5.2 Jan-19-2017 - Renamed "NEO-Hub" to "NanoHat-Hub" 5.3 Jan-20-2017 - Renamed "NanoHat-Hub" to "NanoHat Hub"
http://wiki.friendlyarm.com/wiki/index.php/BakeBit_-_Servo
CC-MAIN-2019-09
en
refinedweb
The built-in async pipe in Angular 2+ gives us a great tool to easily manage observable subscriptions. With it, we can learn to avoid having to manually subscribe to observables in component classes for most cases. Let’s say we want to have an observable that gives us the current time every second. Without using the async pipe, we might do something like this: import { Component, OnInit, OnDestroy } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { Subscription } from 'rxjs/Subscription'; import 'rxjs/add/observable/interval'; import 'rxjs/add/operator/map'; @Component({ selector: 'app-root', template: `Time: {{ time | date:'mediumTime' }}` }) export class AppComponent implements OnInit, OnDestroy { time: Date; timeSub: Subscription; ngOnInit() { this.timeSub = Observable .interval(1000) .map(val => new Date()) .subscribe(val => this.time = val); } ngOnDestroy() { this.timeSub.unsubscribe(); } } In our OnInit hook we created an observable that emits a value every second and maps that value to a new date. We then subscribed to that observable and set our time class variable to the emitted value. We also made sure to unsubscribe from the observable when the component is destroyed to clean up after ourselves. In the template, we used the built-in date pipe to transform the date into our desired format of minutes and seconds. 🐊 Alligator.io recommends ⤵ It’s quite a bit of boilerplate code however, and if we forget to unsubscribe we run the risk of creating memory leaks. We can greatly simplify, and here’s the same functionality implemented using the async pipe instead: import { Component } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/observable/interval'; import 'rxjs/add/operator/map'; @Component({ selector: 'app-root', template: `Time: {{ time$ | async | date:'mediumTime' }}` }) export class AppComponent { time$ = Observable .interval(1000) .map(val => new Date()); } The async pipe takes care of subscribing and unwrapping the data as well as unsubscribing when the component is destroyed. We can also use the async pipe to unwrap and pass data to an input for a child component: app.component.html <app-child [time]="time$ | async"></app-child> And the child now has noting to do really but to display the data. Async Pipe with ngFor Let’s say we have a slightly more complex data structure available as an observable and we set an artificial delay of 1 second before getting its value (mimicking a network request): import { Component } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/observable/of'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/delay'; @Component({ ... }) export class AppComponent { cities$ = Observable .of([ {name: 'Los Angeles', population: '3.9 million', elevation: '233′'}, {name: 'New York', population: '8,4 million', elevation: '33′'}, {name: 'Chicago', population: '2.7 million', elevation: '594′'}, ]) .delay(1000); } In the template we can unwrap and subscribe to the data when it arrives with an ngFor directive like this: <ul> <li * Name: {{ city.name }}, Population: {{ city.population }}, Elevation: {{ city.elevation }}</li> </ul> Async Pipe with ngIf Here’s an example making use of the ngIf structural directive. Our observable looks like this: word$ = Observable.of('Abibliophobia'); And our template looks like this: <span * Long word: {{ word$.value }} </span> <ng-template #shortWord> Short word: {{ word$.value }} </ng-template> And we’ll get: Long word: Abibliophobia Notice how we pipe the word$ observable through async, but wrap it in parentheses to then be able to check the length on the unwrapped value. We also make use of the Elvis operator (?) to avoid an error when the value of word$ is not yet available.
https://alligator.io/angular/async-pipe/
CC-MAIN-2019-09
en
refinedweb
>This and Bind in React</h1> <br> <div id="container"> <p> To install React, follow the instructions on <a href="">GitHub</a>. </p> <p> If you can see this, React is <strong>not</strong> working right. </p> </div> <br> <h4>Example Details</h4> <p>Write in both inputs and see the state update and console record. As you can see, we don't need to bind 'this' to the eventListener since react.createClass binds it automatically. </p> <p> var Counter = React.createClass({ getInitialState: function () { return { count: 0 }; }, updateInput: function (event) { console.log(event.target.value); this.setState({ count: this.state.count + 1, }); }, render: function () { return ( <div> <input type="text" onChange={this.updateInput.bind(this)} /> <input type="text" onChange={this.updateInput} /> <br/> <span>State altered: {this.state.count}</span> </div> ); } }); ReactDOM.render( <Counter />, document.getElementById('container') ); Also see: Tab Triggers
https://codepen.io/benchung/pen/GjRaZd/
CC-MAIN-2019-09
en
refinedweb
I am downloading data from quandl.com with python and I have reached my limit with 50 downloads for today. Users with an account can exceed this limit which I already have an account set up. The error message say I need to put my api key with the request, but to my knowledge it does not say how?? This is the error message quandl.errors.quandl_error.LimitExceededError: (Status 429) (Quandl Error QELx01) You have exceeded the anonymous user limit of 50 calls per day. To make more calls today, please register for a free Quandl account and then include your API key with your requests. import quandl import pandas as pd from datetime import datetime import pandas.io.data as web symbols = ['BOE/XUDLTWD','BOE/XUDLCDS','tvix'] pnls = {} for i in symbols: a = '/' in i if a == True: data = quandl.get(i ) t = i.split('/') df1= pnls df1[str(t)] = data print(a) That's how to use your api key properly. data = Quandl.get('what', authtoken='your_api_key')
https://codedump.io/share/lJFhwNGO2pq5/1/dowloading-data-from-quandlcom-and-want-to-know-how-i-include-my-api-key-with-my-request
CC-MAIN-2017-17
en
refinedweb
Summary This article describes the Distributed File System (DFS) Management snap-in in Microsoft Windows Server 2003 R2.. More Information To make namespace concepts easier to understand, namespace terminology has been simplified in DFS Management. The following table describes the previous and updated terms. For more information about new DFS Namespaces terminology and features in Windows Server 2003 R2,: DFS replication does not interoperate with the File Replication service (FRS). For more information about DFS replication requirements, visit the following Microsoft Web site: New DFS Namespaces featuresDistributed File System is now known as DFS Namespaces. Although the underlying service and basic functionality are unchanged, some new namespace settings are exposed in Windows Server 2003 R2. These settings are as follows. Target priorityWhen a client accesses a namespace, the client receives a referral that contains a list of targets that are associated with the namespace root or folder. These targets are listed according to the current ordering method for the namespace or the folder. To fine tune how particular targets are ordered, you can specify whether a server appears first or last in a referral. It is useful to assign target priority in many scenarios, such as in "hot-standby" scenarios. A "hot-standby" scenario occurs when one server is considered the server of last resort. In this scenario, you specify that the standby server always appears last in referrals. Clients fail over to this server only if all the other servers fail or become unavailable because of network outages. Client failbackClient failover in DFS Namespaces is the process by which clients try to access another server in a referral after one of the servers fails or is removed from the namespace. Unless client failback is configured, clients continue to use the server to which they failed over unless the client is restarted or the client's referral cache is cleared. When client failback is configured and when clients have the appropriate client failback hotfix installed, clients fail back to a preferred, local server when it is restored. Better delegationYou can easily delegate the ability to create domain-based namespaces and manage individual stand-alone and domain-based namespaces. The DFS Management snap-in sets the appropriate permissions on either the DFS Namespace configuration objects in the Active Directory directory service or in the namespace server's registry. Permissions depend on the namespace type. Ability to restructure the namespaceYou can easily rename or move folders in the namespace when you use the DFS Management snap-in. You can restructure the namespace to correct mistakes or to adjust the hierarchy as business needs change or as new folders are added to the namespace. You can also move namespace folders by using the updated version of the Dfscmd.exe command-line tool. DFS Management Console features and usage New DFS Namespaces terminology and features in Windows Server 2003 R2 - Updated namespace terminology - New namespace features Getting started with namespaces - Deploy a namespace for publishing content - Increase the availability of a namespaces Namespace properties - Referral properties - Polling properties - Target properties DFS replication overview - Introduction to DFS replication - Replication groups and replicated folders - Security requirements for setting up and managing DFS replication - DFS replication requirements - DFS replication limits - What to expect during initial replication Getting started with DFS replication - Publish data using DFS replication - Collect data for backup purposes using DFS replication (RDC) for a specific connection - Enable or disable topology verification - Repair a disconnected topology - Edit the replication filters for a replicated folder - Edit the quota size of the staging folder and Conflict and Deleted folder - Share a replicated folder - Publish a replicated folder in an existing namespace - Create a diagnostic report for DFS Replication DFS replication properties - Replication schedules and bandwidth - Replication topologies - Staging folders and Conflict and Deleted folders - File and subfolder filters Interoperability of DFS management tools with Windows Server 2003 R2Windows Server 2003 R2 includes a new DFS Management MMC snap-in (Dfsmgmt.msc) that provides a richer set of features than the older Distributed File System (Dfsgui.msc) snap-in. However, DFS Management requires at least one Windows Server 2003 R2-based server for management. Additionally, DFS Management does not support some namespace features until all domain controllers and namespace servers are running Windows Server 2003 Service Pack 1 (SP1) or a newer version. Therefore, we recommend that you use the DFS Namespaces snap-in to manage only namespaces that you upgrade to Windows Server 2003 SP1. To manage older “DFS Roots," use the Distributed File System snap-in that is installed on a Windows Server 2003 R2-based server. To install the DFS Management snap-in in Windows Server 2003 R2, install or upgrade the File Server role by using the Manage Your Server window. Windows Server 2003 R2 includes DFS Management snap-ins for managing both implementations of DFS. DFS replication does not interoperate with the File Replication service (FRS). For more information about DFS replication requirements, visit the following Microsoft Web site: Properties Article ID: 915146 - Last Review: Mar 29, 2017 - Revision: 3
https://support.microsoft.com/en-us/help/915146/description-of-the-distributed-file-system-dfs-management-snap-in-in-windows-server-2003-r2
CC-MAIN-2017-17
en
refinedweb
POSIX_SPAWN_FILE_ACTIONS_ADDOPEN(3P)rammer'sXManual_FILE_ACTIONS_ADDOPEN(3P) This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. posix_spawn_file_actions_addopen — add open action to spawn file actions object (ADVANCED REALTIME) #include <spawn.h> int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *restrict file_actions, int fildes, const char *restrict path, int oflag, mode_t mode); Refer to posix_spawn_file_actions_addclose_ADDOPEN(3P)
http://man7.org/linux/man-pages/man3/posix_spawn_file_actions_addopen.3p.html
CC-MAIN-2017-17
en
refinedweb
Erik Andersen wrote: > I just asked my boss, and adding nfs support to busybox' > mount isn't a high priority here at Lineo (they are paying > me to work on it so I do what they pay me to do). Adding insmod > and rmmod is more important, so I guess I'll be working on > that today. I may look into adding it in my spare time at > home, but I rarely use nfs... > > If you have a few hours and want to hack the nfs support from > util-linux's mount into a new file like nfs_mount.c, then > you add #define BB_NFS_MOUNT to busybox.defs.h (so it gets > compiled in when BB_NFS_MOUNT is defined via some sed magic) > and then stick in > > #if defined BB_NFS_MOUNT > stuff > #endif > > stuff into busybox' mount.c. Ok, I will do it asap (tonight or tomorrow). Regards. -- Eric Delaunay | "La guerre justifie l'existence des militaires. delaunay@lix.polytechnique.fr | En les supprimant." Henri Jeanson (1900-1970)
https://lists.debian.org/debian-boot/1999/11/msg00378.html
CC-MAIN-2017-17
en
refinedweb
OpenSessionInView-LoadableDetachableModel-Pattern and its Pitfalls Environment: Wicket, Spring, Hibernate, OpenSessionInView This article targets some pitfalls when using the OpenSessionInView (OSIV) pattern in combination with LoadableDetachableModels (LDM) and Hibernate. This combination is a very commonly used pattern, because it greatly simplifies handling of Hibernate entities (no more detached entities), and it relieves us from the pain of dealing with LazyInitializationExceptions (how many hours did we spend fixing these?). But although this pattern is very useful and it's highly recommended, there might be some tricky side effects, which have to be considered. These are described in this article. The OSIV-LDM-Pattern In order to explain the benefits of the OSIV-LDM-Pattern, let's take a look at a simple example. Assume we have a Hibernate entity Personwith three properties lastNameand username: @Entity public class Person { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String lastName; private String firstName; private String username; ... } A simple page to edit a person could be implemented like this: public PersonEditPage(final Long personId) { super(new PersonModel(personId)); Form form = new Form("form", new CompoundPropertyModel(getModel())); add(form); form.add(new TextField("firstName")); form.add(new TextField("lastName")); form.add(new TextField("username")); form.add(new Button("saveButton", new Model("Save")) { public void onSubmit() { Person person = (Person) PersonEditPage .this.getModelObject(); // save person } }); } The page simply consists of three text fields for the person's properties and a button to submit the changes. In this example, PersonModelis a LoadableDetachableModelfor Personentities. This can be implemented easily, for example by inheriting from GenericLoadableDetachableModelintroduced in the previous article: public class PersonModel extends GenericLoadableDetachableModel { public PersonModel(Long id) { super(Person.class, id); } } Now, in this situation, the combination of the LDM with an OSIV-Filter (i.e. the OSIV-LDM-Pattern) is very elegant for serveral reasons. - The LDM keeps session size small, as the entities are not put into the HTTP session but are always fetched from the database on demand instead (if the haven't been fetched already). - As a result, entities are not detached (Hibernate detached) between requests. - The OSIV pattern opens a Hibernate session at the beginning of a request and keeps it open until all components have been rendered. So within a request, entities are not detached, as well. - Consequently, when OSIV is used with LDMs, entities will never be in detached state (neither within a request, nor between request). In the example above, the PersonModelis attached to the page at page construction. During the render phase, the first time the model object is accessed it is fetched from the database. Until the end of the render phase, the OSIV keeps the Hibernate session open, so the entity is not detached. During event processing, as in Button.onSubmit(), Wicket first loads the model object, so it is fetched from the database (it is in persistent state), and then applies any changes to it. So, in Button.onSubmit()above, the person object is still attached to the Hibernate session and changes have been applied. Consequently, we never have to deal with detached entities or LazyInitializationExceptions at any point in a request cycle. OSIV-LDM-Pitfall 1 But there are some things to be aware of. In the example above, when Button.onSubmit()is called, Wicket has pulled the entity from the model (from the database) before and has applied the converted and possibly validated input to it, for example the user could have changed the username of the person. At this moment, the entity is still attached to the Hibernate session. So, there is nothing more to do to save the changes to the database, because at the end of the request, the session will be closed by the OSIV-Filter and the changes will be flushed to the database ... But if we run the example above, we'll eventually recognize that the changes are not persisted to the database. So, let's try a bit harder and call session.saveOrUpdate(person): public void onSubmit() { Person person = (Person) PersonEditPage .this.getModelObject(); sessionFactory.getCurrentSession() .saveOrUpdate(person); } Nothing. The changes are still not persisted to the database. The reason is, that the OSIV-Filter will by default set the flush mode of the session to FlushMode.MANUAL, which means that the session will not get flushed (synchronized to the db) on close or in between. To solve the problem we have to flush the session manually by calling session.flush(): public void onSubmit() { Person person = (Person) PersonEditPage .this.getModelObject(); sessionFactory.getCurrentSession() .saveOrUpdate(person); sessionFactory.getCurrentSession().flush(); } Okay, this was an easy one. Let's tackle the next pitfall. OSIV-LDM-Pitfall 2 The example above uses kind of a bad practice. Instead of handling persistent state in a Wicket component, it's recommended to move this code into the service layer, which takes care of transaction handling. [The OSIV-Filter does not do any transaction handling, everything you do in Wicket components is out of any transactional scope.] Let's improve our code by checking if the user changed the username of the person to a username that already exists in the database. If so, the application should reject the change. For this purpose the submit method calls a transactional person service: public void onSubmit() { Person person = (Person) PersonEditPage .this.getModelObject(); try { personService.updatePersonDetails(person); // show success message } catch (DuplicateUsernameException e) { error("Username " + e.getUsername() + " already exists"); // show error message } } The service method PersonService.updatePersonDetails(person)is called to update the person details. This method first queries all persons with the same username as the person provided as the argument from the databse. If there is no other person with this username, the person is updated with the new username by calling session.saveOrUpdate(). Otherwise, if there is a person with the same username, a DuplicateUsernameExceptionis thrown: @Service @Transactional public class PersonService implements IPersonService { @Autowired private IPersonDao personDao; public void updatePersonDetails(Person person) throws DuplicateUsernameException { // Check for duplicate username Person checkPerson = personDao .getPersonByUsername(person.getUsername()); if (checkPerson == null || checkPerson == person) { personDao.saveOrUpdate(person); } else { throw new DuplicateUsernameException( person.getUsername()); } } } If we give it a try, and change the username of one person to the username of another person, a DuplicateUsernameExceptionis thrown and it looks like everything works fine. But somehow the person's new username is persisted to the database, although this username already exists! (Assume for this example that there is no database unique constraint on username). The DuplicateUsernameExceptionwas thrown, so obviously personDao.saveOrUpdate(person)has never been called, so how did the changes get persisted? The key is, that the Spring transaction manager has changed the session's flush mode from FlushMode.MANUAL (set by the OSIV-Filter) to FlushMode.AUTOat the beginning of the transaction. In this mode, Hibernate sometimes flushes the session before queries to ensure that the query does not return stale data. In the example, Hibernate flushes the session before the query executed by personDao.getPersonByUsername(person.getUsername()). The result of this flushing is, that person, which includes the new username, is also flushed to the database, unexpectedly. This is, because of the OSIV-LDM-Pattern the person has been attached to the Hibernate session from the beginning of the request. If it had been detached, it would not have been flushed. Note: The same would also happen, if a query is called from onSubmit()and then a service is called. The best advice, I can give, is to always be aware of this side effect of the OSIV-LDM-Pattern. When you have identified a problematic case, there are some ways to get around these problems. One is to validate the input before it gets applied to the model object. In the case above, we could implement a Wicket validator, that checks for duplicate usernames. Wicket validators are executed before the changes are applied to the model object, so if the username already exists, the username of the person would not be changed. Another, but not quite elegant way, is to use some kind of DTO like helper objects, which are used as model objects instead of the entities themselves. The changes have to be transferred from the DTO to the entity manually then. Conclusion The OSIV-LDM-Pattern is a very elegant way to handle Hibernate entities. Sometimes the problems above are quite hard to identify, but in real world situations they are quite rare and in most cases they can be tackled easily. Finally, I'd like to mention, that the OSIV pattern has some further consequences, e.g. related to session handling after exceptions/transaction rollbacks, and because only one session is used for each request. But these topics are out of the scope of this article.
http://stronglytypedblog.blogspot.com/2009_03_01_archive.html
CC-MAIN-2017-17
en
refinedweb
CSC/ECE 517 Fall 2012/ch1b 1w46 sm Subclassing Subclassing Subclassing is a principle of creating a specialization(subclass/ [1]) of a base class(superclass/ parent class) by inheriting the methods and instance data from the base class. Subclassing is one of the significant features of OO programming, which greatly increases the reusability of classes and also minimizes duplication of code. A subclass usually inherits some properties from a super class. Inheritance is a design principle in object oriented languages like Java. The reason behind inheritance is to reuse the code of existing objects or establish a subtype from an object. This greatly improves the efficiency and makes the code more readable as methods which are written only once can be used by a lot of subclasses. A superclass consists of common features that can be extended over subclasses. Superclass and subclass are commonly called base and derived class. The relationship between a subclass and superclass can be represented by a simple UML diagram as shown below. Examples of Subclassing The following example illustrates method overriding in Java. public class Base{ public String printName(){ System.out.println("Base Class"); } } public class Child extends Base{ public String printName(){ System.out.println("Child Class"); } } public class Test{ public static void main(String args[]){ Base b = new Base(); b.printName(); //prints "Base class" Child c = new Child(); c. printName(); //prints "Child class" b = c; b.printName(); //prints "Child class" } } The following example illustrates subclassing in C++ #include <iostream.h> class Base { public : virtual void printName() { cout << "Base Class"; } }; class Child:public Base { public : void printName() { cout << "Child Class"; } }; void main() { Base b; Child c; Base *b2 = new Child(); b.printName(); c.printName(); b2->printName(); } Advantages of Subclassing Reusability By creating subclass, the code of the base class can be reused in many situations. This gives subclass the freedom to create more specialized functions. It can use the base class methods to create these special functions. Apart from avoiding code duplication, this helps in decreasing the file size thereby saving some memory space. For instance, we maybe programming animal characteristics but there is a special class of animals called mammals. Mammals display some specialized functions which can be defined in the subclass. As per Liskov Substitution principle which is discussed later, mammals obey the constraints enforced by the animal class and hence this kind of implementation avoids code duplication. Polymorphism This allows multiple definitions for the same method depending on the object it is invoked on. Subclasses of a class can define their own unique behaviors and yet share some of the same functionality of the parent class. For example, public class Car{ public String getEngineType(){ return "Basic" } } public class Mercedes extends Car{ public String getEngineType(){ return "Advanced" } } public class BMW extends Car{ public String getEngineType(){ return "Moderate" } } public class Tester{ public static void main(String[] args){ Car c = new Car(); c.getEngineType();// returns "Basic" c = new Mercedes(); c.getEngineType();// returns "Advanced" c = new BMW(); c.getEngineType();// returns "Moderate" } } In the above example, even though we have used the same variable type, the actual method invocation at runtime invokes the appropriate object's method and not the method defined by the variables's type. Disadvantages of Subclassing Tight Coupling Inheritance causes tight coupling between base class and subclasses. We cannot freely modify one without modifying (or at least performing substantial testing to make sure it doesn't break existing functionality in the other) the other. The fragile base class problem: Base classes are considered to be fragile because we cannot make changes to it and be sure that it doesn't impact any of the sub-classes without testing all of them. Moreover, we also need to test the client code which makes use of the base class and sub-class objects to make sure there are no regression bugs. A simple change to a base class can leave the system inoperable. Security problems: If a new feature is added to the base class which is required by a subset of sub-classes, then by adding it, we might accidentally provide access to the other sub-classes which shouldn't have access to it. This problem might not be realized until a security breach has occurred and it can have disastrous consequences. Also, there is no easy way to fix this with sub-classing and an alternate method needs to be looked for providing this feature to the sub-classes, possibly, by implementing a particular interface. Using subclassing solely for code reuse If a class inherits another class solely for code reuse and it doesn't have a IS-A relationship with this parent, this can lead to bloated and quite possibly buggy code. It can lead to bloated code if the subclass only makes use of one method in the parent(a large class with numerous methods). It can lead to buggy code if the base class decides to change the signature or possibly delete the methods which it knows for sure that the subclasses won't need. This will cause problems for those subclasses which do not exhibit the IS-A relationship and are improperly added to the class hierarchy. This defeats the whole purpose of inheritance and thinking in terms of objects and hierarchies. Multiple Inheritance Problem When a subclass inherits from more than one parent and both parents have the same method signature, then a conflict arises when we invoke the method on the subclass object. #include <iostream.h> class Base1 { public : void printName() { cout << "Base1 Class"; } }; class Base2 { public : void printName() { cout << "Base2 Class"; } }; class Child:public Base1, Base2 { }; void main() { Child *c = new Child(); c->printName(); } In the above example, the method PrintName is invoked on a child object. But, a conflict arises as to which method of the two parents needs to be invoked Conclusion Subclassing provides an elegant way to capture the hierarchical relationship among classes and promotes code reuse by defining common behavior in the base class and only providing the variations in the subclasses. Code reuse should not be the only reason for subclassing and the subclass should satisfy IS-A relationship. References
http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm
CC-MAIN-2017-17
en
refinedweb
On Mon, Mar 22, 2010 at 1:48 PM, Ingo Molnar <mingo@elte.hu> wrote:>> What about line number information? And the source? Into the kernel with>> them as well?>> Sigh. Please read the _very first_ suggestion i made, which solves all that. I> rarely go into discussions without suggesting technical solutions - i'm not> interested in flaming, i'm interested in real solutions.>> Here it is, repeated for the Nth time:>> Allow a guest to (optionally) integrate its VFS namespace with the host side> as well. An example scheme would be:>> /guests/Fedora-G1/> /guests/Fedora-G1/proc/> /guests/Fedora-G1/usr/> /guests/Fedora-G1/.../> /guests/OpenSuse-G2/> /guests/OpenSuse-G2/proc/> /guests/OpenSuse-G2/usr/> /guests/OpenSuse-G2/.../>> ( This feature would be configurable and would be default-off, to maintain> the current status quo. )Heh, funny. That would also solve my number one gripe withvirtualization these days: how to get files in and out of guestswithout having to install extra packages on the guest side andfiddling with mount points on every single guest image I want to playwith. Pekka--To unsubscribe from this list: send the line "unsubscribe linux-kernel" inthe body of a message to majordomo@vger.kernel.orgMore majordomo info at read the FAQ at
https://lkml.org/lkml/2010/3/22/147
CC-MAIN-2017-17
en
refinedweb
I'm a beginner in Java. I want to use StringUtils.replace "StringUtils cannot be resolved" import java.lang.*; java.lang does not contain a class called StringUtils. Several third-party libs do, such as Apache Commons Lang or the Spring framework. Make sure you have the relevant jar in your project classpath and import the correct class.
https://codedump.io/share/o4qXGHSRWql3/1/how-do-i-use-stringutils-in-java
CC-MAIN-2017-17
en
refinedweb
Hi there! This patch should improve i18n-to-gettext.pl to work with all plugins 1.It also lists i18n.h as there seem to be some plugin-writer putting translations there. 2. It also strips // comments being in lines without "," at the end. 3. it strips /* ... */ comments being in just one line 4. it strips /* ... */ comments spreading over multiple line 5. it just ignores #if and #endif lines (like used to make plugins compile with older vdr-versions which had less languages supported). General question: Why is the locale dir called de_DE and not just de - as that seems what most other programs on my system do? Matthias -- Matthias Schwarzott (zzam) -------------- next part -------------- A non-text attachment was scrubbed... Name: vdr-1.5.7-improve-i18n-to-gettext.diff Type: text/x-diff Size: 1482 bytes Desc: not available Url :
https://www.linuxtv.org/pipermail/vdr/2007-August/013738.html
CC-MAIN-2017-17
en
refinedweb
Consider. C++ implementation of above idea. // Program to find the length of the largest // region in boolean 2D-matrix #include<bits/stdc++.h> using namespace std; #define ROW 4 #define COL 5 // A function to check if a given cell (row, col) // can be included in DFS int isSafe(int M[][COL], int row, int col, bool visited[][COL]) { // row number is in range, column number is in // range and value is 1 and not yet visited return (row >= 0) && (row < ROW) && (col >= 0) && (col < COL) && (M[row][col] && !visited[row][col]); } // A utility function to do DFS for a 2D boolean // matrix. It only considers the 8 neighbours as // adjacent vertices void DFS(int M[][COL], int row, int col, bool visited[][COL], int &count) { // These arrays are used to get row and column // numbers of 8 neighbours of a given cell static int rowNbr[] = {-1, -1, -1, 0, 0, 1, 1, 1}; static int colNbr[] = {-1, 0, 1, -1, 1, -1, 0, 1}; // Mark this cell as visited visited[row][col] = true; // Recur for all connected neighbours for (int k = 0; k < 8; ++k) { if (isSafe(M, row + rowNbr[k], col + colNbr[k], visited)) { // increment region length by one count++; DFS(M, row + rowNbr[k], col + colNbr[k], visited, count); } } } // The main function that returns largest length region // of a given boolean 2D matrix int largest(int M[][COL]) { // Make a bool array to mark visited cells. // Initially all cells are unvisited bool visited[ROW][COL]; memset(visited, 0, sizeof(visited)); // Initialize result as 0 and travesle through the // all cells of given matrix int result = INT_MIN; for (int i = 0; i < ROW; ++i) { for (int j = 0; j < COL; ++j) { // If a cell with value 1 is not if (M[i][j] && !visited[i][j]) { // visited yet, then new region found int count = 1 ; DFS(M, i, j, visited , count); // maximum region result = max(result , count); } } } return result ; } // Driver program to test above function int main() { int M[][COL] = { {0, 0, 1, 1, 0}, {1, 0, 1, 1, 0}, {0, 1, 0, 0, 0}, {0, 0, 0, 0, 1}}; cout << largestRegion(M); return 0; } Output: 6 Time complexity: O(ROW x COL).
http://www.geeksforgeeks.org/find-length-largest-region-boolean-matrix/
CC-MAIN-2017-17
en
refinedweb
I am running into a baffling problem with my code. I am supposed to write a program to average the test scores for an entire class of students. In each case, the student should have taken 5 tests. You are to average the 5 tests. The program run should look like this. How many students are in the class ? 3 Enter five test scores for student number 1 90 90 70 90 80 The average for student number 1 is 84 Enter five test scores for student number 2 100 60 60 90 80 The average for student number 2 is 78 Enter five test scores for student number 3 90 70 50 70 90 The average for student number 3 is 74 Here is what I have: #include <iostream> #include <iomanip> using namespace std; void handleOneStudent(int N); int main() { int NumberOfStudents; cout << "How many students are in the class ?" << endl; cin >> NumberOfStudents; cout << endl; for (int i=1; i <= NumberOfStudents; i++) handleOneStudent(i); return 0; } void handleOneStudent(int N) { const int num_quizzes = 5; int score[num_quizzes]; double average; cout << setprecision(2) << setiosflags(ios::fixed) << setiosflags(ios::showpoint); cout << "Enter five test scores for student number " << N << endl; cin >> score[num_quizzes]; average = (score[1] + score[2] + score[3] + score[4] + score[5])/5; cout << endl << endl; cout << "The average for student number " << N << " is " << average << endl; } When I run the code I get the following error: Error message: Debug error! Run-Time Check Failure #2 - Stack around the variable 'score' was corrupted.
https://www.daniweb.com/programming/software-development/threads/198564/debug-error-run-time-check-failure-2
CC-MAIN-2017-17
en
refinedweb
Hi, I tried doing Project Euler #27 today, which asks the following: Euler published the remarkable quadratic formula: n² + n + 41 It turns out that the formula will produce 40 primes for the consecutive values n = 0 to 39. However, when n = 40, 40^(2) + 40 + 41 = 40(40 + 1) + 41 is divisible by 41, and certainly when n = 41, 41² + 41 + 41 is clearly divisible by 41. Using computers,. So, I did my thinking and came up with the following code in a few minutes: #include <iostream> using namespace std; int* sieve(int i) { bool* primes = new bool[i]; int* primelist = new int[i]; primes[0] = false; primes[1] = false; for (int j = 2; j < i; j++) primes[j] = true; for (int j = 2; j * j < i; j++) { if (primes[j]) { for (int k = j; k*j < i; k++) primes[k*j] = false; } } for (int k = 2; k < i; k++) { if (primes[k]) primelist[k] = k; } return primelist; } bool isPrime(int check) { int* primes = sieve(1000); for (int i = 0; i < 1000; i++) { if (check == primes[i]) return true; } return false; } int main() { int* primes = sieve(1000); int max_co = 0; int max_co_sec = 0; int index = 2; int max = 0; int x; for (int a = -999; a < 1000; a++) { for (int b = -999; b < 1000; b = primes[index++]) { x = 0; while (isPrime(x*x+a*x+b)) x++; if (x > max) { max = x; max_co = a; max_co_sec = b; } } } cout << max_co * max_co_sec << endl; return 0; } What I did: Function sieve() returns an array of prime numbers using the sieve of eratosthenes. This part is OK. I validated the function by generating random ranges of prime numbers and using brute-force to check them. It works. Next, in the main(), there are two loops for checking combinations of n*n+a*n+b. isPrime() goes over the generated primes array to see if the number exists anywhere in it. If it does, then it is a prime. This is basically what my program does.. Problem is, that I'm getting the wrong output. What I'm getting is something like -75913. The correct answer is something like -51318. What am I doing wrong here? And, yes, I know there are many design flaws. Please point out as much as you can, as I want to improve my habits. Thanks for reading :D
https://www.daniweb.com/programming/software-development/threads/332944/need-help-with-a-frustrating-code-getting-the-wrong-output
CC-MAIN-2017-17
en
refinedweb
24 October 2012 11:51 [Source: ICIS news] SINGAPORE (ICIS)--China’s oil and gas major Sinopec has determined the location for its Wenzhou liquefied natural gas (LNG) terminal to be at Xiaomendao Island in Zhejiang province, east China, an official from Wenzhou Development and Reform Commission said on Wednesday. The company is expected to start construction in 2013, and to begin terminal operations in 2015 or between 2016 and 2017, the official said. The terminal is designed to handle 3m tonnes/year of imported LNG, and will be equipped with four 160,000 cubic metre (cbm) storage tanks and a jetty to dock LNG carriers with a loading capacity of 270,000cbm, the official said. The number of storage tanks will be increased to eight or 10 for the second phase of the project. The terminal is expected to receive LNG originating from either ?xml:namespace> Company officials were not immediately available to comment on the matter. Sinopec currently has no operational LNG terminals
http://www.icis.com/Articles/2012/10/24/9606694/chinas-sinopec-finalises-location-for-wenzhou-lng-terminal.html
CC-MAIN-2013-48
en
refinedweb
. Today we are going to examine the LINQ set operations that are part of the IEnumerable<T> extension methods. Now, most of the time when people think of set operations they think of the math or logic classes they are usually taught in, but really these LINQ methods have a much larger appeal and applicability than just math exercises! When we think of set operations in the realm of set logic, there are three primary ones that come to mind: Notice that in set theory, sets are collections of unique elements with no duplicates. Thus the set union, as we saw, removes all duplicates between the two sets. This becomes important as we discuss how these set operations apply to collections in .NET. I've blogged before on the often overlooked HashSet and SortedSet classes (here) in .NET, which are collections that implement sets. Though these are useful, sometimes you want to be able to apply these useful operations to other types of collections as well. This is where the LINQ set operation extension methods come in handy, they are implementations of these set operations that can be applied to any sequence that implements IEnumerable<T> including favorites like arrays, List<T>, iterators, etc. For the set operations to properly work on your sequences of a type, the type must have a valid notion of equality (both Equals() and GetHashCode() must be meaningful). Now, for nearly all the primitive types (int, double, char, etc) the string class, structs and some BCL reference types, equality is well defined and implemented and they will work fine as is. However, custom classes you write can present a problem because the default implementation of equality most likely will not meet our needs. Just keep that in mind for now and we’ll come back to that in the end with examples of how this can bite you and how to mitigate it… The Intersect() method gets the common elements from two different enumerable sequences, just like the set logic's intersection operation dictates. Intersections are very useful in determining where two sets overlap (that is, what elements two sets have in common). The two forms of Intersect(), assuming extension method syntax where the first argument is the target, are: Let’s play with string since it already has a good default equality comparer. So say we have two enumerable sequences of string: 1: // lets say we have a list of healthy stuff to consume 2: var healthyStuff = new List<string> { "fruits", "vegetables", "proteins", "simple carbs", "fiber" }; 3: 4: // and we have a list of what i consume 5: var myStuff = new List<string> { "soda", "chips", "proteins", "fat", "sugar" }; So now that we have these two lists: one of healthy things we can consume, and one that is things i typically consume. We can perform an intersection on them and see what things I consume that are healthy by saying: 1: var results = myStuff.Intersect(healthyStuff); 2: 3: foreach (var item in results) 4: { 5: Console.WriteLine(item); 6: } This will output the item “proteins” which is the only item common between what I eat and healthy stuff (I eat better than that, really, but just for illustrative purposes). It should be noted that the Intersect of two sets follows the commutative property. This means that A ∩ B = B ∩ A. So in our example that would mean that the following two statements are logically identical: 1: // these two are identical 2: results = myStuff.Intersect(healthyStuff); 3: results = healthyStuff.Intersect(myStuff); This makes sense because asking what healthy foods exist in the list that I eat is the same as asking what foods do I eat that exist in the healthy foods list. The Union() method combines the unique elements from two different enumerable sequences, just like the set union operation dictates. Unions are very useful for combining two sets without duplicates. Thus if in our example we wanted to get a list of all the healthy foods and all foods I eat, we could union the two sets. The two forms of Union(), assuming extension method syntax where the first argument is the target, are: By unique elements, I don’t mean to imply that only items with no duplicates are in the resulting set, but that the resulting set eliminates any duplicates. So that if you had { 1, 1, 3, 5 } ∪ { 1, 3, 7 } the result would be { 1, 3, 5, 7 }. For example: 1: var results = myStuff.Union(healthyStuff); 3: // this will output soda, chips, proteins, fat, sugar, 4: // fruits, vegetables, simple carbs, and fiber 5: foreach (var item in results) 6: { 7: Console.WriteLine(item); 8: } Notice that the duplicate of protein is gone. Union() is also commutative, so A ∪ B = B ∪ A. However that said the ordering will be different since the elements from the first sequence appear first in the resulting sequence, followed by any elements in the result that came from the second sequence. The nice thing about Union() is it gives you a nice and easy way to join together two sequences and eliminate duplicates. Note that this is very different from the Concat() extension method in LINQ that just concatenates one sequence to the end of the other, but this makes no attempt to remove duplicates. 1: // these are logically identical 2: results = myStuff.Union(healthyStuff); 3: results = myStuff.Concat(healthyStuff).Distinct(); The Except() method performs a set difference between two sets. That is, A – B yields the items in A minus any items in B that happen to be in A. Any items that were unique to B alone are ignored. Thus, if we wanted to get a list of the food I eat that is NOT healthy food, I could do the set difference between what I eat and the healthy things to eat. The two forms of Except(), assuming extension method syntax where the first argument is the target, are: Once again this is a simple set difference operation. { 1, 3, 5, 7 } – { 1, 5, 8 } = { 3, 7 }. The 1 and 5 are removed since they were in both the first and second set, and the 8 is removed since it didn’t exist in the first set. So the resulting sequence are only the unique items from the first set that are not also in the second set. As you can probably tell, difference is not commutative because if you reverse the order of the sets in the difference you get two different things: This means that you have to be careful with Except() that you are subtracting the sets correctly. Once again if we look at the food example: 1: // this is a list of the things I eat that are not healthy 2: // soda, chips, fat, sugar 3: var results = myStuff.Except(healthyStuff); 4: 5: // this is a list of healthy things that I do not eat 6: // fruits, vegetables, simple carbs, fiber 7: results = healthyStuff.Except(myStuff); So as you can see, Except() is a handy way to get a list of elements in a sequence that do not match the items from a second sequence. Please note, that like many of the System.Linq extension methods, Except(), Union(), and Intersect() are deferred execution which means they will not be invoked until an enumerator is requested from them. Thus if you did something like this: 1: results = healthyStuff.Except(myStuff); 3: // because results is an iterator (deferred execution) this clears 4: // myStuff before it is actually used, which alters our results 5: myStuff.Clear(); 6: 7: foreach (var item in results) 8: { 9: Console.WriteLine(item); 10: } The resulting set will be all of healthyStuff (instead of the difference) since the results variable holds an iterator to the resulting sequence, but that sequence will not be calculated until we begin enumerating through the results. Thus by calling Clear() on one of the sets before we actually use the results, we've altered the operands before the operator is actually applied. In this example, that means we try to subtract an empty set myStuff from the list of healthyStuff, which of course results in the full list. To avoid this either iterate over the results immediately, or use extension methods like ToArray() or ToList() to immediately process the query and put the results in a collection. In IEnumerable<T> the type T is covariant, this means you can use the set operations to manipulate two sets of different types related through inheritance. For example, if you had class Employee and class SalariedEmployee which inherits from Employee, then you can perform set operations between the two sets and the resulting set type is the wider of the two types (that is, the higher up the inheritance chain – Employee in this case). Also notice that the only thing required for these set operations in System.Linq to work is that both sequences must implement IEnumerable<T>, this means they can be an array, a List<T>, a HashSet<T>, or an iterator from another query of type T (and so on). Essentially, this is just to say that you can intersect a HashSet<string> with a List<string> and so on, the only thing that is important is that their element types are the same (or covariant as stated above). I hinted before that these operations will work exactly as you expect for primitives, strings, structs, and any reference types that correctly implement the concept of equality. And I hinted that custom classes you write may be in danger of not working. But why? Well, you may think that the first problem is that with class the default concept of Equals() is a reference comparison. While this is true, it is only half the issue. Let’s say we define an Employee class and override Equals() on it: 1: public class Employee 2: { 3: public int Id { get; set; } 4: public string Name { get; set; } 5: public double Salary { get; set; } 7: public override bool Equals(object obj) 8: { 9: var other = obj as Employee; 10: 11: return other == null 12: ? false 13: : Equals(Id, other.Id) && 14: Equals(Name, other.Name) && 15: Equals(Salary, other.Salary); 16: } 17: } So now if we attempt to perform set operations on these two lists, what do we get? 1: var listOne = new [] 2: { 3: new Employee { Id = 1, Name = "John Smith", Salary = 12342 }, 4: new Employee { Id = 12, Name = "Lucy Doe", Salary = 99243 } 5: }; 7: var listTwo = new [] 9: new Employee { Id = 2, Name = "Jane Doe", Salary = 3241 }, 10: new Employee { Id = 1, Name = "John Smith", Salary = 12342 } 11: }; Now, if we try to do an intersection, we’d expect to see John Smith, right? 1: var results = listOne.Intersect(listTwo); But we don’t, we get an empty list! Why? We can get a hint in that the second forms of Union(), Intersect(), and Except() that take an IEqualityComparer<TSource>. Why IEqualityComparer, why not just IComparer? The answer is that IEqualityComparer requires both an Equals() and a GetHashCode() method to be defined. So this should be a good hint to us that we need to provide not only a meaningful Equals() overload but a GetHashCode() overload in our custom classes (or provide a separate custom IEqualityComparer of course). Remember that two items that are equal should always return the same hash code, but the opposite is not necessarily true. It's okay for two non-equal items to have the same hash code, but it's never okay for two equals items to not have equal hash codes. Typically this means that the GetHashCode() method should be based on the same fields used in the Equals() check (or a subset). So, assuming we add an override for GetHashCode(): 3: // ... all the other stuff from before 5: public override int GetHashCode() 6: { 7: unchecked 8: { 9: // using the pretty standard method of primes and combinging field hash codes 10: int hash = 11; 11: 12: hash = hash * 31 + Id.GetHashCode(); 13: hash = hash * 31 + Name != null ? Name.GetHashCode() : 0; 14: hash = hash * 31 + Salary.GetHashCode(); 15: 16: return hash; 17: } 18: } 19: } Now we get the expected result of John Smith! Many of the LINQ extension methods use the hash codes of the items in the sequences to quickly and efficiently work their way through the lists. We don’t have this issue with primitives and classes such as string which already override Equals() and GetHashCode() appropriately, and struct doesn’t have this issue because struct by default already does a member-wise Equals() and GetHashCode() construction. Thus, another way we could have corrected this would be to make Employee a struct, though this has larger ramifications to consider and shouldn’t be done lightly (for more info on class vs struct and all the differences see here). So the general recommendation is to either provide a meaningful Equals() and GetHashCode(), or create a separate IEqualityComparer that will define these for your custom class. System.Linq includes some great set operation extension methods that can be used to operate on two sequences as if they were sets. These can come in handy when combining sequences with no duplicates (Union()), seeing if two sequences have elements in common (Intersect()), or seeing what elements in a sequence are not part of another sequence (Except()). While set operations are typically thought of as math operations, these can be applied to many computer science problems and should be considered when needing to check membership between two sequences of items. Print | posted on Thursday, May 5, 2011 7:13 PM | Filed Under [ My Blog C# Software .NET Little Wonders ]
http://blackrabbitcoder.net/archive/2011/05/05/c.net-little-wonders-the-linq-set-operations----theyre-not.aspx
CC-MAIN-2013-48
en
refinedweb
On Fri, 30 Nov 2007 12:58:06 +0530Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> wrote:> Andrew Morton wrote:> > On Thu, 29 Nov 2007 23:00:47 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:> > > >> On Fri, 30 Nov 2007 01:39:29 -0500 Kyle McMartin <kyle@mcmartin.ca> wrote:> >>> >>> On Thu, Nov 29, 2007 at 12:35:33AM -0800, Andrew Morton wrote:> >>>> ten million is close enough to infinity for me to assume that we broke the> >>>> driver and that's never going to terminate.> >>>>> >>> how about this? doesn't break things on my pa8800:> >>>> >>> diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c> >>> index 463f119..ef01cb1 100644> >>> --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c> >>> +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c> >>> @@ -1037,10 +1037,13 @@ restart_test:> >>> /*> >>> * Wait 'til done (with timeout)> >>> */> >>> - for (i=0; i<SYM_SNOOP_TIMEOUT; i++)> >>> + do { > >>> if (INB(np, nc_istat) & (INTF|SIP|DIP))> >>> break;> >>> - if (i>=SYM_SNOOP_TIMEOUT) {> >>> + msleep(10);> >>> + } while (i++ < SYM_SNOOP_TIMEOUT);> >>> +> >>> + if (i >= SYM_SNOOP_TIMEOUT) {> >>> printf ("CACHE TEST FAILED: timeout.\n");> >>> return (0x20);> >>> }> >>> diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.h b/drivers/scsi/sym53c8xx_2/sym_hipd.h> >>> index ad07880..85c483b 100644> >>> --- a/drivers/scsi/sym53c8xx_2/sym_hipd.h> >>> +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.h> >>> @@ -339,7 +339,7 @@> >>> /*> >>> * Misc.> >>> */> >>> -#define SYM_SNOOP_TIMEOUT (10000000)> >>> +#define SYM_SNOOP_TIMEOUT (1000)> >>> #define BUS_8_BIT 0> >>> #define BUS_16_BIT 1> >>> > >> That might be the fix, but do we know what we're actually fixing? afaik> >> 2.6.24-rc3 doesn't get this timeout, 2.6.24-rc3-mm2 does get it and we> >> don't know why?> >>> > > > <looks at Subject:>> > > > <Checks that Rafael was cc'ed>> > > > So 2.6.24-rc3 was OK and 2.6.24-rc3-git2 is not?> > Yes, the 2.6.24-rc3 was Ok and this is seen from 2.6.24-rc3-git2/3/4.> There are effectively no drivers/scsi/ changes after 2.6.24-rc3 and wedon't (I believe) have a clue what caused this regression.Can you please do a bisection search on this?Thanks.
http://lkml.org/lkml/2007/12/3/208
CC-MAIN-2013-48
en
refinedweb
Am using weblogic5.1.Did weblogic5.1 supports JMS. Since while look up am getting NameNotFoundException QueueConnectionFactory qconFactory = (QueueConnectionFactory)ic.lookup(QueueConnectionFactory.class.getName()); QueueConnectionFactory qconFactory = (QueueConnectionFactory)ic.lookup("javax.jms.QueueConnectionFactory"); Both ways I have looked up,am getting NameNotFoundException exception.Also I have looked in the weblogic console.Only javax.transaction.UserTransaction is associated in the Naming folder.There is no javax.jms.QueueConnectionFactory association. Thanks in advance. Regards, Vinoth.c Discussions EJB programming & troubleshooting: Did weblogic5.1 supports JMS Did weblogic5.1 supports JMS (1 messages) - Posted by: vinoth chidambaram - Posted on: February 19 2001 00:51 EST Threaded Messages (1) - Did weblogic5.1 supports JMS by Stanislav Markin on February 19 2001 07:03 EST Did weblogic5.1 supports JMS[ Go to top ] You must describe your factory in weblogic.properties. - Posted by: Stanislav Markin - Posted on: February 19 2001 07:03 EST - in response to vinoth chidambaram From the WL5.1 docs: <cite> ConnectionFactories allow JMS clients to create JMS connections. They are configurable so that they create connections with predefined attributes. The JMS specification classifies ConnectionFactories, Queues, and Topics as "administered" objects. They are configured by the messaging system administrator and added to the JNDI namespace to allow access to JMS clients. To define a WebLogic JMS ConnectionFactory, add a weblogic.jms.connectionFactoryName property: weblogic.jms.connectionFactoryName.factoryName=jndiName </cite> See the full documentation here: WBR, Stanislav Markin Brainbench MVP for Java 1
http://www.theserverside.com/discussions/thread.tss?thread_id=4378
CC-MAIN-2013-48
en
refinedweb
Active Directory Service Interfaces -The Easy Way to Access and Manage LDAP-Based Directories (Windows NT 4.0) Active Directory Service Interfaces: The Easy Way to Access and Manage LDAP-Based Directories This paper provides detailed information on how the Active Directory Service Interfaces (ADSI) provide the easy way to implement the Lightweight Directory Access Protocol (LDAP), as defined by the Internet Engineering Task Force (IETF). This document also describes how ADSI helps access and manage products from other vendors that support LDAP and other directory APIs. The ADSI Software Developer's Kit for Windows NT 4.0 is available to all customers by downloading from the Microsoft Internet Web site at On This Page Executive Summary Introduction Microsoft Directory Services Strategy History of LDAP Lightweight Directory Access Protocol (LDAP) Overview Microsoft's commitment to LDAP-based Directories Microsoft's LDAP-based Directory APIs to access LDAP Directory Services Conclusion Executive Summary Enterprise Computing environments need to store directory information in a centralized data store so that data can be added, deleted, modified, or queried by users and applications. The types of directory information that are stored vary greatly—the common ones are user accounts, e-mail addresses, digital certificates, component object names, network names, and so on. This type of information is central to many applications and their usage. The amount of information stored varies greatly with the size the enterprise and its needs. It is important to access the information both from within the enterprise and from the Internet. This centralized data store, plus the services that manage it, has come to be known as a Directory Service. The Directory Service must be accessible via an open, standards-based protocol. Using an open protocol enables the information in the Directory Services to be accessible to clients from different vendors. Thus, Directory Services from different vendors can communicate using an open protocol and can exchange information to create aggregated directories. Active Directory is the Directory Service that is integrated with the next release of the Microsoft® Windows NT® Server operating system. It offers the hierarchical view, extensibility, scalability, and distributed security required by all customers. The Active Directory will natively support LDAP, the Internet Engineering Task Force's (IETF) Specification rfc1777 for directory interoperability, which means that it is completely integrated with the Internet. With this level of LDAP commitment, customers can deploy Active Directory in a corporate computing environment and interoperate with LDAP clients from multiple vendors. While the Active Directory will natively support LDAP, there is an even better way to access the directory than using the low-level LDAP C APIs. To make it easier to write directory-enabled applications that access the Active Directory and other LDAP-enabled directories, Microsoft developed Active Directory Service Interfaces (ADSI). ADSI is an extensible, easy-to-use programming interface that can be used to write applications to access and manage the following: Active Directory any LDAP-based directory ther Directory Services in a customer's network, including NDS This initiative—supported by the major Directory Service vendors in the industry—is designed to enable developers and vendors to plug in service providers specific to each directory. Via this service provider architecture, developers can build applications to a single programming interface that will be able to access and manage multiple directories. With ADSI as the means to access and manage multiple directory services, customers and developers will find it easier and less costly to deploy directory-enabled applications. As part of its commitment to LDAP, Microsoft has built an LDAP provider for the ADSI Software Development Kit. Also, by making ADSI the easy way to do LDAP, Microsoft provides the infrastructure within its operating systems to provide user-empowering interoperability within a heterogeneous computing environment. Introduction Microsoft is committed to implementing open standards that benefit its customers. By incorporating technologies based on open standards, Microsoft has created the building blocks that will allow Windows NT Server to better integrate into a heterogeneous environment. This paper discusses two major issues: 1) why ADSI is necessary and 2) the way in which Microsoft has implemented the critical components of the LDAP specification rfc1777in the Active Directory and ADSI. Further, this paper will discuss what Microsoft is doing today to extend the capabilities of LDAP beyond the version 2 Specification, including the contributions Microsoft is making to the version 3 specification. Challenges of Multiple Directory Services One of the challenges of working within a large, distributed computing environment is identifying and locating resources such as users, groups. As such, they each have their own API set for accessing and managing the directory. Many issues arise when a single enterprise deploys multiple directories. These issues include usability, data consistency, development cost, and support cost, among others. More importantly, how do these customers manage all of these different services in an easy, consistent, and cost-effective manner? To make it easier to write directory-enabled applications that help customers access and manage multiple directories, Microsoft developed Active Directory Service Interfaces (ADSI). Active Directory Service Interfaces addresses these issues by providing a single, consistent, open set of interfaces for managing and using multiple directories. What Are Active Directory Service Interfaces? Active Directory Service Interfaces abstracts the capabilities of directory services from different network providers to present a single set of directory service interfaces for managing network resources. The standard Active Directory Service Interfaces objects are those found within multiple namespaces. The typical namespaces for Active Directory Service Interfaces are directory services for various network operating systems. Administrators and developers can use Active Directory Service Interfaces services to enumerate and manage the resources in a directory service, no matter which network environment contains the resource. Active Directory Service Interfaces makes it easier to perform common administrative tasks, such as adding new users, managing printers, and locating resources throughout the distributed computing environment. Active Directory Service Interfaces makes it easy for developers to "directory- enable" their applications. Administrators and developers deal with a single set of directory service interfaces, regardless of the installed directory service(s). Active Directory Service Interfaces are one component of the Windows® Open Services Architecture (WOSA). Who Will Use Active Directory Service Interfaces? Network Administrators will use Active Directory Service Interfaces to automate common administrative tasks, such as adding users and groups, managing printers, and setting permissions on network resources. Independent Software Vendors (ISVs) and end user developers will use Active Directory Service Interfaces), the directory-enabled products and applications will operate successfully in multiple network and directory environments. And even though Active Directory will natively support LDAP, ADSI is a even better way to access the directory than using the low-level LDAP C APIs. Benefits of Active Directory Service Interfaces Microsoft Directory Services Strategy The computing strategies of corporations focus on providing immediate delivery of valuable information to users from any location and stored in any format. This concept, named "Information at Your Fingertips" by Bill Gates, is the primary business mission of Microsoft. This mission drives the development of Microsoft's technologies and tools. Microsoft views Directory Services as a critical component in a system that finds and delivers that information to your fingertips. Directory Services are a store for information about the organization; e.g., phone/mail address book, the computing environment of the organization (user accounts, printers, objects, and so on), and other miscellaneous information that needs to be found in a location-independent manner. These Directory Services must also provide a single interface for all of the applications deployed in your environment. The Windows NT Server Directory Services already offer extensive integration of applications into the Directory Service, including all of the BackOffice family of applications as well as more than 130 applications from other vendors. The Active Directory Service Interfaces build on this infrastructure, making it easier to integrate applications into the directory. Most enterprise computing environments use widely differing information technology systems from several different vendors. This variation—often caused by different needs within a corporation—causes complexity when integrating a computing infrastructure. Microsoft's mission is to enable customers to effectively integrate Microsoft products and technologies with a variety of computing environments: this includes Directory Services. Microsoft has built the Active Directory to support a number of different industry standards so that it can integrate with products that support any of these popular standards. Microsoft's plans include support for X.500 Directory standards, such as: Subsets of the 1993 Directory Access Protocol (DAP) 1993 Directory System Protocol (DSP) Directory Information Shadowing Protocol (DISP) How Does LDAP Fit Into Active Directory? Microsoft is also building Active Directory on the LDAP protocol, making Active Directory the easiest way to implement LDAP in a network environment. Microsoft will fully support the LDAP protocol and, via ADSI, will allow any LDAP Directory Service to interoperate with Active Directory. In addition, while ADSI is the easiest way to access the directory via LDAP, the Active Directory also fully supports the LDAP C APIs for directory access. Microsoft will continue to develop and support standards that are required to integrate Directory Services with products and technologies that are prevalent in organizations. Microsoft will also continue to work with standards bodies to incorporate features into their Directory Services products so that they can integrate seamlessly with products from other vendors that support those features. To this end, Microsoft is working with the IETF on the draft of LDAP v3 and other draft RFCs.. Because it is an OSI protocol, DAP is significantly more complicated than the more prevalent TCP/IP stack implementations, and it requires more code and computing horsepower to run. The size and complexity of DAP makes it difficult to run on thin clients, such as the PC and Macintosh®, where TCP/IP functionality often comes with the machine. DAP stack implementations are cumbersome to administer, thus limiting the acceptance of X.500. Hence, in 1993, designers at the University of Michigan—with help from the ISODE Consortium—designed and developed a protocol that would work over TCP/IP and was small enough when implemented to run on a thin client, such as a computer running Windows® operating system or a Macintosh. This protocol is called LDAP. The LDAP version 1 Specification was published in March 1994. The LDAP version 2 Specification was published as rfc1777 by the Access Searching and Indexing of Directories (ASID) working group, part of the IETF, in March 1995. In April 1996, forty companies—including Microsoft, Netscape, and Novell—announced support for the LDAP protocol in their Directory Services products so that they could operate with each other as well as integrate with the Internet. LDAP version 3.0 has gone through several drafts, but as of January 1997, it is not completed. Lightweight Directory Access Protocol (LDAP) Overview LDAP defines the following four components: Data Model. Defines the syntax of the data in the directory.. Organizational Model. Defines how the data is organized in the directory. Security Model. Defines how the information in the directory is accessed in a secure manner. Functional Model. Defines the operations for querying and modifying the directory. (DIT) and divided among servers in a geographical and organizational distribution. Each entry, with the exception of. The Functional Model The functional model in LDAP defines the operations for querying and modifying the directory. It defines the operations for: adding an entry from the directory. deleting an entry from the directory. modifying an existing entry. changing the name of an existing entry. querying for an entry in some portion of the directory based on a criterion specified by a query filter. A typical search operation might involve searching the entire tree under the organization "Microsoft" for people with the name "Mohan Cavale," retrieving the e-mail address for each entry found.. LDAP version 3 defines the packet formats of the SASL requests and responses between the LDAP client and server. It supports both security authentication and encryption using different SASL mechanisms. In addition to SASL, LDAP version 3 also supports secure connections using the Secure Sockets Layer (SSL) protocol. The Topological Model A major advantage of LDAP is that not available locally, the server attempts to connect to another LDAP server that can fulfill the request. LDAP uses this referral capability to implement a global directory structure of independent LDAP servers that appear to be a single LDAP server to the client. LDAP C-Binding API RFC 1823 specifies the C-binding APIs for a client to access a Directory Service that supports the LDAP protocol. This API set is extremely simple and supports both synchronous and asynchronous calls to the server. However, it is very low level and means a lot of work for LDAP developers. To make it easier for developers to write LDAP-enabled applications that take advantage of LDAP-based directory services such as Active Directory, Microsoft introduced ADSI. Microsoft's commitment to LDAP-based Directories Today's customers demand multi-vendor integration. Core network level inter-operability is extremely important for multi-vendor integration of services. Microsoft completely supports the LDAP specification. However, the complexity of writing applications to the LDAP API set results in increased development time and costs when compared to the higher-level component systems. For this reason, Microsoft believes that application developers will, over time, use the higher-level abstractions such as ADS, rather than coding directly to low-level API sets. It is with this view that Microsoft has built an LDAP provider for the ADSI API set. Via service providers, ADSI permits an application to access directories from different vendors based on different standards. More importantly, it allows these directories to be accessed using a single API set as COM components or Automation objects. Microsoft recognizes that there are customers that need to use LDAP Directory Services today with an option to migrate to Directory Services based on other emerging standards later. ADSI, with its provider/client architecture, enables an application that is using those APIs to use different Directory Services, both proprietary and standards-based, with very few changes to an application. Microsoft's LDAP-based Directory Active Directory Windows NT operating system, including user accounts, groups, and domains. Active Directory, then, replaces the registry account database and, as well as password-based authentication. Internet clients can also be authenticated using X.509 v3 Public Key Certificates. Active Directory supports impersonation, after a client is authenticated, using appropriate authentication scheme. This provides for a tight integration with the rest of the Windows NT security system. LDAP and Security in Active Directory The Security Support Provider Interface is based on a provider/client architecture so that applications writing to these APIs can use different Security Providers. Microsoft's LDAP client and Active Directory use the Security Support Provider Interface (SSPI) APIs for authentication and security; hence, they can use any SSPI providers for establishing and conducting a secure LDAP session. The next major release of Windows NT will ship with SSPI providers for SSL 3.0, Kerberos v5, and NTLM. APIs to access LDAP Directory Services Microsoft provides powerful, flexible, and easy-to-use Active Directory Service Interfaces An easier way than low-level LDAP C API calls to access directory services is ADSI. An ADSI provider maintains the implementation of objects and dependent objects for a particular namespace. Figure 2 demonstrates that, with ADSI, clients can be concerned only with getting and using interfaces on an object, and not with the details of where and how the software of an object is implemented. This means that developers, administrators and end-users alike can benefit from an easier way to access and manage distributed services. The ADSI SDK providers are available for the following Directory Windows NT 4.0 Novell NetWare 3.x and 4.x Active Directory any Directory Service that supports LDAP RFC-1777. ADSI components are designed to meet the needs of traditional C and C++ programmers, system administrators, and sophisticated end users. ADSI components present the directory as a set of COM objects, which provide behavior in addition to data. With ADSI components, development of directory-enabled applications is fast and easy. Future of LDAP Microsoft is actively working with the IETF on defining the LDAP v3 specification and will support LDAP v3 and later versions ensure support for even more standards and protocols on Microsoft platforms. This support includes LDAP and its technologies that provide interoperation. Microsoft clients and servers are also designed to interoperate with other products that support LDAP. While Microsoft is completely committed to LDAP, LDAP interoperability is just one part of Microsoft's broad work toward a single system image in which users and administrators do not have to be aware of the differences between systems on a multi-vendor network. Microsoft is committed to providing support for both open and vendor-specific standards to give customers the interoperation they need to truly enable computing for competitive advantage. To make sure that customers and developers can leverage all of the directory service technology in a distributed environment, Microsoft built ADSI. Programming your application to a standard set of APIs does not make your application portable. Portability is achieved through a carefully-defined implementation within a layered services architecture—these layers are known as abstraction layers and are used to segregate critical services. Abstraction layers enable developers to change application components and platforms, without necessarily affecting the application or other components. ADSI. 0297 Part no. 098-68763
http://technet.microsoft.com/en-us/library/cc749950.aspx
CC-MAIN-2013-48
en
refinedweb
Windows Workflow Tutorial: Introduction to Sequential Workflows Ken Getz MCW Technologies LLC Published: November, 2008 Articles in this series - Building a Sequential Workflow - Building a State Machine Workflow - Flow Control: Basics - Flow Control: Replicator - Fault Handling - Communication: Calling Methods within the Host Process - Communication: Handling an Event From the Host in a Workflow - Rules-Driven .NET Applications - Rules-Driven WCF Services Download the code for this article Introduction Windows Workflow Foundation (WF), originally introduced as part of the .NET Framework 3.0 with extensions for Visual Studio 2005’s designers, has continued to be enhanced for the .NET Framework 3.5 and Visual Studio 2008. WF makes it possible, and for many workflow scenarios, even easy to create robust, manageable workflow-based applications. WF is actually many things: It’s a programming model, and runtime engine, and a set of tools that help you create workflow-enabled applications hosted by Windows. (For more information on WF, drop by the portal site). In this series of tutorials, you’ll work through several different examples, showing off various important features of WF, and the corresponding tools and techniques using Visual Studio 2008. Because workflows generally deal with specific business-oriented processes, and these tutorials can’t begin to emulate your specific processes, you’ll find that the specific examples shown here tend to focus on either scenarios that you can control in order to demonstrate the specific workflow features (such as working with files in the file system), or they focus on business processes with “holes” left for your imagination to insert real-world behaviors. This first tutorial introduces the basics of creating Workflow applications, using a console application as the workflow’s host. Along the way, you’ll investigate the various workflow-focused templates that Visual Studio 2008 provides, and you’ll learn what happens when you create and run a workflow application. You’ll try out a few of the many different workflow activities, as well. (These tutorials assume that you have Visual Studio 2008 installed, along with the .NET Framework 3.5. You can choose to work in either Visual Basic or C#--the steps listed here call out specific differences between the languages, when necessary. There’s a lot to cover in this first tutorial, so fire up Visual Studio 2008, and get started! Investigate the Workflow Templates To get started, in Visual Studio 2008 select File | New | Project to display the New Project dialog box. In the list of project types, select Workflow, displaying the list of templates shown in Figure 1. Figure 1. Visual Studio 2008 provides these workflow templates. In general, WF allows you to create two different types of workflows: sequential, and state machine. Sequential workflows provide a structured series of steps in which one activity leads to another, and steps generally occur immediately one after another. A step might wait for some event (an email to arrive, for example), but sequential workflows are often appropriate for tasks that operate without human intervention. State machine workflows provide a set of states; transitions between the states define the behavior. In general, state machine workflows react to events which move the workflow’s current activity from one state to another. Each workflow that you design is simply a class that inherits from one or the other of the System.Workflow.Activities.SequentialWorkflowActivity or System.Workflow.Activities.StateMachineWorkflowActivity classes, and most of the Visual Studio 2008 workflow project templates create a class that inherits from one or the other of these base classes for you. (In addition, each of these templates includes assembly references to the various assemblies required in order to design and run workflows.) If you want to create a sequential workflow, you can select any of the following templates: - Sequential Workflow Console Application, which includes a Console application host application that helps run your workflow. You’ll investigate this specific template in this tutorial. - Sequential Workflow Library, which creates a .NET library containing only a sequential workflow class. This project template does not include a host application, so you will need to supply your own in order to execute a workflow. - Sharepoint 2007 Sequential Workflow, which creates a sequential workflow suitable for use with SharePoint 2007. (For more information on SharePoint 2007 and workflows, visit this site.) If you want to create a state machine workflow (the topic of another tutorial in this series), you can select any of the following templates, which correspond to the similarly named templates previously listed: - SharePoint 2007 State Machine Workflow - State Machine Workflow Console Application - State Machine Workflow Library In addition, you can select the Empty Workflow Project template to create an empty project, with just the necessary references set; or you can select the Workflow Activity Library template to create a library in which you could create custom workflow activities. Create a Workflow Project For this demonstration, select the Sequential Workflow Console Application template, name your application WorkflowDemo1, and select an appropriate folder for the project. Click OK to create the project. (Note that every workflow must be hosted by some application—something has to create an instance of the workflow runtime, which, in turn, creates an instance of the workflow you want to execute. In this example, you’ll create a Console application that hosts the workflow.) At this point, the workflow project contains a single workflow class, named Workflow1. This blank template should be opened for you (if not, double-click the corresponding code file in the Solution Explorer window to open it), and the workflow designer is ready for you to add your own activities (see Figure 2). Figure 2. The workflow designer is ready for you to add activities. In the Solution Explorer window, right-click the Workflow1 file, and select View Code from the context menu. You’ll find code like the following, clearly pointing out that the workflow that you’re designing is really just a class that inherits from the SequentialWorkflowActivity class: Public class Workflow1 Inherits SequentialWorkflowActivity End Class public sealed partial class Workflow1: SequentialWorkflowActivity { public Workflow1() { InitializeComponent(); } } Just as a Windows Form that you design within Visual Studio becomes an instance of a class that inherits from the System.Windows.Forms.Form class when you run the application, the workflow that you design within Visual Studio becomes an instance of a class that inherits from either the SequentialWorkflowActivity or StateMachineWorkflowActivity class when you run the application. Later, you’ll add code to this partial class in order to add behavior to your workflow. (Actually, there’s more of a similarity than just that—in Visual Studio, when you load a file that contains a class that inherits from the Form class, Visual Studio displays the form using the Windows Forms designer. The same thing happens with a workflow class—when you ask Visual Studio to load a file that contains a class that inherits from one of the two base activity classes, it displays the class using the appropriate workflow designer.) Select View | Designer to return to design view. Look in the Toolbox window (if it’s not visible, select View | Toolbox to display it). You’ll see two tabs that deal with Workflow: the tab labeled Windows Workflow v3.0 contains most of the built-in workflow activities you’ll use, and the tab labeled Windows Workflow v3.5 contains the new workflow activities added in the .NET Framework 3.5 (this tab contains only two activities dealing with WCF and workflow, and you won’t need these items for these tutorials). For now, select the Windows Workflow 3.0 tab, and expand it (see Figure 3). Figure 3. The Windows Workflow v3.0 tab in the Toolbox window contains most of the built-in workflow activities. Some of the activities you see in the Toolbox window have obvious behavior—the Code activity allows you to execute code, the IfElse activity allows you to make choices, and the While activity executes an activity while some condition remains true. Other activities, such as the SynchronizationScope activity, require a bit more study to determine their purpose. In this tutorial, you’ll work with the simple Code and IfElse activities—later tutorials will walk you through using some of the more complex activities, such as the Replicator, While, Listen, and HandleExternalEvent activities. Add Activities to the Workflow To get started, from the toolbox, drag a Code activity onto the design surface, so that the designer looks like Figure 4 just before you drop the activity. Once you drop the activity, the designer looks like Figure 5. (Note that as you drag activities onto the designer, you see one or more green “dots” indicating where, on the workflow, you can drop your activity.) Figure 4. Before dropping the activity, you see an icon representing where it will finally appear within the workflow. Figure 5. After dropping the activity, it appears within the workflow design. At this point, the Code activity indicates an error—you haven’t yet told it what to do when the workflow attempts to execute it! You’ll add the code soon. (Although this tutorial doesn’t walk you through the steps, you should get in the habit of providing meaningful names for your workflow activities—otherwise, it gets difficult to manage all the activities in your workflow. Setting the Name property for each activity is a good habit to get into, but it’s not necessary for this simple workflow.) At runtime, the sequential workflow starts at the green arrow, and executes activities, one at a time, in turn, until it reaches the red circle at the conclusion of the workflow. In your sample workflow, you have included only a single Code activity. Executing the workflow will cause it to run any code that you have placed in the activity’s ExecuteCode event handler. To create the code for your activity, double-click CodeActivity1. This creates an associated procedure, ready for you to edit in the code editor. Modify the procedure, adding the following code: Console.WriteLine("Hello, World!") Console.WriteLine("Hello, World!"); Select View | Designer, and verify that the error indicator disappears, because you have provided code for the Code activity to run. Select the Code activity, and examine the Properties window (see Figure 6). You’ll see that by adding the event handler, you’ve set the activity’s ExecuteCode property, so that the activity “knows” what to do when it becomes the active activity within the workflow. Figure 6. Adding code for the Code activity sets the activity’s ExecuteCode property. Just to verify that you’ve created a working workflow, save and press Ctrl+F5 to run your project. (If you use any other means to run the project, the console window will disappear immediately, once the message appears on the screen.) After a few seconds, the console window displays your message awaits a key press. So far, you’ve created the world’s simplest working workflow, and it really only proved that workflow works at all—clearly, you would never use WF for a simple application like this. Next, you’ll investigate how WF loads and runs your workflow design. Debugging a Workflow Although this simple application certainly doesn’t require any debugging capabilities, you’ll often need to step through your workflows. As you might expect, you can easily place a breakpoint in the ExecuteCode handler for a Code activity, and step through the code. But what if you want to debug at a higher level, stepping through activities as they execute? You can, and Visual Studio makes the process feel much like debugging at the code level. In the workflow designer, right-click CodeActivity1. From the context menu, select BreakPoint | Insert Breakpoint. At this point, the designer places a red dot on the activity, indicating that the workflow will drop into Debug mode when it begins to execute the activity (see Figure 7). Figure 7. Set a breakpoint on an activity. Press F5 to start running the application. When the workflow reaches codeActivity1, it pauses execution and highlights the activity in yellow, as shown in Figure 8. Figure 8. At runtime, Visual Studio stops at the activity’s breakpoint. Select Debug | Step Over (or the corresponding keystroke), and Visual Studio steps to the next activity, executing the previous Code activity’s ExecuteCode procedure. Select Debug | Step Into, and Visual Studio steps into the second Code activity’s ExecuteCode procedure, as you might expect. Visual Studio 2008 makes debugging a workflow no more difficult than debugging any other type of application. (In order to step through your workflow, the startup project within Visual Studio must be a workflow project. That is certainly the case in this simple example, but might not be the case in a “real-world” scenario in which the workflow exists in a library, and the host project is separate. In that case, you’ll need to configure Visual Studio so that it starts the host application when you start debugging.) Investigate the Startup Code The project template created a simple console application for you, and the project automatically loaded and ran your workflow. It’s important to understand exactly how the project does its work, because you’ll often want to host workflows from other types of applications (from Windows or Web applications, or perhaps from a Windows Service)—in those cases, you’ll need to provide your own code to get the workflow running. To investigate the code that actually does the work starting up your workflow, in the Solution Explorer window, double-click Module1.vb or Program.cs. There, you’ll find the following code:Demo1.Workflow1)); instance.Start(); waitHandle.WaitOne(); } } } This code, which runs as your application loads, starts by creating a new instance of the WorkflowRuntime class, which provides a execution environment for workflows. Every application you create that hosts one or more workflows must create and instantiate an instance of this class. The WorkflowRuntime instance later creates workflow instances: Using workflowRuntime As New WorkflowRuntime() ' Code removed here… End Using using (WorkflowRuntime workflowRuntime = new WorkflowRuntime()) { // Code removed here… } On its own, a Console application simply quits when the code in its Main procedure completes. In this case, however, you must keep the application “alive” as long as the workflow is still running. The project template includes an AutoResetEvent variable that helps keep that application running until the workflow has completed: Shared WaitHandle As New AutoResetEvent(False) AutoResetEvent waitHandle = new AutoResetEvent(false); The AutoResetEvent class allows threads to communicate with each other by signaling. In this case, the Console application runs in one thread, and the workflow runs in a separate thread. The main thread—in this case, the console application—calls the wait handle’s WaitOne method, which blocks the console application’s thread until the workflow’s thread calls the wait handle’s Set method, which allows the main thread to complete. How does this all happen? Given the WorkflowRuntime instance, the code adds event handlers for the runtime’s WorkflowCompleted and WorkflowTerminated events. The WorkflowCompleted event occurs when the workflow completes normally, and the WorkflowTerminated event occurs if the workflow completes abnormally (because of an unhandled exception, for example): AddHandler workflowRuntime.WorkflowCompleted, _ AddressOf OnWorkflowCompleted AddHandler workflowRuntime.WorkflowTerminated, _ AddressOf OnWorkflowTerminated ' Later in the class: workflowRuntime.WorkflowCompleted += delegate(object sender, WorkflowCompletedEventArgs e) { waitHandle.Set(); }; workflowRuntime.WorkflowTerminated += delegate(object sender, WorkflowTerminatedEventArgs e) { Console.WriteLine(e.Exception.Message); waitHandle.Set(); }; When either event occurs, the code calls the wait handle’s Set method, which allows the console application’s thread to continue running (in effect, completing the application and allowing the console window to close). If the workflow terminates abnormally, the WorkflowTerminated event handler writes the exception to the console window before calling the Set method. (This is, as you can probably surmise, not terribly helpful—because the message appears in the window immediately before the window closes, you’ll never actually see the message if the workflow throws an unhandled exception!) You’ve investigated all the code provided in the project template, except the code that actually starts your workflow running. This code appears between the code that sets up the event handlers, and the code that calls the wait handle’s WaitOne method: Dim workflowInstance As WorkflowInstance workflowInstance = _ workflowRuntime.CreateWorkflow(GetType(Workflow1)) workflowInstance.Start() WorkflowInstance instance = workflowRuntime.CreateWorkflow( typeof(WorkflowDemo1.Workflow1)); instance.Start(); This code starts by creating a WorkflowInstance object, assigning to it the return value of calling the WorkflowRuntime object’s CreateWorkflow method. By passing the type of the workflow to be created as a parameter to the CreateWorkflow method, the workflow runtime can determine exactly which type of workflow to create. Finally, the code calls the Start method of the workflow instance, which begins executing the workflow at its first activity. (Sequential workflows have an initial activity; state machine workflows have an initial state. It’s a subtly different concept, and you’ll understand it better once you try out a state machine workflow.) Although you’ll probably want to spend the most time fixating on the mechanics of the AutoResetEvent object and the wait handle, please don’t—these features are only necessary for workflows hosted by a Console application, to keep the application running as long as the workflow hasn’t completed. When you host a workflow in any other type of application (a Windows Forms application, for example), you needn’t worry about keeping the application alive. Build a Slightly More Useful Workflow Although it’s important to work through the obligatory “Hello, World” example as you’ve done, the workflow you built really didn’t do much. For the remainder of this tutorial, you’ll build a workflow application with the following features for backing up files in a folder: - When the workflow starts up, it creates the required backup folder, if necessary, using a Code activity. - Using a While activity, it loops through all the files in the “from” folder. - Within the activity inside the While activity, a Code activity performs the file copy. - The workflow receives its “from” and “to” folders passed as parameters from the host application. In setting up this simple workflow, you’ll learn how to use the While activity, and also how to pass parameters to a workflow from the host. In Visual Studio 2008, create a new project, again selecting Sequential Workflow Console Application as the template. Name the project BackupWorkflow. In the workflow designer, drag a Code activity, then a While activity, and finally, another Code activity into the designer. When you’re done, the designer should look like Figure 9. Note that each of the activities displays an error condition: the two Code activities require code to execute, and the While activity requires you to supply a condition so that it can determine when to stop executing. Figure 9. Create this simple workflow. The While activity allows you to drop a single activity within it (note the “Drop and Activity” prompt inside the activity). What if you want to execute multiple activities in a loop? Although you cannot drop multiple activities inside the While activity, for this very purpose, WF supplies a Sequence activity. The Sequence activity acts as a container for other activities, and as far as the While activity is concerned, it contains only a single activity once you place a Sequence activity inside it. Although this workflow only requires a single activity within the While activity, iif you were to add more than a single activity, you would need the Sequence activity. On the other hand, adding the Sequence activity adds significant overhead to the workflow’s execution—therefore, only add a Sequence activity if you need multiple activities within the While activity. As a “best practice”, consider minimizing the number of activities within the While activity, if at all possible.. Drag a Sequence activity inside the While activity. When you’re done, the workflow should resemble Figure 10. Figure 11. The completed layout should look like this. Configure Code Activities Double-click codeActivity1, creating the activity’s ExecuteCode handler. At the top of the code file, add the following statement: Imports System.IO using System.IO; Outside the procedure you just created, but inside the Workflow1 class, add the following declarations. You’ll use these declarations to keep track of the “from” and “to” folders, as well as the current file and total number of files as you’re copying files: Private currentFile As Integer Private files As FileInfo() Private _totalFiles As Integer Public Property TotalFiles() As Integer Get Return _totalFiles End Get Set(ByVal value As Integer) _totalFiles = value End Set End Property Private _toFolder As String Public Property toFolder() As String Get Return _toFolder End Get Set(ByVal value As String) _toFolder = value End Set End Property Private _fromFolder As String Public Property fromFolder() As String Get Return _fromFolder End Get Set(ByVal value As String) _fromFolder = value End Set End Property public string toFolder { get; set; } public string fromFolder { get; set; } public int totalFiles ( get; set; } private int currentFile; private FileInfo[] files; In the codeActivity1_ExecuteCode procedure, add the following code, which initializes the variables: currentFile = 0 files = New DirectoryInfo(fromFolder).GetFiles totalFiles = files.Count ' Create the backup folder. Directory.CreateDirectory(toFolder) currentFile = 0; files = new DirectoryInfo(fromFolder).GetFiles(); totalFiles = new DirectoryInfo(fromFolder).GetFiles().Count(); // Create the backup folder: Directory.CreateDirectory(toFolder); Select View | Designer to switch back to the workflow designer. Double-click codeActivity2, and add the following code to the activity’s ExecuteCode handler. This code retrieves the name of the current file to be copied, copies it to the “to” folder (overwriting existing files), and increments the current file counter: Dim currentFileName As String = _ Path.GetFileName(files(currentFile).Name) files(currentFile).CopyTo( _ Path.Combine(toFolder, currentFileName), True) currentFile += 1 string currentFileName = Path.GetFileName(files[currentFile].Name); files[currentFile].CopyTo( Path.Combine(toFolder, currentFileName), true); currentFile++; At this point, you’ve set up the Code activities and their ExecuteCode handlers, but you’re not done: You still need to configure the While activity, and you need to pass the fromFolder and toFolder values from the host application. In addition, you need to add code in the host that reports on the results of executing the workflow. Configure the While Activity The While activity in this workflow needs to execute as many times as there are files in the “from” folder. The code includes the currentFile and totalFiles variables—you simply need to expose that information to the While activity. Select View | Designer. In the designer, select the While activity. In the Properties window, find the Condition property, select the drop-down arrow to the right of the property’s value, and select Declarative Rule Condition (see Figure 11). You have the option of either defining a rule in the Properties window (Declarative Rule Condition) or creating a condition in code (Code Condition). For this demonstration, you’ll create the condition in the Properties window. Figure 12. Set up the declarative rule condition. Click the tiny “+” sign to the left of the Condition property, expanding the property. Set the ConditionName property to filesLeft. (Naming the condition allows you to use the same condition in a different place within your workflow.) Select the Expression property, and then select the ellipsis to the right of the property. Enter the condition shown in Figure 12. As you type, note the IntelliSense support. Clearly, the Rule Condition Editor window is able to retrieve information about the properties exposed by your workflow as you type. Although Visual Basic developers can enter the expression using Visual Basic syntax (using the Me keyword instead of this), the editor converts the syntax to C# syntax before it closes. Click OK to close the editor. Figure 13. Create the While activity’s rule condition. The rule condition specifies that your workflow should loop inside the While activity as long as the currentFile value is less than the total number of files. In effect, you’ve created a simple For loop using the While activity and a little bit of code. (You might be wondering if there’s some way to create a For Each loop using an activity. There is, in fact. The Replicator activity can accomplish this same goal, with less code. You can learn more about that activity in a later tutorial.) Configuring Input Parameters You still need to be able to specify the fromFolder and toFolder values from the host application. Because you’ll often need to pass parameters to a workflow, as you start it up, WF provides a standardized mechanism for passing parameters from the host to a workflow. As you did earlier, open the Module1.vb or Program.cs file in the code editor. Currently, the Main procedure creates the workflow instance using the following code: workflowInstance = workflowRuntime.CreateWorkflow(GetType(Workflow1)) WorkflowInstance instance = workflowRuntime.CreateWorkflow(typeof(BackupWorkflow.Workflow1)); In order to pass parameters to the workflow, you must create a generic dictionary, using a String type as the key, and an Object type as the value. Add property name and value pairs to the dictionary, and pass it as a second parameter in the call to the CreateWorkflow method. The workflow runtime engine passes the parameters by name to the workflow as it creates the instance. Because the workflow you created exposes public fromFolder and toFolder properties, you can easily pass these parameters from the host application. To finish your workflow, add the following code to the Main procedure, replacing the existing line of code that calls the CreateWorkflow method (feel free to alter the specific folders to match your own situation.): Dim parameters As New Dictionary(Of String, Object) parameters.Add("fromFolder", "C:\test") parameters.Add("toFolder", "C:\backup") workflowInstance = workflowRuntime.CreateWorkflow(GetType(Workflow1), parameters) var parameters = new Dictionary<string, object>(); parameters.Add("fromFolder", @"C:\test"); parameters.Add("toFolder", @"C:\backup"); WorkflowInstance instance = workflowRuntime.CreateWorkflow( typeof(BackupWorkflow.Workflow1), parameters); This technique has its own set of tricks. First of all, the parameter names must match public properties (not fields) in the workflow’s class. If you add an invalid property name to the dictionary, you won’t get a compile-time error—instead, you’ll find out at runtime that your property name is incorrect. In addition, the property names are case-sensitive, even when you’re writing code in Visual Basic. Display Workflow Results As you’ve seen earlier, the workflow runtime’s WorkflowCompleted executes once the workflow completes successfully. In addition, you’ve seen how to pass parameters to the workflow, using a custom dictionary. You can also retrieve values back from the workflow, in the WorkflowCompleted event handler: the WorkflowCompletedEventArgs that the .NET Runtime passes to this event handler exposes its OutputParameters collection. You can use the name of any public property within the workflow as a string index into this collection to retrieve the value of the property. To verify this behavior, in Module1.vb or Program.cs, modify the OnWorkflowCompleted event handler so that it includes the following code (in C#, the event handler appears at the end of a long line of code, which hooks up the WorkflowCompleted event handler using an anonymous method. You’ll find it easier to add this code if you reformat the existing code so that it looks similar to the WorkflowTerminated event handler): Console.WriteLine("Copied {0} file(s)", _ e.OutputParameters("TotalFiles")) Console.WriteLine("Press any key to continue...") Console.ReadKey() WaitHandle.Set() Console.WriteLine("Copied {0} file(s)", e.OutputParameters["TotalFiles"]); Console.WriteLine("Press any key to continue..."); Console.ReadKey(); waitHandle.Set(); Save and run your project. If you’ve followed the directions carefully, the workflow should copy all the files from the “from” folder to the “to” folder, and you should see the results of the workflow in the Console window. Conclusion In this tutorial, you’ve learned many of the basic concepts involved in creating and executing workflows, using the Windows Workflow Foundation. Of course, the workflows you created are contrived, and exist simply to demonstrate specific features of WF—you’ll need to consider, as you begin thinking about incorporating WF into your own environment, what kinds of tasks lend themselves to running as workflows. Consider this: because WF supports features like persistence, which allows the workflow to persist its state to a data store (SQL Server, by default), WF is best suited for applications in which you have a long-running task that must survive even if the host machine needs to be rebooted during the task’s execution. For simple applications like you’ve seen here, WF is truly overkill. For enterprise solutions in which you have tasks that might not complete for days, or months, WF provides a perfect solution. Now that you’ve gotten a taste for what you can do using WF, take the time to try out the remaining tutorials in this series, and then start building your own workflows. You’ll be amazed at the power in this rich framework. About the Author Ken Getz is a developer, writer, and trainer, working as a senior consultant with MCW Technologies, LLC. In addition to writing hundreds of technical articles over the past fifteen years, he is lead courseware author for AppDev (). Ken has co-authored several technical books for developers, including the best-selling ASP.NET Developer’s Jumpstart, Access Developer’s Handbook series, and VBA Developer’s Handbook series, and he’s a columnist for both MSDN Magazine and CoDe magazine. Ken is a member of the INETA Speakers Bureau, and speaks regularly at a large number of industry events, including 1105 Media’s VSLive, and Microsoft’s Tech-Ed.
https://docs.microsoft.com/en-us/previous-versions/dotnet/articles/dd692925(v=msdn.10)?redirectedfrom=MSDN
CC-MAIN-2020-10
en
refinedweb
Java Switch Case Statement With Simple Program Examples: Today, we are going to learn another new topic of Core Java tutorial series. That is Switch Case and if you are not reading our previous post about If-Else In Java then by using that link you can understand that. Switch Case statements used when there is several options are available, and we need to perform some specific task as per the selection. How to Use Switch Cases In Java the syntax for switch-case statements it looks like below: switch(variable) { case value1: statement1; case value2: statement2; case value3: statement3; . . . case valuen: statement; [default : default_statements;] } Java Switch Statement Example package java_Basics; public class SwitchCase_Example { public static void main(String[] args) { int i = 2; switch (i) { case 0: System.out.println("i is zero."); break; case 1: System.out.println("i is one."); break; case 2: System.out.println("i is two."); break; default: System.out.println("i is greater than 2."); } } } Output: i is two. Important Points Of Switch Statements - The case value cannot duplicate - The entered Value and the case Value must be the same data type. - The Value for Case must be literal or constant. you can not use the variable in case. - The Break statement is used inside the switch case to terminate the flow of statement sequence. - The Break statement is optional. If there is no break, then the flow of execution will continue to the next case. - The default statement in switch case is optional, and that can appear anywhere of the switch block. - Java Switch case statement make the code more readable by omitting if..else..if statements. - Make sure you are going to use Switch case string when you are going to use Java 7 otherwise you will get an exception. - You can use nested switch statements which means you can use a switch case statement inside another switch case. If You find anything wrong and if you want to add some more information then write in the comment section, and we are happy to update with your information.
https://www.softwaretestingo.com/java-switch-statement-case/
CC-MAIN-2020-10
en
refinedweb
This is a simple article which demonstrates how to use a Link Button control of ASP.NET in the web applications. This is a simple article which demonstrates how to use a Link Button control of ASP.NET in the web applications. This article explains on how to execute client-side functions when the link button is clicked. Example projects are created using Visual Studio 2008 and the project type created is Web Application. Purpose Calling a JavaScript function and passing the property value. Here is my UI code I have added a Grid View control of ASP.NET to display a list of products. The columns displayed are Product Name and Description. To display the Product Name, I have added a Link Button control which has the text value of the Product Name. I have added one custom property called "myCustomID" and set the property to the Product ID. Note: You can add many custom properties in controls and can access them wherever needed though you will not see them using the Intellisense while defining them. <%@ Page<html xmlns=""><head runat="server"> <title>Untitled Page</title> <script type="text/javascript" src="JS/jquery.js"></script> <script type="text/javascript">$(document).ready(function() { jQuery('[id$="LinkProducts"]').click(function() { var customID = $(this).attr('myCustomID');; alert(customID); }); }); </script></head><body> <form id="form1" runat="server"> <div><asp:GridView <Coluns> <asp:TemplateField <ItemTemplate><asp:LinkButton</asp:LinkButton> </ItemTemplate </asp:TemplateField><asp:BoundField </Columns </asp:GridView> </div> </form></body></html> In the code behind file, I have added a class called "Product" which has 3 public properties: ID, Name, and Description. public class Product{ public string Name { get; set; } public string ID { get; set; } public string Description { get; set; }} Now include the name space System.Collection.Generic for using the collections in your example. using System.Collections.Generic; Now create a collection of objects of type "Product" and define the property values. In a real-time application, you might get data from the databases. Add the following code in the Page Load event of the class: List<Product> ProductList = new List<Product>{ new Product(){Name="Product1", ID="1",Description = "Description1"}, new Product(){Name="Product2", ID="2",Description = "Description2"}, new Product(){Name="Product3", ID="3",Description = "Description3"}};ShowProducts.DataSource = ProductList;ShowProducts.DataBind(); The above code initializes a collection object ProductList with 3 Product type data and binds the data to the Grid View. When you run your application, your browser should be displayed as in the following: Now we need to write a client-side script for the Link Button Click event. I am using jQuery in my example. You can download the jQuery from the jQuery website or from the code attachment with this article. Include the jQuery in the page and then write the code for the click function. Get the custom property value and display as an alert. <script type="text/javascript" src="JS/jquery.js"></script><script type="text/javascript">$(document).ready(function() { jQuery('[id$="LinkProducts"]').click(function() { var customID = $(this).attr('myCustomID');; alert(customID); }); }); </script> Now click on the hyperlink in your browser and you should see that the JavaScript function is invoked and an alert with the ID of the Product Name is displayed. Conclusion In real-time applications, the custom property value will be used for other purposes like displaying corresponding client-side data for the value or hiding/showing some of the elements and calculating some of the values based on the requirements. This article is intentionally made short so that if someone searches for this requirement, he/she should be able to get the proper help. In my next article we will see how to execute server-side functions when the user clicks the Link Button. View All
https://www.c-sharpcorner.com/uploadfile/akkiraju/calling-javascript-function-from-link-button-in-asp-net/
CC-MAIN-2020-10
en
refinedweb
Unity: capturing audio from multiple microphones Posted by Dimitri | Aug 5th, 2012 | Filed under Featured, Programming . Not only that, but a SelectionGrid needs to be rendered, so the user can select the microphone that will capture the audio, here’s the code: using UnityEngine; using System.Collections; [RequireComponent (typeof (AudioSource))] public class MultipleMicrophoneInput : MonoBehaviour { //A boolean that flags whether there's a connected microphone private bool micConnected = false; //The maximum and minimum available recording frequencies private int[] minFreqs; private int[] maxFreqs; //A handle to the attached AudioSource private AudioSource goAudioSource; //The current microphone private int currentMic = 0; //The selected microphone private int selectedMic = 0; //An integer that stores the number of connected microphones private int numMics; //A boolean that flags whether the audio capture is active or not private bool recActive = false; //Use this for initialization void Start() { //An integer that stores the number of connected microphones numMics = Microphone.devices.Length; //Check if there is at least one microphone connected if(numMics <= 0) { //Throw a warning message at the console if there isn't Debug.LogWarning("No microphone connected!"); } else //At least one microphone is present { //Set 'micConnected' to true micConnected = true; //Initialize the minFreqs and maxFreqs array to hold the same number of integers as there are microphones minFreqs = new int[numMics]; maxFreqs = new int[numMics]; //Get the recording capabilities of each microphone for(int i=0; i < numMics; i++) { Microphone.GetDeviceCaps(Microphone.devices[i], out minFreqs[i], out maxFreqs[i]); //According to the documentation, if both minimum and maximum frequencies are zero, the microphone supports any recording frequency... if(minFreqs[i] == 0 && maxFreqs[i] == 0) { //...meaning 44100 Hz can be used as the recording sampling rate for the current microphone maxFreqs[i] = 44100; } } //Get the attached AudioSource component goAudioSource = this.GetComponent<AudioSource>(); } } void OnGUI() { //If there is at least as single microphone connected if(micConnected) { //For the current selected microphone, check if the audio is being captured recActive = Microphone.IsRecording(Microphone.devices[currentMic]); //If the audio from the current microphone isn't being recorded if(recActive == false) { //Case the 'Record' button gets pressed if(GUI.Button(new Rect(Screen.width/2-100, Screen.height/2-25, 200, 50), "Record")) { //Start recording and store the audio captured from the selected microphone at the AudioClip in the AudioSource goAudioSource.clip = Microphone.Start(Microphone.devices[currentMic], true, 20, maxFreqs[currentMic]); } } else //Recording is in progress { //Case the 'Stop and Play' button gets pressed if(GUI.Button(new Rect(Screen.width/2-100, Screen.height/2-25, 200, 50), "Stop and Play!")) { Microphone.End(Microphone.devices[currentMic]); //Stop the audio recording goAudioSource.Play(); //Playback the recorded audio } GUI.Label(new Rect(Screen.width/2-100, Screen.height/2+25, 200, 50), "Recording in progress..."); } //Disable the mic SelectionGrid if a recording is in progress GUI.enabled = !recActive; //Render the SelectionGrid listing all the microphones and save the selected one at 'selectedMic' selectedMic = GUI.SelectionGrid(new Rect(Screen.width/2-210, Screen.height/2+50,420,50), currentMic, Microphone.devices, 1); //If the selected microphone isn't the current microphone if(selectedMic != currentMic) { //Assign the value of currentMic to selectedMic currentMic = selectedMic; } } else // No microphone { //Print a red "No microphone connected!" message at the center of the screen GUI.contentColor = Color.red; GUI.Label(new Rect(Screen.width/2-100, Screen.height/2-25, 200, 50), "No microphone connected!"); } } } At the above script, eight member variables are being declared. The first one is a boolean that flags if there is at least one microphone connected (line 9). Then, there are two integer arrays, that will store the minimum and maximum frequencies supported by all connected microphones (lines 13 and 14). There’s no use capturing audio if it’s not going to be played back, so that’s why a AudioSource object is being declared at line 16. The currentMic and selectedMic integers are, not surprisingly, the variables that store the selected and current microphone from the SelectionGrid (lines 19 and 22). The next integer being declared stores the number of connected microphones (line 25) and the last variable being declared, a boolean, will help detect if the audio capture is active or not (line 28). The recording logic is being set up at the Start() method. There, the numMics member variable is initialized by storing the number of connected microphones (line 34). After that, an if statement checks whether numMics value is smaller than or equal to zero, in other words, if there are no microphones detected, a warning message is printed at the console (lines 37 through 41). However, if at least one microphone is present, the micConnected is set to true and the minFreqs and maxFreqs arrays are initialized to hold the same number of elements as there are connected microphones (lines 45 through 49). At this point, the recording capabilities of each device can be obtained, which is achieved by the for loop that calls the Microphone.GetDeviceCaps() static method for each element of the static Microphone.devices string array saving the maximum and minimum available recording frequencies at the minFreqs and maxFreqs arrays. As explained on the previous post and on the comments at the above script, the official documentation states that if the minimum and maximum frequencies are both zero for a given microphone, it can record at any sample rate. Therefore, to find out if that’s the case, still inside the for loop an if statement checks whether both minimum and maximum frequencies for a recording device are zero (lines 57 through 61). That being true, the maximum recording frequency for that device is set to 44100Hz (lines 52 through 62). Later, the elements at maxFreqs array are going to be used as one of the parameters to start the audio recording. And that’s it for this loop. The last thing the Start() method does is initialize the goAudioSource by obtaining a reference to the attached AudioSource on the same Game Object the script is linked to (line 65). Now, the OnGUI() method is the one that will render the controls that will make it possible to the user to select the microphone and also start and stop the audio recording. It’s composed basically by a single if statement that checks for the value of the micConnected boolean (line 72). If it’s false, no microphones were detected, so a red error message is printed at the middle of the screen (lines 113 through 118). If it’s true, the Microphone.IsRecording() method is called, passing the name of the current microphone to it. By doing so, the current selected microphone state is obtained, returning true if there is an audio capture in progress and false otherwise. This value is stored at the recActive boolean (line 75). Now, there’s one more if statement, and this one checks if the value of recActive is false (line 78), and if it is, the audio recording can be started when the user presses the ‘Record’ button, which will cause the Microphone.Start() method be called (line 84). The parameters passed to this method are the current microphone name string, a boolean that makes the recording loop over itself, the maximum time for the recording, which is being set at 20 seconds and the corresponding recording frequency that has been previously stored at the maxFreqs array (line 84). At this same line, the Microphone.Start() method return – an AudioClip – is being stored as the attached AudioSource‘s audio clip. All that is left to do is to create a button that stops the recording and plays the recently obtained audio clip. This is being done at lines 90 through 94. The ‘Stop and Play’ button calls the Microphone.Stop() method, passing the current microphone name as a parameter, so the audio capture with the current mic is stopped. When the Play() method is called from the goAudioSource member object, the audio clip is played back. Line 100 takes the inverse of the recActive boolean value to enable or disable the rendering of the selection grid. This means that, if an audio recording is in progress, the selection grid will be “grayed out” or unavailable to the user. This prevents accidentally changing to other microphone while the audio is being captured. Finally, the selection grid is rendered at line 103, and the integer corresponding to the pressed button from the grid is stored at selectedMic. And there’s a small if statement after that, which makes the value of the currentMic be the same as selectedMic, only if they are different (lines 106 through 110). That’s it! Here’s a couple of screenshots of the sample project in action: At the bottom, a selection grid displays all the connected devices that can be selected to capture audio. Note that the selection grid is disabled when an audio recording is in progress. Final Thoughts Thankfully, Unity allows us to capture audio from the microphone in the free version. Not only that, but the Microphone class is actually pretty straightforward, listing all the devices under a static string array and and returning the captured audio as an AudioClip, which is great, because the audio can be either played back or stored into a file. Again, this application has only been tested as an standalone application on a Windows PC and on the editor. It will probably work as a web player if the necessary permissions are set. I haven’t being able to test it on a mobile device to see if it works, but I would be surprised if it did. Downloads Be the first to leave a comment!
http://www.41post.com/4909/programming/unity-capturing-audio-from-multiple-microphones
CC-MAIN-2020-10
en
refinedweb
! DataGrid columns In the previous chapter, we had a look at just how easy you could get a WPF DataGrid up and running. One of the reasons why it was so easy is the fact that the DataGrid will automatically generate appropriate columns for you, based on the data source you use. However, in some situations you might want to manually define the columns shown, either because you don’t want all the properties/columns of the data source, or because you want to be in control of which inline editors are used. Manually defined columns Let's try an example that looks a lot like the one in the previous chapter, but where we define all the columns manually, for maximum control. You can select the column type based on the data that you wish to display/edit. As of writing, the following column types are available: - DataGridTextColumn - DataGridCheckBoxColumn - DataGridComboBoxColumn - DataGridHyperlinkColumn - DataGridTemplateColumn Especially the last one, the DataGridTemplateColumn, is interesting. It allows you to define any kind of content, which opens up the opportunity to use custom controls, either from the WPF library or even your own or 3rd party controls. Here's an example: <Window x: <Grid Margin="10"> <DataGrid Name="dgUsers" AutoGenerateColumns="False"> <DataGrid.Columns> <DataGridTextColumn Header="Name" Binding="{Binding Name}" /> <DataGridTemplateColumn Header="Birthday"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <DatePicker SelectedDate="{Binding Birthday}" BorderThickness="0" /> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> </DataGrid.Columns> </DataGrid> </Grid> </Window> using System; using System.Collections.Generic; using System.Windows; namespace WpfTutorialSamples.DataGrid_control { public partial class DataGridColumnsSample : Window { public DataGridColumnsSUsers.ItemsSource = users; } } public class User { public int Id { get; set; } public string Name { get; set; } public DateTime Birthday { get; set; } } } In the markup, I have added the AutoGenerateColumns property on the DataGrid, which I have set to false, to get control of the columns used. As you can see, I have left out the ID column, as I decided that I didn't care for it for this example. For the Name property, I've used a simple text based column, so the most interesting part of this example comes with the Birthday column, where I've used a DataGridTemplateColumn with a DatePicker control inside of it. This allows the end-user to pick the date from a calendar, instead of having to manually enter it, as you can see on the screenshot. Summary By turning off automatically generated columns using the AutoGenerateColumns property, you get full control of which columns are shown and how their data should be viewed and edited. As seen by the example of this article, this opens up for some pretty interesting possibilities, where you can completely customize the editor and thereby enhance the end-user experience.
https://wpf-tutorial.com/hu/89/the-datagrid-control/datagrid-columns/
CC-MAIN-2020-10
en
refinedweb
Boto3, python and how to handle errors I just picked up python as my go-to scripting language and I am trying to figure how to do proper error handling with boto3. I am trying to create an IAM user: def create_user(username, iam_conn): try: user = iam_conn.create_user(UserName=username) return user except Exception as e: return e When the call to create_user succeeds, i get a neat object that contains the http status code of the API call and the data of the newly created user. Example: {'ResponseMetadata': {'HTTPStatusCode': 200, 'RequestId': 'omitted' }, u'User': {u'Arn': 'arn:aws:iam::omitted:user/omitted', u'CreateDate': datetime.datetime(2015, 10, 11, 17, 13, 5, 882000, tzinfo=tzutc()), u'Path': '/', u'UserId': 'omitted', u'UserName': 'omitted' } } This works great. But when this fails (like if the user already exists), i just get an object of type botocore.exceptions.ClientError with only text to tell me what went wrong. Example: ClientError('An error occurred (EntityAlreadyExists) when calling the CreateUser operation: User with name omitted already exists.',) This (AFAIK) makes error handling very hard because i can't just switch on the resulting http status code (409 for user already exists according to the AWS API docs for IAM). This makes me think that i must be doing something the wrong way. The optimal way would be for boto3 to never throw exceptions, but juts always return an object that reflects how the API call went. Can anyone enlighten me on this issue or point me in the right direction? Thanks a lot! Use the response contained within the exception. Here is an example: import boto3 from botocore.exceptions import ClientError try: iam = boto3.client('iam') user = iam.create_user(UserName='fred') print "Created user: %s" % user except ClientError as e: if e.response['Error']['Code'] == 'EntityAlreadyExists': print "User already exists" else: print "Unexpected error: %s" % e The response dict in the exception will contain the following: ['Error']['Code']e.g. 'EntityAlreadyExists' or 'ValidationError' ['ResponseMetadata']['HTTPStatusCode']e.g. 400 ['ResponseMetadata']['RequestId']e.g. 'd2b06652-88d7-11e5-99d0-812348583a35' ['Error']['Message']e.g. "An error occurred (EntityAlreadyExists) ..." ['Error']['Type']e.g. 'Sender' For more information see botocore error handling. [Updated: 2018-03-07] The AWS Python SDK has begun to expose service exceptions on clients (though not on resources) that you can explicitly catch, so it is now possible to write that code something like this: import boto3 from botocore.exceptions import ClientError, ParamValidationError try: iam = boto3.client('iam') user = iam.create_user(UserName='fred') print "Created user: %s" % user except iam.exceptions.EntityAlreadyExistsException: print "User already exists" except ParamValidationError as e: print "Parameter validation error: %s" % e except ClientError as e: print "Unexpected error: %s" % e Unfortunately, there is currently no documentation for these exceptions. From: stackoverflow.com/q/33068055
https://python-decompiler.com/article/2015-10/boto3-python-and-how-to-handle-errors
CC-MAIN-2020-10
en
refinedweb
How can I prevent containers from accessing Amazon EC2 instance metadata in Amazon ECS? Last updated: 2020-02-11 I want to prevent containers from accessing Amazon Elastic Compute Cloud (Amazon EC2) instance metadata in Amazon Elastic Container Service (Amazon ECS). Short Description If you run containers in an Amazon EC2 instance, it's a best practice for security reasons to avoid allowing your applications to assume an instance role. Amazon ECS provides the following networking modes to run a task with external connectivity: - The bridge mode. The task uses Docker's built-in virtual network. - The awsvpc mode. The task allocates an elastic network interface, and all the containers share the same networking namespace. - The host mode. The containers share the host's networking namespace. The following resolution shows you how to prevent containers from accessing the instance metadata using the bridge and awsvpc networking modes. Note: It's not possible to prevent access with the host networking mode, because the Amazon ECS agent runs on the host networking namespace and requires access to it. Resolution For tasks using the awsvpc networking mode, add the following parameter to the Amazon ECS configuration file /etc/ecs/ecs.config: ECS_AWSVPC_BLOCK_IMDS=true For tasks using the bridge networking mode, use iptables to block the network traffic from the docker0 bridge. You can specify the configuration of iptables in your custom Amazon Machine Image (AMI) or at launch in Amazon EC2 instance user data. See the following example for Amazon Linux 2 AMIs. Note: If you choose Amazon EC2 instance user data, the following configuration must be written before the Docker daemon starts. The cloud-boothook user data format executes earlier in the boot process than most services. #cloud-boothook yum install iptables-services -y cat <<EOF > /etc/sysconfig/iptables *filter :DOCKER-USER - [0:0] -A DOCKER-USER -d 169.254.169.254/32 -j DROP COMMIT EOF systemctl enable iptables && systemctl start iptables To include this configuration with your existing user data, use the MIME multi part archive. See the following example: Content-Type: multipart/mixed;> /etc/ecs/ecs.config --==BOUNDARY==-- Did this article help you? Anything we could improve? Need more help?
https://aws.amazon.com/premiumsupport/knowledge-center/ecs-container-ec2-metadata/
CC-MAIN-2020-10
en
refinedweb
In a previous article, we discussed in detail about the decorator pattern and how it helps in maintaining code integrity and satisfies a couple of design principles in its structuring. In this article we'll discuss about how we can implement the decorator pattern in dotnet core. Various popular DI (Dependency Injection) containers such as Ninject and Autofac have different code syntaxes to implement decorator pattern. In theory, we inject a derivative of an interface as a constructor parameter to a wrapper component which itself is a derivative of the same interface. Read: Understanding the Decorator Pattern Let's take our previous example of the Reader class: public interface IDataReader { List<Data> ReadData(); } public class DataReader : IDataReader { public List<Data> ReadData() { var data = new List<Data>(); // some logic for reading data data.Add(...); return; } } In the above examples, both the classes DataReader and FormattedDataReader implement the interface IDataReader and the FormattedDataReader expects a parameter of its base type viz. IDataReader. Now we pass an instance of DataReader for the FormattedDataReader constructor and the whole stuff works fine. This approach is implemented in a Ninject container as follows: IKernel container = new StandardKernel(); container.Bind<IDataReader>() .To<FormattedDataReader>() .InSingletonScope() .WithConstructorArgument<IDataReader>(container.Get<DataReader>()); We instruct the Ninject container to pass in an instance of the DataReader class as parameter to the constructor of the type FormattedDataReader which is to be substituted whenever an instance of type IDataReader is requested. And a similar approach follows in Autofac container as follows:(); That's a bit complicated when compared to Ninject but in simple terms we instruct the Autofac container to pass in an instance of the class DataReader which is registered as a named type under key "reader" to the constructor of the type FormattedDataReader, whenever an instance of type IDataReader is requested. Coming to the implementation using DI container provided under ASP.NET Core MVC, it's no straightforward approach since the DI container doesn't contain any extension method to specify the constructor parameters to be passed when a service type is called. Hence if we go by the below approach, which is the conventional, services.AddSingleton<IDataReader, FormattedDataReader>(); we encounter a circular reference runtime error, since the DI container blindly substitutes FormattedDataReader whenever it sees for a type IDataReader. Now since the FormattedDataReader type expects an instance of type IDataReader in its constructor, the DI container windsup into a circular loop. Now the solution? There's a workaround, if not the alternative for implementing such a dependency resolution.. While this works, I don't see this an elegant method since we're explicitly creating an object using the new keyword. For this, we can use a method CreateInstance() from the class ActivatorUtilities under the Microsoft.Extensions.DependencyInjection namespace. The method takes in a type parameter followed by a service collection instance if needed to be used for resolution and any constructor parameters for that instance which is returned. The above piece of code then becomes, services.AddSingleton<IDataReader>( x => ActivatorUtilties.CreateInstance<FormattedDataReader>(x, ActivatorUtilties.CreateInstance<DataReader>(x) ) ); This is one example of the limitations of the DI container provided in the ASP.NET Core MVC. Although the DI container has its own advantages of being lightweight and performant, such scenarios might make it a bit complex. isn't it? Other Structural Patterns: The Decorator Pattern (this) Published 4 months ago
http://referbruv.com/blog/posts/exploring-aspnet-core-fundamentals-implementing-the-decorator-pattern
CC-MAIN-2020-10
en
refinedweb
This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 12.2, “How to write text files in Scala.” Problem You want to write plain text to a file in Scala,() Note that you’ll generally want to add a newline character ( \n) to each line you print with these approaches. (If you don’t, you’ll get one long line of output.). Update: See the Comments section below for a note about explicitly declaring the charset when using PrintWriter. Note that PrintWriter constructors let you specify the charset, but FileWriter does not. The Java 8 FileWriter Javadoc suggests that you use an OutputStreamWriter on a FileOutputStream to specify the file encoding. Example Scala file-writing methods As an example of how to use these file-writing methods, here are two writeFile methods from my little Scala file utilities project: import java.io._ /** * write a `Seq[String]` to the `filename`. */ def writeFile(filename: String, lines: Seq[String]): Unit = { val file = new File(filename) val bw = new BufferedWriter(new FileWriter(file)) for (line <- lines) { bw.write(line) } bw.close() } /** * write a `String` to the `filename`. */ def writeFile(filename: String, s: String): Unit = { val file = new File(filename) val bw = new BufferedWriter(new FileWriter(file)) bw.write(s) bw.close() } Note that those methods don’t handle exceptions, but you can use them as the start of your own methods, if you’d like. Wow, strangely hard to find… Wow, strangely hard to find good simple info on this, thanks! But wouldn't it be better to specify the output encoding? ex: val pw = new PrintWriter(new File("hello.txt"), "UTF-8") Explicitly declaring the charset Sure, I have no problem with explicitly declaring the charset. I know that PrintWriteruses the “default charset for this instance of the JVM,” but it is probably more clear to declare “I want UTF-8” or “I want UTF-16,” rather than leaving that up to the JVM implementation. Thanks for the comment, that’s a good point.
https://alvinalexander.com/scala/how-to-write-text-files-in-scala-printwriter-filewriter
CC-MAIN-2020-10
en
refinedweb
A fast BigInt.js in an evening, compiling C++ to JavaScript A few days ago I stumbled upon an article: on the V8 blog. I had been busy at work with trying to figure out ways to optimize i32 and i64 operations for our C/C++ to JavaScript compiler Cheerp; this seemed like a fun side project to experiment on. The goal: Implement a pure JavaScript library, callable by some code like: var one = BigInt("1"); var A = BigInt("1"); var B = BigInt("1");for (var i=1; i<=1000; i++) { A = BigInt.multiply(A, B); B = BigInt.add(B, one); }console.log("factorial(1000) is " + A); The plan: - finding a C/C++ library for arbitrary precision integer arithmetic. - adapt/implement a (basic) interface (eg. a constructor that accepts a JavaScript String, multiply(a,b), add(a,b), a.toString() are required from the above example). - adapt the code and feed it to the Cheerp compiler. - test it and benchmark it. - go to bed. Choosing a C/C++ BigInt library I googled a few keywords, ended up on Boost.Multiprecision. In particular, they support 3 integer types backends: cpp_int, gmp_int and tom_int. From Boost’s classification: gmp_int (based on GMP) is the fastest, cpp_int (Boost’s creation) the more versatile (?) while tom_int have no licence restrictions. I wrestled a bit with Boost and GMP build systems (I had to make them work with the Cheerp compiler) before turning to LibTomMath and managing at the first attempt. It’s a pure C library with a mainly educational purpose. No dependencies required, very liberal license, seemed the perfect choice for my purpose. [[ps: while publishing the article I realized that there is a sister library that promise to be even faster: TomsFastMath. I will give it a try at some point]] API Wrapping the memory management and C-style functions calls in a C++ class was needed and consulting the library manual it turned out straightforward (and required no understanding of how a BigInt library internally works). This is, for example, a function to sum 2 BigInts: static BigInt* BigInt::add(const BigInt& a, const BigInt& b) { BigInt* res = new BigInt(); //mp_add is the libtommath backend function //wrapper takes care of checking the error code returned by mp_add wrapper( mp_add(&a.number, &b.number, &res->number) );//Every resource will be garbage collected by JavaScript's GC return res; } Then I played a bit with calculating some factorials, fixed the inevitable errors, and I had a working C++ class. Compile it with Cheerp Cheerp aims to be just a regular C/C++ compiler. You call it like: /opt/cheerp/bin/clang++ source_file.cpp -o output.js -target cheerp In the basic settings, it takes in a cpp file in and it outputs a JavaScript file (wasm / wasm+js / asmjs being other possible output). cd build_libtommath && /opt/cheerp/bin/clang *.c -c -O3 -target cheerp && cd .. && /opt/cheerp/bin/clang++ wrapper.cpp -c -Ilibtommath -O3 -target cheerp && /opt/cheerp/bin/clang++ build_libtommath/*.bc wrapper.bc -o wrapper.js -O3 -target cheerp -cheerp-pretty-code Here I had to build the library files into .bc files (LLVM internal representation) then my wrapper.cpp into a .bc file, then all .bc files together into a JavaScript file. It builds, perfect. Cheerp provides a C++11 attribute [[cheerp::jsexport]], to preserve class names and interfaces into JavaScript, so it was just needed to tag the class with it and now it could be called as a library. Now I went back to implementing the API, added a few more static methods that were missing in the wrapper class: subtraction, division, remainder, a constructor accepting native JavaScript String, and a toString() member function: #include <client/types.h> //Cheerp provided header //that forward declares String methodsclient::String* BigInt::toString(int radix) const { int dim = 0; wrapper( mp_radix_size(&number, radix, &dim) ); std::string std_string; std_string.resize(dim-1); wrapper( mp_toradix(&number, &std_string[0], radix) ); return new client::String( std_string.c_str() ); } Here is the toString implementation. client::String is just the JavaScript string type. A String constructor from a C char* is also provided in the header file. Recompiling everything (by now I had a script in place), a couple of more bug fixing, and …with more It works! 171! = Infinity Test & benchmark I ran some tests, it seemed to work well enough, it was late… I will need to get back to checking things for real at some other point. I found some great resources on BigInt around, and one had a very easy to hack benchmarking page, that allowed to add your very own implementation of BigInt to be pit against the others directly on the client-side. You could try it for yourself: BigInt’s benchmark. Ideally, try it on different browsers/devices. On Chrome the results are not very encouraging (= is the last among the considered libraries), while on Firefox and Safari the Cheerp backed BigInt implementation is clearly the fastest in the first 2 families of benchmarks. Why it matters the difference between Chrome and the others? Chrome has a good BigInt native implementation (native != relying on pure JavaScript), and some libraries default to it if available. [[I will need to do a deeper dive into the difference and do some more testing on other devices, I may be back with a second article]] There are lots of benchmarks, I would advise to concentrate on addition/subtraction one, that are the only ones in which this library is competitive (and luckily, they are at the top of the page). What does all this mean? So, by being very restrictive I could claim to be “creator of the best addition and subtraction BigInt library that exists outside Chrome”. A part nonsensical titles (that I will brag nonetheless), the idea that in a few hours, requiring no domain knowledge I was able to create a pure JavaScript library that performs a complex task at close to peak performance seems great to me. I don’t see anything coming in the way of you repeating the same outlined process for [fill in with whatever library you may need]. The problem is not in finding great C/C++ libraries, nor in adapting the few lines of code required. Learning to work with the Cheerp compiler may take a few tries, we are trying to render less steep the process, and there are lots of resources to get you started.
https://medium.com/leaningtech/a-fast-bigint-js-in-an-evening-compiling-c-to-javascript-db61ae733512?source=collection_home---5------4-----------------------
CC-MAIN-2020-10
en
refinedweb
cristian.botauBAN USER This is actually O(N), because you have the recurrence relation: T(n) = 2*T(n/2) + O(1) For O(log N) you should do only one recursive call, i.e: T(n) = T(n/2) + O(1) You can obtain that be reusing the result of "power(a, n / 2)" to compute "power(a, n - n / 2)", and avoid the second recursive call. Cheng Q.'s approach is correct. Here is an implementation for this idea. I use the array pos, where pos[i] = the left most position where count_1 - count_0 = i Time complexity: O(N) Space complexity: additional O(N) #include <iostream> #include <algorithm> #include <cstring> const int MAX_N = 100; const int INF = 0x3F3F3F3F; using namespace std; int solve(int a[MAX_N], int n) { int b[2*MAX_N + 1]; int *pos = b + MAX_N; // pos points to the middle of b so that we can use negative indices for accessing pos elements for (int i = -n; i <= n; ++i) pos[i] = INF; int result = 0; for (int i = 0, count = 0; i < n; ++i) { count += a[i] ? 1 : -1; result = max(i - pos[count], result); pos[count] = min(i, pos[count]); } return result; } int main() { int a[MAX_N] = {1,1,1,1,1,0,0,0,0,0,0,0,1}; //int a[MAX_N] = {0,0,1,0,1,0,1,0,1}; cout << solve(a, 13) << endl; return 0; } The decision to take out the a[start] out of the sequence if a[start] != more and a[end] != more doesn't seem to lead to a correct answer for some cases. Take, for example, a = 1111100000001 @dmxmails: The complexity can be further reduced if you use a clever data structure that supports fast insertion at an arbitrary position. This can be achieved using a modified skiplist (expected insertion time O(logN)) or a modified balanced binary tree for which we store the in each node the number of nodes in the subtree rooted at that node (worst case insertion time: O(logN)). So, the final complexity of the algorithm would be O(N*log(N)). You can solve the problem using the dynamic programming technique. Construct the matrix match, where match[i][j] is true iff the first i characters of a match the first j characters of b. The recurrence relation is the following: match[i][j] = (match[i-1][j-1] && character_matches(a[i - 1], b[j - 1])) || /* eg: (abc, a?c) => (abcd, a?cd) */ (match[i-1][j] && b[j - 1] == '*') || /* eg: (ab, a*) => (abc, a*) */ (match[i][j-1] && b[j - 1] == '*') /* eg: (abc, ab) => (abc, ab*) */ And the basic case is: match[0][0] = true Time complexity: O(A*B), Space complexity: O(A*B), can be reduced to O(A+B) where A,B = length of A, respectively B Here is the code: #include <iostream> using namespace std; bool isCharMatch(char a, char b) { return (b == '?') || (b == '*') || (a == b); } // match[i][j] = (match[i-1][j-1] && matches(a[i - 1], b[j - 1])) || // (match[i-1][j] && b[j - 1] == '*') || // (match[i][j-1] && b[j - 1] == '*') bool isMatch(const string& a, const string& b) { bool match[a.length() + 1][b.length() + 1]; for (int i = 0; i <= a.length(); ++i) for (int j = 0; j <= b.length(); ++j) { match[i][j] = (i == 0) && (j == 0); if (i > 0 && j > 0) match[i][j] |= match[i-1][j-1] && isCharMatch(a[i-1], b[j-1]); if (i > 0 && j > 0) match[i][j] |= match[i-1][j] && b[j-1] == '*'; if (j > 0) match[i][j] |= match[i][j-1] && b[j-1] == '*'; } return match[a.length()][b.length()]; } void test(const string& a, const string& b) { cout << "match(" << a << ", " << b << ") = " << isMatch(a, b) << endl; } int main() { test("abab", "*b*"); test("abab", "a**b"); test("abab", "a**b"); test("", ""); test("ab", ""); test("ab", "*"); test("", "**"); test("", "*?"); return 0; } I've updated answer to contain the program and tests used for the program. Hopefully I didn't leave any important test cases out. If you find any failing input data please post it ;) @Apostle: Oh, sorry, I haven't paid attention to the requirement (I thought that the largest square was asked for). @Apostle: "1. No. It's an O(N^2) algorithm. each element of the matrix is traversed at most thrice." I agree with Chih.Chiu.19. It seems to be O(N^3) by your explanation. What happens with your algorithm on an NxN matrix filled all with 1? While doing the diagonal parsing (looking for corners) what happens after you have processed a corner? Continue parsing the diagonal or maybe you skip the whole diagonal? (otherwise I don't see how your algorithm runs in less than O(N^3)). That's because it doesn't make sense in modular arithmetic (floating point numbers don't make much sense in modular arithmetic). Actually, it would make sense if you would compute the modular multiplicative inverse of x^abs(y) if y is negative, but that can be computed only if x^abs(y) and z are coprimes (so the problem might not always have an answer). Here is an O(log(y)) algorithm. It is the classical fast exponential algorithm. I won't get into details into it because it is a simple algorithm and can be found easily by googling it. However, the trick to this problem is to watch out for arithmetical overflows: - since x^y can grow really big, you can't just compute x^y and then apply % z, since it will likely overflow; so you need to apply modulo z operation on each multiplication; - furthermore for high values of z even one multiplication can overflow (take for instance x = 2 billions - 1, y = 2, z = 2 billions), so you need to use the long long type for each multiplication; In order to make sure there is no arithmetic overflow happening, I've defined the modMul(x, y, z) operation which performs the operation "(x * y) % z" and guarantees there is no overflow. inline int modMul(int x, int y, int z) { int result = ((long long)x * y) % z; return result; } int power(int x, int y, int z) { if (y == 0) return 1; int sqrt = power(x, y / 2, z); int result = modMul(sqrt, sqrt, z); if (y % 2 == 1) result = modMul(result, x, z); return result; } The line: int y = power(x,n-1/2); is incorrect "/" takes precedence before "-", so the expression n-1/2 will actually evaluate to n. Btw, since n is odd you could just write n/2 (it will truncate the result, and it is equivalent to (n-1)/2). Also, your solution will likely overflow since x^y can easily get over 2^31-1. You need to apply "% z" to each multiplication inside the power() function. What if x and z are very large, like 2^31-10? Even if you use "% z" for each multiplication it is not ok, for example x*x will overflow. So, when performing a multiplication you need to use long long ints (which can hold numbers up to 2^63-1). For example, line "return y*y" should be "return ((long long)y * y) % z" For a correct implementation, which also works for large int values for x, y, z check my answer. I am not sorting and I'm not actually making any bucket. The buckets are used for algorithm explanation. You basically need the following operations: - find x - the smallest element in input vector that (x >= 1 and x < 2) - easily done in O(N) with a simple pass through the array - take the smallest element & second smallest element from the input array (and ignore the first element from triple) - doable in O(N) - find x the highest element s.t. (x >= 0.5 and x < 1) - O(N) - etc. To generalize, the algorithm uses operations like: find the first/second lowest/highest element which lies in the interval [a..b). These operations are doable in O(N). Consider the following buckets: (0..0.5), [0.5..1), [1..2), [2..inf). Obviously, we ignore numbers in [2..inf). Now basically we need to treat all cases of choosing 3 numbers from the 3 buckets. We only need to look at the following cases (the other cases are "worse" or are covered by these): 1. If possible, choose the smallest element from bucket [1..2) => for the 2nd and 3rd we need to take the smallest 2 elements available. If sum < 2 then return true. 2. If possible, choose the two smallest elements from bucket [0.5 .. 1) => for the 3rd we need to take the smallest element available. If sum < 2 then return true; 3. If possible, choose the highest element from bucket [0.5 .. 1) => if possible, for the 2nd and 3rd take the highest and the second highest from bucket (0 .. 0.5). If sum > 1 then return true. 4. If possible, choose the highest 3 elements from bucket (0..0.5). If sum > 1 then return true. If none of the cases above found a solution then return false. Space complexity: O(1), you don't need to explicitly store numbers in buckets. Time complexity: each operation (e.g.: find smallest element from bucket [1..2), etc.) can be done in O(N). There is a constant number of these operations => overall complexity O(N) LATER EDIT: Since the answer was down-graded without any question or explanation why it would be wrong, here is the actual code and the associated tests. Hopefully I didn't forget any relevant test case. The code could be optimized more and be more condensed, but I tried to make it as clear as possible (regarding to the explanations above and the space and time requirements). #include <iostream> #include <vector> #include <algorithm> #include <iterator> using namespace std; const float INF = 1000; bool inInterval(float x, float st, float end) { return x >= st && x < end; } bool findFirstSmallest(const vector<float>& a, float start, float end, float &res) { int found = 0; res = INF; for (int i = 0; i < a.size(); ++i) if (inInterval(a[i], start, end)) { ++found; res = min(res, a[i]); } return found >= 1; } bool findFirstHighest(const vector<float>& a, float start, float end, float &res) { int found = 0; res = -INF; for (int i = 0; i < a.size(); ++i) if (inInterval(a[i], start, end)) { ++found; res = max(res, a[i]); } return found >= 1; } bool findSecondSmallestSecondHighestThirdSmallest findThirdHighest solve(const vector<float>& a, float& x, float &y, float& z) { if (findFirstSmallest(a, 1, 2, x) && findFirstSmallest(a, 0, 1, y) && findSecondSmallest(a, 0, 1, z)) if (x + y + z < 2) return true; if (findFirstSmallest(a, 0.5, 1, x) && findSecondSmallest(a, 0.5, 1, y) && (findFirstSmallest(a, 0, 0.5, z) || findThirdSmallest(a, 0.5, 1, z) )) if (x + y + z < 2) return true; if (findFirstSmallest(a, 0.5, 1, x) && findFirstHighest(a, 0, 0.5, y) && findSecondHighest(a, 0, 0.5, z)) if (x + y + z >= 1) return true; if (findFirstHighest(a, 0, 0.5, x) && findSecondHighest(a, 0, 0.5, y) && findThirdHighest(a, 0, 0.5, z)) if (x + y + z >= 1) return true; return false; } void test(const vector<float>& a) { cout << "Test: "; copy(a.begin(), a.end(), ostream_iterator<float>(cout, " ")); cout << endl; float x, y, z; if (solve(a, x, y, z)) cout << "Solution: " << x << " " << y << " " << z << endl; else cout << "Solution not found!" << endl; cout << endl; } #define arrSize(a) (sizeof(a) / sizeof(a[0])) int main() { float test1[] = {0.1, 0.2, 0.2, 0.3, 2.0, 3.0}; test(vector<float>(test1, test1 + arrSize(test1))); float test2[] = {0.1, 0.3, 0.3, 0.4, 2.0, 3.0}; test(vector<float>(test2, test2 + arrSize(test2))); float test3[] = {0.1, 0.1, 0.2, 0.6, 2.0, 3.0}; test(vector<float>(test3, test3 + arrSize(test3))); float test4[] = {0.5, 0.6, 0.6, 2.0, 3.0}; test(vector<float>(test4, test4 + arrSize(test4))); float test5[] = {0.6, 0.6, 2.0, 3.0}; test(vector<float>(test5, test5 + arrSize(test5))); float test6[] = {0.6, 0.6, 1.0, 2.0, 3.0}; test(vector<float>(test6, test6 + arrSize(test6))); float test7[] = {0.1, 0.2, 0.5, 1.0, 2.0, 3.0}; test(vector<float>(test7, test7 + arrSize(test7))); float test8[] = {0.1, 0.7, 0.6, 1.0, 2.0, 3.0}; test(vector<float>(test8, test8 + arrSize(test8))); float test9[] = {0.5, 0.5, 0.6, 1.0, 2.0, 3.0}; test(vector<float>(test9, test9 + arrSize(test8))); float test10[] = {1.6, 1.2, 1.0, 2.0, 3.0}; test(vector<float>(test10, test10 + arrSize(test10))); return 0; } It is not 3SUM-hard. The data has other characteristics which might make the problem solvable in linear time: - numbers are positive - sum must lie in an interval Check my answer on how we can "exploit" these relaxed requirements in order to obtain a linear algorithm. No, it is O(N^2) because the largestArea() function runs in O(N) time. This is because if you count the total operations done in the most inner loop "while (!St.empty())" you'll see it is O(N) (you can't pop more than N elements). @nitingupta180: Nice & optimal solution. The algorithm for largestArea() could be made a little more faster, if you see that you only need the first loop (for computing L). That loop can be modified like so: whenever you pop an element from the stack you update the result with the rectangle corresponding to that element (you know where it starts and you know that it ends here at i). You also need to take care of elements not popped at the end of the loop. However, I think that the solution that computes both L and R is easier to understand. The solution is correct, but there is a small problem with the notation of the vector: You are multiplying a 2x1 matrix with a 2x2 matrix, and that is not possible. Either swap places of vector and matrix, or define the vector horizontally (i.e 1x2 matrix). | f(n-1) f(n-2) | x | 2 1 | = | f(n) f(n-1) | | 2 0 | For that you need to use additional data (like a hash map) for determining effficiently the position in the heap. Try googling for how decrease key is implemented efficiently for a heap. However I recommend that you use a std::set (actually multiset or map in order to deal with duplicate elements) instead of a heap. That will make implementation of the algorithm much easier. I used the term "heap" in the solution description because of its main purpose (to keep track of the minimum). @arwin: I hope i understood your question properly. Here is the response: When we have to delete elements from j to j' it doesn't take O(logN) time. It takes (j' - j)*O(logN). However, if you count the elements that are deleted for all the steps the algorithm performs then there are at most N elements to delete (because when you delete an element you increase j', it is never decremented and it goes up to N). Or to put it in another way: throughout the running of the algorithm, you heap.remove() each element of the array at most once. Like your algorithm: simple, concise and general. However, no vote for you until you put a proper brief description in words of the algorithm. Yeah, my bad :) Although, if the order doesn't matter, I don't see how the fact that the list is sorted may be helpful. I think the key to solving this problem is to use the information that the list of words is sorted (i.e.: you already have the word list preprocessed to help you with the query). Consider (for complexity computation): N - number of words in the word list (max. 1 million) L - size of a word (max. 40) A - size of the alphabet (= 26) For 1 letter distance you can use the following algorithm: 1. Generate all the possible words that are 1 letter distance away from the query word - this has the complexity O(L*A) 2. Look up each of the generated words in the word list using a binary search: - the look up of an individual word is O(L*logN) - we have O(L*A) lookups => final complexity is O(L^2*A*logN) which is roughly (not considering the hidden constant) about 832.000 operations which is better than O(L*N) which is roughly 40 million operations. For distance = 2, this algorithm performs worse than the O(L*N) version. Later edit: @warrior: in case your last reply was not referring to my comment then just ignore what I just wrote :) I didn't say that your solution is incorrect (it is actually correct), but i don't like the fact that it uses backtracking. Regarding to what I proposed you misunderstood one thing: it doesn't permute the remaining digits, it finds the next permutation for the whole number. Here is an example: X = [1, 6, 7, 3, 2], Y = [6, 7, 8, 9, 1] Algorithm: [6 ?] --> [6, 7, ? ] -- no remaining larger digits? ---> [6, 7, 3, 2, 1] -- next permutation --> [7, 1, 2, 3, 6] Binary search trees have the property that the inorder traversal of the tree is a sorted array. The reciprocal of this property is also true. So the easiest algorithm would be: 1. array a = inorder-traversal(tree) 2. check if a is sorted increasingly Of course, you can merge those two steps into one and not use the additional array. The algorithm looks incorrect. Please correct me if I didn't understand it properly: you basically check for every node if (direct left child < parent) and (direct right child > parent). If so, in the case below your algorithm returns a false positive: 5 / \ 2 7 / \ 1 10 evaluateExpressionPow has side effects. After a call of pow(a, b), if I call pow(c, d) where c != a it will use the pp computed for a (which is obviously wrong). You don't need to backtrack if you are out of digits that are higher then the one in y. Why not just generate the largest possible number with the remaining digits (even though it will be lower then y) and then run next permutation algorithm on the result? You can solve it even more efficiently (O(N)) using a dequeue instead of min-heap. Check my answer, it includes explanation for the min-heap version as well as for the dequeue version. @bambam: Using '\0' to end an array of ints is a little bit creepy. Why not just use 0 instead? (it's basically the same value and you don't force the compiler to cast your char to int) I haven't analyzed your solution in depth but those inner loops makes me a little bit skeptic about the O(N) complexity you're claiming. (min2 >= min1) and (p + min1 >= k) implies that (p + min2 >= k) Hence use of min2 is redundant. This can be done in O(N*log(N)) time using a min-heap or O(N) using a dequeue. Basically, the algorithm works like this: for each index i in the array computes the longest subarray that ends at position i and satisfies the requested condition. Now, let's consider we're at index i, and [j ... i-1] is the longest subarray found in the previous iteration (for i-1). In order to compute the subarray for this iteration we need to find the smallest j' >= j such that min(a[j'], .., a[i-1]) + a[i] >= K. Now, the trick is how to find j' efficiently. A first approach is to use a min-heap and start with j' = j and then increment j' and remove element a[j'] from heap until the condition holds (or you reach i). Since j is incremented at most N times => there are a total of N calls to heap.remove_element. Since i is incremented N times => there are N calls to heap.insert_element. => final complexity O(N*log(N)). A second approach, which is a little bit trickier (I suggest getting a pen and paper for this) is using a deque instead of heap. The constructed deque will have these important properties: - in the front of the deque is index of the minimum element in seq [j..i-1] (just like the heap) - the second element is the index of the minimum element in the sequence that remains after removing the first minimum along with the elements in front of it; - and so on. So basically if dequeue = [m1, m2, ...] then the initial sequence looks like this [j ... m1 ... m2 ... i-1], and: - m1 is the index of minimum of sequence [j .. i-1], - m2 is the index of minimum of sequence (m1 .. i-1] (please note that the interval is open at m1) I won't explain how you perform the operations on the dequeue in order to prserve those properties (try to think them yourself or look at the code / if you have any questions feel free to ask). You have the implementation below for the time-optimal (dequeue) solution. The methods for updating the deque are push(i) - updates the deque by adding element a[i] and popBadMins() which removes minimums from dequeue and returns the new j'. Friendly advice: If you're not familiar with dequeue trick, I suggest you try to understand it because it proved to be helpful in programming contests. #include <iostream> #include <vector> #include <deque> using namespace std; #define MAX_N 10000 struct Sol { int st, end; Sol(int s, int e) : st(s), end(e) {}; }; int A[MAX_N], N, K; vector<Sol> sol; int maxLen = 0; deque<int> q; // adds the [st, end] interval to the solution set if it is maximal so far void update_sol(int st, int end) { int len = end - st + 1; if (len > maxLen) { maxLen = len; sol.clear(); } if (len == maxLen) sol.push_back(Sol(st, end)); } void read_data() { cin >> N >> K; for (int i = 0; i < N; ++i) cin >> A[i]; } void push(int index) { int val = A[index]; while (!q.empty() && val <= A[q.back()]) q.pop_back(); q.push_back(index); } int popBadMins(int prevStart, int endIndex) { int val = A[endIndex]; int result = prevStart; while (!q.empty() && val + A[q.front()] < K) { result = q.front(); q.pop_front(); } return result; } void solve() { for (int i = 0, j = -1; i < N; ++i) { j = popBadMins(j, i); push(i); update_sol(j+1, i); } } void print_result() { for (int i = 0; i < sol.size(); ++i) { const Sol& s = sol[i]; for (int j = s.st; j <= s.end; ++j) cout << A[j] << " "; cout << endl; } } int main() { read_data(); solve(); print_result(); return 0; } Note: Didn't test this thoroughly so I might have missed some corner cases. Oh, and sorry for the long post. Forgot to mention that there is no solution in case nextArrangment() method fails (i.e. this is the highest arrangement for x digits and yet still lower than y). Note: I assume x and y have the same number of digits This is an O(N) algorithm: Here is pseudocode with explanations: 1. create digits histogram for x in order to be able to efficiently extract a given digit from it for (int i = 0; i < x.size(); ++i) ++histogram[x[i]]; 2. start from most significant digit (assuming its index is 0) and basically use the same digit from y on the same position in result. If at some point you don't have that digit, you select the smallest digit higher than the digit you're looking for and then put the remaining digits in increasing order and you have your answer. If there is no larger digit then put the remaining digits in decreasing order. In this case you've got yourself the closest number to Y, but lower. So you need to generate the next lexicographic permutation - see step 3 (in C++ there is std::next_permutation that just does that). for (i = 0; i < y.size(); ++i) { try to extract digit y[i] from histogram if (y[i] found in histogram) then { result[i] = y[i] } else if (there is a digit d in histogram s.t. d > y[i]) { result[i] = the smallest digit d from histogram st d>y[i] // put remaining digits in increasing order result[(i+1)..y.size()] = histogram.sortIncreasing(); // found the number, woohoo!! break for loop; } else /* there are only digits lower than y[i] */ { // put remaining digits in decreasing order result[i..y.size()] = histogram.sortDecreasing(); // found closest number smaller then y break for loop; } } 3. Now the variable result is either: - the result we're looking for, i.e.: the closest number greater or equal to y - the closest number less than y, case in which we need to generate the next lexicographic permutation of digits So we need to do this check: if (result < y) result = nextPermutation(result); The question asks for the *number* of pairs. In order to compute the number of pairs you don't necessarily need to iterate over each pair.- cristian.botau October 04, 2013
https://careercup.com/user?id=14951783
CC-MAIN-2020-10
en
refinedweb
Recently I was poking around a bit with the interceptors available in EF 6, IDbConnectionInterceptor and IDbCommandInterceptor. Since a common use of these interceptors is to provide logging/profiling capabilities, it seemed like these might be a good fit to try with ETW. But first I wanted to know if EF already uses ETW. After a somewhat lengthy search it seems that it does not, although at the provider and SQL Server levels there is use of something called BID (Built In Diagnostics), along with complicated directions involving registering MOF files, which I won’t try now. I decided to re-work the Microsoft sample “ASP.NET MVC Application Using Entiy Framework Code First” as it’s using EF 6 and has already implemented a DbCommandInterceptor for logging. It also has a simple ILogger implementation. The name of the sample application is, of course, “ContosoUniversity”. You can download the modified source code here. Getting Started To add to some of the confusion about providers, Microsoft offers two different implementations of EventSource. First there’s System.Diagnostics.Tracing.EventSource, in mscorlib, then there’s Microsoft.Diagnostics.Tracing.EventSource, available from a NuGet package. What’s the difference? The NuGet version (MDT.EventSource) supports channels, and thus writing to the Event Log. The package will also be revved more frequently, and includes support for portable, Windows Store and Phone apps, so is probably the best choice (despite what the package description says). The package also installs the EventRegister package, which adds a target to your project file to validate your EventSource and generate and register a manifest if needed (this is needed if using channels, which I won’t get into here). The package adds a document called _EventSourceUsersGuide.docx to your project which is worth reading. You can also find it online. A simple EventSource An EventSource definition is initially deceptively easy. The sample already includes a DbCommandInterceptor implementation called SchoolInterceptorLogging, which is doing logging for executing/executed interception of three types of DbCommands – Scalar, NonQuery, and Reader. Note: The Microsoft sample has a bug in its implementation of the command interceptor. Only a single instance of the interceptor is used by EF, so it must be thread safe to handle concurrent requests from multiple threads. The Stopwatch used in the sample is not thread safe. For logging purposes I don’t really care about the type of DbCommand, so my EventSource will define only two events – CommandExecuting and CommandExecuted, and the interceptor will call these event methods. The interceptor now looks like this: public class SchoolInterceptorLogging : DbCommandInterceptor { ... public override void ReaderExecuting(DbCommand command, DbCommandInterceptionContext<DbDataReader> interceptionContext) { SampleEventSource.Log.CommandExecuting(command.CommandText); } public override void ReaderExecuted(DbCommand command, DbCommandInterceptionContext<DbDataReader> interceptionContext) { SampleEventSource.Log.CommandExecuted(command.CommandText); } // And so on for the Scalar and NonQuery overrides } … while the first attempt at an EventSource looks like this: using Microsoft.Diagnostics.Tracing; namespace ContosoUniversity.Logging { [EventSource(Name="Samples-ContosoUniversity")] public sealed class SampleEventSource : EventSource { public static readonly SampleEventSource Log = new SampleEventSource(); public class Tasks { public const EventTask CommandExecuting = (EventTask)0x1; } private const int CommandStartEventId = 1; private const int CommandStopEventId = 2; [Event(CommandStartEventId, Task=Tasks.CommandExecuting, Opcode=EventOpcode.Start)] public void CommandExecuting(string commandText) { if (IsEnabled()) WriteEvent(CommandStartEventId, commandText); } [Event(CommandStopEventId, Task=Tasks.CommandExecuting, Opcode=EventOpcode.Stop)] public void CommandExecuted(string commandText) { if (IsEnabled()) WriteEvent(CommandStopEventId, commandText); } } } A few things to note: - An ETW provider is defined by sub-typing EventSource. The EventSourceAttribute is used to name the provider, otherwise it will default to the class name. - Microsoft guidance suggests you define a singleton instance of your EventSource; using a static field named “Log” seems to be common practice. - Any void instance methods are assumed to be events, with event ids incrementing by one. To avoid problems it’s a good idea to use the EventAttribute on all event methods and explicitly define the parameters as shown here. Event methods can take only string, DateTime or primitive type arguments, which means you can’t pass a type such as Exception or DbCommand to an event method, as the build-time validation will raise an error. The number and types of arguments to the event method must also match those passed to the WriteEvent method it calls. Consuming events Generating events is all well and good, but it’s still nice to see what’s going on while debugging. PerfView to the rescue! PerfView is a “performance analysis tool focusing on ETW information” and has a huge number of features, but with the help of Vance Morrison’s PerfView tutorial video series it’s easy to get started. I wanted to view my custom events, so I started a data collection and told PerfView about my custom provider: Because this provider isn’t registered on the machine with a manifest the provider name must be prefixed with an asterisk as shown above. Not all tools support this. After running the application for a few minutes before stopping the collection, I can now see my events in the context of .NET and other provider events. Here’s a few of my events, with the DURATION_MSEC calculated by PerfView. Using an external tool is great for working with a deployed app, but while coding and debugging it’s much handier to see a real time log of events. After removing the prior Logger implementation it may seem a bit ass backwards to add logging back in, but that’s what I do using an EventListener. The EventListener is part of the EventSource NuGet package, and can listen to all EventSources in the current domain. Here’s a simple implementation which dumps everything to the output window in Visual Studio: using Microsoft.Diagnostics.Tracing; using System.Diagnostics; using System.Linq; namespace ContosoUniversity.Logging { public class SampleEventListener : EventListener { protected override void OnEventSourceCreated(EventSource eventSource) { EnableEvents(eventSource, EventLevel.LogAlways, EventKeywords.All); Trace.TraceInformation("Listening on " + eventSource.Name); } protected override void OnEventWritten(EventWrittenEventArgs eventData) { string msg1 = string.Format("Event {0} from {1} level={2} opcode={3} at {4:HH:mm:ss.fff}", eventData.EventId, eventData.EventSource.Name, eventData.Level, eventData.Opcode, DateTime.Now); string msg2 = null; if (eventData.Message != null) { msg2 = string.Format(eventData.Message, eventData.Payload.ToArray()); } else { string[] sargs = eventData.Payload != null ? eventData.Payload.Select(o => o.ToString()).ToArray() : null; msg2 = string.Format("({0}).", sargs != null ? string.Join(", ", sargs) : ""); } if (eventData.Level == EventLevel.Error || eventData.Level == EventLevel.Critical) { Trace.TraceError("{0}\n{1}", msg1, msg2); } else { Trace.TraceInformation("{0}\n{1}", msg1, msg2); } } } } This is a start, but I’ve lost a few things too. The original sample logged informational messages, warnings, errors and “trace api” information, along with it’s own duration calculation (however buggy). This implementation doesn’t log exceptions, and the EventListener doesn’t contain event names or timestamps. Logging exceptions Because System.Exception and sub-types aren’t supported with EventSource event methods you must apparently resort to using either the exception message or ToString(), which doesn’t seem ideal. CLR exceptions are logged by the CLR Runtime ETW provider, so they aren’t lost entirely, but logging them from my EventSource seems like a good idea too, so I added a Failure event to my EventSource. (Why did I call it “Failure”? I don’t know, it seemed like a good idea at the time, and naming things is hard.) [Event(FailureEventId, Message = "Application Exception in {0}: {1}", Level = EventLevel.Error)] public void Failure(string methodName, string message) { if (this.IsEnabled()) { this.WriteEvent(FailureEventId, methodName, message); } } … and this to the *Executed methods in the interceptor: public override void ReaderExecuted(DbCommand command, DbCommandInterceptionContext<DbDataReader> interceptionContext) { LogResultOrException(command, interceptionContext.Exception); } private void LogResultOrException(DbCommand command, Exception ex, [CallerMemberName] string methodName = "") { if (ex != null) { SampleEventSource.Log.Failure(methodName, ex.ToString()); } else { SampleEventSource.Log.CommandExecuted(command.CommandText); } } Not ideal, but better. I want to use ETW instrumentation throughout the sample application, though, not just to record database calls, so back to design considerations. Adding more events The Microsoft recommendation is to limit the number of EventSources defined within your application. But this raises more questions – if only a single EventSource is used for the entire application, and you want to take advantage of the structured nature of ETW events, you could have a large number of events defined within a single provider. If instead you use “generic” events such as Information(..), Warning(..) and so on, you lose the benefits of strong typing. The goal, after all, is to enable a comprehensive analysis of the application in context, not to generate lots of string messages that can’t be filtered easily. The user’s guide installed with the NuGet package recommends a “{CompanyName}{Product}{Component}” naming convention (which I didn’t follow here), but this sample is too small to have components, and was actually only logging from its DbInterceptors, so I need to think about what might be useful to instrument to diagnose production issues. Since the application is pretty simple, the only potentially helpful thing I can see is to optionally instrument method entry and exit, in either selected “critical” methods or all methods in certain classes. This sounds like a great use case for AOP, and in a later post I’m going to try implementing this with ETW and PostSharp. For now, though, I’ll just add another EF interceptor, IDbConnectionInterceptor, and add some more events to my existing EventSource. This will give me a chance to work with the additional EventAttribute parameters: Kathleen Dollard has a good post explaining how to best use these parameters, but here’s some quick definitions: Channel – There are four predefined channels – Admin, Analytic, Debug and Operational. Other than being used to write to the EventL Log, I still don’t understand much about them. In a later post I’ll look at this further. Keywords – These can be used to help group or categorize events. Level – Predefined levels include Informational, Warning, Error, Critical, LogAlways and Verbose. Message – This is an optional format string which accepts the event method parameters. Task and Opcode – Provide for “task-oriented” groupings. The Opcode can only be used if a Task is specified. There are some predefined Opcodes like Start and Stop, Suspend and Resume, and a few others. Because they’re well-known, tools can act on these opcodes in a generic way. Version – Events can be versioned, but according to Dollard, don’t. The IDbConnectionInterceptor interface contains begin/end interception points for 12 different connection-related events, but for now I’m only interested in instrumenting those related to opening and closing a connection. Here’s the revised EventSource. It contains several more event methods, a few more tasks, and keywords, which may help in filtering. A few of the events also use either the Verbose or Error level. using Microsoft.Diagnostics.Tracing; using System.Runtime.CompilerServices; namespace ContosoUniversity.Logging { [EventSource(Name="Samples-ContosoUniversity")] public sealed class SampleEventSource : EventSource { public static readonly SampleEventSource Log = new SampleEventSource(); public class Keywords { public const EventKeywords Command = (EventKeywords)1; public const EventKeywords Connection = (EventKeywords)2; } public class Tasks { public const EventTask CommandExecuting = (EventTask)0x1; public const EventTask ConnectionOpening = (EventTask)0x2; public const EventTask ConnectionClosing = (EventTask)0x3; } private const int CommandStartEventId = 1; private const int CommandStopEventId = 2; private const int ConnectionOpenStartEventId = 3; private const int ConnectionOpenStopEventId = 4; private const int ConnectionCloseStartEventId = 5; private const int ConnectionCloseStopEventId = 6; private const int TraceApiEventId = 50; private const int CommandFailureEventId = 1000; private const int ConnectionFailureEventId = 1001; [Event(CommandStartEventId, Keywords=Keywords.Command, Task=Tasks.CommandExecuting, Opcode=EventOpcode.Start, Level = EventLevel.Verbose)] public void CommandExecuting(string commandText) { if (IsEnabled()) WriteEvent(CommandStartEventId, commandText); } [Event(CommandStopEventId, Keywords = Keywords.Command, Task = Tasks.CommandExecuting, Opcode = EventOpcode.Stop)] public void CommandExecuted(string commandText) { if (IsEnabled()) WriteEvent(CommandStopEventId, commandText); } [Event(ConnectionOpenStartEventId, Message = "Opening {0}", Keywords = Keywords.Connection, Task = Tasks.ConnectionOpening, Opcode = EventOpcode.Start)] public void ConnectionOpening(string databaseName) { if (IsEnabled()) WriteEvent(ConnectionOpenStartEventId, databaseName); } [Event(ConnectionOpenStopEventId, Message = "Opened {0}", Keywords = Keywords.Connection, Task = Tasks.ConnectionOpening, Opcode = EventOpcode.Stop)] public void ConnectionOpened(string databaseName) { if (IsEnabled()) WriteEvent(ConnectionOpenStopEventId, databaseName); } [Event(ConnectionCloseStartEventId, Message = "Closing {0}", Keywords = Keywords.Connection, Task = Tasks.ConnectionClosing, Opcode = EventOpcode.Start)] public void ConnectionClosing(string databaseName) { if (IsEnabled()) WriteEvent(ConnectionCloseStartEventId, databaseName); } [Event(ConnectionCloseStopEventId, Message = "Closed {0}", Keywords = Keywords.Connection, Task = Tasks.ConnectionClosing, Opcode = EventOpcode.Stop)] public void ConnectionClosed(string databaseName) { if (IsEnabled()) WriteEvent(ConnectionCloseStopEventId, databaseName); } [Event(TraceApiEventId, Message = "TraceApi {0} {1}", Level = EventLevel.Verbose)] public void TraceAPI([CallerMemberName] string methodName = "", string message = "") { if (this.IsEnabled()) this.WriteEvent(TraceApiEventId, methodName, message); } [Event(CommandFailureEventId, Message = "Command error in {0}: {1}", Keywords = Keywords.Command, Level = EventLevel.Error)] public void CommandFailure(string methodName, string message) { if (this.IsEnabled()) this.WriteEvent(CommandFailureEventId, methodName, message); } [Event(ConnectionFailureEventId, Message = "Connection error in {0}: {1}", Keywords = Keywords.Connection, Level = EventLevel.Critical)] public void ConnectionFailure(string methodName, string message) { if (this.IsEnabled()) this.WriteEvent(ConnectionFailureEventId, methodName, message); } } } And the new interceptor: using ContosoUniversity.Logging; using System; using System.Data.Common; using System.Data.Entity.Infrastructure.Interception; using System.Runtime.CompilerServices; namespace ContosoUniversity.DAL { public class SchoolConnectionInterceptor : IDbConnectionInterceptor { private SampleEventSource _logger = SampleEventSource.Log; public void Opening(DbConnection connection, DbConnectionInterceptionContext interceptionContext) { _logger.ConnectionOpening(connection.Database); } public void Opened(DbConnection connection, DbConnectionInterceptionContext interceptionContext) { LogResultOrException(() => _logger.ConnectionOpened(connection.Database), interceptionContext); } public void Closing(DbConnection connection, DbConnectionInterceptionContext interceptionContext) { _logger.ConnectionClosing(connection.Database); } public void Closed(DbConnection connection, DbConnectionInterceptionContext interceptionContext) { LogResultOrException(() => _logger.ConnectionClosed(connection.Database), interceptionContext); } public void Disposing(DbConnection connection, DbConnectionInterceptionContext interceptionContext) { _logger.TraceAPI(); } public void Disposed(DbConnection connection, DbConnectionInterceptionContext interceptionContext) { _logger.TraceAPI(); } private void LogResultOrException(Action logAction, DbConnectionInterceptionContext context, [CallerMemberName] string methodName = "") { if (context.Exception != null) { _logger.ConnectionFailure(methodName, context.Exception.ToString()); } else { logAction(); } } // Remaining interface methods are stubs } } Is Less More? For simple instrumentation from only the EF interceptors this isn’t too bad, but I’m still not happy with the tight coupling, and also don’t have a handle on what would be most useful for monitoring a running production application. In fact, I wonder if I’d get equivalent results if I got rid of the interceptors and called one generic trace event via built-in EF logging: this.Database.Log = (s) => SampleEventSource.Log.TraceAPI("DefaultLogger", s); Which results in somewhat unstructured but still useful information: And finally … It’s going to take some trial and error to get this right; after several weeks I’ve still only scratched the surface with ETW and find the learning curve long and sometimes steep. In future posts I plan to take a look at: - channels and the Event Log, - the Semantic Logging Application Block, - AOP for method enter/exit instrumentation One thought on “A Look at ETW – Part 2” Pingback: A Look at ETW – Part 1 | A Round Tuit
https://aroundtuitblog.wordpress.com/2014/10/24/a-look-at-etw-part-2/
CC-MAIN-2017-47
en
refinedweb
(Another) Mercurial Plugin for hoe Description This is a fork of the [hoe-hg](bitbucket.org/mml. Examples # in your Rakefile Hoe.plugin :mercurial If there isn't a '.hg' directory at the root of your project, it won't be activated. Committing $ rake hg:checkin -or- $ rake ci This will offer to pull and merge from the default repo (if there is one), check for any unregistered files and offer to add/ignore/delete or temporarily skip them, run the *:precheckin* task (which you can use to run tests, lint, or whatever before checking in), builds a commit message file out of the diff that's being committed and invokes your editor on it, does the checkin, then offers to push back to the default repo. Pre-Release Hook This plugin also hooks Hoe's *prerelease* task to tag and (optionally) sign the rev being released, then push to the default repo. If there are any uncommitted files, it also verifies that you want to release with uncommitted changes, and ensures you've bumped the version number by checking for an existing tag with the same version. If you also wish to check the History file to ensure that you have an entry for each release tag, add this to your hoespec: self.check_history_on_release = true You can also invoke or add the ':check_history' task as a dependency yourself if you wish to check it at other times. It expects lines like: == v1.3.0 <other stuff> to be in your History file. Markdown, RDoc, and Textile headers are all supported. To sign tagged revisions using 'hg sign', do this in your hoespec: self.hg_sign_tags = true This requires that 'hg sign' work on its own, of course. Other Tasks It also provides other tasks for pulling, updating, pushing, etc. These aren't very useful on their own, as it's usually just as easy to do the same thing yourself with 'hg', but they're intended to be used as dependencies in other tasks. A 'rake -T' will show them all; they're all in the 'hg' namespace. Dependencies Hoe and Mercurial, obviously. I haven't tested these tasks with Mercurial versions earlier than 1.6 or so. Installation $ gem install hoe-mercurial License The original is used under the terms of the following license: Copyright 2009 McClain Looney (m@loonsoft. My modifications are: and are licensed under the same terms as the original.
http://www.rubydoc.info/gems/hoe-mercurial/frames
CC-MAIN-2017-47
en
refinedweb
Ok I made this program using IDLE and it runs perfect in windows xp.. when I try to run it on redhat linux it gives me the following errors [python@ python]$ ./ksconfigwriter.py ./ksconfigwriter.py: line 2: import: command not found ./ksconfigwriter.py: line 6: syntax error near unexpected token `(' ./ksconfigwriter.py: line 6: `def fileExists(f):' I was wondering what I could do to get it to work... the first part of my code looks like this Thank you in advance... # Libs ---------------------------------------------- import sys,os,string,time ##open the name of the output file according to the user's selection def fileExists(f): try: file = open(f) except IOError: #no it doesn't exist exists = '0' else: #yes it does exist exists = '1' return exists #---------------------------------------------------- print ("\n\n") overwrite = '' while overwrite != 'y': overwrite = ''
http://forums.devshed.com/python-programming/91290-linux-xp-last-post.html
CC-MAIN-2017-47
en
refinedweb
Contents. That is bad for several reasons, and I am going to lay out what I think every developer should be required to do before he writes production code. Reinventing the wheel costs time I will take a standard example: Searching for something in a container, e.g. a `std::vector`. This is the naive approach taken by developers who don’t know the standard library too well: bool isNumberInVector(std::vector<int> const& numbers, int iLookFor) { bool found = false; for (auto it = numbers.begin(), it != numbers.end(), ++it) { if ((*it) == iLookFor) { found = true; } } return found; } Most people who have a bit of experience with C++ know that there is a function template `std::find` in ´<algorithm>´ that does such a search for us: #include <algorithm> bool isNumberInVector(std::vector<int> const& numbers, int iLookFor) { auto pos = std::find(std::begin(numbers), std::end(numbers), iLookFor); return pos != std::end(numbers); } Or with C++11 algorithms: bool isNumberInVector(std::vector<int> const& numbers, int iLookFor) { return std::any_of(std::begin(numbers), std::end(numbers), [=](int iElem){ return iElem == iLookFor; } ); } “Yeah” some people may say, “but I don’t look for numbers in a `vector`, I look in a `map<string, Foo>` for every key value pair where the `bar` attribute of the `Foo` is `”meow”`. `std::find` can’t give me that!” They are right, but there are other algorithms that can: #include <iterator> std::map<string, Foo> getWhereBarIsMeow(std::map<string, Foo> const& myMap) { std::map<string, Foo> results; std::copy_if( std::begin(myMap), std::end(myMap), std::inserter(results, std::end(results)), [](std::pair<string const, Foo> const& mapEntry) { return mapEntry.second.getBar() == "meow"; } ); return results; } Development time That call to `std::copy_if` does not look too short, so the function will take time to write. So where is the advantage against a handcrafted loop? I think the handcrafted loop will take more time, because you usually check twice to check if it does the right logic. In general, I prefer calling a function that does all the checks for me, than writing a handcrafted loop where I have more possibilities to mess things up. It may not be much time I gain when writing the code, in some cases it might even take more time, e.g. if I have to look up the exact order in which i have to pass the parameters. But the time I spend writing a function is usually the least important. Run time Although we should not worry about getting each single percent of performance out of a single piece of code when we write it, performance matters. Writing a function performant without decreasing readability is not premature optimization, it is avoiding premature pessimization. My hand written implementation of the `isNumberInVector` function above is a bit sloppy, can you spot the problem? I haven’t written anything wrong, the function will work like a charm, but I left something out. There should be a `break` in the loop when the value has been found. If you pass a long vector and the value you look for is among the first entries, it will nevertheless loop over the whole vector, wasting time and needlessly adding a bit of entropy to our universe. Maintenance time Usually the most precious time resource is maintenance time, and using library features instead of writing code by hand that does the same thing is mostly an issue of maintenance time. If someone reads a piece of code and sees a call to a library function, he will know what is happening just by recognizing the name of the function. If he encounters a handwritten loop or a bunch of intermediate calculations that do the same thing as the library function would have done, he has to analyze the code in order to recognize what is happening, which will cost more time. He will perhaps even wonder why the original author did not use the library function and waste precious time searching for something that makes the library function inapplicable and which simply is not there. It’s all about communication When talking with your customers, you will probably use domain specific terms they are used to. Those terms will be used in the specs, and I bet there are many terms you had to learn when you started working in that domain. For example, I had to learn a lot of insurance related terms for the job I am currently at. It’s just necessary for a clear communication to have a set of terms that everybody involved understands, so nobody has to digress into lengthy explanations. It is the same with software development. Writing code is communicating with other developers, including your future self. It is mandatory to have a clear set of terms there, too, and libraries, including your own, provide those terms. Knowing the libraries that are used is essential to write understandable code and to understand code written by others. Which libraries should I learn? One can’t possibly learn about all C++ libraries in the world, so a project should have a document that has a list of the libraries that are used. The document should also state where those libraries are used, so when someone works only in a certain part of the system, he has to learn only the libraries used in that part. A database expert might not need to know everything about the GUI library. Sometimes it is not necessary to learn about the whole library, when only a few features are used. Nevertheless you should know which features you are currently not using play well together with the features you use. If you are using standard library containers you should know about all the algorithms, because you will surely need one of them some time in the future. Not only know what you are using today, but also what you will be using tomorrow. How deeply you should learn a library depends on how often you use it. For example, `std::vector` is an essential container, so you best know everything there is to know about it by heart. It might even be useful to know not about its interface but about how it is implemented on your system. On the other hand if you don’t work with custom memory management you probably don’t need to exactly know how you create a `std::function` with a custom allocator – it will suffice to know that it is possible and where to look it up in case you should need it in the future. You should not blindly introduce some new library into your part of the project, just because you think it is fancy or because one single function of the library is just the thing you could use right now. Everyone involved with your code will have to learn about the library, at least about the part you used, to understand your code. Especially don’t use two libraries that do the same thing. Introduce new libraries to your project only after careful consideration. Your own libraries Although I mostly talked about the standard library, everything I have written above applies to any library you use, including your own code. You will be using your own classes way more often than any library class. In a large code base with many contributors that is only possible with good modularization. You can’t learn thousands of classes, and you should not need to. Most classes are implemented to hold features that are only used within a certain part of an application. If you don’t work in that part, you don’t need to know the class. Instead, if your project is modularized, you only need to know about the classes that make up the interface of each module, and only of those modules that you are using in the part of the application you work at. Modularize your applications to provide a clean manageable set of libraries. Like with any other library you should define which of your own libraries get used in which parts of the code. That way you not only provide reusability and encapsulation by having the libraries, you also prevent uncontrolled dependency growth and you don’t have to worry about the inner workings of all your libraries at once, but only of the one you are currently working in. The others can be thought of as just another library you are using. 10 Comments Permalink Permalink Permalink Permalink I agree that using algorithms are self documented and most of the time are a better pick but the range based for loop does not looks so bad to me in that case too. Without compromising on code readability and chance of adding a bug. std::map getWhereBarIsMeow(std::map const& myMap) { std::map results; for( auto & elem : myMap ) if ( elem.second.getBar() == “meow” ) results.insert(elem); return results; } Permalink I agree that range based for loops are much more readable that the traditional for loops. Nevertheless one has to analyze their content, which I consider a slightly bigger mental burden than just reading “copy from… to… if…” This is especially true once we get range based algorithms. Permalink > Which libraries should I learn? None, you should be able to Google. In my opinion the most valuable ability a software designer should have. Permalink While I agree that googling is a key skill, you still have to know at least the capabilities of your libraries, or else you end up reimplementing everything from scratch. When it comes to the exact name and parameter list of a function you can of course look it up. Unless you have to use it often, then googling each time would take too much time. Permalink … “It is avoiding premature pessimization”… The quote of the day. An article I should have read before starting a professional career as C++ dev. Thanks for sharing. Permalink You could also use ‘std::any_of’ for your first example. I think this describes the functions intent best. Permalink Great point! Seems I still have to learn my (C++11 standard-) libraries as well 😉 I added an `any_of` version.
https://arne-mertz.de/2015/02/know-your-libraries/
CC-MAIN-2017-47
en
refinedweb
It’s been awhile since I’ve had a technically focused blog post, so I’m rectifying that today. Lately I’ve been doing a lot of work with Event Tracing for Windows (henceforth called “ETW” for brevity’s sake.) For the spelunker who wants to see the OS in operation, or for the developer trying to pin down exactly what happened, ETW provides you a ton of useful information. Unfortunately, working with ETW isn’t as simple as it could be. There are quite a few concepts to wrap your head around, and it’s quite easy to get lost in the weeds. What I’m doing here is providing just a high level tour of the essential concepts. If you want to play with ETW yourself, you’ll obviously need to refer to the MSDN documentation. At heart, ETW is a high performance logging mechanism that usable from both user and kernel mode. There are APIs for producing events as well as consuming events. The OS and various components such as IIS define quite a number of useful event categories, and you can create your own custom events. The ETW API has been around for a number of years, so it’s implemented in unmanaged code. As I write this, there are no shipping managed libraries to make working with it simpler. Internally, various groups here are looking at the best way to make ETW a first class citizen in the managed world. In my mind, ETW subdivides into three parts: - Producing events - Consuming events - Discovering the format of events For this blog entry we’ll look at the discovery portion, since this is the fastest way of seeing for yourself what sort of information ETW can provide to you. If you’re still interested, you can read future blog entries on producing and consuming events. Let’s start with a very brief overview of events. ETW events are logged by providers which are registered with the system. Each provider has a descriptive name and is uniquely identified to the system by a GUID. Some typical provider names are: - HttpEtwTrace - AspNetTrace - MSNT_SystemTrace - ACPITrace A given provider emits one or more events. Each event has its own GUID and a descriptive name. Typical event names include: HttpRequest AspNetTraceEvent Process Thread Registry So far, so good. But here’s where it gets interesting. In addition to a GUID, each event has an integer EventType field. A given event usually has multiple EventType fields. Think of each unique EventType field as a derivation from a base class. For instance, AspNetTraceEvent has several dozen different EventType values, including: - AspNetStart = 1 - AspNetStop = 2 - AspNetAppDomainEnter = 7 - AspPageInit = 21 Put another way, an events GUID indicates the general category of the event (e.g., an HTTP Request), while the EventType field gives you exactly what the event represents (e.g., an app domain being entered, or a page being initialized.) If you were to turn on the HttpEtwTrace provider and then examine the logged events, you’d see potentially hundreds of HttpRequest events for a single request for a web page. Only by examining the EventType field would you be able to infer exactly what the event represents. Each distinct event (as identified by a GUID and EventField value) has a binary data format which can be interpreted. All events, no matter which provider they came from, begin with a standard header which includes fields like a process ID, a thread ID, and a timestamp. After the header, different events are free to put whatever additional data they’d like. For an ASP.NET event, this might include the URL being requested or a connection ID. I admit that this is somewhat confusing at first. To make matters even more complex, different providers categorize their events in different ways. It’s a spectrum, really. On one end you might have a single event GUID with many EventTypes, on the other end you could have a different event GUID for every action you log, and effectively ignore the EventType field. As we’ll soon see, event providers cover all parts of the spectrum. The HttpRequest provider uses only one GUID for all its events and multiple EventFields. The MSNT_SystemTrace has 18 different event GUIDs, with each GUID having roughly four EventType values. Finally, SQL Server has hundreds of event GUIDs, with each GUID using only a single EventType. Describing Events Another interesting piece of the ETW story is how you can programmatically discover the layout of the fields which follow the standard event header. That is, you can query the system for the names and data types of the optional fields in an event. To do so requires you to descend a bit into WMI land. WMI is the acronym for Windows Management Instrumentation. WMI has fairly extensive capabilities, but of interest here is that WMI has an object hierarchy that represents many different aspects of the system. One particular branch of the WMI object hierarchy contains information about ETW events. Nothing requires an event provider to describe its event in the WMI object hierarchy. If you’re writing an event provider and don’t care if anybody else can interpret your events, there’s no need to describe them in the WMI data. The event consumption API will hand you a pointer to the event, and it’s up to you to know how the data fields are encoded. Let’s see how we can learn what providers and events are registered in the WMI hierarchy. The easiest way to do this is with CIM Studio, which is part of the WMI SDK. From this point forward, I’ll assume that you’ve downloaded and installed the WMI SDK. First, start up “WMI CIM Studio”, which is hosted inside Internet Explorer. If you’re running a newer OS such as XP SP2, you may get the warning that IE has blocked active content. If so, allow IE to show the content. You should then get a dialog box prompting you to “connect to a namespace”. The default is “root\CIMV2”. You’ll need to change that to “root\wmi”, then hit “OK”. Another dialog should appear, entitled “WMI CIM Studio Login”. I’m able to just hit “OK’, and shortly thereafter get the screen shown here: The left side of the window has a treeview hierarchy, while the right side shows the properties of the currently selected treeview node. In the treeview, locate the top level object named “EventTrace”, and expand it: Depending on which OS version you’re running, and which software you have installed, you’ll see any number of sub-nodes. In the screenshot above, the sub-nodes are: - HttpEtwTrace - MSNT_SystemTrace - ACPITrace - AspNetTrace Each of these sub-nodes corresponds to an event provider. With one of the providers selected, right-click in the right-hand properties pane, and select “Object Qualifiers…” You should get a dialog like this: The Guid field value is the event provider’s GUID that was registered with ETW. The Description field provides more info about the provider. In this case, the Description field indicates that this provider is the “Windows Kernel Trace”. You can now cancel out of that dialog. Next, expand one of the providers. For our example, expand the MSNT_SystemTrace node. You should see something like this: Each of these sub-nodes (e.g., EventTraceEvent, PageFault, UdpIp, etc…) is an event with a GUID associated with it. Highlight one of them (in this case, Image), right-click in the properties pane, and again select “Object Qualifiers…”. You should see something like this: Cancel out the Object Qualifiers dialog, and then expand the “Image” node. It has one sub-node, named Image_Load. Looking at the right hand properties pane you should see something like this: Notice at the top that there are fields named FileName, ImageBase, ImageSize and ProcessId. These are fields that will be represented in the event’s optional data that appears after the standard header. Right click in the properties pane again, select “Object Qualifiers…”, and you should see this: The crucial field here is the “EventType” field. In this instance, it’s 10. Thus, when you see a raw ETW event blob with the GUID specified by the Image object, and an EventType of 10, you’ll know that it has the four fields (FileName, etc..) listed above. Another key point: In this case, the Image object had only one child. However, other events could have multiple children. For instance, if you look at the HttpRequest event from the HttpEtwTrace provider, you’d see this: There are seven children of the HttpRequest event. If you were to select each one of them, and view the Object Qualifiers, you’d see that they all have different EventType values. For instance, HttpReceiveRequest has an EventType of 1. To further complicate matters, one of these children might not specify an EventType directly. This is the case when the object is describing multiple events with the same data format, but with different EventTypes. For instance, select HttpSendComplete, and view it’s object qualifiers: Notice that the EventType and EventTypeName values are arrays. Parallel arrays, to be more precise. Clicking on the “Array” button for the EventTypeName value, you should see this: There are five separate values (end, CacheAndSend, etc…). Each of these names matches up with the entries in the EventType array: What’s the deal here? Essentially, these arrays allow for a more compact encoding of events that share the same layout. Whew! I’ve covered a lot of ground here, and not even in that much detail. However, you should now know enough to start exploring the ETW hierarchy that’s on your system to see what sort of tracing goodies are available to you. In future blog posts, I’ll talk more about creating ETW traces and consuming the resultant data. come on matt – gives us more. how can we consume these events?? dominick The short answer is the ProcessTrace API. I’m planning on doing a subsequent blog entry on this topic. Yes, the content of the PDC will be great and varied and wonderful… One topic in particular that I’ve… Yes, the content of the PDC will be great and varied and wonderful… One topic in particular that I’ve… PingBack from PingBack from Performance comparison using VSTS Orcas Profiler
https://blogs.msdn.microsoft.com/matt_pietrek/2004/09/16/intro-to-event-tracing-for-windows/
CC-MAIN-2017-47
en
refinedweb
An instrumented test is a fancy name for a test that runs within the Android device in the same process space as your app. This lets you test code that relies on Android SDK calls. The official guide is horridly incomplete. Here are a few quick notes. Package Conflict Android Studio builds a separate APK just for instrumented test. This runs in the same process space as the APK for the main app. Unfortunately this means both APKs must have no conflicting package dependencies. But the Internet is full of example of conflict with the com.android.support:support-annotations package. You will need to force both APK to use a higher version. androidTestCompile 'com.android.support.test:runner:0.5' androidTestCompile 'com.android.support.test:rules:0.5' //Force same version androidTestCompile 'com.android.support:support-annotations:23.2.0' compile 'com.android.support:support-annotations:23.2.0' This is just an example only. By the time you read this newer versions may be available. Location of the Test Java File You have to create the test Java file in the androidTest folder. This way it will get packaged with the test APK. Annotation An instrumented test class needs to have @RunWith and @SmallTest annotation. A sample template class: import android.support.test.runner.AndroidJUnit4; import android.test.suitebuilder.annotation.SmallTest; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; @RunWith(AndroidJUnit4.class) @SmallTest public class InstrumentedTests { @Test public void testCaching() { assertNotNull("Hello"); assertTrue(true); assertEquals("One", "One"); } }
https://mobiarch.wordpress.com/2016/06/14/running-instrumented-test-in-android/
CC-MAIN-2017-47
en
refinedweb
Purpose: This demo shows how to construct a network that multiplies two inputs. Comments: This can be thought of as a combination of the combining demo and the squaring demo. Essentially, we project both inputs independently into a 2D space, and then decode a nonlinear transformation of that space (the product of the first and second vector elements). Multiplication is extremely powerful. Following the simple usage instructions below suggests how you can exploit it to do gating of information into a population, as well as radically change the response of a neuron to its input (i.e. completely invert its ‘tuning’ to one input dimension by manipulating the other). Usage: Grab the slider controls and move them up and down to see the effects of increasing or decreasing input. The output is the product of the inputs. To see this quickly, leave one at zero and move the other. Or, set one input at a negative value and watch the output slope go down as you move the other input up. Output: See the screen capture below import nef net=nef.Network('Multiplication') #Create the network object net.make_input('input A',[8]) #Create a controllable input function #with a starting value of 8 net.make_input('input B',[5]) #Create a controllable input function #with a starting value of 5 net.make('A',100,1,radius=10) #Make a population with 100 neurons, #1 dimensions, a radius of 10 #(default is 1) net.make('B',100,1,radius=10) #Make a population with 100 neurons, 1 dimensions, a #radius of 10 (default is 1) net.make('Combined',225,2,radius=15) #Make a population with 225 neurons, 2 dimensions, and set a #larger radius (so 10,10 input still fits within the circle #of that radius) net.make('D',100,1,radius=100) #Make a population with 100 neurons, 1 dimensions, a #radius of 10 (default is 1) net.connect('input A','A') #Connect all the relevant objects net.connect('input B','B') net.connect('A','Combined',transform=[1,0]) #Connect with the given 1x2D mapping matrix net.connect('B','Combined',transform=[0,1]) def product(x): return x[0]*x[1] net.connect('Combined','D',func=product) #Create the output connection mapping the #1D function 'product' net.add_to_nengo()
http://ctnsrv.uwaterloo.ca/docs/html/demos/multiplication.html
CC-MAIN-2017-47
en
refinedweb
fprintf, vprintf, vsnprintf, vsprintf - format output of a stdarg argument list #include <stdarg.h> #include <stdio.h> vprintf(), vfprintf(), vsnprintf(), and vsprintf() functions shall be equivalent to printf(), fprintf(), snprintf(), and sprintf()() . Refer to fprintf() . The following sections are informative. None. Applications using these functions should call va_end(ap) afterwards to clean up. None. None. fprintf() , the Base Definitions volume of IEEE Std 1003.1-2001, <stdarg.h>, .
http://manpages.sgvulcan.com/vfprintf.3p.php
CC-MAIN-2017-47
en
refinedweb
: As an exercise, write a function printTime that takes a Time object as an argument and prints it in the form hours:minutes:seconds. As a second exercise, write a boolean function after that takes two Time objects, t1 and t2, as arguments, and returns True if t1 follows t2 chronologically and False otherwise. In the next few sections, we'll write two versions of a function called addTime, which calculates the sum of two Times. They will demonstrate two kinds of functions: pure functions and modifiers. The following is a rough version of addTime: def addTime(t1, t2): sum = Time() sum.hours = t1.hours + t2.hours sum.minutes = t1.minutes + t2.minutes sum.seconds = t1.seconds + t2.seconds return sum The function creates a new Time object, initializes its attributes, and returns a reference to the new object. This is called a pure function because it does not modify any of the objects passed to it as arguments and it has no side effects, such as displaying a value or getting user input. Here is an example of how to use this function. We'll create two Time objects: currentTime, which contains the current time; and breadTime, which contains the amount of time it takes for a breadmaker to make bread. Then we'll use addTime to figure out when the bread will be done. If you haven't finished writing printTime yet, take a look ahead to Section 14.2 before you try this: >>> currentTime = Time() >>> currentTime.hours = 9 >>> currentTime.minutes = 14 >>> currentTime.seconds = 30 >>> breadTime = Time() >>> breadTime.hours = 3 >>> breadTime.minutes = 35 >>> breadTime.seconds = 0 >>> doneTime = addTime(currentTime, breadTime) >>> printTime(doneTime): def addTime. There are times when it is useful for a function to modify one or more of the objects it gets as arguments.: def increment(time, seconds): time.seconds = time.seconds + seconds if time.seconds >= 60: time.seconds = time.seconds - 60 time.minutes = time.minutes + 1 if time.minutes >= 60: time.minutes = time.minutes - 60 time.hours = time.hours + seconds is less than sixty. One solution is to replace the if statements with while statements:. As an exercise, rewrite this function so that it doesn't contain any loops. As a second exercise, rewrite increment as a pure function, and write function calls to both versions. Anything that can be done with modifiers can also be done with pure functions. In fact, some programming languages only allow pure functions. There is some evidence that programs that use pure functions are faster to develop and less error-prone than programs that use modifiers. Nevertheless, modifiers are convenient at times, and in some cases, functional programs are less efficient. In general, we recommend that you write pure functions whenever it is reasonable to do so and resort to modifiers only if there is a compelling advantage. This approach might be called a functional programming style.Time: def convertToSeconds(t): minutes = t.hours * 60 + t.minutes seconds = minutes * 60 + t.seconds return seconds Now, all we need is a way to convert from an integer to a Time object: def makeTime(seconds): time = Time() time.hours = seconds // 3600 time.minutes = (seconds%3600) // 60 time.seconds = seconds%60 return time You might have to think a bit to convince yourself that this function is correct. Assuming you are convinced, you can use it and convertToSeconds to rewrite addTime: def addTime(t1, t2): seconds = convertToSeconds(t1) + convertToSeconds(t2) return makeTime(seconds) This version is much shorter than the original, and it is much easier to demonstrate that it functions (convertToSeconds and makeTime),).. Warning: the HTML version of this document is generated from Latex and may contain translation errors. In particular, some mathematical expressions are not translated correctly.
http://greenteapress.com/thinkpython/thinkCSpy/html/chap13.html
CC-MAIN-2017-47
en
refinedweb
Data type to manage parsing of patches. More... #include <svn_diff.h> Data type to manage parsing of patches. API users should not allocate structures of this type directly. Definition at line 1219 of file svn_diff.h. An array containing an svn_diff_hunk_t * for each hunk parsed from the patch. Definition at line 1230 of file svn_diff.h. Mergeinfo parsed from svn:mergeinfo diff data, with one entry for forward merges and one for reverse merges. Either entry can be NULL if no such merges are part of the diff. Definition at line 1250 of file svn_diff.h. The old and new file names as retrieved from the patch file. These paths are UTF-8 encoded and canonicalized, but otherwise left unchanged from how they appeared in the patch file. Definition at line 1224 of file svn_diff.h. Represents the operation performed on the file. Definition at line 1239 of file svn_diff.h. A hash table keyed by property names containing svn_prop_patch_t object for each property parsed from the patch. Definition at line 1235 of file svn_diff.h. Indicates whether the patch is being interpreted in reverse. Definition at line 1243 of file svn_diff.h.
https://subversion.apache.org/docs/api/latest/structsvn__patch__t.html
CC-MAIN-2017-47
en
refinedweb
This is the mail archive of the binutils@sourceware.org mailing list for the binutils project. On Mon, Jul 03, 2017 at 09:44:20PM +0930, Alan Modra wrote: > Jan's libiberty patch broke gold. Applying as obvious. > > * dwarf.h (DW_FIRST_IDX, DW_IDX, DW_IDX_DUP, DW_END_IDX): Define. Ugh, this was supposed to be merged into the last patch. diff --git a/elfcpp/ChangeLog b/elfcpp/ChangeLog index 1ca1df1..fc864bf 100644 --- a/elfcpp/ChangeLog +++ b/elfcpp/ChangeLog @@ -1,6 +1,7 @@ 2017-07-03 Alan Modra <amodra@gmail.com> - * dwarf.h (DW_FIRST_IDX, DW_IDX, DW_IDX_DUP, DW_END_IDX): Define. + * dwarf.h (DW_FIRST_IDX, DW_IDX, DW_IDX_DUP, DW_END_IDX): Define, + and undefine after using. 2017-06-21 Alan Modra <amodra@gmail.com> diff --git a/elfcpp/dwarf.h b/elfcpp/dwarf.h index 85004a4..e5053c4 100644 --- a/elfcpp/dwarf.h +++ b/elfcpp/dwarf.h @@ -110,6 +110,11 @@ namespace elfcpp #undef DW_CFA #undef DW_END_CFA +#undef DW_FIRST_IDX +#undef DW_IDX +#undef DW_IDX_DUP +#undef DW_END_IDX + // Frame unwind information. enum DW_EH_PE -- Alan Modra Australia Development Lab, IBM
https://www.sourceware.org/ml/binutils/2017-07/msg00011.html
CC-MAIN-2017-47
en
refinedweb
FormsBundle\Form namespace, unless you use other custom form classes like data transformers. To use the class, use createForm() and pass the fully qualified class name: Registering Forms as Services¶ You can also register your form type as a service. This is only needed if your form type requires some dependencies to be injected by the container, otherwise it is unnecessary overhead and therefore not recommended to do this for all form type classes.:, is it required to call $form->isSubmitted() in the if statement before calling isValid(). Calling isValid() with an unsubmitted form is deprecated since version 3.2 and will throw an exception in 4.0. This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.
http://symfony.com/doc/current/best_practices/forms.html
CC-MAIN-2017-47
en
refinedweb
This object represents a single HTTP request. More... #include <httprequest.h> This object represents a single HTTP request.. Definition at line 36 of file httprequest.h. Values for getStatus() Definition at line 43 of file httprequest.h. Constructor. Destructor. Get the HTTP request body. Get the value of a cookie. Get all cookies. Get the value of a HTTP request header. Get all HTTP request headers. Get the values of a HTTP request header. Get the method of the HTTP request (e.g. "GET") Get the value of a HTTP request parameter. Get all HTTP request parameters. Get the values of a HTTP request parameter. Get the decoded path of the HTPP request (e.g. "/index.html") Get the address of the connected client. Note that multiple clients may have the same IP address, if they share an internet connection (which is very common). Get the raw path of the HTTP request (e.g. "/file%20with%20spaces.html") Get the status of this reqeust. Get an uploaded file. The file is already open. It will be closed and deleted by the destructor of this HttpRequest object (after processing the request). For uploaded files, the method getParameters() returns the original fileName as provided by the calling web browser. Get the version of the HTPP request (e.g. "HTTP/1.1") Read the HTTP request from a socket. This method is called by the connection handler repeatedly until the status is RequestStatus::complete or RequestStatus::abort. Decode an URL parameter. E.g. replace "%23" by '#' and replace '+' by ' '.
http://www.stellarium.org/doc/0.16.1/classHttpRequest.html
CC-MAIN-2017-47
en
refinedweb
[Share Code] round button Actually, I am just sharing this because I was about to make a entry in the git. I wanted a disabled ui.Button without the text being greyed out/or alpha changed. I wanted to use the button like a graphic element, but without it being clickable. If you do ui.Button.enabled = False, that's what you get. But you can also do ui.Button.touch_enabled = False, which is what I wanted. Text not changed and does not respond to touches. I know it's not rocket science, it's in the help file. Just depends if you think about it. I write this for beginners like me import ui, editor def round_btn(w, title, factor=.7): btn = ui.Button(frame=(0, 0, w, w)) btn.title = title btn.font = ('Arial Rounded MT Bold', w * factor) btn.corner_radius = btn.width / 2 btn.bg_color = 'deeppink' btn.tint_color = 'white' return btn class MyClass(ui.View): def __init__(self, *args, **kwargs): #super().__init__(*args, **kwargs) py3 only ui.View.__init__(self, *args, **kwargs) btn = round_btn(self.width * .8, 'IJ') btn.center = self.bounds.center() btn.y -= 22 # i will never figure out center :( i dont get it btn.touch_enabled = False self.add_subview(btn) if __name__ == '__main__': factor = 1 w = 375 * factor h = 667 * factor f = (0, 0, w, h) mc = MyClass(frame=f, bg_color = 'white') mc.present('sheet') #editor.present_themed(mc, theme_name='Cool Glow', #style = 'sheet', animated=False) Thanks I didn't know the attribute touch_enabled I'm sure that if I spend one hour per day with Pythonista, I'll learn something new each day 😉
https://forum.omz-software.com/topic/3247/share-code-round-button
CC-MAIN-2017-47
en
refinedweb
Using WPF with Managed C++ WEBINAR: On-demand webcast How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER > 1. Introduction The purpose of this article is two folds. At the first half we discuss what WPF is. In addition we studied why and how to program WPF using Managed C++ and high level overview of WPF architecture. Latter we scratch the surface of Loan Amortization with one working example of Loan Amortization in WPF using C++. 2. What is WPF? Before going to study the WPF one might ask a question that what is WPF? WPF is abbreviation of "Window Presentation Foundation". It is a next generation presentation system for building window client application that can be run stand alone as well as in a Web Browser (i.e. XBAP Application). WPF is based on .Net environment, it means it is a managed code and theoretically can be written with any .Net based language such as Visual C#, VB.Net and Managed C++. WPF introduced with .Net 3.0 with few other important technologies such as Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF), but here we are going to study only WPF. Most of the programmer thought that WPF is a feature of Visual C# and VB.Net can be done only in these languages. Although writing WPF programs in these languages are quite easy and fun, but it is not limited to only this. WPF is in fact a feature of .Net introduced with its version 3.5; therefore technically any .Net language can use it. If this is a case then why there are so many WPF samples written only in C# and VB.Net codes even in MSDN? The best answer might be because of XAML. When using C# or VB.Net then we can take full advantage of XAML, which is not available in VC++.Net. It means when you are trying to write WPF code in Managed C++, then you are on your own and have to write code for everything. It may be a daunting task but not impossible and in fact there are few samples available with Microsoft SDK such as PlotPanel, RadialPanel, CustomPanel etc. 2.1. Why Managed C++ for WPF? Next question is why should we use Managed C++ in Visual C++ to write WPF application when we can do the same thing in C# or VB.Net with XAML? There can be different reasons for it. - You lots of code base written in VC++ unmanaged code and it is not possible to rewrite everything in C#. You want to take advantage of both managed and unmanaged code in your project, such as using MFC document view architecture with rich user interface of WPF without creating any new DLL in C#. - Portion of your programs should be optimized for speed and for performance reason you write unmanaged code for it. WPF internally used the same technique for performance reason to call DirectX. - You want to hide the implementation of some portion of your program and or algorithm so no one can reverse engineer and write it as unmanaged code so no one can reverse engineer your code using ildasm. - Just for fun. 2.2. WPF Programming in VC++ To create simplest WPF program using Managed C++, you have to include reference of .Net components named windowsbase.dll, presentationcore.dll and presentationframeworkd.dll. In addition the program must be compiled using /clr switch because it is a managed code. Here is a diagram to show one project that has added references of these three DLL. To add the reference, right click on the project in the Solution Explorer tree and select "Reference..." from there. If we want to create a simple windows based program then it would be something like this. #include <windows.h> using namespace System::Windows; int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmd, int nCmd) { MessageBox::Show("Hello World"); } This program does nothing more than simply display one message box. We can further shorten the program by using main instead of WinMain and avoid including windows.h header file altogether, but in that case we will see the black console window behind the message box. If we want to make something more useful and interesting then we have to create objects of at least two classes Window and Application. But remember there can be only one object of Application class in the whole program. Here is the simplest program to show the usage of Window and Application class. #include <windows.h> using namespace System; using namespace System::Windows; [STAThread] int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmd, int nCmd) { Window^ win = gcnew Window(); win->Title = "Hello World"; Application^ app = gcnew Application(); app->Run(win); } The output of this program is a blank window with a title "Hello World". Here Application class is used to start the WPF application, manage the state of application and application level variables and information, but there is no output of it. It is Windows class that is responsible to draw window on the screen. Run method should be the last method call in the program, because this method won't return until the program close. Return value of Run method is application exit code return to the operating system. It is not necessary to pass the window object as a parameter in the run function of application class. We can call Run function without any parameter, but if we call the Run function without any parameter then we have to call the Show or ShowDilaog function of Window class before calling the Run. Difference between Show and ShowDialog is Show display the model dialog, on the other hand ShowDialog display the modeless dialog. For our simple application it doesn't make any difference. You can inherit your classes from Window and Application classes to store some application specific or window specific information. But remember you class must be inherited using the "ref" keyword and use "gcnew" keyword to create an instance of it on managed heap. Here is a simple program to show the usage of user inherited Window and Application classes. #include <windows.h> using namespace System; using namespace System::Windows; public ref class MyWindow : public Window { public: MyWindow() { Title = "Hello World"; } }; public ref class MyApplication : public Application { }; [STAThread] int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmd, int nCmd) { MyWindow^ win = gcnew MyWindow(); MyApplication^ app = gcnew MyApplication(); app->Run(win); } Output of this program is same as the previous one. In this program we can store all the application specific information in MyApplication class and Window specific information in MyWindow class. For example we set the title of the window in the constructor rather than in main after creating the object of it. We can also set other properties of window such as its back ground color, size, etc in the same place i.e. constructor. These classes and their usages looks quite familiar with MFC. In MFC based application we also need object of two classes named CWinApp and CWnd. Similarly we create only one object of CWinApp based class and call the run method of CWinApp. 2.3. WPF Class Hierarchy As we have seen before that to make smallest WPF application that display its own window we have to create objects of at least two classes named Window and Application. Before going further let's take a look at these two classes in little bit more detail. Here is a class diagram to show the inheritance chain for Application and Window class. There are no comments yet. Be the first to comment!
https://www.codeguru.com/cpp/cpp/cpp_managed/general/article.php/c16355/Using-WPF-with-Managed-C.htm
CC-MAIN-2017-47
en
refinedweb
This app uses System.Speech and System.Speech.Synthesize namespaces. There is nothing too special with these as they have been used in a few apps here at CodeProject and a few other sites. The applications that can be thought of using System.Speech are unimaginable. I came up with this idea from a few apps that are here at CodeProject. I ran one of the apps and my grandchildren were amazed at the computer talking. So I added their names to the program and ran it. They were surprised to hear their names. Their attention spans were as short as this >.<. Now they are not. System.Speech System.Speech.Synthesize System.Speech This app is a (CLC) Child's Learning Center and there is nothing more valuable than a child or grandchild's education. This app targets the 3 to 5 year old pre-schoolers. Some children might start to read at 2 years of age and others might start at 6 years. If your child is a little bored, stop the learning process for a couple of weeks and TRY again. Remember, children learn at their own pace. The requirements for the app are: Children, Adobe's PDF Reader, Powerpoint viewer, both installed to their default locations, go to, to get all the PDF and Powerpoint Presentation activity sheets and visual learning tools free. This app was tested on Vista Home Basic w/SP2, .NET 3.5, Visual Studio 2008 Pro w/SP1, 1024X768, and my grandchildren. There are many Child Learning Applications out there, but this one is Free. It works, and my grandchildren's attention spans have increased 10 fold. They interact with the computer by doing, seeing, and hearing what they have just done. Repeating the same steps, 3 times, helps the child remember. Putting this app together was a learning process for me. I had to think of what I would like to see as a child, different colors, animal pictures, letters, numbers, pretty fruit, and the computer talking. I am by no means, a designer or a teacher, but I am someone who believes that if something works, don't Fix-It. I didn't believe it at first, this actually works. First was the Parent-Child interactivity mode. I added a TextBox to hold the child's name. I then added a GroupBox to hold five CheckBoxes and a couple of Buttons to display the different activities. Then I added the activity GroupBoxes with alphabet buttons, number buttons, a few pictureBoxes and a label. Putting this all together starts the learning process. TextBox GroupBox CheckBoxes Buttons GroupBoxes I had a problem when clicking on a checkbox and checking it, then clicking on another checkbox, having it checked and the previous checkbox, unchecked, while displaying the correct groupbox for the current checkbox. Confused??? So was I after I wrote that long-winded sentence, but it makes perfectly good sense to me, now. This turned out to be somewhat simple enough without any overflow exceptions being thrown. I then added two more checkboxes to the Numbers GroupBox, using the same method, I was getting overflow exceptions. After a few trial and error attempts, I came up with these two examples: Private Sub chkPlus_CheckedChanged(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles chkPlus.CheckedChanged If chkPlus.Checked Then lblSign.Text = "+" chkMinus.Checked = False Else lblSign.Text = "-" chkMinus.Checked = True End If End Sub Private Sub chkMinus_CheckedChanged(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles chkMinus.CheckedChanged If chkMinus.Checked Then lblSign.Text = "-" chkPlus.Checked = False Else lblSign.Text = "+" chkPlus.Checked = True End If End Sub Clicking on one checkbox switches from one checkbox to the other, and visa-versa. My next problem was with the simple addition (1 + 1 = 2). I haven't been programming that long and when I typed 1 in the first textbox and 1 in the next textbox then added them together, I got 'cannot convert string to Integer'. I just forgot to convert the text numbers to integers. After all the fuss, I came up with this: Private Sub btnPlus_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles btnPlus.Click ansPlus = (CInt(txtNum1.Text) + CInt(txtNum2.Text)) End Sub Private Sub btnMinus_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles btnMinus.Click ansMinus = (CInt(txtNum1.Text) - CInt(txtNum2.Text)) End Sub Private Sub btnEnter_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles btnEnter.Click If chkPlus.Checked Then If CInt(txtAnswer.Text) = ansPlus Then strSay = CInt(txtNum1.Text) & " plus " & CInt(txtNum2.Text) & _ " equals " & CInt(txtAnswer.Text) InitializeSpeaker() speaker.SpeakAsync(strSay) MessageBox.Show("Correct :) " & txtName.Text) Else MessageBox.Show("Try Again :( " & txtName.Text) End If Else If CInt(txtAnswer.Text) = ansMinus Then strSay = CInt(txtNum1.Text) & " minus " & CInt(txtNum2.Text) & _ " equals " & CInt(txtAnswer.Text) InitializeSpeaker() speaker.SpeakAsync(strSay) MessageBox.Show("Correct :) " & txtName.Text) Else MessageBox.Show("Try Again :( " & txtName.Text) End If End If End Sub Applying the spelling routine was pretty straight forward. I created 'wordlist.txt' file to hold all my 2 and 3 letter words, I then added a ListBox and made it invisible as it is not used for any type of selection. I added two more buttons, btnNext, btnPrevious to navigate the word list in the Listbox. Here is what I came up with that works fairly well: ListBox btnNext btnPrevious Listbox Private Sub LoadListWords() Try Dim sr As StreamReader = New StreamReader(wordlistPath) 'sr.ReadBlock( Do While sr.Peek() >= 0 strWord = sr.ReadLine Me.lstWords.Items.Add(strWord) Loop sr.Close() sr = Nothing lstWords.SelectedIndex = 0 wordIndex = 0 Catch ex As Exception MessageBox.Show("Error : " & ex.Message) End Try End Sub Private Sub btnPrevious_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnPrevious.Click If wordIndex <= 0 Then Exit Sub lstWords.SetSelected(wordIndex, False) wordIndex -= 1 lstWords.SetSelected(wordIndex, True) lblSpell.Text = lstWords.SelectedItem.ToString() End Sub Private Sub btnNext_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnNext.Click If wordIndex >= lstWords.Items.Count - 1 Then Exit Sub lstWords.SetSelected(wordIndex, False) wordIndex += 1 lstWords.SetSelected(wordIndex, True) lblSpell.Text = lstWords.SelectedItem.ToString() End Sub Private Sub btnSPClear_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnSPClear.Click strSay = "" txtSpell.Text = "" End Sub Private Sub btnSPSay_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnSPSay.Click InitializeSpeaker() speaker.SpeakAsync(strSay) strGood = strCorrect & txtName.Text If strSay = txtSpell.Text Then speaker.SpeakAsync(strGood) Else ' Do Nothing End If End Sub After I put everything together and got it working correctly, then came the testing. I started with my oldest granddaughter, who is 4 years old and pretty much set in her ways already. To my amazement, she took right to it. Now, when she comes over, this is the first thing she wants to do. She already knew how to sing the alphabet song so I started teaching her the letters of the alphabet with the A is For... part of the program. Next is writing the letters. You can download all child activities from. They are free and well worth it. A is.
http://www.codeproject.com/script/Articles/View.aspx?aid=37945
CC-MAIN-2015-18
en
refinedweb
23 December 2011 10:16 [Source: ICIS news] GUANGZHOU (ICIS)--?xml:namespace> Well drillings at the block are expected to be completed in the first quarter of next year and the drilling programme is scheduled to produce 100,000 cubic metres (cbm) of gas per day, or 33m cbm/year, from the northern section of the block, Fortune Oil said in a statement. Meanwhile, China United Shanxi CBM, which jointly develops the Liulin block with Fortune Oil, has opened a new compressed natural gas (CNG) refuelling station at Changzhi and is building a wholesale CNG station for collecting, compressing and dispatching gas produced from the Liulin block, according to the statement. In addition, The London-listed Fortune Oil, which the parent company of Fortune Liulin Gas, focuses on oil, natural gas, as well as resource supply operations and investments primarily
http://www.icis.com/Articles/2011/12/23/9519124/chinas-fortune-oil-to-start-gas-sales-from-liulin-project-in.html
CC-MAIN-2015-18
en
refinedweb
. Posted by guest on May 02, 2014 at 05:42 PM PDT # I get the feeling you might be looking at the problem upside-down. public <T extends IFace & Object> void syncsOnElements(Set<T> objs). Posted by Tim Boudreau on May 03, 2014 at 03:23 PM PDT # What is the explosion of complexity with non-final fields? If all fields are final, why can't it be passed by reference to avoid the copying overhead of pass by value? What is the difference between this proposal and C# structs? Posted by Clay on May 05, 2014 at 07:39 AM PDT # In addition to graphics programming which has been mentioned, there are a few problem spaces that I've encountered where something along the lines of ValueTypes could be of great significance (but the “Devil is in the Details”):... ...I have a few others, (i.e. Cache Oblivious Data Structures /OffHeap/Unsafe and Language interoperability use cases which others have discussed) but (stepping back for a moment) I ask myself (philosophically):. Cheers, Eric Posted by M. Eric DeFazio on May 14, 2014 at 07:52 AM PDT # I have some proposal that I think They would be interesting on how to use Values Types. I have two proposal: How to define if? and how to use it? The two are separate proposal. Now I will write the first proposal 1.Defining Value Types?. So I think that to define a value type we can only do: final class Point(int x, int y){ boolean equals(Point p){ return this.x==p.x&&this.y==p.y} }; x and y are automatically final and public members. So that can exactly be compiled like: final __ByValue class Point { public final int x; public final int y; public Point(int x, int y) { this.x = x; this.y = y; } public boolean equals(Point that) { return this.x == that.x && this.y == that.y; } } Simple, concise and contributes to productivity. We can also do: final class Point(int x, int y){ private int c;//if I wont boolean equals(Point p){ return this.x==p.x&&this.y==p.y} public static Point getFunPoint(){ } public static void maFunction(Point p, boolean b, double b){ } } I also thought about something new: B. Why not an implicit default equals. So if I do : final class Point(int x, int y){} that means if the JVM doesn't find an explicit equals, it cans do logical compare. public boolean equals(Point that) { return this.x == that.x && this.y == that.y; }. So a Point can be defined in one line: final class Point(int x, int y){} C. If we don't want to define something else in a value types, braces can be optional as in lambda expressions :) So to define a value type we can only do: final class Point(int x, int y); Posted by Bilal Soidik on May 14, 2014 at 10:04 AM PDT # I have a different proposal that solves similar problems, but (I think) have some clear advantages over “Value types”: - does not require such big changes to JVM (e.g. no new opcodes) - works better with current java coding practises (supports both mutable and immutable types). - in some cases improves performance of existing java programs without need to change anything in them. Proposal: 1) Add one new special class to java: public class ValuesArray<E> implements List<E> { native E get(int index); native E set(int index, E element); native int size(); static native <E> ValuesArray<E> create(E seed, int size); …. } This will behave similarly to ArrayList with fixed size, but instead of storing references to objects, it will store values of its fields. So it is something like array of struct instead of array of references. Methods: create(E seed, int size) - will create new ValuesArray of type E, specified size and filled with values from seed object. It also stores type E (=seed.getClass()). set(index, element) - instead of storing reference to object, it will store values of its fields. get(index) - will read values and box them to new object of type E. Of course there will be some limitations on which classes can be used as E. It must be final class and it must support construction of boxed values: - for mutable objects: all fields of E are public and non-final and it has public no-param constructor. - for immutable objects: it should have have constructor that has same parameters as objects fields and it assigns those parameters to them. 2) Improve escape analyses in JVM: - should be able to detect that field of a class never escapes and “inline” it. (e.g. Line object with 2 Point fields p1 and p2 can be stored as one object on heap, if JVM can determine that p1 and p2 never escape.) -). 3) Add some support for escape analyses in language. E.g.: - “@NoEscape” annotation for class fields. For JVM this will be just hint, but for developer it should cause compile time errors/warnings when he tries to use the field in the way that breaks “escape analyses” rules. - “@ValueType” annotation for class. Makes sure that the class is suitable for ValuesArray. Posted by Palo Marton on June 17, 2014 at 05:15 AM PDT # Great to see this moving along. Struct-like enhancements to Java like this are great. My vote for __MakeValue is the null string. I'd love it to be: Point p1 = (1, 34); it'd fit well with assignment to return values as: (x, y) = p1; or (x, y) = getRandomPoint(); Posted by guest on June 18, 2014 at 09:41 AM PDT #
https://blogs.oracle.com/jrose/entry/value_types_in_the_vm1
CC-MAIN-2015-18
en
refinedweb
This post goes into the details of how you can add a "save game" feature to your games. Python's built-in shelve module makes this very easy to do, but there are some pitfalls and tips that you might want to learn from this post before trying to code it up yourself. To give an example of adding a "save game" feature to a game program, I'll be taking the Flippy program (an Othello clone) from Chapter 10 of "Making Games with Python & Pygame" (and Reversi from Chapter 15 of "Invent Your Own Computer Games with Python".) If you want to skip ahead and see the Flippy version with the "save game" feature added, you can download the source code and image files used by the game. You need Pygame installed to run Flippy (but not Reversi). The Naïve Ways to Implement "Save Game" A save game feature works by taking all of the values in the program's variables (which in total called the game state) and writes them out to a file on the hard drive. The game program can be shut down, and when next started again the values can be read from the file and into the program's variables. If you are familiar with Python's file I/O and the open(), write(), readline(), and close() functions, you might think that you can just open a file in write-mode, and then write out all the data to the hard drive that you want to load the next time the player plays the game. This is doable, but turns out to be a bad way to implement a "save game" feature. Quick Start: The shelve Built-In Module The shelve module has a function called shelve.open() that returns a "shelf file object" that can be used to create, read, and write data to shelf files on the hard drive. These shelf files can store any Python value (even complicated values like lists of lists or objects of classes you make). Say you had a variable with a list of list of strings, like the mainBoard variable in the Flippy program. Here's how you can save the state of all 64 spaces on the board (which are 64 string values) and the other variables (playerTile, computerTile, showHints, and turn): import shelve shelfFile = shelve.open('saved_game_filename') shelfFile['mainBoardVariable'] = mainBoard shelfFile['playerTileVariable'] = playerTile shelfFile['computerTileVariable'] = computerTile shelfFile['showHintsVariable'] = showHints shelfFile.close() The shelve.open() function returns a "shelf file object" that you can store values in using the same syntax as a Python dictionary. You don't have to put the word "Variable" at the end of the key. I just did that to point out that the name doesn't have to be the same as the variable with the value being stored. In fact, just like any dictionary key, it doesn't even need to be a string. The data stored in the shelf object is written out to the hard drive when shelfFile.close() is called. Note that the shelf file name is 'saved_game_filename', which doesn't have an extension. An extension isn't needed, but you can add one if you want. This will be explained more in detail. Here's the code to load the game state from a shelf file: import shelve shelfFile = shelve.open('saved_game_filename') mainBoard = shelfFile ['mainBoardVariable'] playerTile = shelfFile ['playerTileVariable'] computerTile = shelfFile ['computerTileVariable'] showHints = shelfFile ['showHintsVariable'] shelfFile.close() 'some 'some_file.txt', then the files will be some_file.txt.bak, some_file.txt.dat, and some_file.txt.dir. Security Warning Just like with any file, your players can modify the values in the shelf file. You can try obfuscated the data in it, but this never works in the long run. What this means in most cases is that people can make saved game hack programs to let players cheat. That's not really a problem. What can be a problem is if your game executes code depending on the content of the shelf file, than this can have bad security implications. Say as part of the save game file, you include a string that tells your game what program to run. Something like this: shelfFile['programToRun'] = 'notepad.exe' A malicious hacker could change the shelf file so that instead of the string 'notepad.exe' it is 'virus.exe' or some other value that could cause your game program to act badly because of a saved game file. In most cases, your games won't store data like this. But it's something that I just wanted to point out. Examples: flippy_withsavegame.py and reverse_withsavegame.py The good news is that the shelve module makes it as simple as possible to convert the values in variables to files on the hard drive, and vice versa. Just call shelve.open(), assign the values to the shelf file object, and then call the close() method. But it also helps to see this used in actual code. I've modified a couple Othello games from "Invent Your Own Computer Games with Python" and "Making Games with Python". Both are written for Python 3. Reversi is an Othello clone that uses ASCII text for graphics. Flippy is an Othello clone that has real graphics. You will need to download and install Pygame to run it. 4 thoughts on “Implement a "Save Game" Feature in Python with the shelve Module” Great post. I've been doing this the old way with I/O functions. I'll try this for sure. Thx :) I like using YAML via PyYAML for this sort of thing because it's a standard format that can be read by other languages and I can easily edit the files manually if necessary. Unlike XML or other similar options, you can take a Python dictionary and call yaml.dump(dict) and it will give you a nice human readable YAML representation of the data without having to mess around with any further details. Hi. I know this was posted quite a while ago, but if you don't mind, could you explain what to do if you need to save methods? I'm working on a game and each character has a dictionary of the commands they can use (with the command to type in as the key, and the function for that command as the value) and I want this saved as some characters might have different skills and so on. When I try to shelve the characters I get an error because instance methods can't be pickled. Is there a way around this, or will I have to completely rewrite the way commands work? Thanks. Hi. I know this was posted a while ago, but if you don't mind, could you explain what to do if you want to shelve methods? I'm working on a game where each character has a dictionary of commands (with the string to be typed in as the key and the function for the command as the value). I want to save this as different characters might have different skills and so on. When I try to shelve it I get an error because instance methods can't be pickled. Is there a way around this, or do I have to rewrite the way commands work? Thanks.
http://inventwithpython.com/blog/2012/05/03/implement-a-save-game-feature-in-python-with-the-shelve-module/?wpmp_switcher=mobile
CC-MAIN-2015-18
en
refinedweb
Integrating the Video Platform Kaltura to a CMS Client Sven Hoffman details how subshell integrated open source video platform Kaltura into their CMS Sophora). The Integration So, the main idea of the integration allows users to stay within their familiar workbench, the CMS itself, and treat videos like any other Sophora document, even though they are actually stored in the external Kaltura instance. It is not important for the user that an additional application manages the video data in the background. The new procedure for the editorial journalist simply consists of the following steps. First, a new Sophora video document is created with the help of a wizard (see figure 1) as known from Eclipse by clicking File → New in the main menu. In this wizard, the user can select an existing video asset from the Kaltura server, which then will be linked with a new document within Sophora. As soon as the user clicks on one of the listed video entries, it will be displayed in the preview part together with corresponding meta-information (duration, format, Kaltura entry ID and the like). Figure 1: Wizard to create new video documents. After clicking the finish button, the new Sophora document automatically opens in the editor (see figure 2). Some fields are already filled with data obtained from the Kaltura server while others are empty and thus can be completed by the user. The connection between the Sophora document and the video asset is guaranteed by a unique identifier, the Kaltura entry ID. This ID is set automatically (and cannot be modified) in the Sophora document upon creation. Figure 2: Video document opened for editing in document editor Now the video is ready for further usage and can be included in other Sophora documents by drag and drop. An example can be seen in figure 3 where a Sophora video document is inserted in the text body of an article. The result is immediately visible within the preview on the right-hand side of the window. Figure 3: Exemplary usage of a video document within an article. The result can be seen in the preview on the right-hand side. If the desired video is not yet available on the Kaltura server, the user can initially up-load it from the local hard-drive. While uploading, a video will automatically be converted into previously configured profiles, so-called “flavors” (for instance standard, mobile or HD). In addition, a thumbnail image is generated from the video data. When creating a new Sophora document from an existing Kaltura source this thumbnail is copied from Kaltura to Sophora. The exemplary video, shown in the subsequent figures, is taken from the “Big Buck Bunny“ movie of the Blender Foundation due to its free availability on the web. The Implementation When considering existing Kaltura plug-ins for systems such as Drupal, Joomla or WordPress, you will recognize that the integration on the client side is based on the Adobe Flash widgets provided by Kaltura. Within a Java / RCP application, such as the Sophora DeskClient, it is recommendable to choose a different approach since the usage of Flash widgets is not user friendly. Hence, the choice falls on using the web-services of the Kaltura platform directly, which can be accessed by a Java client library. The functionality to connect to a Kaltura server has been encapsulated in a distinct Eclipse plug-in that provides a wizard to create a new Sophora video document as well as an upload dialog for new videos. Both are integrated into the DeskClient via an extension point. Document Creation Wizard On the left-hand side of the wizard (see figure 1), a list of all videos is displayed that are available on the Kaltura server. For the illustration of this list, a JFace TableViewer, which retrieves the content to be shown directly from the Kaltura platform, is used. In order to fetch the available videos by calling the corresponding service, the KalturaMediaService in this case, a connection has to be established first. Therefore, the usual connection details including user name, password and service URL are required. This information has to be supplied in advance by the user within a Preferences page. The actual connection to the Kaltura server is embodied by the KalturaConnection class, which encapsulates the KalturaClient object of the Java client library. Basically a KalturaClient object is then used to access the web-services of the video platform. The method getAllVideos() of the KalturaConnection object has to be called to retrieve the available videos from the server. As shown in listing 1, the KalturaMediaService is used to return a list of entries that are of the type KalturaMediaType.Video. These entries are passed to the TableViewer and are finally displayed in the wizard’s list. Listing 1 private final KalturaClient client; KalturaConnection(KalturaClient client) { this.client = client; } public List<KalturaMediaEntry> getAllVideos() throws KalturaException { try { /* get media service from KalturaClient */ KalturaMediaService mediaService = client.getMediaService(); /* create a filter and a pager to choose how many entries and which type to receive */ KalturaMediaEntryFilter filter = new KalturaMediaEntryFilter(); filter.mediaTypeEqual = KalturaMediaType.VIDEO; KalturaFilterPager pager = new KalturaFilterPager(); pager.pageSize = MAX_PAGESIZE; /* execute list action of the mediaService object to get the list of entries */ KalturaMediaListResponse listResponse = mediaService.list(filter, pager); mediaService.list(filter); return listResponse.objects; } catch (KalturaApiException e) { throw new KalturaException(e); } } Preview Video Player “>When you select an entry from the list of available videos within the wizard, the corresponding video immediately starts playing in the preview video player which is positioned to the right of the said list. The player is one of the Kaltura widgets (Kaltura Dynamic Player) that is integrated into the DeskClient. Since the player is a Flash widget the SWT browser component is applied here. The browser component receives a local HTML file to display, which utilizes the Flash player as an SWFObject. The control of the player is done by JavaScript methods within the HTML that can then be called from Java methods of the DeskClient. The HTML file and the required JavaScript libraries are also contained in the DeskClient plug-in. Listing 2 depicts the (shortened) content of the HTML file that the player embeds in the DIV element with the ID kdp3 by calling swfobject.embedSWF(). As seen in this code snippet, the Flash object is located on the Kaltura server and is accessed by a HTTP URL. This URL contains several parameters, such as wid and uiconf_id, which control the player’s configuration. For instance, you can change the player’s appearance and offered controls with the parameter uiconf_id. The JavaScript function changeMedia() may be called to play the video with the matching Kaltura entry ID. Within this JavaScript function the sendNotification() method is used to send out a changeMedia event. Besides the type of the event, the ID of the video to be displayed is passed on. Listing 2 – player_embed.html <html xmlns=""> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript"> function changeMedia(id) { $('#kdp3').get(0).sendNotification('changeMedia', {entryId:id}); } </script> <script type="text/javascript"> [...] swfobject.embedSWF("", "kdp3", ...); </script> </head> <body> <div id="kdp3" /> </body> </html> In order to finally integrate the player into the wizard the class PlayerWidget is employed (see listing 3). There, the SWT browser component is instantiated and the method setUrl() receives the HTML file from listing 2. To detect the path of the said HTML file, the Eclipse class FileLocator is used and the URL is prepended with the keyword platform: (platform: needs keyphrase – if the colon is extra, keyword stays) so that the workspace of the DeskClient is searched for this particular HTML file. To assure that the HTML file, as well as the required JavaScript libraries, which are embedded in the HTML code via script elements, are reliably detected by this mechanism, the plug-in must not be added to the product in form of an JAR archive. Instead it must be added as an unpacked folder. By instantiating an object of class PlayerWidget, an empty video player is generated initially. This video player does not play any video until the method changeMedia() is called. This method forwards the request via the execute() method of the SWT Browser object to the same named JavaScript function and passes the Kaltura entry ID of the video to be played. The changeMedia() method of the PlayerWidget class is notified by each individual selection of an entry within the wizard’s list of available videos and thereby triggers the playback of the according video. In general, when integrating Flash objects into an Eclipse RCP application, you have to be aware that the SWT browser component invokes the system browser (which is the Internet Explorer in Windows). Thus, to display Flash content the according Flash plug-in for the system browser is required. Listing 3 – PlayerWidget /* Widget which displays a Flash based video player within a Browser component. */ public class PlayerWidget { private Browser browser; public PlayerWidget(Composite parent) { browser = new Browser(parent, SWT.NONE); String urlString = StringUtils.EMPTY; try { URL url = new URL("platform:/plugin/com.subshell.sophora.eclipse.kaltura/etc/player_embed.html"); urlString = FileLocator.toFileURL(url).toURI().toString(); } catch(IOException e) { // Exception Handling ... } browser.setUrl(urlString); } /* Play media with passed id. An invalid ID will lead to a javascript error. */ public void changeMedia(String entryId) { browser.execute("changeMedia('" + entryId + "');"); } } Upload Dialog In addition to the wizard for creating new Sophora video documents, there is another dialog to upload video files to the Kaltura server. When you have opened this dialog, which is accessible in the same way as the New wizard in the main menu, you can provide a name and select a local file. After confirmation of the dialog (by clicking on Ok), a connection to the Kaltura platform is established in the background and the file is then transmitted. For this, the method addNewMediaEntry() of the KalturaConnection class is invoked which accesses the KalturaBaseEntryService (compare to listing 4). At first, the binary data of the new video is transferred and then an entry will be added to the Kaltura system later. With the help of the addFromUploadedFile() method, the new entry is connected with the previously saved video data. The upload of a new video file and the creation of a new entry might be a time consuming operation, depending upon the size of the video. Besides transmitting the binary data, the upload automatically triggers additional processes that convert the uploaded video into different formats. To avoid that the UI is blocked in the meantime, this operation is run in the background of the DeskClient. As soon as this background task is finished, the uploaded video will be available within the list of all videos of the New wizard. Listing 4 – KalturaConnection (Continuation) public void addNewMediaEntry(File videoFile, String entryName) throws KalturaException { try { /* get base entry service from KalturaClient */ KalturaBaseEntryService baseEntryService = client.getBaseEntryService(); /* upload new file and get a token that identifies it */ String token = baseEntryService.upload(videoFile); /* create a new entry */ KalturaBaseEntry entry = new KalturaBaseEntry(); entry.name = entryName; entry.type = KalturaEntryType.MEDIA_CLIP; /* attach uploaded file to newly created entry */ baseEntryService.addFromUploadedFile(entry, token); } catch (KalturaApiException e) { throw new KalturaException(e); } } Displaying Videos on the Website Since the play-out of content in Sophora is implemented with JSP templates, a corresponding template is required. This template is equipped with similar mechanisms as the HTML file used for the preview player in the DeskClient’s wizard. A SWFObject embeds the video player and receives the Kaltura entry ID as a parameter. The template receives this ID from the Sophora document that has to be played out. Additional parameters for the size, the height and the preferred configuration of the video allow altering of the video player’s appearance. Conclusion: Added Value by the Connection of two Systems The interaction of both systems, Sophora and Kaltura, offers sensible benefits on every side. As described, the connection facilitates users to integrate videos in websites easily without leaving the familiar environment of the used CMS. In the background the system benefits from valuable functions of the video platform, such as streaming, the video player widget, or the automated format conversion. This solution has many options for future extensions. Possible variants might be the design of an online video platform within the CMS or the upload of videos as user generated content via the website. From a technical point of view, the connection of the Kaltura platform with the Sophora CMS proceeded straight forward and without serious obstacles. The Java library provides an easy access to the platform’s functionality.
http://jaxenter.com/integrating-the-video-platform-kaltura-to-a-cms-client-104620.html
CC-MAIN-2015-18
en
refinedweb
On Thu, 11 Aug 2005, Vladimir Terziev wrote: > From: Vladimir Terziev > To: kerberos@mit.edu > Date: Thu, 11 Aug 2005 12:31:38 +0300 > Subject: Unable to build 1.4.2 on FreeBSD > > Hi, > > i tryed to build Kerberos 1.4.2 on FreeBSD 4.10, but i failed. The error i got is the following: .... > In file included from ../../../include/krb5.h:100, > from gssapiP_krb5.h:50, > from import_name.c:27: > /usr/include/stdlib.h:111: warning: ANSI C does not support `long long' > /usr/include/stdlib.h:117: warning: ANSI C does not support `long long' > import_name.c: In function `krb5_gss_import_name': > import_name.c:125: `BUFSIZ' undeclared (first use in this function) > import_name.c:125: (Each undeclared identifier is reported only once > import_name.c:125: for each function it appears in.) > import_name.c:125: warning: unused variable `pwbuf' > import_name.c:124: warning: unused variable `pwx' > gmake[3]: *** [import_name.o] Error 1 > > As i managed to investigate, BUFSIZ is really undeclared, but why? > > Could someone explain me what could be wrong? I've just been looking at this on OpenBSD. I strongly suspect that it's because stdio.h isn't being included for some reason. I bodged things by applying the following patch: *** ./src/lib/gssapi/krb5/import_name.c.orig Mon Jul 18 23:12:42 2005 --- ./src/lib/gssapi/krb5/import_name.c Thu Aug 11 10:06:34 2005 *************** *** 39,44 **** --- 39,48 ---- #include #endif + #ifdef __OpenBSD__ + #include + #endif /* __OpenBSD__ */ + /* * errors: * GSS_S_BAD_NAMETYPE if the type is bogus Something similar may work for you on FreeBSD. Note that this *is* a bodge, not a fix. -- Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK D.H.Davis@bath.ac.uk Phone: +44 1225 386101 ________________________________________________ Kerberos mailing list Kerberos@mit.edu
http://fixunix.com/kerberos/59775-unable-build-1-4-2-freebsd.html
CC-MAIN-2015-18
en
refinedweb
NAME VOP_ACCESS - check access permissions of a file or Unix domain socket SYNOPSIS #include <sys/param.h> #include <sys/vnode.h> int VOP_ACCESS(struct vnode *vp, int mode, struct ucred *cred, struct thread *td); DESCRIPTION This entry point checks the access permissions of the file against the given credentials. Its arguments are: vp The vnode of the file to check. mode The type of access required. cred The user credentials to check. td The thread which is checking. The mode is a mask which can contain VREAD, VWRITE or VEXEC. LOCKS The vnode will be locked on entry and should remain locked on return. RETURN VALUES If the file is accessible in the specified way, then zero is returned, otherwise an appropriate error code is returned. PSEUDOCODE int vop_access(struct vnode *vp, int mode, struct ucred *cred, struct thread *td) { int error; /* * Disallow write attempts on read-only file systems; *; break; } } /* If immutable bit set, nobody gets to write it. */ if ((mode & VWRITE) && vp has immutable bit set) return EPERM; /* Otherwise, user id 0 always gets access. */ if (cred->cr_uid == 0) return 0; mask = 0; /* Otherwise, check the owner. */ if (cred->cr_uid == owner of vp) { if (mode & VEXEC) mask |= S_IXUSR; if (mode & VREAD) mask |= S_IRUSR; if (mode & VWRITE) mask |= S_IWUSR; return (((mode of vp) & mask) == mask ? 0 : EACCES); } /* Otherwise, check the groups. */ for (i = 0, gp = cred->cr_groups; i < cred->cr_ngroups; i++, gp++) if (group of vp == *gp) { if (mode & VEXEC) mask |= S_IXGRP; if (mode & VREAD) mask |= S_IRGRP; if (mode & VWRITE) mask |= S_IWGRP; return (((mode of vp) & mask) == mask ? 0 : EACCES); } /* Otherwise, check everyone else. */ if (mode & VEXEC) mask |= S_IXOTH; if (mode & VREAD) mask |= S_IROTH; if (mode & VWRITE) mask |= S_IWOTH; return (((mode of vp) & mask) == mask ? 0 : EACCES); }.
http://manpages.ubuntu.com/manpages/intrepid/man9/VOP_ACCESS.9freebsd.html
CC-MAIN-2015-18
en
refinedweb
October 2008 Board reports (see ReportingSchedule). These reports are due here by 8 Oct Now, BlueSky ASF Project is running in the first phase. A lot of efforts are done to legalize the BlueSky source code under Apache licence. For RealClass system source code, there are three main third-part libraries whose licences do not comply with ASL definitely. They are GUN c++ stl, arts and ffmpeg. The issue that dynamic link with GPLed GUN c++ stl in RealClass system source code is legal or not have been discussing in bluesky mailing list. The conflict which the other two libraries lead to are so complicated that more time is spent and discuss in details to resolve this problem. Besides ,we do the following: In order to introduce RealClass system’s functions, feature and usage, we supply the document about system customer manual to BlueSky website. - Due to conflict with ASL, the work of committing the source code is behind of the schedule. Empire-DB Empire-db has been accepted to the incubator in July 2008. While ths SVN repository had soon been set up and development progressed there has until now not been an official Apache release with the packages containting the org.apache namespace and with all legal files available and in the right place. Recent activity: The main concern of the Empire-db committers in the previous month has been the acceptance of the first official Apache release by members of the incubator PMC. Due to legal concerns about the inclusion of two .jar files the distribution was first changed to go without them which however resulted in compilation problems with the build files provided. After a long discussion period the two jars which were taken from a Tomcat distribution where included again and release candidate 2 of Empire-db 2.0.4 and Struts2-extentions 1.0.4 were again put up for voting. Finally the release got accepted incubator PMC. The accepted distribution files will now be offered for download from the Empire-db website. (Yet to be done) Meanwhile a few improvement and bufixing tasks have already been opened for the upcoming 2.0.5 release. Community aspects: Slowly the empire-user mailing list is getting used by uses not belonging to the empire-db development team. A few mail requests have been answered. With the now accepted official Apache release we hope that we can now further increase the community... Mailing lists have been created. The svn repository was created at Initial committers' accounts are in process. Mentors have been given access to the svn repo. The JIRA project has been created. 2008-October JSecurity Incubator status report JSecurity is a powerful and flexible open-source Java security framework that cleanly handles authentication, authorization, enterprise session management and cryptography. JSecurity has been incubating since June 2008. Last month, a new external release was issued (0.9.0-RC2). After this, a single bug fix has been implemented and committed to the external SourceForge SVN repository. Many other commits have been made, but all were nonfunctional and were made to round out the project's JavaDoc. The JavaDoc is already quite good, but not 100%. The team has discussed on the development list that it would be a good idea to get the JavaDoc completed at 100% before releasing 0.9 final, with 0.9 final being the last external release. After this point, we wanted to inject the code source into the Apache repository as a 'clean slate' initiative. The idea is that perhaps 0.9.1 would be an Apache release, allowing that release to focus only on adherence to Apache policy and not dependent on code or documentation. Then all subsequent releases could benefit from the experience of this 'first run', continuing to maintain Apache policy. The JavaDoc is currently being updated intermittently, as the development team has the opportunity to update it in their spare time. It is certainly desirable to finish this effort soon, hopefully no more than a week or two. But this time frame is ultimately dependent upon the number of contributors. The project team is not considering graduation at this point, as the code is not ready for an Apache release. The community is working well, with decisions being made in public. The status is being maintained at No changes.... still a limping along community with the potential for new committers on the horizon for quite some time now but no action towards bringing them on. There is some vitality to the mailing list, but being a mostly auto-generated port of Java Lucene does not an excitingly innovative project make.. entered the Apache Incubator in May 2008. Recent Activity: - A large group effort to refactor some of the TProtocol abstraction for higher performance is underway Issues before Graduation: - We would like to bring on more committers, particularly one to own the Python libraries - We have also yet to make an official Apache release, development is ongoing in trunk with diverse affiliations. Community: - We continue to do outreach to attract new contributors with diverse affiliations, who may become committers.
http://wiki.apache.org/incubator/October2008
CC-MAIN-2015-18
en
refinedweb
HFJ Music Box Page 392 Davy Kelly Ranch Hand Joined: Jan 12, 2004 Posts: 384 posted Nov 18, 2006 08:58:00 0 Hey Guys, been a while, still getting back into it, but on page 392 of the Head First Java , I was doing the Music Box program with GUI. I get an error from the code, and I am not sure why. the 1 error I get is this line of code sequencer.addControllerEventListener(ml, new int[] {127}); i get this error: MiniMusicPlayer3.java:33 addControllerEventListener(javax.sound.midi.ControllerEventListener,int[]) in javax.sound.midi.Sequencer cannot be applied to (MyDrawPanel,int[]) sequencer.addControllerEventListener(ml, new int[] {127}); ^ 1 error I copied the code directly, i fixed other errors I done, but I have been looking at this for over an hour now, and cant get it. here is the full program code: import javax.sound.midi.*; import java.io.*; import javax.swing.*; import java.awt.*; public class MiniMusicPlayer3 { static JFrame f = new JFrame("My First Music Video"); static MyDrawPanel ml; public static void main(String[] args) { MiniMusicPlayer3 mini = new MiniMusicPlayer3(); mini.go(); }//close main method public void setUpGui() { ml = new MyDrawPanel(); f.setContentPane(ml); f.setBounds(30, 30, 300, 300); f.setVisible(true); }//close setUpGui method public void go() { setUpGui(); try { //make and open a sequencer Sequencer sequencer = MidiSystem.getSequencer(); sequencer.open(); sequencer.addControllerEventListener(ml, new int[] {127}); //make a sequence and a track Sequence seq = new Sequence(Sequence.PPQ, 4); Track track = seq.createTrack(); int r = 0; //make a bunch of events to make the notes keep going up for (int i = 0; i < 60; i+= 4) { r = (int)((Math.random() * 50) +1); //call a new makeEvent() method to make the message and event. //then add the result to the track track.add(makeEvent(144, 1, r, 100, i)); /*Here's how we pick up the beat - - we insert our own ControllerEvent (176 says the event type is ControllerEvent) with an argument for event #127. This will do NOTHING! We put it in just so that we can get an event each time a note is played. In other words, its sole purpose is so that something will fire that we can listen for (we can listen for NOTE ON/OFF events). Note that we're making this event happen at the same tick as the NOTE ON. So when the NOTE ON event happens, we'll know about it because out event will fire at the same time. */ track.add(makeEvent(176, 1, 127, 0, i)); track.add(makeEvent(128, 1, r, 100, i + 2)); }//end for loop //start the sequence runnning sequencer.setSequence(seq); sequencer.start(); sequencer.setTempoInBPM(220); }//close try catch (Exception ex) { ex.printStackTrace(); }//close catch }//close go method public MidiEvent makeEvent(int comd, int chan, int one, int two, int tick) { MidiEvent event = null; try { ShortMessage a = new ShortMessage(); a.setMessage(comd, chan, one, two); event = new MidiEvent(a, tick); }//close try catch (Exception e) { }//close catch return event; }//close makeEvent method //inner class class MyDrawPanel1 extends JPanel implements ControllerEventListener { //set the flag to false, only set it to true when we get an event boolean msg = false; public void controlChange(ShortMessage event) { //we got an event set the flag to true and repaint msg = true; repaint(); } public void paintComponent(Graphics g) { if (msg) { //we have to use a flag because other things might trigger a repaint //we only want to pain only there's a controllerEvent); msg = false; }//close if }//close paintComponent method }//close inner class }//close outer MiniMusicPlayer3 class any help will be appreciated. davy [ November 18, 2006: Message edited by: Davy Kelly ] [ November 18, 2006: Message edited by: Davy Kelly ] How simple does it have to be??? Davy Kelly Ranch Hand Joined: Jan 12, 2004 Posts: 384 posted Nov 18, 2006 09:48:00 0 Woo Hoo, I figured it out, because I have another version of MyDrawPanel, I renamed the one in this program as MyDrawPanel1 and I forgot to fix the declerations of them, so some had MyDrawPanel and some had MyDrawPanel1, its all fixed now. it took me a while, but I got there. I think I need a break now. davy I agree. Here's the link: subject: HFJ Music Box Page 392 Similar Threads How LOLbad is this stylistically? MiniMusicPlayer2 class in Head First Java book (Chapter 12) Java Class hangs after run Head First Java problem MiniMusicPlayer HFJ All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter JForum | Paul Wheaton
http://www.coderanch.com/t/405428/java/java/HFJ-Music-Box-Page
CC-MAIN-2015-18
en
refinedweb
May 13, 2007 02:46 AM|click2|LINK Member 20 Points All-Star 21717 Points Sep 25, 2007 05:09 AM|jimmy q|LINK? All-Star 21717 Points Sep 26, 2007 07:49 AM|jimmy q|LINK I managed to fix my problem. The problem was I had a calendar extender control within the tabpanel that had its ondateselection property set. For some unknown reason with that property set, Firefox refuses to display the tabcontainer. None 0 Points Member 37 Points Feb 18, 2008 03:56 PM|officialboss|LINK>This is how it is rendered <div> <div id="Tabs" class="ajax__tab_xp" style="width:788px;visibility:hidden;"> <div id="Tabs_header"> </div><div id="Tabs_body" style="height:610px;"> </div> </div> Current Tab: <span id="CurrentTab"></span><br /> <span id="Messages"></span> </div> Feb 19, 2008 02:51 PM|vdewisme|LINK Hello, It seems you have to set the ActiveTabIndex to 0 programmatically to make the TabContainer visible. By the way, I have another error with the tab container. I add some tab in my tab container programmatically. ie : QuarterCalculationContainer.Tabs.Clear() For i As Integer = 0 To yearForecasts.ForecastsList.Count - 1 Dim panel As New TabPanel() panel.ID = "Panel_" & yearForecasts.ForecastsList.Keys(i).QuarterId & "_" & yearForecasts.ForecastsList.Keys(i).QuarterYear.Value panel.HeaderText = yearForecasts.ForecastsList.Keys(i).ToString() Dim table as New Table() panel.Controls.Add(table) QuarterCalculationContainer.Tabs.Add(panel) Next tab container Mar 17, 2008 11:05 AM|tweenet|LINK. TabContainer ajax visibility Mar 17, 2008 02:35 PM|aploessl1|LINK? Apr 26, 2008 08:22 PM|zigy42|LINK> May 09, 2008 06:04 PM|timtas|LINK. Jul 22, 2008 09:59 PM|vackup|LINK When "Sys is not defined appears" it's a Javascript problem. But why's the Javascript problem? The problem appears when the AJAX Javascript Librarys doenst load. The main problem here is that AJAX parameters are not defined correctly in web.config. Did u defined correctly? This is my web.config PS: Sorry my awful english <?xml version="1.0"?> ="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <"/> <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies> <="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/> <"/> </handlers> </system.webServer> </configuration> Oct 23, 2009 04:18 PM|tomgusa|LINK My problem was similar. I had a couple of Regular expression Validators embedded in comments tag (<!-- comments like this -->). Removed it completely and is fixed the issue. From Firefox, use error console and try to fix all javascript errors that pops up there. That should fix your issue. Member 1 Points Feb 19, 2010 10:19 AM|jcreator16|LINK I was facing same problem I resolved it by adding style explicitly. <ajax:TabContainer None 0 Points Mar 24, 2010 08:25 AM|Mike_Zandvliet_|LINK Hello jcreator16 and others, I am experiencing the same kind of problems as descibed above, where the TabContainer is rendering *sometimes*, but not others. The problem is mostly occuring in Firefox (3.6), but also IE (8). My site uses Master Pages. Firebug gives me this error message on the occasions that the TabContainer does not render: Sys.InvalidOperationException: Component 'ctl00_ContentPlaceHolder1_tabContainer1' was not found. The errors occur maybe 40% of the time in Firefox, and 10% of the time in IE. As speculated above, it seems that the AJAX libraries are not loading properly, but only sometimes. I've been googling this all day, and none of the suggestions out there have helped so far. Anyone got any ideas? jcreator16 - did you add that style code to all the tabs also? When I add it to just the TabContainer, I get just a row of unformatted text (the text from the tab labels) and nothing else.... (on the occasions when the error occurs that is). Cheers, Mike Member 2 Points Mar 26, 2010 06:42 PM|itignition|LINK I dont think the new Tookit Version is ready. period. The volitile new AjaxTookit.dll , Assembly Version v.3.0.31106.0 is behaving badly with firefox/IE8/KDE etc. Browsers. Issues: 1)Tab Container is hidden with the style="visibility:hidden" attribute. 2)Mouse over tab header content or "hand" UI browser feature does not appear. I recommend that you rollback to version : 3.0.11119.0. Rolling hat fixed my issues across all browsers. If you cannot find it, post here and I will U/L an assembly that will works for you. None 0 Points Nov 21, 2010 12:16 AM|LarryGMoody|LINK This is the fix that worked for me: Add [CombineScripts="false"] to the ToolkitScriptManager attributes Feb 11, 2011 11:01 PM|Tawl|LINK I know this is an old post, but to add my two pence, I had the same problem. It turns out it was all due to some invalid HTML markup (missing a quote mark around an attribute). I guess first rule when the container won't appear at all is, check your markup! Hope that helps someone. T Member 23 Points Apr 01, 2011 01:12 PM|Webmonkeymon|LINK thanks for posting. i tried several other suggestions and read quite a few posts and this solution worked for me. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load TCMain.ActiveTabIndex = 0 'where tcmain is the id of the ajax TabContainer thanks Member 23 Points Apr 01, 2011 01:19 PM|Webmonkeymon|LINK i also had this issue. Thankfully the post above was a good work around. (setting the tabactiveindex to zero) but i also have a " custom HTTP module I use for authentication " but cannot follow what you are saying to fix it. if you can elaborate i would like to get to the bottom of this since this is on a production server and just about everything we do is running in this ajax control. however for now. it seems to be working. i have checked "email me replies to this post." and would like to hear from you if you have some time and more to share. thanks Aug 03, 2011 06:53 PM|dscarr|LINK I had built a quick test web application where it all worked fine so I tried to incorporate the tab control into an existing application. First in a rather complex page where I wanted it to eventually be used and in a separtate simple page just for testing. Neither of the pages in the existing application rendered the tab control no mater which of the solutions proposed here (to date) worked. Then I got to wondering about the issue that some had raised about libraries not getting loaded properly and the fact that my simple web application (one page) worked just fine. So I did the following: I deleted all of the markup for the script manager and the tab control from my simple test page in my existing application. I then rebuilt the entire tab control using the Toolbox, making sure to give all of the elements ID's and making sure to include the runat attribute to the TabContainer and TabPanel elements. It worked! The only thing I can figure out is that I copied the markup from the simple web application that worked into these pages instead of using the ToolBox to add them to the page. I'm guessing that using the ToolBox to add the elements causes something to be registered or otherwise included that did not happen when I simply copied the markup into the pages. Thanks to all for the ideas . . . they definitely stimulated some though and caused me to try something that eventually worked. Oct 01, 2011 04:15 AM|BlueTran|LINK This is the fix that worked for me: Add [CombineScripts="false"] to the ToolkitScriptManager attributes Thanks :) None 0 Points All-Star 48373 Points May 11, 2012 03:32 AM|chetan.sarode|LINK Hi, I suggest you check the HTML source code after running. Is there any HTML elements about tabs in it? You can use some debugger tool to check the style property of tabs. Maybe Height style of tab panel is 0, property "display" is "none", or property "visibility" is "hidden". If it can't be shown, there are three protient causes. 1. The related elements are not rendered. You can't find any HTML elements there. 2. The elements are rendered, but some style properties I refered are not in gear. 3. Your IE or IIS has problems somewhere.</div> Contributor 2211 Points May 11, 2012 03:57 AM|suresh dasari|LINK 30 replies Last post May 11, 2012 03:57 AM by suresh dasari
http://forums.asp.net/t/1109955.aspx?TabContainer+always+hidden
CC-MAIN-2015-18
en
refinedweb
OPENJPA 1.2.3Snapshot, Rad 7.5.5 I am having a problem that an assignment to a persistent field in an entity with accesstype FIELD is being ignored in a ~detached~ entity. Eg, @OneToMany private List articleList /* = new ArrayList() */ ; public List getArticleList(){ if (articleList != null) return articleList; articleList = new ArrayList(); return articleList; // at this point, articleList == null! } The articleList field is not getting assigned. (Interestingly, if, in the (Rad7(eclipse) debugger, breaking after the assignment, I swipe and evaluate the assignment ~in an expression pane~, the field is assigned as expected). (BTW, even if I specify the variable initializer the articleList is null when the entity is fetched (and detached from the database)). I'm guessing this is due to bytecode enhancement, the assignment has been replaced with something else. The full OTM and MTO mappings that I generate are shown below. The accessors are designed for client use - to ensure bidirectionality that works from either side of the relationship , to lazy init the list, and in some cases to do other bookkeeping or business logic. Presumably the accessors are not used by OpenJPA because the access type is FIELD. Changing the access type PROPERTY cures the assignment issue, but would be a fundamental change with many ramifications. Eg. a) I don't want to expose those accessors to the persistence provider, they are fragile for several reasons a1) while the accessors as currently implemented appear to be tolerated by OpenJPA (I only tested fetch, not persist), it would require a lot of testing to prove it. a2) some accessors may contain other logic. eg set a sequence number according to the child's position in the parent list, or just business related logic that assumes the entity is well-formed whenever the setter is invoked. a3) I dont want to have to change the accessType just to fix (allegedly) incorrect behavior. a4) The big reason: the accessors are subject to modification by application developers and that could break them for OpenJPA. b) The entities are rich domain objects with hundreds of non-persistence-related methods, including bean-style getters that would (I think?) have to be marked transient. I say I think, because I tried PROPERTY access and JPA did not seem to generate column references in selects for my non-persistent getXXX() methods. I briefly thought about having a separate pair of accessors just for JPA, to provide a clean seperation of provider accessors and client accessors, but that still has the disadvantages of using PROPERTY described above. My main question is, why is JPA no-oping that assignment and how can I prevent it? The kicker is that in months of testing, this is the first time I encountered the assignment problem, it has worked propertly in the past. public class Magazine { // ... @OneToMany(mappedBy="magazine") private List articleList /* = new ArrayList() */ ; public List getArticleList(){ if (articleList != null) return articleList; articleList = new ArrayList(); return articleList; } public void setArticleList(List ArticleList) { this.articleList = articleList; } public void addArticle(Article article){ // if used by OpenJPA might need: if(article == null) return; List collection = getArticleList(); if (collection.contains(article)) // avoid circularity, dupes return; collection.add(article); article.setMagazine(this); // be bidirectional } // ... } public class Article { // ... @ManyToOne @JoinColumn(name="...") private Magazine magazine; public Magazine getMagazine(){ return magazine; } public void setMagazine(Magazine newMagazine){ if (this.magazine == newMagazine) // avoid circularity return; if (magazine != null) magazine.getArticleList().remove(this); // disown current parent this.magazine = newMagazine; if (newMagazine == null) // avoid bidectional if null parent return; newMagazine.addMagazine(this); // be bidirectional } // ... } -- View this message in context: Sent from the OpenJPA Users mailing list archive at Nabble.com.
http://mail-archives.apache.org/mod_mbox/openjpa-users/201104.mbox/%3C1302443581285-6258774.post@n2.nabble.com%3E
CC-MAIN-2015-18
en
refinedweb
. The first, and perhaps simplest, method for taking advantage of JAXM functionality is by developing a servlet that extends the JAXMServlet interface and consumes XML messages packaged via SOAP 1.1. JAXMServlets look surprisingly like message-driven Enterprise Java Beans, in that they have a single onMessage(Message msg) method that needs to be implemented. The reality, however, is that they are traditional servlets and that the onMessage method gets called whenever a servlet POST or GET action occurs. When onMessage() is called we can then decompose the underlying SOAP message, as required by the application. Let's look at a complete example, adapted from public draft 1, that takes a SOAP trade message and dumps it to System.out. Listing 1: SOAPListener.java 00 /* 01 * adapted from a sun example 02 */ 03 import javax.xml.messaging.*; 04 import javax.xml.soap.*; 05 import javax.xml.parsers.*; 06 import javax.xml.transform.*; 07 import javax.activation.DataHandler; 08 import java.io.*; 09 import org.w3c.dom.*; 10 import org.xml.sax.SAXException; 11 public class SOAPListener extends JAXMServlet implements AsyncListener { 12 // implement the required onMessage method 13 public void onMessage(Message message) { 14 try { 15 //Get the soap part of the message (ignore attachments) 16 SOAPPart soapPart = message.getSOAPPart( ); 17 18 // tunnel in and get the envelope 19 20 SOAPEnvelope soapEnvelope = soapPart.getSOAPEnvelope( ); 21 22 // from the envelope get the DOM tree representing the content. 23 DOMSource domSrc = (DOMSource) soapEnvelope.getContentAs(DOMSource.FEATURE ); 24 25 //Now use the dom tree to traverse the info. 26 //get some of the fields from it. 27 Document doc = (Document) domSrc.getNode(); 28 Element root = doc.getDocumentElement(); 29 NodeList list = root.getElementsByTagName("GetLastTradePriceDetailed" ); 30 Element element; 31 Element childElement; 32 for(int i = ; i < list.getLength(); i++){ 33 if (!(list.item(i) instanceof Element )) continue; 34 element = (Element list.item(i) ); 35 NodeList list2 = element.getChildNodes(); 36 for(int j = ; j < list2.getLength( ; j++ { 37 if(!(list2.item(j instanceof Element) continue; 38 childElement = (Element list2.item(j ; 39 System.out.println(childElement.getTagName() ; 40 System.out.println("\t" ; 41 System.out.println( ((Text) childElement.getFirstChild()).getData()) ; 42 System.out.println("\n" ); 43 } 44 } 45 } // end try 46 catch(Exception jxe ) { 47 jxe.printStackTrace(); 48 } 49 } // end onMessage 50 } // end SOAPListener Breaking the example down, we see that lines 3-10 simply import the required packages to support JAXM (see the JAXM specification for details). On line 11 we've defined an AsyncListener listener. Note that SynchListeners are expected to return a SOAPmessage object. Servlets must implement either the AsyncListener or SyncListener, depending on what behavior you want. Line 13 shows the first real line of code, the definition of the onMessage() method with its single message argument, defined in the javax.xml.messaging package. It's interesting to note that the specification provides classes and methods that closely parallel the SOAP 1.1 specification. Specifically, messages contain a SOAP part, which contains a SOAP Envelope, containing a SOAP Header and Body, etc. Lines 16 and 20, respectively, show how we obtain the object representing the SOAP envelope, as shown in figure 3. The various SOAP message class information is detailed in the javax.xml.soap package. Note that we could have just as easily obtained the attachment part of the message by writing: AttachmentPart attachmentPart = message.getAttachmentPart( ); Once we have the SOAPEnvelope we can obtain the data representing the encapsulated XML using the getContentAs() method. GetContentAs returns any of a number of javax.xml.transform.Source types, of which we chose DOMSource.FEATURE, but could have chosen SAXSource.FEATURE or STREAMSource.FEATURE, depending on how we wanted to process the result..
http://www.onlamp.com/lpt/a/1180
CC-MAIN-2015-18
en
refinedweb
public class WrongMethodTypeException extends RuntimeException This exception may also be thrown when two method handles are composed, and the system detects that their types cannot be matched up correctly. This amounts to an early evaluation of the type mismatch, at method handle construction time, instead of when the mismatched method handle is WrongMethodTypeException() WrongMethodTypeExceptionwith no detail message. public WrongMethodTypeException(String s) WrongMethodType.
http://docs.oracle.com/javase/7/docs/api/java/lang/invoke/WrongMethodTypeException.html
CC-MAIN-2015-18
en
refinedweb
> :I? > I think you will find it more trouble then it's worth. Sounds like a challenge to me :-) Anyway, it actually seemed to have the desired effect as far as `loader' goes, and I'm finally able to boot straight into DragonFly on my Firewire disk on this ten-year-old machine. Yay. Of course, in order for it to work in general, rather than for my specific case (where `grub' does all the dirty work to find /dboot/loader), I'd need to get `boot2' to grok this path as well, which would require a bit more study on my part to get it to compile properly -- I bet this is what you were referring. (Unfortunately, what with boot2, it's not an all-purpose hack that anyone should use -- only for my specific case, wanting to use `grub' to select from differently named `/boot's on a single filesystem. However, I wonder if this Makefile is in need of the following patch just for consistency -- not that it makes much sense to override BINDIR, but one can do so earlier in this makefile...) --- /stand/obj/hacks/DragonFly-src/source-hacks/sys/boot/i386/loader/Makefile-ORIG Sun Aug 1 23:45:19 2004 +++ /stand/obj/hacks/DragonFly-src/source-hacks/sys/boot/i386/loader/Makefile Sun Aug 8 22:10:10 2004 @@ -113,9 +113,9 @@ .PATH: ${.CURDIR}/../../forth FILES= ${PROG}.help loader.4th support.4th loader.conf FILES+= screen.4th frames.4th beastie.4th FILESDIR_loader.conf= /boot/defaults -.if !exists(${DESTDIR}/boot/loader.rc) +.if !exists(${DESTDIR}${BINDIR}/loader.rc) FILES+= ${.CURDIR}/loader.rc .endif thanks barry bouwmsa
http://leaf.dragonflybsd.org/mailarchive/kernel/2004-08/msg00096.html
CC-MAIN-2015-18
en
refinedweb
random numbersMaybe you are right , i have to rest , enough for coding.The much you code , the much you rattle. random numbersHello is it possible to get such numbers as 0.125 , 0.25844 , 0.8989 double 0 to 1 but not 0.00001... Cant delete objectTy for your helping appreciated... plss help[code] typedef struct ProbWays { double *probs ; int length ; }ProbWays; int main() { Pro... Syscall - sys/syscall.h#if __linux #include <sys/syscall.h> #elif defined(_WIN32) || defined(_WIN64) #include <windows.h> ...
http://www.cplusplus.com/user/vFreeman/
CC-MAIN-2015-18
en
refinedweb
. When I tried to compile the code, I got the same error: undefined reference to `vtable for MainWindow' This is because you have to change CMakeLists.txt in order to generate .moc files. Just add this line: qt4_automoc(${tutorial4_SRCS}) Then you also have to add this line at the bottom of mainwindow.cpp: #include "mainwindow.moc" This fixed the problem for me. Please try this and post your results so I can correct the tutorial.
https://techbase.kde.org/index.php?title=Talk:Development/Tutorials/Saving_and_loading&oldid=23467
CC-MAIN-2015-18
en
refinedweb
Editor's Note - In this article you'll learn how to create a responsive UI that can search and display results using Web Services and Flash Remoting. Jason will show you how to build the interface and manipulate the XML Web Service. This tutorial requires Flash MX, Flash Remoting, and a free Amazon.com associate account. As a webmaster, I frequently find myself forcing third party web tools to integrate into my Web site. In the end, I may disguise the obvious subdomain name or that slight change in the consistency of my design, but I shouldn't have to. I should request and get seamless integration from any vendor into my Web site. Well, several companies are finally coming around with XML Web Services. XML Web Services allow you to hook into a company's infrastructure and share data through the Web. This differs from other methods because it embraces W3C's standards for transportation and descriptions known as SOAP and WSDL. Now companies can embrace this as a way to aggregate real time information. Imagine purchasing financial software off the shelf and seamlessly getting credit card balances and bank statements from different companies. Imagine having full control of that affiliate solution's look and feel. The power of XML Web Services doesn't stop there. It also allows companies to decrease paper and time by instantly transmitting data. For example, Monster.com, HotJobs.com, and CareerBuilder.com could all receive new job posting for your company via an exposed XML Web Service. This allows your Human Resources department to use one tool for writing and sending job posting that works with several job boards as well as brick and motor placement firms. Macromedia understands this vision and plans to be part of it with Flash Remoting. Flash Remoting leaps years ahead of previous ways Flash grabbed data (remember loadVariable) and allows Flash to integrate with any complex Web application exposed as a XML Web Services, as well as ColdFusion MX, ASP.Net, and J2EE. Now Flash can consume Web Services from any remote source and spit out that data as if it where its own. Think about this for a second. You can connect to an Amazon.com XML Web Service and create your own Flash store complete with Amazon recommendations, search, product description...the whole nine yards. Or you could create a responsive UI that can search and display results using Google.com's XML Web Service. And that's exactly what we're going to do in this article. Amazon.com recently released a XML Web Service to allow affiliates to better integrate Amazon.com into their Web sites. This provides amazing potential for Amazon.com, as well as affiliates looking to pass Amazon.com's books off as their own. In this tutorial I'll break down Amazon.com's XML Web Service, show you how to establish a connection with Flash Remoting, and help you build a Flash spotlight that dynamically list Amazon.com's books. To follow along with this tutorial, you should download my Flash file and download Amazon's developer kit. You'll also need to register with Amazon for a unique token. Without this token you cannot connect to the XML Web Service. Now that we understand some of the benefits of XML Web Services, let's take a look at Amazon.com's WSDL. A WSDL (Web Service Description Language) is a XML vocabulary, and we'll use to provide all the information we'll ever need to know about a XML Web Service. With this we can view the Web Service's functions, its location, and special types. Go to to view the WSDL description. <xsd:complexType <xsd:all> <xsd:element <xsd:element <xsd:element <xsd:element <xsd:element <xsd:element <xsd:element </xsd:all> </xsd:complexType> At first this WSDL may look a little intimidating, but it's surprisingly simple and easy to understand. First, look at the <xsd:complexType> tag. This tag allows Amazon to create new types that provide additional functionality or grouping native types like strings and integers can't provide. In the this case, we have an object that stores keyword search criteria. Each type within this object is a string type. In the above code snippet, the elements wrap to the following keyword data: keyword- the keyword used in the search. page- Which page of the search results you'd like to see. mode- The store this search should include. A list of valid stores is available in the developer kit. tag- "webservice-20" this denotes that this is a web service call. type- "lite" or "heavy" response. This corresponds with the amount of data you want returned. devtag- Your unique token. A free token is available at Amazon's web site here. version- Currently "1.0" I will not breakdown the other object defined types but the request wrapper objects are defined in the sample Flash download. <message name="KeywordSearchRequest"> <part name="KeywordSearchRequest" type="typens:KeywordRequest" /> </message> <message name="KeywordSearchResponse"> <part name="return" type="typens:ProductInfo" /> </message> Another important element in the WSDL is the <message> tag; it provides information on the functions available from our Web Service. In the above code snippet, the <part> element represents the parameters for the function named KeywordSearchRequest and the type this parameter is. You should also notice that we have two separate <message> elements, one named KeywordSearchRequest and the other KeywordSearchResponse. Request should be used when calling the function while response provides the type returned. By combining our <message> and <xsd:complexType> elements, we can understand the parameters the function requires. The next section will shed light on how to implement these objects in Flash. Now it's time to open Flash MX and build the framework for our application. For this application to properly run, you need to install Flash Remoting on your Web server. A 30-day trial version of Flash Remoting is available for download from Macromedia. In Flash MX, create a new Flash File and open the action's dialog for frame 1. In this frame we will use Flash Remoting to create a connection to Amazon.com's XML Web Service. #include "NetServices.as" init( init== null ) { var init = true; NetServices.setDefaultGatewayURL( "" ); gatewayConnection = NetServices.createGatewayConnection(); AmazonWebService = gatewayConnection.getService( "", this ); } I've created a code block that initializes my XML Web Service. The first line of the code snippet grabs additional functions and objects included with Flash Remoting from an external action script file. Within the code block we need to define the location of our server using the gateway and instance of the XML Web Service. My application uses the WSDL address we discussed earlier to access Amazon.com's XML Web Service, this allows Flash Remoting to programmatically build a proxy, or interrupter, to our XML Web Service. This code snippet is for a ASP.Net server; a JRun or Coldfusion server will not require .aspx on the gateway call. Also, ASP.Net requires a physical file in the path; JRun and Coldfusion don't. With a connection to our XML Web Service established, let's build a interface to display the output. Using the text tool, create two text boxes on the main movie clip. Name the first text box txtName and the second txtPrice. Next, create an empty movie clip named mcImage and place it on your main movie clip. Please note that our mcImage movie clip will work as a holder for our product's image. Because the size of the image varies based on the type of product, it's a good idea to add a backdrop for your movie clip. For more information on dynamically loading images view my article on jasonmperry.com. With our base elements in place you may want to add a little spice to your Amazon.com product spotlight. I've taken the liberty of adding a bright spinning background to draw attention to the spotlighted book and setting my text colors to white. Interface in hand, lets focus on filling those text boxes with dynamic content. To do this we need to implement a callback function and object that wraps to our XML Web Service's <message> and <xsd:complexType> definitions. function AsinSearchRequest_Result( result ) { ProductInfo = result; //sets the product info for our moviec lip txtProductName.text = ProductInfo.Details[ 0 ].ProductName; txtProductPrice.text = ProductInfo.Details[ 0 ].OurPrice; urlProductLocation = ProductInfo.Details[ 0 ].Url; //loads the medium sized image onto the _root. //Image holder provides size holder. loadMovie( ProductInfo.Details[ 0 ].ImageUrlMedium, _root.mcImage ); } function AsinSearchRequest_Status( error ) { trace( error.code ); trace( error.description ); trace( error.details ); } Callback functions receive response data and errors sent from our XML Web Service proxy. These callbacks wrap to the AsinSearchRequest function defined in the WSDL. The " _Result" function is called with the output of AsinSearchResponse, and " _Status" is called if an error occurs during the call. When implementing a callback function take the name of the method and add both " _Result" and " _Status" to the end. In our " _Result" callback we receive an instance of the ProductInfo type defined in our WSDL. Our code snippet grabs the returned product's name, price, URL, and image from the result. We also need to use loadMovie to dynamically grab the URL of our product's image and display it in our Flash Application. To provide better positioning of the image you should use load the jpeg into a movie clip. //creates a AsinRequest object type wrapper asinRequest = function(asin, mode) { this.asin = asin; this.mode = mode; this.tag = "webservices-20"; //tag this.token = "???"; //Your unique token this.version = "1.0"; //id of this version of Amazon service. Currently 1.0. this.type = "heavy"; //"heavy" or "lite" determines amount of copy returned } Object.registerClass( "AsinRequest", asinRequest ); The next step is to create a object wrapper for our parameter type. To do this we can create mirror image of our AsinRequest WSDL complex type as a Flash object. We also need to register the new class as type AsinRequest. AmazonWebService.AsinSearchRequest( new AsinRequest( "0672320789", "books") ); With our callbacks done and AsinRequest object registered, we can call the AsinSearchRequest method and sent our AsinRequest parameter to the XML Web Service. When Flash Remoting receives data as ether a error message or result it will call the proper callback function. NOTE: When in debug mode you can view the result data to see the best way to access the data. In the sample download I've taken the liberty of implementing the remaining callback functions and wrappers. This should give you a good idea of how to implement any object in Flash based on its WSDL counterpart. Using Flash Remoting to create a dynamic interface to Amazon.com's XML Web Services only brushes on the capabilities of Flash Remoting. The true potential lies in developing Flash interfaces that mimic Windows UI components and are responsive. In the near future, complex applications like credit card accounts will allow you to drag and drop a payment onto the proper icon or display a progress bar as it grabs last month's statement. The FLA source file built in this tutorial is available for download as FlashAmazonSpotlight.zip. Note the file will not work with out Flash Remoting installed and running on your computer. A 30-day trial version of Flash Remoting is available for download at Macromedia.com. Jason Michael Perry is a partner in Out the Box Web Productions and the Webmaster for Pan-American Life, an international financial services company. You can contact Jason by visiting Jasonmperry.com. Return to the Web Development DevCenter.
http://archive.oreilly.com/lpt/a/3092
CC-MAIN-2015-18
en
refinedweb
Fabulous Adventures In Coding Eric Lippert is a principal developer on the C# compiler team. Learn more about Eric. A while back I was discussing the differences between VBScript's For-Each and JScript's for-in loops. A coworker asked me today whether there was any way to control the order in which the for-in loop enumerates the properties. He wanted to get the list in alphabetical order for some reason. Unfortunately, we don't support that. The specification says (ECMA 262 Revision 3 section 12.6.4): The mechanics of enumerating the properties. Our implementation enumerates the properties in the order that they were added. (This also implies that properties added during the enumeration will be enumerated.) If you want to sort the keys then you'll have to do it the hard way -- which, fortunately, is not that hard. Enumerate them in by-added order, add each to an array, and sort that array. var myTable = new Object(); myTable["blah"] = 123; myTable ["abc"] = 456 myTable [1234] = 789; myTable ["def"] = 346; myTable [345] = 566; var keyList = new Array(); for(var prop in myTable) keyList.push(prop); keyList.sort(); for(var index = 0 ; index < keyList.length ; ++index) print(keyList[index] + " : " + myTable[keyList[index]]); This has the perhaps unfortunate property that it sorts numbers in alphabetical, not numeric order. If that bothers you, then you can always pass a comparator to the sort method that sorts numbers however you'd like. Strange. Seems like all the keys are converted to strings. Is that because they become field names on the object? Here's what I mean (sorry about the verbosity): //-------------------------------------------------------------------------// TestSorting()//-------------------------------------------------------------------------function TestSorting(){ print(); print('TestSorting()'); print('-------------'); var myTable = new Object(); myTable["Blah"] = 123; myTable ["abc"] = 456; myTable [1234] = 789; myTable ["def"] = 346; myTable [345] = 566; var keyList = new Array(); for(var prop in myTable) keyList.push(prop); keyList.sort( Comparer ); for( var index in keyList ) print( 'myTable[{0}] = {1}', keyList[index], myTable[keyList[index]] );}//-------------------------------------------------------------------------// Comparer()// Silly sort method of the collection seems to convert all the indices to // strings, so that it is not easy to sort the numbers separately from the// strings.//-------------------------------------------------------------------------function Comparer(a,b){ var result = -1; print('Comparer(): {0} is a {1}, {2} is a {3}', a, typeof(a), b, typeof(b) ); if( typeof(a) == 'number' ) { print('{0} is a number.',a); if( typeof(b) == 'number' ) result = a - b; else result = -1; } else { if( typeof(b) == 'number' ) result = 1; else { if( a.toLowerCase() == b.toLowerCase() ) result = 0; else if( a.toLowerCase() > b.toLowerCase() ) result = 1; else result = -1; } } if( result == 0 ) print( '{0} and {1} are equal.', a, b ); else if( result < 0 ) print( '{0} is less than {1}.', a, b ); else print( '{0} is greater than {1}.', a, b ); return result;}//-------------------------------------------------------------------------// print()//// Shorthand for WScript.echo() that also does positional parameter// substitution (as in C#).//-------------------------------------------------------------------------function print(msg){ var args = print.arguments; if(args.length==0) var msg = ''; // Allows for "print();" else { // Parameter substitution à la C#: for( var i = 1; i < args.length; i++ ) while( msg.indexOf('{' + (i-1) + '}') >= 0 ) msg = msg.replace( '{' + (i-1) + '}', '' + args[i] ); } WScript.echo(msg);}TestSorting();The results printed out are:TestSorting()-------------Comparer(): def is a string, 345 is a stringdef is greater than 345.Comparer(): def is a string, abc is a stringdef is greater than abc.Comparer(): def is a string, 1234 is a stringdef is greater than 1234.Comparer(): def is a string, Blah is a stringdef is greater than Blah.Comparer(): abc is a string, 345 is a stringabc is greater than 345.Comparer(): abc is a string, Blah is a stringabc is less than Blah.Comparer(): Blah is a string, 1234 is a stringBlah is greater than 1234.Comparer(): Blah is a string, 345 is a stringBlah is greater than 345.Comparer(): abc is a string, 345 is a stringabc is greater than 345.Comparer(): abc is a string, 1234 is a stringabc is greater than 1234.Comparer(): abc is a string, 345 is a stringabc is greater than 345.Comparer(): 345 is a string, 1234 is a string345 is greater than 1234.myTable[1234] = 789myTable[345] = 566myTable[abc] = 456myTable[Blah] = 123myTable[def] = 346So seems like it would by quite tedious to write all the code necessary to sort by keys such that the numeric keys are sorted numerically... Yes, that was what I intended to imply by the last two sentences in the post. All object property slot names are strings, whether they are initially numbers or not. However, it is not _particularly_ tedious to write a comparator which compares numbers numerically. Just check both strings to see if they are numbers, if they are, compare them as numbers, otherwise compare them as strings. Ah, I thought you were implying that the default sort would be alphabetical because the keys would be converted to string for sorting purposes, not that the keys were converted to string in the first place. The difference is that the comparer would be simpler in that you could simply check the type. Since the comparer is getting all strings no matter what, you have to look at the string and assume what data type it was in the first place "123" may have been an int or it may have been the string "123". I was thinking that the key object type was maintained and would work like this does in Python, for example: myTable = {} myTable["Blah"] = 123 myTable ["abc"] = 456 myTable [1234] = 789 myTable ["def"] = 346 myTable [345] = 566 myTable ['345'] = 999 # This '345' key is distinct from the 345 entry. keys = myTable.keys() def KeyComparer( a, b ): result = 0 if type(a) == type(b): if type(a) == type(''): result = cmp(a.lower(),b.lower()) else: result = cmp( a, b ) elif type(a) == type(''): result = -1 else: result = 1 description = 'equal to' if result > 0: description = 'greater than' elif result < 0: description = 'less than' print 'KeyComparer: %s is %s %s.' % (str(a),description, str(b)) return result keys.sort(KeyComparer) print 'Keys: %s' % keys So I guess in JScript you would need to use parseFloat or a regular expression and assume all numerical looking keys were originally numbers. While we're on the subject of semantic differences between seemingly similar syntaxes, let me just take this opportunity to quickly answer a frequently asked question: why doesn't for in enumerate a collection? Is there any similar code that could enumerate properties for ActiveXObjects, or would I have to use IUnknown in C++ ... code such as this just doesn't work!? var objCadImage = new ActiveXObject("TurboCAD.Drawing") for( n in objCadImage){ document.write(n+"<br>"); }
http://blogs.msdn.com/b/ericlippert/archive/2003/10/01/53134.aspx
CC-MAIN-2015-18
en
refinedweb
Siebel Order Management Guide Addendum for Fleet Management > Web Services for Siebel Orders for Fleet Management > Use this outbound Web service to submit an order to the rating engine and get ratings in response. Its namespace is: This Web service submits the order request to the third-party application to get feasible solutions for this transportation order. The following operations are used for the QueryTransportationSalesOrderItineraryListSiebelReqABCSImpl Web service. For a list of operations associated with this Web service, see Table 6 QueryTransportationSalesOrderItineraryList Submits the order request For a description of this request message, see Table 7. CustomHeaderContext Optional Hierarchy QueryTransportationSalesOrderItineraryListReqMsg:QueryTransportationSales_1 Integration Object For a description of this response message, see Table 8. This topic describes the application objects called by this Web service. For more information on application implementation, refer to your application development documentation on Oracle Technology Network. For a description of the service objects for this Web service, see Table 9. QueryTransportationSalesOrderItineraryListSiebelReqABCSImplService Business Service CSSWSOutboundDispatcher This object is called from the virtual business component context. Unlike other Web services, which are generally called by clicking a button or selecting a menu item, this Web service is called when an applet based on the appropriate virtual business component is displayed. For a description of data objects for this Web service, see Table 10. SWIOrderIO PDS Simplified Order SWIOrderEntry(Sales)IORes Order Entry (Sales) For a description of the methods for this Web service, see Table 11.
http://docs.oracle.com/cd/B40099_02/books/OrderMgtFleet/OrderMgtFleet_Web2.html
CC-MAIN-2015-18
en
refinedweb
Next: VMS Installation Details, Previous: VMS Compilation, Up: VMS Installation [Contents][Index] gawkDynamic Extensions on VMS The extensions that have been ported to VMS can be built using one of the following commands. $ MMS/DESCRIPTION=[.vms]descrip.mms extensions or: $ MMK/DESCRIPTION=[.vms]descrip.mms extensions gawk uses AWKLIBPATH as either an environment variable or a logical name to find the dynamic extensions. Dynamic extensions need to be compiled with the same compiler options for floating point, pointer size, and symbol name handling as were used to compile gawk itself. Alpha and Itanium should use IEEE floating point. The pointer size is 32 bits, and the symbol name handling should be exact case with CRC shortening for symbols longer than 32 bits. For Alpha and Itanium: /name=(as_is,short) /float=ieee/ieee_mode=denorm_results For VAX: /name=(as_is,short) Compile time macros need to be defined before the first VMS-supplied header file is included. #if (__CRTL_VER >= 70200000) && !defined (__VAX) #define _LARGEFILE 1 #endif #ifndef __VAX #ifdef __CRTL_VER #if __CRTL_VER >= 80200000 #define _USE_STD_STAT 1 #endif #endif #endif
http://www.gnu.org/software/gawk/manual/html_node/VMS-Dynamic-Extensions.html
CC-MAIN-2015-18
en
refinedweb
Post your Comment The XML Style Sheet Translation (XSLT) APIs The XML Style Sheet Translation (XSLT) APIs The XSLT Packages The XSLT APIs are defined in the following packages XS Passing parameters to XSLT style sheets Passing parameters to XSLT style sheets Passing parameters to XSLT style sheets...() { // For display purposes only $.ajax({ url: 'xslt-test.xml' Introduction to XSLT a simple XML file into HTML using XSLT APIs. To develop this program, do...; Extensible Stylesheet Language Transformations (XSLT) is an XML-based language... language for XML. With XSLT you can add/remove elements and attributes to or from Cascading Style Sheet(CSS) Cascading Style Sheet(CSS) Cascading Style Sheet (CSS) is known as style sheet language.... The application of style sheet is to style the web pages written in HTML and XHTML style sheet properties style sheet properties What are style sheet properties The JAXP APIs . javax.xml.transform Defines the XSLT APIs that let's to transform XML... in javax.xml.transform package of JAXP-APIs. The XSLT APIs let you convert XML... of JAXP-APIs. The "Simple API" for XML (SAX) is the event-driven, serial Flex External Style sheet uses Flex Style with External Style Sheet:- In this tutorial you can see how to use External Style Sheet inn your flex application. Firstly we have create Style in different CSS file. you can use that style sheet directly in flex An Overview of the XML-APIs An Overview of the XML-APIs Here we have listed all the major Java APIs for XML... for creating and using the standard SAX, DOM, and XSLT APIs in Java An XSLT Stylesheet .style1 { border-style: solid; border-width: 1px; } XSLT document is a well formed XML document which defines how the transformation of an xml... writing templates in XSLT document. <?xml version="1.0 External style sheets in Flex4 external style sheet. You can choose a CSS file and set the properties of components in it. After that you call this style sheet in to main application...; <!-- call external style sheet using Inline style in Flex4 Inline style in Flex4: When you can set the properties of components in its own tag called a inline style sheet. In this example you can see how we can use a inline style sheet in our application. Example: <?xml XSLT Introductions XSLT Introductions XSLT is an xml based language for transforming XML documents into other XML documents. XSLT stands for eXtensible Styles Language...). XSLT document is itself a well formed XML document which defines how The Simple API for XML (SAX) APIs The Simple API for XML (SAX) APIs  ... to configure and obtain a SAX based parser to parse XML documents.... Brief description of the key SAX APIs: SAXParserFactory SAXParserFactory Orangevolt XSLT xml documents by widely configurable XSLT launch configurations... Orangevolt XSLT OrangevoltXSLT for Eclipse provides XSLT support Transforming XML with XSLT Transforming XML with XSLT This Example shows you how to Transform XML with the XSLT in a DOM document. JAXP (Java API for XML Processing) is an interface which provides The Simple API for XML (SAX) APIs The Simple API for XML (SAX) APIs  ... applications to configure and obtain a SAX based parser to parse XML.... Brief description of the key SAX APIs: SAXParserFactory Flex Style Property external style sheet i will discuss later. This is example of local style...Style in Flex:- Style is the main part of the Flex because user can change... a way to use Style for flex component. You can see how to use local style in flex ToolTip style in Flex4 ToolTip style in Flex4: In this example you can see how we can change the style of ToolTip. In this example we use a internal style sheet for change the style of ToolTip. Example: <?xml version="1.0" encoding Style in Flex . External style sheet Ex:/* CSS file */ @namespace s "library...-family:"Verdana"; color:blue; } 2. Local style sheet Ex: <...Style in Flex Hi... What are some ways to specify styles Introduction to XML ; that declares the document to be an XSL style sheet. Now, read more information...Introduction to XML  ... to develop XSL because there was a need for an XML-based Stylesheet Language. Thus Using the jQuery Transform plug-in(XSLT) Using the jQuery Transform plug-in(XSLT) Using the jQuery Transform plug-in(XSLT) XSLT stands for XSL Transformations (Extensible Stylesheet XML Related Technologies: An overview is a language for navigating in XML documents. XSL-FO (Extensible Style Sheet Language...) is a stricter and cleaner version of HTML. XSL (Extensible Style Sheet Language) - XSL consists of three parts: XSLT - a language for transforming XML documents Java Xml Transform . To know more about this, just click: http:/... Java Xml Transform There are generic APIs included in the J2EE API like javax.xml Post your Comment
http://www.roseindia.net/discussion/18517-The-XML-Style-Sheet-Translation-(XSLT)-APIs.html
CC-MAIN-2015-18
en
refinedweb
QAbstractAnimation The QAbstractAnimation class is the base of all animations. More... #include <QAbstractAnimation> Inherited by: QAnimationGroup, QPauseAnimation, and QVariantAnimation. This class was introduced in Qt 4.6. Public Types Properties Public Functions Public Slots Signals Protected Functions Reimplemented Protected Functions Additional Inherited Members Detailed Description The QAbstractAnimation class is the base of all animations. The class defines the functions for the functionality shared by all animations. By inheriting this class, you can create custom animations that plug into the rest of the animation framework. The progress of an animation is given by its current time (currentLoopTime()), which is measured in milliseconds from the start of the animation (0) to its end (duration()). The value is updated automatically while the animation is running. It can also be set directly with setCurrentTime(). At any point an animation is in one of three states: Running, Stopped, or Paused--as defined by the State enum. The current state can be changed by calling start(), stop(), pause(), or resume(). An animation will always reset its current time when it is started. If paused, it will continue with the same current time when resumed. When an animation is stopped, it cannot be resumed, but will keep its current time (until started again). QAbstractAnimation will emit stateChanged() whenever its state changes. An animation can loop any number of times by setting the loopCount property. When an animation's current time reaches its duration(), it will reset the current time and keep running. A loop count of 1 (the default value) means that the animation will run one time. Note that a duration of -1 means that the animation will run until stopped; the current time will increase indefinitely. When the current time equals duration() and the animation is in its final loop, the Stopped state is entered, and the finished() signal is emitted. QAbstractAnimation provides pure virtual functions used by subclasses to track the progress of the animation: duration() and updateCurrentTime(). The duration() function lets you report a duration for the animation (as discussed above). The animation framework calls updateCurrentTime() when current time has changed. By reimplementing this function, you can track the animation progress. Note that neither the interval between calls nor the number of calls to this function are defined; though, it will normally be 60 updates per second. By reimplementing updateState(), you can track the animation's state changes, which is particularly useful for animations that are not driven by time. See also QVariantAnimation, QPropertyAnimation, QAnimationGroup, and The Animation Framework. Member Type Documentation enum QAbstractAnimation::DeletionPolicy enum QAbstractAnimation::Direction This enum describes the direction of the animation when in Running state. enum QAbstractAnimation::State This enum describes the state of the animation. See also state() and stateChanged(). Property Documentation currentLoop : const int This property holds the current loop of the animation. This property describes the current loop of the animation. By default, the animation's loop count is 1, and so the current loop will always be 0. If the loop count is 2 and the animation runs past its duration, it will automatically rewind and restart at current time 0, and current loop 1, and so on. When the current loop changes, QAbstractAnimation emits the currentLoopChanged() signal. Access functions: Notifier signal: currentTime : int This property holds the current time and progress of the animation. This property describes the animation's current time. You can change the current time by calling setCurrentTime, or you can call start() and let the animation run, setting the current time automatically as the animation progresses. The animation's current time starts at 0, and ends at totalDuration(). Access functions: See also loopCount and currentLoopTime(). direction : Direction This property holds the direction of the animation when it is in Running state. This direction indicates whether the time moves from 0 towards the animation duration, or from the value of the duration and towards 0 after start() has been called. By default, this property is set to Forward. Access functions: Notifier signal: duration : const int This property holds the duration of the animation. If the duration is -1, it means that the duration is undefined. In this case, loopCount is ignored. Access functions: loopCount : int This property holds the loop count of the animation. This property describes the loop count of the animation as an integer. By default this value is 1, indicating that the animation should run once only, and then stop. By changing it you can let the animation loop several times. With a value of 0, the animation will not run at all, and with a value of -1, the animation will loop forever until stopped. It is not supported to have loop on an animation that has an undefined duration. It will only run once. Access functions: state : const State This property holds state of the animation. This property describes the current state of the animation. When the animation state changes, QAbstractAnimation emits the stateChanged() signal. Access functions: Notifier signal: Member Function Documentation QAbstractAnimation::QAbstractAnimation ( QObject * parent = 0 ) Constructs the QAbstractAnimation base class, and passes parent to QObject's constructor. See also QVariantAnimation and QAnimationGroup. QAbstractAnimation::~QAbstractAnimation () [virtual] Stops the animation if it's running, then destroys the QAbstractAnimation. If the animation is part of a QAnimationGroup, it is automatically removed before it's destroyed. void QAbstractAnimation::currentLoopChanged ( int currentLoop ) [signal] QAbstractAnimation emits this signal whenever the current loop changes. currentLoop is the current loop. See also currentLoop() and loopCount(). int QAbstractAnimation::currentLoopTime () const Returns the current time inside the current loop. It can go from 0 to duration(). See also duration() and currentTime. void QAbstractAnimation::directionChanged ( QAbstractAnimation::Direction newDirection ) [signal] QAbstractAnimation emits this signal whenever the direction has been changed. newDirection is the new direction. bool QAbstractAnimation::event ( QEvent * event ) [virtual protected] Reimplemented from QObject::event(). void QAbstractAnimation::finished () [signal] QAbstractAnimation emits this signal after the animation has stopped and has reached the end. This signal is emitted after stateChanged(). See also stateChanged(). QAnimationGroup * QAbstractAnimation::group () const If this animation is part of a QAnimationGroup, this function returns a pointer to the group; otherwise, it returns 0. See also QAnimationGroup::addAnimation(). void QAbstractAnimation::pause () [slot] Pauses the animation. When the animation is paused, state() returns Paused. The value of currentTime will remain unchanged until resume() or start() is called. If you want to continue from the current time, call resume(). See also start(), state(), and resume(). void QAbstractAnimation::resume () [slot] Resumes the animation after it was paused. When the animation is resumed, it emits the resumed() and stateChanged() signals. The currenttime is not changed. See also start(), pause(), and state(). void QAbstractAnimation::setPaused ( bool paused ) [slot] If paused is true, the animation is paused. If paused is false, the animation is resumed. See also state(), pause(), and resume(). void QAbstractAnimation::start ( QAbstractAnimation::DeletionPolicy policy = KeepWhenStopped ) [slot] Starts the animation. The policy argument says whether or not the animation should be deleted when it's done. When the animation starts, the stateChanged() signal is emitted, and state() returns Running. When control reaches the event loop, the animation will run by itself, periodically calling updateCurrentTime() as the animation progresses. If the animation is currently stopped or has already reached the end, calling start() will rewind the animation and start again from the beginning. When the animation reaches the end, the animation will either stop, or if the loop level is more than 1, it will rewind and continue from the beginning. If the animation is already running, this function does nothing. See also stop() and state(). void QAbstractAnimation::stateChanged ( QAbstractAnimation::State newState, QAbstractAnimation::State oldState ) [signal] QAbstractAnimation emits this signal whenever the state of the animation has changed from oldState to newState. This signal is emitted after the virtual updateState() function is called. See also updateState(). void QAbstractAnimation::stop () [slot] Stops the animation. When the animation is stopped, it emits the stateChanged() signal, and state() returns Stopped. The current time is not changed. If the animation stops by itself after reaching the end (i.e., currentLoopTime() == duration() and currentLoop() > loopCount() - 1), the finished() signal is emitted. See also start() and state(). int QAbstractAnimation::totalDuration () const Returns the total and effective duration of the animation, including the loop count. See also duration() and currentTime. void QAbstractAnimation::updateCurrentTime ( int currentTime ) [pure virtual protected] This pure virtual function is called every time the animation's currentTime changes. See also updateState(). void QAbstractAnimation::updateDirection ( QAbstractAnimation::Direction direction ) [virtual protected] This virtual function is called by QAbstractAnimation when the direction of the animation is changed. The direction argument is the new direction. See also setDirection() and direction(). void QAbstractAnimation::updateState ( QAbstractAnimation::State newState, QAbstractAnimation::State oldState ) [virtual protected] This virtual function is called by QAbstractAnimation when the state of the animation is changed from oldState to newState. See also start(), stop(), pause(), and
http://developer.blackberry.com/native/reference/cascades/qabstractanimation.html
CC-MAIN-2015-18
en
refinedweb
This is a discussion on TOTD #128: EJBContainer.createEJBContainer: Embedded EJB using GlassFish v3 - Solaris Rss ; This blog has been in my Drafts folder for quite some time now, needed some final tweaks, and finally pushing it out. Chapter 22 of Enterprise JavaBeans 3.1 specification (released as part of Java EE 6) describes "Embeddable Usage" as: ... This blog has been in my Drafts folder for quite some time now, needed some final tweaks, and finally pushing it out. Chapter 22 of Enterprise JavaBeans 3.1 specification (released as part of Java EE 6) describes "Embeddable Usage" as:. Earlier blogs already described the steps in detail but I had to try this stuff myself :-) And moreover this Tip Of The Day (TOTD) shows, as always, complete detailed steps to get you going from scratch. Lets see how such an embeddable EJB application can be easily created. So no explicit GlassFish downloading and/or configuring, just deployed a simple EJB, and ran the tests - everything within one VM.So no explicit GlassFish downloading and/or configuring, just deployed a simple EJB, and ran the tests - everything within one VM. - Create a Maven project as: mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=org.glassfish.embedded.samples -DartifactId=ejb31 - Add the following fragments to "pom.xml" to ensure right set of JARs are pulled in: download.java.net Java.net Maven Repository . . . org.glassfish.extras glassfish-embedded-all 3.0 compile. . . install org.apache.maven.plugins maven-compiler-plugin 2.0.2 1.5 1.5 - Change the generated "src/main/java/org/glassfish/embedded/samples/App.java" to: package org.glassfish.embedded.samples;import javax.ejb.Stateless;/** * Hello world! */@Statelesspublic class App { public static String sayHello(String name) { return "Hello " + name; }} This creates our trivial Enterprise JavaBean. - Change the generated "src/test/java/org/glassfish/embedded/samples/AppTest.java" to (taking the code snippet from Adam's blog and slightly altering it): public void testEJB() throws NamingException { EJBContainer ejbC = EJBContainer.createEJBContainer(); Context ctx = ejbC.getContext(); App app = (App) ctx.lookup("java:global/classes/App"); assertNotNull(app); String NAME = "Duke"; String greeting = app.sayHello(NAME); assertNotNull(greeting); assertTrue(greeting.equals("Hello " + NAME)); ejbC.close(); } This is a simple test that looks up the bean using portable JNDI name, more explanation on JNDI name below. - Run the tests by giving the following standard command in the Maven project: ~/samples/v3/embedded/ejb31 >mvn clean test[INFO] Scanning for projects...[INFO] ------------------------------------------------------------------------[INFO] Building ejb31[INFO] task-segment: [clean, test][INFO] ------------------------------------------------------------------------[INFO] [clean:clean {execution: default-clean}][INFO] Deleting directory /Users/arungupta/samples/v3/embedded/ejb31/target. . .------------------------------------------------------- T E S T S-------------------------------------------------------Running org.glassfish.embedded.samples.AppTestApr 9, 2010 3:48:16 PM org.glassfish.ejb.embedded.EJBContainerProviderImp l getValidFileSEVERE: ejb.embedded.location_not_existsApr 9, 2010 3:48:19 PM com.sun.enterprise.v3.server.AppServerStartup runINFO: GlassFish v3 (74.2) startup time : Embedded(1180ms) startup services(1523ms) total(2703ms)Apr 9, 2010 3:48:20 PM com.sun.enterprise.transaction.JavaEETransactionMa nagerSimplified initDelegatesINFO: Using com.sun.enterprise.transaction.jts.JavaEETransacti onManagerJTSDelegate as the delegateApr 9, 2010 3:48:21 PM org.glassfish.admin.mbeanserver.JMXStartupService$ JMXConnectorsStarterThread runINFO: JMXStartupService: JMXConnector system is disabled, skipping.Apr 9, 2010 3:48:21 PM AppServerStartup runINFO: [Thread[GlassFish Kernel Main Thread,5,main]] startedApr 9, 2010 3:48:30 PM com.sun.enterprise.security.SecurityLifecycle INFO: security.secmgroffApr 9, 2010 3:48:31 PM com.sun.enterprise.security.ssl.SSLUtils checkCertificateDatesSEVERE: java_security.expired_certificateApr 9, 2010 3:48:31 PM com.sun.enterprise.security.SecurityLifecycle onInitializationINFO: Security startup service calledApr 9, 2010 3:48:31 PM com.sun.enterprise.security.PolicyLoader loadPolicyINFO: policy.loadingApr 9, 2010 3:48:32 PM com.sun.enterprise.security.auth.realm.Realm doInstantiateINFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRe alm successfully created.Apr 9, 2010 3:48:32 PM com.sun.enterprise.security.auth.realm.Realm doInstantiateINFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRe alm successfully created.Apr 9, 2010 3:48:32 PM com.sun.enterprise.security.auth.realm.Realm doInstantiateINFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate .CertificateRealm successfully created.Apr 9, 2010 3:48:32 PM com.sun.enterprise.security.SecurityLifecycle onInitializationINFO: Security service(s) started successfully....Apr 9, 2010 3:48:33 PM com.sun.ejb.containers.BaseContainer initializeHomeINFO: Portable JNDI names for EJB App : [java:global/classes/App!org.glassfish.embedded.samples.App, java:global/classes/App]Apr 9, 2010 3:48:34 PM org.glassfish.admin.mbeanserver.JMXStartupService shutdownINFO: JMXStartupService and JMXConnectors have been shut down.Apr 9, 2010 3:48:34 PM com.sun.enterprise.v3.server.AppServerStartup stopINFO: Shutdown procedure finishedApr 9, 2010 3:48:34 PM AppServerStartup runINFO: [Thread[GlassFish Kernel Main Thread,5,main]] exitingTests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.61 secResults :Tests run: 2, Failures: 0, Errors: 0, Skipped: 0The key log messages are highlighted in bold and are described: - *"mvn clean test" builds the project and runs the test. - The server started in under 3 seconds, 2703 ms to be precise. - The portable JNDI name for the EJB is "java:global/classes/App" (convenience name for a bean with one view) and the fully-qualified notation is "java:global/classes/App!org.glassfish.embedded.samples.App". The convenience name is constructed in the "global" namespace + the unqualified name of the directory + bean name. The later is created by adding the fully-qualified name of the interface to the former. - The server shuts down after the tests are run, shows that 2 tests (one default + one newly added) ran, and both passed. A future blog will show how to add other Java EE functionality to this app. Technorati: totd embedded ejb glassfish javaee v3 Read More about [TOTD #128: EJBContainer.createEJBContainer: Embedded EJB using GlassFish v3...
http://fixunix.com/solaris-rss/578673-totd-128-ejbcontainer-createejbcontainer-embedded-ejb-using-glassfish-v3.html
CC-MAIN-2015-18
en
refinedweb
Note. I'm using Google Cloud Python SDK version 1.9.3, on Ubuntu Linux 12.04, 64 bits. As I want this short intro to grow up in time I'll be using the excellent MVC framework "Ferris" from CloudSherpas from the beginning. The IDE I'm using is EMACS 23.3. 1. Creating your first "Person" Datastore model 1. Create a blank projectFirst you need to create an empty project to start with. To do so just make a copy of new_project template included with Google Cloud SDK. cp -R new_project_template my_new_project 2. Install Ferris MVC Download Ferris MVC from the official site: wget -c Unzip the package in your "my_new_project" folder or directory $ unzip cloudsherpas-ferris-framework-*.zip -d . $ cd cloudsherpas-ferris-framework-* $ mv * ../ $ rm -fr cloudsherpas-ferris-framework-* Edit your and save your app.yaml file so you know is your project #my_new_project/app.yaml application: my-new-app-id #.appspot.com version: 1.0 Start your app for the first time just to check everything is ok To start your app for the first time just launch the dev server like this. $ dev_appserver.py my_new_project Then open your browser at (local app URL) and to (local admin console). 3. Creating your first Datastore ModelFor the purposes of this article we'll create a simple two-properties model for the Kind "Person". This model includes the "name" of the person an also a multi-value text field for saving tags related to this person. Following the directory structure we'd just created by copying Ferris to our project, we need to create our model under the folder app/models like this: (you can use the text editor or IDE of your choice). # app/models/person.py from ferris import BasicModel from google.appengine.ext import ndb class Person(BasicModel): """ NDB Model for Person name: StringProperty - Required skills: StringProperty(repeated=True) - Optional """ name = ndb.StringProperty(required=True) tags = ndb.StringProperty(repeated=True) Once you create your model you can restart your development server (CTRL+C) and dev_appappserver.py my_new_project again. Using the interactive console to test your modelGoogle's Cloud SDK contains a very nice administration app that includes an interactive console to test your code or data for different purposes. In this case, we are going to use the interactive console to test our simple Person model by creating new entries and do some queries against it. Mass creation of test entries with sample dataOne of the things that I find most annoying when testing some app is the lack of real or at least close to real data. A lot of problems (think of performance, scalability, validation and data modeling problems just to name a few), can be tracked down during early stages of development if just one can count on an adequate dataset to work with. Even for our simple model is good to have a decent size dataset to play with queries and insertions over tags or names in it. Although the developement server included with the GC SDK appears to have utilities to mass insert data into Google's Datastore, I could not found a good resource or reference to execute that procedure when one is using NDB (the official doc, mentions DB but not NDB implementation). In this scenario i'd remembered excelent Perl::Maker package and decided to search for an equivalent for Python. What i'd found was "Faker", a very simple yet powerful tool for creating user data: names, surnames and general paragraphs (lorem ipsum), so, what we are going to do right now is to add Faker to our project and start using the Interactive Console to do some tests. 1. Download Faker from official github site 2. Unzip Faker inside your project folder $ cd my_new_project $ unzip faker-master.zip -d . $ mv faker-master faker 3. Creating mass data from Interactive Console Start your development server (if you didn't already) $ dev_appserver.py my_new_project Launch de Admin Console Point your browser to then click on "Interactive Console" from the left menu bar Once there clear the default code in the text box. Finally copy and paste the following python code in the text box: from app.models.person import Person from google.appengine.ext import ndb from random import randrange from faker import Faker # a new instance of Faker fake = Faker() NENTRIES = 10 # a list wich contains fake tags to randomize over ftags = (['engineering','custom-making','writing','electrician', 'interiors-design','dancing','smiling','drifting','drinking']) ftags_new = [] for i in range(1,NENTRIES): # create a new name fname = fake.name() # randomize over tags list size and items to create the person's tags # randomize the number of tags for j in range(0,randrange(9)): # randomize tags ftags_new.extend([ftags[randrange(9)]]) print ftags_new person = Person(name=fname, tags=ftags_new) del ftags_new[:] # save the new person on datastore everytime person.put() After executing the code above you should see a printed list of all tags list random assigned to each new entry. ['interiors-design', 'writing', 'electrician', 'dancing', 'interiors-design', 'drinking', 'smiling', 'interiors-design'] ['electrician', 'writing'] ['interiors-design'] ['interiors-design', 'interiors-design', 'dancing', 'smiling', 'smiling'] ['drifting', 'electrician', 'dancing', 'interiors-design', 'dancing', 'drinking'] ['electrician', 'writing', 'drifting', 'writing', 'writing', 'drinking', 'interiors-design', 'engineering'] ['interiors-design', 'interiors-design'] ['writing'] ['drinking', 'drinking', 'drinking', 'engineering'] Now you can go to "Datastore Viewer" in the console to see the entries you'd just created. In this case you'd created just 10 entries, but rhe number can be higher. In the next part we'll be covering querying against Datastore and the repeated attributes and also some very nice options for timing your entries creation process. References[1] Google's App Engine Official Documentation [2] Ferris MVC [3] Faker -
http://grupodot.blogspot.com/2014/04/part-1-testing-your-datastore-models.html
CC-MAIN-2015-18
en
refinedweb
Enterprise. ArcGIS installs the versions of Python listed below. The version of NumPy and Matplotlib is included with the Python environment in the most recent releases.. ArcGIS Pro The version of Python and its stack versions can be determined by opening the Python window in the application by clicking View > Python, and typing the following commands: import sys import matplotlib import numpy import scipy print(sys.version) print(matplotlib.__version__) print(numpy.__version__) print(scipy.__version__) The commands display the default Python version used with the application. In the image below (ArcGIS Pro 2.5), the version of Python is 3.6.9, followed by the versions of the Matplotlib, NumPy, and SciPy packages. Many other packages are also included with the Python environment. Use the Python tab in the ArcGIS Pro settings to check the version of those packages . Note: In ArcGIS Pro versions 1.0 through 1.2, if Python is used outside of ArcGIS Pro, it is required to install Python for ArcGIS Pro. This is not required for versions 1.3 and later. ArcGIS Desktop ArcGIS Enterprise ArcGIS Enterprise also ships with Python. In recent releases, both Python 2.x and Python 3.x runtimes are provided. ArcGIS Notebook Server Each notebook runtime in ArcGIS Notebook Server packages a precise list of Python libraries, including a specific version of each. If you need a library that is not in either runtime by default, you can extend a notebook runtime to include it. Refer to ArcGIS Notebook Server: Available Python libraries for a complete list of the Python libraries packaged in each default runtime. Related Information - ArcGIS Pro: Python in ArcGIS Pro - ArcGIS Server and ArcPy - ArcMap: ArcGIS Desktop 10.5.x system requirements - ArcMap: ArcGIS Desktop 10.6.x system requirements - ArcMap: ArcGIS Desktop 10.7.x system requirements - ArcMap: ArcGIS Desktop 10.8.x system requirements - ArcGIS Notebook Server: Available Python libraries Last Published: 12/13/2021 Article ID: 000013224 Software: and prior) 10, ArcGIS Desktop 10, ArcGIS Enterprise 10.6.1, 10.6, 10.5.1 ArcGIS for Desktop 10.5, 10.4.1, 10.4, 10.3.1, 10.3, 10.2.2, 10.2.1, 10.2, 10.1 ArcGIS GIS Server 10.5, 10.4.1, 10.4, 10.3.1, 10.3, 10.2.2, 10.2.1, 10.2, 10.1, (10.0, ArcGIS Pro 2.9, 2.8.3, 2.8.2, 2.8.1, 2.8, 2.7.4, 2.7.3, 2.7.2, 2.7.1, 2.7, 2.6.8, 2.6.7, 2.6.6, 2.6.5, 2.6.4, Desktop 10.6.1, 10.6, 10.5.1 ArcGIS Server 10.9.1, 10.9, 10.8.1, 10.8, 10.7.1, 10.7, 10.6.1, 10.6, 10.5.1, 10.5, 10.4.1, 10.4, 10.3.1, 10.3, 10.2.2, 10.2.1, 10.2, 10.1, 10
https://support.esri.com/en/Technical-Article/000013224
CC-MAIN-2022-05
en
refinedweb
3D texture mapping node. More... #include <Inventor/nodes/SoTexture3.h> This property node defines a 3D texture map and parameters for that map. This map is used to apply a 3D texture to subsequent shapes as they are rendered. The texture can be read from the file(s) specified by the filenames field. Once the texture has been read, the images field contains the texture data. However, this field is marked so the image is not written out when the texture node is written to a file. To turn off texturing, set the first value of the filenames field to an empty string (""). Textures can also be specified in memory by setting the images field to contain the texture data. Doing so resets the filenames field to the empty string. Simply put, a 3D texture is a set of well-arranged 2D textures. Typically, 3D textures represent a set of image-slices of a given volume of data, and are used for mapping onto pieces of geometry. Note that this is different from direct volume rendering in that 3D textures need to be mapped onto a piece of geometry. OpenGL requires all images in a 3D texture to have the same dimensions, and each dimension (X, Y, and Z) needs to be a power of 2. Also, images must have the same number of components (grayscale, grayscale with transparency, RGB, or RGB with transparency). You should take this into account when setting texture coordinates. If your 3D image is not correctly dimensioned, you may want to consider either applying a ratio to your coordinates or adding an SoTexture3Transform node with the field scaleFactor set to compensate.. Transparency Texture images can contain transparency (alpha values less than 1) and modify the transparency of geometry in the scene. Also note that some image file formats, for example JPEG, do not support transparency information (alpha channel). LIMITATIONS 3D textures are only supported by the following shapes: Only SoIndexedFaceSet shapes automatically compute texture coordinates if they are not specified either by a texture coordinate function (see SoTextureCoordinateFunction) or by explicit texture coordinates (see SoTextureCoordinate3). SoComplexity, SoMaterial, SoTextureCoordinate3, SoTextureCoordinateBinding, SoTextureCoordinateFunction Texture layout. Creates a texture node with default settings. Names of file(s) from which to read texture image(s).3 node was read. For example, if an SoTexture3 node with a filename of "../tofu.rgb" is read from /usr/people/bob/models/food.iv, then /usr/people/bob/tofu.rgb will be read (assuming tofu.rgb isn't found in the directories maintained by SoInput). All images must have the same dimensions and number of components. Depth (number of slices) is determined by the number of file names. Note that only 2D image file formats are currently supported. A 3D texture image can be read as a series of 2D image files. Contains an in-memory representation of the texture map. It is either the contents of the file(s) read from filenames, an image read directly from an Open Inventor file, or an image set programmatically using the methods provided by SoSFImage3. Indicates whether the data layout is a volumetric texture VOLUME or an array of bi-dimensional textures ARRAY. Use enum SoTexture3::Layout. Default is VOLUME. Note that if you use a SoTexture3 with a SoShaderProgram, the layout value affects the type of sampler in GLSL: if the layout value is VOLUME, the sampler type is sampler3D; if the layout value is ARRAY, the sampler type is sampler2DArray.NOTE: field available since Open Inventor 9.
https://developer.openinventor.com/refmans/latest/RefManCpp/class_so_texture3.html
CC-MAIN-2022-05
en
refinedweb
Introduction To Pragmatic Functional Java Pragmatic Functional Java is a modern, very concise yet readable Java coding style based on Functional Programming concepts. Join the DZone community and get the full member experience.Join For Free The Pragmatic Functional Java (PFJ) is an attempt to define a new idiomatic Java coding style. Coding style, which will completely utilize all features of current and upcoming Java versions and involve compiler to help writing concise yet reliable and readable code. While this style can be used even with Java 8, with Java 11 it looks much cleaner and concise. It gets even more expressive with Java 17 and benefits from every new Java language feature. But PFJ is not a free lunch, it requires significant changes in developers’ habits and approaches. Changing habits is not easy, traditional imperative ones are especially hard to tackle. Is it worth it? Definitely! PFJ code is concise, expressive, and reliable. It is easy to read and maintain and in most cases, if code compiles - it works! Elements Of Pragmatic Functional Java PFJ is derived from a wonderful Effective Java book with some additional concepts and conventions, in particular, derived from Functional Programming. Note that despite the use of FP concepts, PFJ does not try to enforce FP-specific terminology. (Although references are provided for those who are interested to explore those concepts further). PFJ focuses on: - Reducing mental overhead. - Improving code reliability. - Improving long-term maintainability. - Involving compiler to help write correct code. - Making writing correct code easy and natural, writing incorrect code, while still possible, should require effort. Despite ambitious goals, there are only two key PFJ rules: - Avoid nullas much as possible. - No business exceptions. Below, each key rule is explored in more detail: Avoid null As Much As Possible (ANAMAP rule) Nullability of variables is one of the Special States. They are a well-known source of run-time errors and boilerplate code. To eliminate these issues and represent values that can be missing, PFJ uses the Option<T> container. This covers all cases when such a value may appear - return values, input parameters, or fields. In some cases, for example for performance or compatibility with existing frameworks reasons, classes may use null internally. These cases must be clearly documented and invisible to class users, i.e., all class APIs should use Option<T>. This approach has several advantages: - Nullable variables are immediately visible in the code. No need to read documentation/check source code/rely on annotations. - The compiler distinguishes nullable and non-nullable variables and prevents incorrect assignments between them. - All boilerplate necessary for nullchecks is eliminated. No Business Exceptions (NBE Rule) PFJ uses exceptions only to represent cases of fatal, unrecoverable (technical) failures. Such an exception might be intercepted only for purposes of logging and/or graceful shutdown of the application. All other exceptions and their interception are discouraged and avoided as much as possible. Business exceptions are another case of Special States. For propagation and handling of business-level errors, PFJ uses the Result<T> container. Again, this covers all cases when errors may appear - return values, input parameters, or fields. Practice shows that fields rarely (if ever) need to use this container. There are no justified cases when business-level exceptions can be used. Interfacing with existing Java libraries and legacy code performed via dedicated wrapping methods. The Result<T> container contains an implementation of these wrapping methods. The No Business Exceptions rule provides the following advantages: - Methods which can return errors are immediately visible in code. No need to read. documentation/check source code/analyze call tree to check which exceptions can be thrown and under which conditions. - The compiler enforces proper error handling and propagation. - Virtually zero boilerplate for error handling and propagation. - Code can be written for happy day scenarios and errors handled at the point where this is most convenient - the original intent of exceptions, which was never actually achieved. - Code remains composable, easy to read and reason about, no hidden breaks or unexpected transitions in the execution flow - what you read is what will be executed. Transforming Legacy Code Into PFJ Style Code OK, key rules seem to look good and useful, but how real code will look like? Let’s start from quite a typical backend code: public interface UserRepository { User findById(User.Id userId); } public interface UserProfileRepository { UserProfile findById(User.Id userId); } public class UserService { private final UserRepository userRepository; private final UserProfileRepository userProfileRepository; public UserWithProfile getUserWithProfile(User.Id userId) { User user = userRepository.findById(userId); if (user == null) { throw UserNotFoundException("User with ID " + userId + " not found"); } UserProfile details = userProfileRepository.findById(userId); return UserWithProfile.of(user, details == null ? UserProfile.defaultDetails() : details); } } Interfaces at the beginning of the example are provided for context clarity. The main point of interest is the getUserWithProfile method. Let’s analyze it step by step. - The first statement retrieves the uservariable from the user repository. - Since a user may not be present in the repository, uservariable might be null. The following nullcheck verifies if this is the case and throws a business exception if yes. - The next step is the retrieval of the user profile details. Lack of details is not considered an error. Instead, when details are missing, then defaults are used for the profile. The code above has several issues. First, returning null in case if a value is not present in the repository is not obvious from the interface. We need to check the documentation, look into implementation or make a guess how these repositories work. Sometimes annotations are used to provide a hint, but this still does not guarantee API behavior. To address this issue, let’s apply rules to the repositories: public interface UserRepository { Option<User> findById(User.Id userId); } public interface UserProfileRepository { Option<UserProfile> findById(User.Id userId); } Now there is no need to make any guesses - API explicitly tells that returned value may not be present. Now let’s take a look into getUserWithProfile method again. The second thing to note is that the method may return a value or may throw an exception. This is a business exception, so we can apply the rule. The main goal of the change - make the fact that a method may return value OR error explicit: public Result<UserWithProfile> getUserWithProfile(User.Id userId) { OK, now we have APIs cleaned up and can start changing the code. The first change will be caused by the fact, that userRepository now returns Option<User>: public Result<UserWithProfile> getUserWithProfile(User.Id userId) { Option<User> user = userRepository.findById(userId); } Now we need to check if the user is present and if not, return an error. With the traditional imperative approach, code should be looking like this: public Result<UserWithProfile> getUserWithProfile(User.Id userId) { Option<User> user = userRepository.findById(userId); if (user.isEmpty()) { return Result.failure(Causes.cause("User with ID " + userId + " not found")); } } The code does not look very appealing, but it is not worse than the original either, so let’s keep it for now as is. The next step is to try to convert the remaining parts of the code: public Result<UserWithProfile> getUserWithProfile(User.Id userId) { Option<User> user = userRepository.findById(userId); if (user.isEmpty()) { return Result.failure(Causes.cause("User with ID " + userId + " not found")); } Option<UserProfile> details = userProfileRepository.findById(userId); } Here comes the catch: details and users are stored inside Option<T> containers, so to assemble UserWithProfile we need to somehow extract values. Here could be different approaches, for example, use Option.fold() method. The resulting code will definitely not be pretty, and most likely will violate the rule. There is another approach - use the fact that Option<T> is a container with special properties. In particular, it is possible to transform value inside Option<T> using Option.map() and Option.flatMap() methods. Also, we know, that details value will be either, provided by the repository or replaced with default. For this, we can use Option.or() method to extract details from the container. Let’s try these approaches:)); } Now we need to write a final step - transform userWithProfile container from Option<T> to Result<T>:)); return userWithProfile.toResult(Cause.cause("")); } Let’s keep the error cause in return the statement empty for a moment and look again at the code. We can easily spot an issue: we definitely know that userWithProfile is always present - case, when user is not present, is already handled above. How can we fix this? Note, that we can invoke user.map() without checking if a user is present or not. The transformation will be applied only if user is present and ignored if not. This way, we can eliminate if(user.isEmpty()) check. Let’s move the retrieving of details and transformation of User into UserWithProfile inside the lambda passed to user.map():(Cause.cause("")); } The last line needs to be changed now, since userWithProfile can be missing. The error will be the same as in the previous version, since userWithProfile might be missing only if the value returned by userRepository.findById(userId) is missing:(Causes.cause("User with ID " + userId + " not found")); } Finally, we can inline details and userWithProfile as they are used only once and immediately after creation: public Result<UserWithProfile> getUserWithProfile(User.Id userId) { return userRepository.findById(userId) .map(userValue -> UserWithProfile.of(userValue, userProfileRepository.findById(userId) .or(UserProfile.defaultDetails()))) .toResult(Causes.cause("User with ID " + userId + " not found")); } Note how indentation helps to group code into logically linked parts. Let’s analyze the resulting code: - Code is more concise and written for happy day scenario, no explicit error or nullchecks, no distraction from business logic - There is no simple way to skip or avoid errors or nullchecks, writing correct and reliable code is straightforward and natural. Less obvious observations: - All types are automatically derived. This simplifies refactoring and removes unnecessary clutter. If necessary, types still can be added. - If at some point repositories will start returning Result<T>instead of Option<T>, the code will remain unchanged, except the last transformation ( toResult) will be removed. - Aside from replacing the ternary operator with Option.or()method, the resulting code looks a lot like if we would move code from original returnstatement inside lambda passed to map()method. The last observation is very useful to start conveniently writing (reading usually is not an issue) PFJ-style code. It can be rewritten into the following empirical rule: look for value on the right side. Just compare: User user = userRepository.findById(userId); // <-- value is on the left side of the expression And return userRepository.findById(userId) .map(user -> ...); // <-- value is on the right side of the expression This useful observation helps with the transition from legacy imperative code style to PFJ. Interfacing With Legacy Code Needless to say, the existing code does not follow PFJ approaches. It throws exceptions, returns null and so on and so forth. Sometimes it is possible to rework this code to make it PFJ-compatible, but quite often this is not the case. Especially this is true for external libraries and frameworks. Calling Legacy Code There are two major issues with legacy code invocation. Each of them is related to a violation of the corresponding PFJ rule: Handling Business Exceptions The Result<T> contains a helper method named lift() which covers most use cases. Method signature looks so: static <R> Result<R> lift(FN1<? extends Cause, ? super Throwable> exceptionMapper, ThrowingSupplier<R> supplier) The first parameter is the function that transforms an exception into the instance of Cause (which, in turn, is used to create Result<T> instances in failure cases). The second parameter is the lambda, which wraps the call to actual code which needs to be made PFJ-compatible. The simplest possible function, which transforms the exception into an instance of Cause is provided in Causesutility class: fromThrowable(). Together with Result.lift() they can be used as follows: public static Result<URI> createURI(String uri) { return Result.lift(Causes::fromThrowable, () -> URI.create(uri)); } Handling null Value Returns This case is rather straightforward - if the API can return null, just wrap it into Option<T> using Option.option() method. Providing Legacy API Sometimes it is necessary to allow legacy code call code written in PFJ style. In particular, this often happens when some smaller subsystem is converted to PFJ style, but the rest of the system remains written in old-style, and API needs to be preserved. The most convenient way to do this is to split the implementation into two parts - PFJ style API and adapter, which only adapts the new API to the old API. Here could be a very useful simple helper method like the one shown below: public static <T> T unwrap(Result<T> value) { return value.fold( cause -> { throw new IllegalStateException(cause.message()); }, content -> content ); } There is no ready to use helper method provided in Result<T> for the following reasons: - There could be different use cases and different types of exceptions (checked and unchecked) can be thrown. - Transformation of the Causeinto different specific exceptions heavily depends on the particular use case. Managing Variable Scopes This section will be dedicated to various practical cases which appear while writing PFJ-style code. Examples below assume the use of Result<T>, but this is largely irrelevant, as all considerations are applicable to Option<T> as well. Also, examples assume that functions invoked in the examples are converted to return Result<T> instead of throwing exceptions. Nested Scopes The functional style code intensively uses lambdas to perform computations and transformations of the values inside Option<T> and Result<T> containers. Each lambda implicitly creates scope for their parameters - they are accessible inside the lambda body, but not accessible outside it. This is a useful property in general, but for traditional imperative code, it is rather unusual and might feel inconvenient at first. Fortunately, there is a simple technique to overcome perceived inconvenience. Let’s take a look at the following imperative code: var value1 = function1(...); // function1() may throw exception var value2 = function2(value1, ...); // function2() may throw exception var value3 = function3(value1, value2, ...); // function3() may throw exception Variable value1 should be accessible for invocation of function2() and function3(). This does mean that following straightforward transformation to PFJ style will not work: function1(...) .flatMap(value1 -> function2(value1, ...)) .flatMap(value2 -> function3(value1, value2, ...)); // <-- ERROR, value1 is not accessible! To keep value accessible we need to use nested scope, i.e., nest calls as follows: function1(...) .flatMap(value1 -> function2(value1, ...) .flatMap(value2 -> function3(value1, value2, ...))); Second call to flatMap() is done for the value returned by function2 rather than the value returned by first flatMap(). This way we keep value1 within the scope and make it accessible for function3. Although it is possible to make arbitrarily deep nested scopes, usually more than a couple of nested scopes are harder to read and follow. In this case, it is highly recommended to extract deeper scopes into a dedicated function. Parallel Scopes Another frequently observed case is the need to calculate/retrieve several independent values and then make a call or build an object. Let’s take a look at the example below: var value1 = function1(...); // function1() may throw exception var value2 = function2(...); // function2() may throw exception var value3 = function3(...); // function3() may throw exception return new MyObject(value1, value2, value3); At first look, transformation to PFJ style can be done exactly as for nested scopes. The visibility of each value will be the same as for imperative code. Unfortunately, this will make scopes deeply nested, especially if many values need to be obtained. For such cases, Option<T> and Result<T> provide a set of all() methods. These methods perform “parallel” computation of all values and return a dedicated version of MapperX<...> interface. This interface has only three methods - id(), map() and flatMap(). The map() and flatMap() methods work exactly like corresponding methods in Option<T> and Result<T>, except they accept lambdas with a different numbers of parameters. Let’s take a look at how it works in practice and convert the imperative code above into PFJ style: return Result.all( function1(...), function2(...), function3(...) ).map(MyObject::new); Besides being compact and flat, this approach has few more advantages. First, it explicitly expresses intent - calculates all values before use. Imperative code does this sequentially, hiding original intent. The second advantage - calculation of each value is isolated and does not bring unnecessary values into scope. This reduces the context necessary to understand and reason about each function invocation. Alternative Scopes A less frequent, but still, important case is when we need to retrieve a value, but if it is not available, then we use an alternative source of the value. Cases, when more than one alternative is available, are even less frequent, but even more painful when error handling is involved. Let’s take a look at the following imperative code: MyType value; try { value = function1(...); } catch (MyException e1) { try { value = function2(...); } catch(MyException e2) { try { value = function3(...); } catch(MyException e3) { ... // repeat as many times as there are alternatives } } } The code is somewhat contrived because nested cases are usually hidden inside other methods. Nevertheless, overall logic is far from simple, mostly because besides choosing the value, we also need to handle errors. Error handling clutters the code and makes initial intent - choose a first available alternative - buried inside error handling. Transformation into the PFJ style makes intent crystal clear: var value = Result.any( function1(...), function2(...), function3(...) ); Unfortunately, here is one important difference: original imperative code calculates second and subsequent alternatives only when necessary. In some cases, this is not an issue, but in many cases, this is highly undesirable. Fortunately, there is a lazy version of the Result.any(). Using it, we can rewrite code as follows: var value = Result.any( function1(...), () -> function2(...), () -> function3(...) ); Now, converted code behaves exactly like its imperative counterpart. Brief Technical Overview of Option<T> and Result<T> These two containers are monads in the Functional Programming terms. Option<T> is rather a straightforward implementation of Option/Optional/Maybe monad. Result<T> is an intentionally simplified and specialized version of the Either<L,R>: left type is fixed and should implement Cause interface. Specialization makes API very similar to Option<T> and eliminates a lot of unnecessary typing by the price of loss of universality and generality. This particular implementation is focused on two things: - Interoperability between each other and existing JDK classes like Optional<T>and Stream<T> - API designed to make an expression of intent clear The last statement is worth a more in-depth explanation. Each container has few core methods: - factory method(s) map()transformation method, which transforms value but does not change special state: present Option<T>remains a present, success Result<T>remains success. flatMap()transformation method, which, besides transformation, may also change special state: convert present Option<T>into empty or success Result<T>into failure. fold()method, which handles both cases (present/empty for Option<T>and success/failure for Result<T>) at once. Besides core methods, there are a bunch of helper methods, which are useful in frequently observed use cases. Among these methods, there is a group of methods that are explicitly designed to produce side effects. Option<T> has the following methods for side effects: Option<T> whenPresent(Consumer<? super T> consumer); Option<T> whenEmpty(Runnable action); Option<T> apply(Runnable emptyValConsumer, Consumer<? super T> nonEmptyValConsumer); Result<T> has the following methods for side effects: Result<T> onSuccess(Consumer<T> consumer); Result<T> onSuccessDo(Runnable action); Result<T> onFailure(Consumer<? super Cause> consumer); Result<T> onFailureDo(Runnable action); Result<T> apply(Consumer<? super Cause> failureConsumer, Consumer<? super T> successConsumer); These methods provide hints to the reader that code deals with side effects rather than transformations. Other Useful Tools Besides Option<T> and Result<T>, PFJ employs some other general-purpose classes. Below, each of them is described in more detail. Functions JDK provided many useful functional interfaces. Unfortunately, functional interfaces for general-purpose functions is limited only to two versions: single parameter Function<T, R> and two parameters BiFunction<T, U, R>. Obviously, this is not enough in many practical cases. Also, for some reason, type parameters for these functions are reverse to how functions in Java are declared: result type is listed last, while in a function declaration it is defined first. PFJ uses a consistent set of functional interfaces for functions with 1 to 9 parameters. For brevity, they are called FN1… FN9. So far, there were no use cases for functions with more parameters (and usually this is a code smell). But if this will be necessary, the list could be extended further. Tuples Tuples is a special container that can be used to store several values of different types in a single variable. Unlike classes or records, values stored inside have no names. This makes them an indispensable tool for capturing an arbitrary set of values while preserving types. A great example of this use case is the implementation of Result.all() and Option.all() sets of methods. In some sense, tuples could be considered a frozen set of parameters prepared for function invocation. From this perspective, the decision to make tuple internal values accessible only via map() method sounds reasonable. Nevertheless, a tuple with 2 parameters has additional accessors which make possible use of Tuple2<T1,T2> as a replacement for various Pair<T1,T2> implementations. PFJ uses a consistent set of tuple implementations with 0 to 9 values. Tuples with 0 and 1 values are provided for consistency. Conclusion Pragmatic Functional Java is a modern, very concise yet readable Java coding style based on Functional Programming concepts. It provides a number of benefits comparing to the traditional idiomatic Java coding style: - PFJ involves Java compiler to help write reliable code: - Code which compiles usually works - Many errors shifted from run-time to compile time - Some classes of errors, like NullPointerExceptionor unhandled exceptions, are virtually eliminated - PFJ significantly reduces the amount of boilerplate code related to error propagation and handling, as well as nullchecks - PFJ focuses on clear expression of intent and reducing mental overhead Published at DZone with permission of Sergiy Yevtushenko. See the original article here. Opinions expressed by DZone contributors are their own.
https://dzone.com/articles/introduction-to-pragmatic-functional-java
CC-MAIN-2022-05
en
refinedweb
- 17 Feb, 2011 1 commit - 14 Feb, 2011 2 commits Further changes after review. Also removed some includes of <iostream> left over from debugging. - 09 Feb, 2011 5 commits Replaced some of the more general message IDs (such as OPENIN or RDERR) with ones more specific to the message compiler and logging code. The general ones were too general given that the ID has to be totally unique within BIND10. The .h file now contains external references to message IDs and the .cc file contains both the definition and the initialization of the global dictionary with the associated text. - 08 Feb, 2011 3 commits - Jelte Jansen authored two spaces, one letter 'e' added - 07 Feb, 2011 3 commits Change of the message compiler to avoid a possible clash of names in generated symbols. Also update documentation. * RootLoggerName now correctly avoids static initialization fiasco. * Message header file now references message definition file. * Moved message identifiers in logging subsystem into isc::log namespace. * Logger implementation now not created until logger is first used. * Messages are now "const char*" to avoid problems if a reference to a message is made in a static initialization. * Message compiler now recognises $NAMESPACE directive - 04 Feb, 2011 1 commit(). - 17 Jan, 2011 1 commit A checkpoint of various modifications to the logging code in trac438. -
https://gitlab.isc.org/isc-projects/kea/-/commits/1e3a2586abe597550611cca5697916f311ffd2a9/src/lib/log/compiler/message.cc
CC-MAIN-2022-05
en
refinedweb