text
stringlengths
454
608k
url
stringlengths
17
896
dump
stringclasses
91 values
source
stringclasses
1 value
word_count
int64
101
114k
flesch_reading_ease
float64
50
104
During a community event, most of the time attendees want to have internet access. However it is useful to have internet access but it should be limited under some circumstances. Usually the speech sessions are very short and speaker wants the audience to listen to him. Switching off the WiFi access through a mobile app can be very much useful during the speech period and it can be switched-on as soon as the session is over. Few days ago, I was working with setting up hostapd based AP (Access Point) on raspberry pi. Getting the idea of script based AP server control, I thought to control WiFi with one button interface. The idea is that one master user can switch-on and switch-off WiFi anytime through Cayenne UI and SSID will disappear from available list. Step 1: Setup the WiFi Hotspot First thing need to do is to setup the wifi hotspot. Clear steps for setting up RPi3 WiFi access point is shows at following link. The steps will make internal WiFi (wlan0) as access point physical layer. However the external dongle generally connects to wlan1 (use ifconfig or iw command to check all WiFi related options). So, I made all modifications according to wlan1. However, my wlan1 (Tenda W311M) dongle doesn't support the mentioned driver in hostapd configuration and thus the script automatically switch the AP access MAC address to wlan0 as shown in figure. Step 2: WiFi Switched-off in Default State while True: # WiFi Hotstop turn-off condition if GPIO.input(inp)==0: subprocess.Popen('sudo service hostapd stop',shell=True) print "OFF" time.sleep(2) Step 3: Switch-on WiFi With Click of a Button # WiFi Hotstop turn-on condition if GPIO.input(inp)==1: subprocess.Popen('sudo service hostapd start',shell=True) print "ON" time.sleep(2) Step 4: Source Code import RPi.GPIO as GPIO import time import subprocess # Pin declaration for input and output but = 20 inp = 21 # Configuration setup for input and output pins GPIO.setmode(GPIO.BCM) GPIO.setup(but, GPIO.OUT) GPIO.setup(inp, GPIO.IN) try: while True: # WiFi Hotstop turn-off condition if GPIO.input(inp)==0: subprocess.Popen('sudo service hostapd stop',shell=True) print "OFF" time.sleep(2) # WiFi Hotstop turn-on condition if GPIO.input(inp)==1: subprocess.Popen('sudo service hostapd start',shell=True) print "ON" time.sleep(2) except: print "WiFi control using Cayenne, BYE!!!" finally: GPIO.cleanup() 2 Discussions 2 years ago There are a lot of professors that would love one of these :) Reply 2 years ago Thanks :)
https://www.instructables.com/id/PiFi-Controller-Pi-Hotspot-Control-Using-Cayenne-A/
CC-MAIN-2019-04
refinedweb
430
64.81
IntroductionThe State machine Work flow discussion Source Code All characters in this article are fictional and any resemblance to live or dead is purely coincidental.. This article was written in a straight half & hour session so please excuse for my English as it's my second language and for any spelling mistakes..so guys enjoy State machines. Do not forget to watch my training videos on and download by 500 J ?. RC: - I was reading your article on WWF. I am working currently on an order processing project and I am bit confused how the workflow aspect of the project should be approached. Shiv: - Can you explain me the workflow part of your order project? RC: - Ok here's the requirement for the order and also I have drawn a small sketch of how the work flow looks like:- The work flow starts by user placing an order. Accounts department logs in and checks if payment is made for the order. If the payment is not made then they mark the order as cancelled and it's sent to the user for payment. Once the user makes the payment the order is moved to a valid order placed stage again. Purchase department logs in and check if the product is in stock for the order. If the product is in Stock the purchase department person enters saying the product is Instock and the order is then ready for dispatch. Courier department logs in and check if the address of the order is proper. If address is not proper the order is moved to a pending stage and sent to the end user for address correction. In pending stage if the user corrects the address the order is then moved back to ready for dispatch. If the order is dispatched and received by the end user the delivery person marks the order as delivered. Shiv: - Hmmm, it's an interesting work flow. This can be very easily solved by using Windows work flow foundation. The first step we need to decide is which kind of work flow we need to choose for the above. RC: - ohhh , Are there different kind of work flows in Windows Work flow. Shiv :- Primarily there are two kinds of work flows in WWF and depending on the nature we need to choose the work flow accordingly. RC:- That's funny I thought a work flow is just a collection of activities which is executed depending on certain conditions. For instance below figure shows a simple work flow which has customer activities, some if condition depending on which the activities are executed. In other words what I want to say is workflow is workflow what do you mean by types of work flow. Shiv :- From windows work flow point of view there are two types of workflow the first is a sequential work flow and the second is a state machine work flow.. RC :- In other words what we can say is that if the work flow controls the execution then its sequential and if there is some external factor which controls the work flow then it becomes a state machine workflow. Shiv: - Yes, that's a good summary. Looks like you have started thinking in terms of work flows. So now let's first decide your order project is of which kind of work flow. RC (Thinking):- Well I think it's a sequential work flow ,as the work flow has a control on the execution. Shiv :- Ok , so let me redraw your workflow diagram , below is your changed diagram. You can see there are so many inputs from the user which changes your workflow. For instance the accounts department depending in the payment diverts the workflow, purchase department depending on stock value divert the flow and same holds true for the courier person. RC: - I understand where you are coming from. My work flow is not in control of himself. Ok, I buy back my point my order project is of a state machine work flow. Shiv :- A few comments on work flow type before we move ahead. Many architects get carried with sequential work flow. If you see in your application that depending on user inputs your workflow is changing then it's a good idea to think about state machine. Ok, let me comment from more practical point of view. In actual projects it's a combination of these types rather than just one type. In other words you can have a broader state machine work flow which has lot of sequential work flow in between and vice versa. RC :- What I also think is we should also look from the domain perspective what kind of work flow it actually looks like. Ok, this sounds good. So how can we now move ahead? Shiv :- So let's first try to visualize what are the important elements in state machine work flow. There three important things in state machine work flow initial state , action and the final state. You can see from the figure a simple example of state machine. So you have a initial state, a action happens and it moves to the some other state. For instance a bulb is first in a on state and then switch off and it moves to a off state. RC :- Ok , I am trying to get a feel of state machines. Shiv :- So let's first visualize the whole order work flow from these three aspects. So below is a table which shows the whole work flow from the above three perspective. First state Action / Event Next state Order placed InStockEvent Order Approved NotPaidEvent Order cancelled PaymentMadeEvent AddressNotProperEvent Order Pending Order pending AddressCorrectedEvent DispatchedEvent Order Delivered RC :- Ok , that a good visualization. So what I understand is we have in all 4 different states and some 6 to 7 events. I think our state machine diagram will look something as below. Shiv :- nice you are catching up on state machines. Ok now that we are clear about our states and about our events. It's time to make the complete work flow using WWF. RC :- That sounds sense. I really do not like theory there should be some practical implementation. Shiv :- We will be using VS 2008 enterprise and .Net 3.5 RC :- Why not express edition ?. Shiv :- Well WWF does not come with express edition. RC :- Ok noted. Shiv :- So before we move ahead and talk about practical. There's a one more point we need to cover. In a typical work flow project we have two important things one is the work flow and the second is the client which can be windows or web application which consumes that work flow. In state machine work flow we need to define a interface with all action. This interface is the only thing which the work flow knows. So any client who wants to invoke the work flow should make calls using this interface. RC :- Ok , got it so this interface is the gateway to make calls to the work flow. Shiv :- Yes you said right. So below is our interface, so that the first step we need to do create the interface. So we below figure shows that we have created a 'IOrder.cs' interface. The important point to note is we have referenced 'System.Workflow.Activities' and attributed the interface with 'ExternalDataExchange'. We have then define all our events for the states in this interface. RC :- That's a pretty simple step. Shiv: - Ok now do add new project and select 'State machine work flow library' Shiv :- Once you create the work flow project you will be popped up with a work flow designer as shown below. Now every state in a work flow had events so go the work flow tool box and drag and drop the event driven component on the state activity. RC: - Hang on shiv, correct me if I am wrong. As per our discussion logically every state should have events by which the state changes its action and it should also have which next state it should move after the event. Shiv :- You are absolutely right. So double click on the state and drag two things one is handle external event which defines which event it should listen to and second is the set state which says which is the next state it should move on. RC :- Ok great. So how should we define the events and next state for the state. Shiv :- If you remember we had defined a interface. It's time to start using it. So go to the properties of the handle event and select the interface type and the event for the same. The below figure shows the state is order placed and we need to handle the instock event. Shiv :- Now to specify the next state. So goto the property of the set state component and specify target state name. Shiv :- So create states , create event we need to handle in the states and the next state. You will see you end up in to something like as shown below. RC :- The visuals look great and appealing. Shiv :- Yeah.The most important part for WWF is to get a feel of the work flow development.. RC :- Ok , this sounds good. What next. Shiv :- One of the most important points we have forgotten is we need to make our concrete class which will be called by the client. So let's implement the interface Iorder. You can see the below class clsOrder which implements IOrder. We have just displayed simple console messages. Remember this concrete class will called by client and all the below methods of the class will be invoked by the client. This class internally calls the interface which in turn invoked the work flow engine. public class clsOrder : IOrder { #region IOrder Memberspublic event EventHandler NotPaid; public event EventHandler InStock; public event EventHandler PaymentMade; public event EventHandler Dispatch; public event EventHandler AddressNotProper; public event EventHandler AddressCorrected; public event EventHandler absolutely right. So we need to create the work flow instance using the work flow runtime and start the instance. We also need to add the order class clsorder object as a service. :- So below is the code snippet which shows how our client code looks like. What I have done is I am taking inputs and invoking the work flow entered 2 the product moved in stock and when I did dispatch it moved in a delivered state. Shiv :- The most important part in work flow is the work flow logic is now in your work flow project and your business component are self contained and they are doing their own activity. RC :- Great man where can I down the code from, would like to see the same when I reach home tonight. Hall of Fame Twitter Terms of Service Privacy Policy Contact Us Archives Tell A Friend
http://www.dotnetspark.com/kb/445-state-machine-work-flow-discussion.aspx
CC-MAIN-2018-30
refinedweb
1,817
72.26
XmlSerializationWriter.WriteAttribute Method (String, Byte[]) .NET Framework (current version) Namespace: System.Xml.Serialization This API supports the product infrastructure and is not intended to be used directly from your code. Instructs an XmlWriter object to write an XML attribute that has no namespace specified for its name. Assembly: System.Xml (in System.Xml.dll) Parameters - localName - Type: System.String The local name of the XML attribute. - value - Type: System.Byte[] The value of the XML attribute as a byte array. The protected members of XmlSerializationWriter are intended for use only by derived classes that are used internally within the .NET Framework XML serialization infrastructure. Return to top .NET Framework Available since 1.1 Silverlight Available since 2.0 Available since 1.1 Silverlight Available since 2.0 Show:
https://msdn.microsoft.com/en-us/library/x2cke66h.aspx?cs-save-lang=1&cs-lang=fsharp
CC-MAIN-2017-39
refinedweb
128
55.61
Opened 5 years ago Closed 5 years ago Last modified 5 years ago #14880 closed (fixed) raw_id_fields in admin does not work when limit_choices_to dictionary has value=False Description The related-lookup popup does not properly filter the queryset when the limit_choices_to dictionary has value=False. The models.py and admin.py demonstrate the problem. To reproduce: - Using the following models.py and admin.py, do Publisher(name='local', overseas=False).save() Publisher(name='overseas', overseas=True).save() - Inside admin interface > add book, select related-lookup link to display popup. Only publisher "overseas" is available. Should display publisher "local" only. Work-around: setting limit_choices_to={'overseas': 0} works, but this work-around is less intuitive than a fix. models.py from django.db import models class Publisher(models.Model): name = models.CharField(max_length=20) overseas = models.BooleanField() class Book(models.Model): title = models.CharField(max_length=20) local_publisher = models.ForeignKey(Publisher, limit_choices_to={'overseas': False}) admin.py from testproj.testapp.models import * from django.contrib import admin class BookAdmin(admin.ModelAdmin): raw_id_fields = ['local_publisher',] class PublisherAdmin(admin.ModelAdmin): list_display = ['name', 'overseas'] admin.site.register(Book, BookAdmin) admin.site.register(Publisher, PublisherAdmin) Attachments (4) Change History (15) comment:1 follow-up: ↓ 2 Changed 5 years ago by julien - Needs documentation unset - Needs tests unset - Patch needs improvement unset comment:2 in reply to: ↑ 1 Changed 5 years ago by smallming@… comment:3 Changed 5 years ago by russellm - milestone set to 1.3 - Triage Stage changed from Unreviewed to Accepted Confirmed that this worked in 1.2.3, but doesn't in 1.2.4 or trunk. This makes it a release blocker for 1.3. comment:4 Changed 5 years ago by russellm - Keywords blocker regression added comment:5 Changed 5 years ago by lukeplant I don't think this was ever working. I have tried with a real life project, and with tests, and I get failure on 1.2.3. On 1.2.4 I get the suspicious operation thing. The original reporter was using 1.2.1 apparently, so this doesn't look like a regression. I will attach patches for the tests - against 1.2.3, 1.2.4, most recent 1.2.X and most recent trunk, all slightly different. Changed 5 years ago by lukeplant Tests - patch against 1.2.3 Changed 5 years ago by lukeplant Tests - patch against 1.2.4 Changed 5 years ago by lukeplant Tests - patch against 1.2.X Changed 5 years ago by lukeplant Tests - patch against trunk comment:6 Changed 5 years ago by smallming I will like to add a line to admin.py in the initial bug report so it properly reflects the bug and "skip" SuspiciousOperation exception. Reason below. class PublisherAdmin(admin.ModelAdmin): list_display = ['name', 'overseas'] list_filter = ['overseas'] # Added for illustration I was tracing the bug using 1.2.4, and found that the SuspiciousOperation is due to the lack of corresponding ModelAdmin.list_filter specified. Adding list_filter = ['overseas'] to PublisherAdmin will lead to the original bug reported (at least in 1.2.4). Perhaps a separate bug can be filed under "raw_id_fields in admin raise SuspiciousOperation when limit_choices_to is used without corresponding ModelAdmin.list_filter". comment:7 Changed 5 years ago by ramiro The SuspiciousOperation error you see in 1.2.4 is because of a problem in the security fix that triggered its release, it was fixed in r15140 and it is also already fixed in trunk. We can ignore the noise introduced by that. Regarding he original report of this ticket, I can trace back this problem showing itself as far as Django 1.1 (and even 1.0, but there bugs like #9561 introduce additional noise)(tested with sqlite3). In such environment, clicking in the magnifying glass icon opens a popup where only the overseas publisher is shown. Later, when trying to save the PublishedBook instance, validation rejects it so it seems there the filter overseas=False filter/validation is working in that stage. comment:8 Changed 5 years ago by lukeplant - Keywords blocker regression removed - milestone 1.3 deleted OK, so this isn't a regression, we can remove the blocker/regression keywords. It would still be nice to be fixed for 1.3, but we don't have to. For those looking to fix it, there are probably two routes: - Change the generated query string to use '0' instead of 'False', since '0' does work. - Fix the code that reads the query string to treat 'False' as boolean False (but obviously only for boolean fields). I have no idea at the moment which is the 'right' way to fix it, one of them is likely to be cleaner that the other. comment:9 Changed 5 years ago by lukeplant - Owner changed from nobody to lukeplant - Status changed from new to assigned comment:10 Changed 5 years ago by lukeplant - Resolution set to fixed - Status changed from assigned to closed I tried your example, but when clicking the hourglass to select a publisher, the popup crashes with an error: SuspiciousOperation: Filtering by overseas not allowed. What version of Django are you using?
https://code.djangoproject.com/ticket/14880
CC-MAIN-2015-35
refinedweb
848
59.7
In this post we’ll get a strong taste for zero knowledge proofs by exploring the graph isomorphism problem in detail. In the next post, we’ll see how this relates to cryptography and the bigger picture. The goal of this post is to get a strong understanding of the terms “prover,” “verifier,” and “simulator,” and “zero knowledge” in the context of a specific zero-knowledge proof. Then next time we’ll see how the same concepts (though not the same proof) generalizes to a cryptographically interesting setting. Graph isomorphism Let’s start with an extended example. We are given two graphs , and we’d like to know whether they’re isomorphic, meaning they’re the same graph, but “drawn” different ways. The problem of telling if two graphs are isomorphic seems hard. The pictures above, which are all different drawings of the same graph (or are they?), should give you pause if you thought it was easy. To add a tiny bit of formalism, a graph is a list of edges, and each edge is a pair of integers between 1 and the total number of vertices of the graph, say . Using this representation, an isomorphism between and is a permutation of the numbers with the property that is an edge in if and only if is an edge of . You swap around the labels on the vertices, and that’s how you get from one graph to another isomorphic one. Given two arbitrary graphs as input on a large number of vertices , nobody knows of an efficient—i.e., polynomial time in —algorithm that can always decide whether the input graphs are isomorphic. Even if you promise me that the inputs are isomorphic, nobody knows of an algorithm that could construct an isomorphism. (If you think about it, such an algorithm could be used to solve the decision problem!) A game Now let’s play a game. In this game, we’re given two enormous graphs on a billion nodes. I claim they’re isomorphic, and I want to prove it to you. However, my life’s fortune is locked behind these particular graphs (somehow), and if you actually had an isomorphism between these two graphs you could use it to steal all my money. But I still want to convince you that I do, in fact, own all of this money, because we’re about to start a business and you need to know I’m not broke. Is there a way for me to convince you beyond a reasonable doubt that these two graphs are indeed isomorphic? And moreover, could I do so without you gaining access to my secret isomorphism? It would be even better if I could guarantee you learn nothing about my isomorphism or any isomorphism, because even the slightest chance that you can steal my money is out of the question. Zero knowledge proofs have exactly those properties, and here’s a zero knowledge proof for graph isomorphism. For the record, and are public knowledge, (common inputs to our protocol for the sake of tracking runtime), and the protocol itself is common knowledge. However, I have an isomorphism that you don’t know. Step 1: I will start by picking one of my two graphs, say , mixing up the vertices, and sending you the resulting graph. In other words, I send you a graph which is chosen uniformly at random from all isomorphic copies of . I will save the permutation that I used to generate for later use. Step 2: You receive a graph which you save for later, and then you randomly pick an integer which is either 1 or 2, with equal probability on each. The number corresponds to your challenge for me to prove is isomorphic to or . You send me back , with the expectation that I will provide you with an isomorphism between and . Step 3: Indeed, I faithfully provide you such an isomorphism. If I you send me , I’ll give you back , and otherwise I’ll give you back . Because composing a fixed permutation with a uniformly random permutation is again a uniformly random permutation, in either case I’m sending you a uniformly random permutation. Step 4: You receive a permutation , and you can use it to verify that is isomorphic to . If the permutation I sent you doesn’t work, you’ll reject my claim, and if it does, you’ll accept my claim. Before we analyze, here’s some Python code that implements the above scheme. You can find the full, working example in a repository on this blog’s Github page. First, a few helper functions for generating random permutations (and turning their list-of-zero-based-indices form into a function-of-positive-integers form) import random def randomPermutation(n): L = list(range(n)) random.shuffle(L) return L def makePermutationFunction(L): return lambda i: L[i - 1] + 1 def makeInversePermutationFunction(L): return lambda i: 1 + L.index(i - 1) def applyIsomorphism(G, f): return [(f(i), f(j)) for (i, j) in G] Here’s a class for the Prover, the one who knows the isomorphism and wants to prove it while keeping the isomorphism secret: class Prover(object): def __init__(self, G1, G2, isomorphism): ''' isomomorphism is a list of integers representing an isomoprhism from G1 to G2. ''' self.G1 = G1 self.G2 = G2 self.n = numVertices(G1) assert self.n == numVertices(G2) self.isomorphism = isomorphism self.state = None def sendIsomorphicCopy(self): isomorphism = randomPermutation(self.n) pi = makePermutationFunction(isomorphism) H = applyIsomorphism(self.G1, pi) self.state = isomorphism return H def proveIsomorphicTo(self, graphChoice): randomIsomorphism = self.state piInverse = makeInversePermutationFunction(randomIsomorphism) if graphChoice == 1: return piInverse else: f = makePermutationFunction(self.isomorphism) return lambda i: f(piInverse(i)) The prover has two methods, one for each round of the protocol. The first creates an isomorphic copy of , and the second receives the challenge and produces the requested isomorphism. And here’s the corresponding class for the verifier class Verifier(object): def __init__(self, G1, G2): self.G1 = G1 self.G2 = G2 self.n = numVertices(G1) assert self.n == numVertices(G2) def chooseGraph(self, H): choice = random.choice([1, 2]) self.state = H, choice return choice def accepts(self, isomorphism): ''' Return True if and only if the given isomorphism is a valid isomorphism between the randomly chosen graph in the first step, and the H presented by the Prover. ''' H, choice = self.state graphToCheck = [self.G1, self.G2][choice - 1] f = isomorphism isValidIsomorphism = (graphToCheck == applyIsomorphism(H, f)) return isValidIsomorphism Then the protocol is as follows: def runProtocol(G1, G2, isomorphism): p = Prover(G1, G2, isomorphism) v = Verifier(G1, G2) H = p.sendIsomorphicCopy() choice = v.chooseGraph(H) witnessIsomorphism = p.proveIsomorphicTo(choice) return v.accepts(witnessIsomorphism) Analysis: Let’s suppose for a moment that everyone is honestly following the rules, and that are truly isomorphic. Then you’ll always accept my claim, because I can always provide you with an isomorphism. Now let’s suppose that, actually I’m lying, the two graphs aren’t isomorphic, and I’m trying to fool you into thinking they are. What’s the probability that you’ll rightfully reject my claim? Well, regardless of what I do, I’m sending you a graph and you get to make a random choice of that I can’t control. If is only actually isomorphic to either or but not both, then so long as you make your choice uniformly at random, half of the time I won’t be able to produce a valid isomorphism and you’ll reject. And unless you can actually tell which graph is isomorphic to—an open problem, but let’s say you can’t—then probability 1/2 is the best you can do. Maybe the probability 1/2 is a bit unsatisfying, but remember that we can amplify this probability by repeating the protocol over and over again. So if you want to be sure I didn’t cheat and get lucky to within a probability of one-in-one-trillion, you only need to repeat the protocol 30 times. To be surer than the chance of picking a specific atom at random from all atoms in the universe, only about 400 times. If you want to feel small, think of the number of atoms in the universe. If you want to feel big, think of its logarithm. Here’s the code that repeats the protocol for assurance. def convinceBeyondDoubt(G1, G2, isomorphism, errorTolerance=1e-20): probabilityFooled = 1 while probabilityFooled > errorTolerance: result = runProtocol(G1, G2, isomorphism) assert result probabilityFooled *= 0.5 print(probabilityFooled) Running it, we see it succeeds $ python graph-isomorphism.py 0.5 0.25 0.125 0.0625 0.03125 ... <SNIP> ... 1.3552527156068805e-20 6.776263578034403e-21 So it’s clear that this protocol is convincing. But how can we be sure that there’s no leakage of knowledge in the protocol? What does “leakage” even mean? That’s where this topic is the most difficult to nail down rigorously, in part because there are at least three a priori different definitions! The idea we want to capture is that anything that you can efficiently compute after the protocol finishes (i.e., you have the content of the messages sent to you by the prover) you could have computed efficiently given only the two graphs , and the claim that they are isomorphic. Another way to say it is that you may go through the verification process and feel happy and confident that the two graphs are isomorphic. But because it’s a zero-knowledge proof, you can’t do anything with that information more than you could have done if you just took the assertion on blind faith. I’m confident there’s a joke about religion lurking here somewhere, but I’ll just trust it’s funny and move on. In the next post we’ll expand on this “leakage” notion, but before we get there it should be clear that the graph isomorphism protocol will have the strongest possible “no-leakage” property we can come up with. Indeed, in the first round the prover sends a uniform random isomorphic copy of to the verifier, but the verifier can compute such an isomorphism already without the help of the prover. The verifier can’t necessarily find the isomorphism that the prover used in retrospect, because the verifier can’t solve graph isomorphism. Instead, the point is that the probability space of “ paired with an made by the prover” and the probability space of “ paired with as made by the verifier” are equal. No information was leaked by the prover. For the second round, again the permutation used by the prover to generate is uniformly random. Since composing a fixed permutation with a uniform random permutation also results in a uniform random permutation, the second message sent by the prover is uniformly random, and so again the verifier could have constructed a similarly random permutation alone. Let’s make this explicit with a small program. We have the honest protocol from before, but now I’m returning the set of messages sent by the prover, which the verifier can use for additional computation. def messagesFromProtocol(G1, G2, isomorphism): p = Prover(G1, G2, isomorphism) v = Verifier(G1, G2) H = p.sendIsomorphicCopy() choice = v.chooseGraph(H) witnessIsomorphism = p.proveIsomorphicTo(choice) return [H, choice, witnessIsomorphism] To say that the protocol is zero-knowledge (again, this is still colloquial) is to say that anything that the verifier could compute, given as input the return value of this function along with and the claim that they’re isomorphic, the verifier could also compute given only and the claim that are isomorphic. It’s easy to prove this, and we’ll do so with a python function called simulateProtocol. def simulateProtocol(G1, G2): # Construct data drawn from the same distribution as what is # returned by messagesFromProtocol choice = random.choice([1, 2]) G = [G1, G2][choice - 1] n = numVertices(G) isomorphism = randomPermutation(n) pi = makePermutationFunction(isomorphism) H = applyIsomorphism(G, pi) return H, choice, pi The claim is that the distribution of outputs to messagesFromProtocol and simulateProtocol are equal. But simulateProtocol will work regardless of whether are isomorphic. Of course, it’s not convincing to the verifier because the simulating function made the choices in the wrong order, choosing the graph index before making . But the distribution that results is the same either way. So if you were to use the actual Prover/Verifier protocol outputs as input to another algorithm (say, one which tries to compute an isomorphism of ), you might as well use the output of your simulator instead. You’d have no information beyond hard-coding the assumption that are isomorphic into your program. Which, as I mentioned earlier, is no help at all. In this post we covered one detailed example of a zero-knowledge proof. Next time we’ll broaden our view and see the more general power of zero-knowledge (that it captures all of NP), and see some specific cryptographic applications. Keep in mind the preceding discussion, because we’re going to re-use the terms “prover,” “verifier,” and “simulator” to mean roughly the same things as the classes Prover, Verifier and the function simulateProtocol. Until then! Never.
https://jeremykun.com/2016/07/05/zero-knowledge-proofs-a-primer/?like_comment=54274&_wpnonce=9a61a0c8b7&replytocom=54274
CC-MAIN-2020-29
refinedweb
2,208
53.92
Overview of the Collections Module The Collections module implements high-performance container datatypes (beyond the built-in types list, dict and tuple) and contains many useful data structures that you can use to store information in memory. This article will be about the Counter object. Counter A Counter is a container that tracks how many times equivalent values are added. It can be used to implement the same algorithms for which other languages commonly use bag or multiset data structures. Importing the module Import collections makes the stuff in collections available as: collections.something import collections Since we are only going to use the Counter, we can simply do this: from collections import Counter Initializing Counter supports three forms of initialization. Its constructor can be called with a sequence of items (iterable), a dictionary containing keys and counts (mapping, or using keyword arguments mapping string names to counts (keyword args).}) Create and Update Counters Counters Elements The elements() method returns an iterator over elements repeating each as many times as its count. Elements are returned in arbitrary order. import collections c = collections.Counter('extremely') c['z'] = 0 print c print list(c.elements()) The order of elements is not guaranteed, and items with counts less than zero are not included. $ python collections_counter_elements.py Counter({'e': 3, 'm': 1, 'l': 1, 'r': 1, 't': 1, 'y': 1, 'x': 1, 'z': 0}) ['e', 'e', 'e', 'm', 'l', 'r', 't', 'y', 'x'] Most of the words in the system dictionary to produce a frequency distribution, ' Combined counts:' print c1 + c2 print ' Subtraction:' print c1 - c2 print ' Intersection (taking positive minimums):' print c1 & c2 print ' Union }) Counting words Tally occurrences of words in a list. cnt = Counter() for word in ['red', 'blue', 'red', 'green', 'blue', 'blue']: cnt[word] += 1 print cnt Counter({'blue': 3, 'red': 2, 'green': 1}) The counter takes an iterable and could also be written like this: mywords = ['red', 'blue', 'red', 'green', 'blue', 'blue'] cnt = Counter(mywords) print cnt Counter({'blue': 3, 'red': 2, 'green': 1}) Find the most common words Find the ten most common words in Hamlet import re words = re.findall('w+', open('hamlet.txt').read().lower()) print Counter(words).most_common(10) [('the', 1143), ('and', 966), ('to', 762), ('of', 669), ('i', 631), ('you', 554), ('a', 546), ('my', 514), ('hamlet', 471), ('in', 451)] Sources Please don't forget to read the links below for more:
https://www.pythonforbeginners.com/collection/python-collections-counter
CC-MAIN-2020-16
refinedweb
396
56.29
Summary Joins the contents of a table to another table based on a common attribute field. The input table is updated to contain the fields from the join table. You can select which fields from the join table will be added to the input table. The records in the Input Table are matched to the records in the Join Table based on the values of Input Join Field and the Output Join Field. Optionally, only desired fields can be selected from the Join Table and appended to the Input Table during the join. Illustration Usage The Input Table can be a feature class (including shapefile) or a table. All fields in the Input Table will be kept during the join. Optionally, only selected fields from the Join Table will be added to the output. These can be checked under the Join Fields parameter. Records from the Join Table can be matched to more than one record in the Input Table. For more information on one-to-one, many-to-one, one-to-many, and many-to-many joins, see About joining and relating tables. If no fields are selected for the optional Join Fields parameter, all fields from the Join Table to the output will be joined. Joins can be based on fields of types text, date, or number. Joins based on text fields are case-sensitive. Fields of different number formats can be joined as long as the values are equal. For example, a field of type float can be joined to a short integer field. The Input Join Field and the Output Join Field can have different names. If a join field has the same name as a field from the input table, the joined field will be appended by _1 (or _2, or _3, and so on) to make it unique. If values in the Output Join Field are not unique, only the first occurrence of each value will be used. - To account for join table values other than the first occurrence, start by executing the Summary Statistics tool using the Join Table as input. Summary Statistics allows you to summarize fields (for example, sum, mean, min). - To merge two or more fields in the join table before the join, first export the table or feature class using the Table To Table tool and merge using the tool's field map. Syntax JoinField_management (in_data, in_field, join_table, join_field, {fields}) Code sample JoinField example 1 (Python window) The following Python window script demonstrates how to use the JoinField function in immediate mode. import arcpy from arcpy import env env.workspace = "C:/data/data.gdb" arcpy.JoinField_management("zion_park", "zonecode", "zion_zoning", "zonecode", ["land_use","land_cover"]) JoinField example 2 (stand-alone Python script) This stand-alone Python script shows the JoinField function used to join a table to a feature class and only include two of the table's fields in the join. # PermanentJoin.py # Purpose: Join two fields from a table to a feature class # Import system modules import arcpy from arcpy import env # Set the current workspace env.workspace = "c:/data/data.gdb" # Set the local parameters inFeatures = "zion_park" joinField = "zonecode" joinTable = "zion_zoning" fieldList = ["land_use", "land_cover"] # Join two feature classes by the zonecode field and only carry # over the land use and land cover fields arcpy.JoinField_management (inFeatures, joinField, joinTable, joinField, fieldList) Environments Licensing information - Basic: Yes - Standard: Yes - Advanced: Yes
http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/join-field.htm
CC-MAIN-2019-18
refinedweb
560
60.55
How to load part of pre trained model? Will the unused parameters be auto deleted if I load the whole model but only use part of it? How to load part of pre trained model? I’m afraid not The keys of state_dictmust exactly match the keys returned by this module’s state_dict()function. if name not in new model , it will raise KeyError but I gusee this may work for you def load_my_state_dict(self, state_dict): own_state = self.state_dict() for name, param in state_dict.items(): if name not in own_state: continue if isinstance(param, Parameter): # backwards compatibility for serialized parameters param = param.data own_state[name].copy_(param) You can remove all keys that don’t match your model from the state dict and use it to load the weights afterwards:(pretrained_dict) Wow, thanks a lot! But “model.load(pretrained_dict)” gives me an error “object has no attribute ‘load’” I think #3 should be: model.load_state_dict(model_dict) Yes it should. I edited the snippet. Thanks. I am looking for it. It seems awesome!!! Consider the situation where I would like to restore all weights till the last layer. # args has the model name, num classes and other irrelevant stuff self._model = models.__dict__[args.arch](pretrained = False, num_classes = args.classes, aux_logits = False) if self.args.pretrained: print("=> using pre-trained model '{}'".format(args.arch)) pretrained_state = model_zoo.load_url(model_names[args.arch]) model_state = self._model.state_dict() pretrained_state = { k:v for k,v in pretrained_state.iteritems() if k in model_state and v.size() == model_state[k].size() } model_state.update(pretrained_state) self._model.load_state_dict(model_state) Shouldn’t we also be checking if the sizes match before restoring? It looks like we are comparing only the names. if the sizes are wrong, i believe the copy_ invoked in load_state_dict will complain. 3. load the new state dict model.load_state_dict(model_dict) step 3 should look like this @chenyuntc Hello, what if the net2 is a subset of net1, and I want to load weight from net2 to net1? can directly using load_static_dict works? thanks! As of 21st December’17, load_state_dict() takes the boolean argument ‘strict’ which when set to False allows to load only the variables that are identical between the two models irrespective of whether one is subset/superset of the other. After model_dict.update(pretrained_dict), the model_dict may still have keys that pretrained_model doesn’t have, which will cause a error. Assum following situation: pretrained_dict: ['A', 'B', 'C', 'D'] model_dict: ['A', 'B', 'C', 'E'] After pretrained_dict = {k: v for k, v in pretrained_dict.items() if k in model_dict} and model_dict.update(pretrained_dict), they are: pretrained_dict: ['A', 'B', 'C'] model_dict: ['A', 'B', 'C', 'E'] So when performing model.load_state_dict(pretrained_dict), model_dict still has key E that pretrained_dict doen’t have. So how about using model.load_state_dict(model_dict) instead of model.load_state_dict(pretrained_dict)? The complete snippet is therefore as follow:(model_dict) hi how I can load trained model with its weights ? Have a look at the Serialization tutorial or do you have a specific issue? Is it param = Parameter.data ? It might be a little late to ask. If I want to skip some layers, like if I train the model with batch normalization, but want to use the trained bn version for that without batch normalization, how can I change the layers’ names? Because otherwise, the name might be different, and it will complain about size mismatching. This is very useful, thanks Shouldn’t the # 3 be model.load_state_dict(model_dict) instead of model.load_state_dict(pretrained_dict) ? if those params are stored in dictionary, there is a great a lot parameters that have same names, eg. nn.Conv2d, really a lot. So how could it know which nn.Conv2d is the right one to choose, when use this dictionary to mapping. Thx~
https://discuss.pytorch.org/t/how-to-load-part-of-pre-trained-model/1113/2?u=amrit_das
CC-MAIN-2022-33
refinedweb
623
51.34
Download presentation Presentation is loading. Please wait. Published byJennifer Doar Modified over 2 years ago 2 The campus of the School of Hard Knocks is in the far country (Proverbs 13:15). The Prodigal Son had a difficult curriculum. Course in Economics - and when he had spent all (Luke 15:14). Course in Horticulture - there arose a mighty famine in that land (Luke 15:14) Course in Livestock Management - he sent him into the field to feed swine (Luke 15:15) Course in Sociology - and no man gave unto him(Luke 15:16; Proverbs 14:20; Proverbs 19:6) 3 You smell terrible. You look awful. You have been working a disgraceful job. You have disgraced your fathers name. He wont take you back!! Luke 15:15 - And he went and joined himself to a citizen of that country. Joined himself- To glue or cement, this implies that he forced himself upon the citizen. He only took him into service because he constantly entreated him for work. 4 The Course in Theology - (Proverbs 22:6). The livestock owner did not know the prodigals father. This is the course that the young man remembered, Luke 15:17 And when he came to himself. How many hired servants of my fathers have bread enough and to spare (Luke 15:17). 5 Ephesians 1:3 – Blessed be the God and Father of our Lord Jesus Christ, who hath blessed us with all spiritual blessing in heavenly places in Christ 6 The Location- In Christ! In order to receive blessings from God, one must be in Christ, the body, the church, the house of God. The prodigal had no blessings away from the Fathers house (Luke 15:17). The Origin Of Gods Blessing- The heavenly places ( literal the heavenlies). The blessings of God do not originate from man, nor can they be disseminated at mans direction. They are Gods blessings to give as God sees fit (Daniel 4:35). 7 The Nature Of Gods Blessings - Spiritual! Physical blessings are promised by God (Matthew 6:25-34), but the bread that truly matters is that which feed and nourishes the soul, preparing for eternity. The Distribution of Gods Blessings - All or Every. Not a single spiritual blessing from the heavenlies can be enjoyed outside of Christ. If one is not in Christ, there are absolutely zero spiritual blessings promised to him. 8 Matthew 14: 19- 21 Mark 8: 19-21 Ephesians 3: 20-21 Psalm 50:10-12- For every beast of the field is mine, and the cattle upon a thousand hills. I know all the fowls of the mountains: and the wild beasts of the field are mine. If I were hungry, I would not tell thee: for the world is mine, and the fullness thereof. 9 Luke 15:20- The first emotion that the father felt was compassion. The Greek is far more expressive than the English. Literally the father hugged him down. In other words the father embraced his son with such emotion that they both went to the ground. Then the father kissed him again and again. 10 The speech- Luke 15: 18-19. The young man did not complete the rehearsed speech. He only made it through repentance. Luke 15:21- And the son said unto him, Father, I have sinned against heaven, and in thy sight, and am no more worthy to be called thy son. What about make me as one of your hired servants? 11 The father cut off the speech. The young man got through repentance but not the request. In the far country the prodigal learned the meaning of misery, but back at his fathers house he discovered, the meaning of mercy. Where does the Father go from here? 12 Best Robe- A fine stately garment that came down to the feet. It was the kind of robe worn by kings. The robe was a gift of identity. He came home wearing clothes that identified him with failure. Sin leaves identifying marks on our lives (Luke 15:14-16; Zechariah 3:3-4) Matthew 22:11- The man wanted to be a part of the feast but his garments betrayed him. 13 The ring- The ring bore the family emblem or name. It was pressed in wax to seal letters and legal documents. The ring was a gift of authority. The ring signified that he was back in authority in the Fathers business. Everyone would have to answer to the Father if they disrespected the sons portion. 14 The shoes- Sandals were a clear indication that the prodigal son was not going to be a servant. Servants nor slaves wore sandals. The shoes were a gift of ability. More is expected of you when you have more. (Matthew 25:15) The fatted calf- The calf was fed with wheat and kept for festive celebrations. The Father is waiting for us to return (2 Peter 3:9). 15 Clothes- Robe Jewelry- Ring Friends- Servants Joyful Celebration- The feast Love - The Father. We love him because he first loved us. Assurance of the future- Inheritance. He was back in the Fathers business. Similar presentations © 2017 SlidePlayer.com Inc.
http://slideplayer.com/slide/1471036/
CC-MAIN-2017-13
refinedweb
862
83.86
OpenGL was ported from the archaic Graphics Library (GL) system developed by Silicon Graphics Inc. as the means to program the companys high-performance specialised graphics workstations. GL was ported to OpenGL in 1992 so that the technology would be platform-independent, i.e., not just work on Silicon Graphics machines. OpenGL is a software interface to graphics hardware. Its the specification of an application programming interface (API) for computer graphics programming. The interface consists of different function calls, which may be used to draw complex 3D scenes. It is widely used in CAD, virtual reality, scientific and informational visualisation, flight simulation and video games. The functioning of a standard graphics system is typically described by an abstraction called the graphics pipeline. The graphics pipeline The graphics pipeline is a black box that transforms a geometric model of a scene and produces a pixel based perspective drawing of the real world onto the screen. The graphics pipeline is the path that data takes from the CPU, through the GPU, and out to the screen. Figure 1 describes a minimalist workflow of a graphics pipeline. Every pixel passes through at least the following phases: vertices generation, vertex shading, generating primitives, rasterisation, pixel shading, testing and mixing. After all these stages, the pixel is sent to a frame buffer, which later results in the display of the pixel on the screen. This sequence is not a strict rule of how OpenGL is implemented but provides a reliable guide for predicting what OpenGL will do. A list of vertices is fed into the GPU that will be put together to form a mesh. Information present with the vertices need not be restricted to its position in 3D space. If required, surface normals, texture coordinates, colours, and spatial coordinate values generated from the control points might also be associated with the vertices and stored. All data, whether it describes geometry or pixels, can be saved in a display list for current or later use. The vertices that are processed are now connected to form the mesh. The GPU chooses which vertices to connect per triangle, based on either the order of the incoming vertices or a set of indices that maps them together. From vertex data, the next stage is the generation of primitives, which converts the vertices into primitives. Vertex data gets transformed by matrix transformations. Spatial coordinates are projected from the 3D space map onto a screen. Lighting calculations as well as generation and transformation of texture coordinates can take place at this stage. Next comes clipping, or the elimination of portions of geometry which dont need to be rendered on the screen and are an overhead. Once we have figured out which pixels need to be drawn to the screen, the varying values from the vertex shader will be interpolated across the surface and fed into the pixel shader. These pixels are first unpacked from one of a variety of formats into the proper number of components. The colour of each pixel is determined. Now, we can use this information to calculate lighting, read from textures, calculate transparency, and use some high level algorithms to determine the depth of the pixels in 3D space. We now have all the information that we need to map the pixels onto the screen. We can determine the colour, depth and transparency information of every single pixel, if needed. Its now the GPUs job to decide whether or not to draw the new pixels on the top of pixels already on the screen. Note that, prior to this stage, various complexities in the pipeline can occur. If textures are encountered, they have to be handled; if fog calculations are necessary, they are to be addressed. We can also have a few stencil tests, depth-buffer tests, etc. Finally, the thoroughly processed pixel information, the fragment’, is drawn into the appropriate buffer, where it finally advances to become a pixel and reaches its final resting place, the display screen. Note that the above described fixed-pipeline model is now obsolete on modern GPUs, which have grown faster and smarter. Instead, the stages of the pipeline, and in some cases the entire pipeline, are being replaced by programs called shaders. This was introduced from OpenGL version 2.1 onwards. Modern 3D graphics programs have vertex shaders, evaluation shaders (tessellation shaders), geometry shaders, fragment shaders and compute shaders. Its easy to write a small shader that mimics what the fixed-function pipeline does, but modern shaders have grown increasingly complex, and they do many things that were earlier impossible to do on the graphics card. Nonetheless, the fixed-function pipeline makes a good conceptual framework on which to add variations, which is how many shaders are created. Diving into OpenGL As described, OpenGL is designed to be hardware-independent. In order to become streamlined on many different platforms, OpenGL specifications dont include creating a window, or defining a context and many other functions. Hence, we use external libraries to abstract this process. This helps us to make cross-platform applications and save the real essence of OpenGL. The OpenGL states and buffers are collected by an abstract object, commonly called context. Initialising OpenGL is done by adding this context, the state machine that stores all the data that is required to render your application. When you close your application, the context is destroyed and everything is cleaned up. The coding pattern these libraries follow is similar. We begin by specifying the properties of the window. The application will then initiate the event loop. Event handling includes mouse clicks, updating rendering states and drawing. Heres how it looks: #include <RequiredHeaders> int main(){ createWindow(); createContext(); while(windowIsOpen){ while (event == newEvent()){ handleThatEvent(event); } updateScene(); drawRequiedGraphics(); presentGraphics(); } return 0; } Coming to which libraries to use with OpenGL, we have a lot of options:. Here are a few noteworthy ones: - The OpenGL Utility Library (GLU) provides many of the modelling features, such as quadric surfaces and NURBS curves and surfaces. GLU is a standard part of every OpenGL implementation. - For machines that use the X Window System, the OpenGL Extension to the X Window System (GLX) is provided as an adjunct to OpenGL. The X Window System creates a hardware abstracted layer and provides support for networked computers. - The OpenGL Utility Toolkit (GLUT) is a Window System-independent toolkit, which is used to hide the complexities of differing window system APIs. We will be using GLUT in our sample program. - Mesa helps in running OpenGL programs on an X Window System, especially Linux. - OpenInventor is a C++ 3D graphics API that abstracts on OpenGL. Now, let’s see what the workflow of a C++ OpenGL program looks like. We have our application program, the compiled code at one end. At the other end is a 3D image that is rendered to the screen. Our program might be written with OpenInventor commands (or in native C++). The function calls are declared in OpenGL. These OpenGL calls are platform-independent. On an X Window System (like Linux), the OpenGL calls are redirected to the implementation calls defined by Mesa. The operating system might also have its own rendering API at this stage, which accelerates the rendering process. The OpenGL calls might also redirect to the implementation calls defined by the proprietary drivers (like Nvidia drivers, Intel drivers, etc, that facilitate graphics on the screen). Now, these drivers convert the OpenGL function calls into GPU commands. With its parallelism and speed, GPU maps the OpenGL commands into 3D images that are projected onto the screen. And this way we finally see 3D images called by OpenGL. Setting up Linux for graphics programming For graphics programming on a Linux machine, make sure that OpenGL is supported by your graphics cardalmost all of them do. OpenGL, GLX and the X server integration of GLX, are Linux system components and should already be part of the Debian, Red Hat, SUSE or any other distribution you use. Also make sure your graphics drivers are up to date. To update the graphics drivers on Ubuntu, go to System settings >> Software and Updates >> Additional drivers and install the required drivers. Next, install GLUT. Download the GLUT source from and follow the instructions in the package. If youre programming in C++, the following files need to be included: #include <GL/glut.h> // header file for the GLUT library #include <GL/gl.h> // header file for the OpenGL32 library #include <GL/glu.h> // header file for the GLu32 library To execute this file, an OpenGL program, you require various development libraries like GL, GLU X11, Xrandr, etc, depending on the function calls used. The following libraries would be sufficient for a simple 3D graphics program. Use apt-get or yum to install these libraries: freeglut3 freeglut3-dev libglew1.5 libglew1.5-dev libglu1-mesa libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev Next comes the linking part. You can use a Makefile to do this. But for our example, we will link them manually while compiling. Lets say we want to execute a C++ OpenGL program called main.cpp. We can link OpenGL libraries as follows: g++ -std=c++11 -Wall -o main main.cpp -lglfw3 -lGLU -lGL -lX11 -lXxf86vm -lXrandr -lpthread -lXi Note that the linking is done sequentially. So the order is important. You can now execute the program the usual way (./main for the above). A simple OpenGL based example Lets now write a minimal OpenGL program in C++. We will use GLUT for windowing and initialising context. We have already discussed what an OpenGL based workflow looks like. We create a window, initialise a context, wait for some event to occur and handle it. For this simple example, we can ignore event handling. We will create a window and display a triangle inside it. The required headers are: #include <GL/glut.h> // header file for the GLUT library #include <GL/gl.h> // header file for the OpenGL32 library The latest versions of GLUT include gl.h. So we can only include the GLUT library header. The main function will look like what follows: int main (int argc, char** argv){ glutInit(&argc, argv); // Initializing glut glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); // Setting up display mode, the single buffering and RGB colors glutInitWindowPosition(80, 80); // Position of the window on the screen glutInitWindowSize(400, 300); // Size of the window glutCreateWindow(A simple Triangle); // Name of the window glutDisplayFunc(display); // The display function glutMainLoop(); } All the above are GLUT calls. Since OpenGL doesnt handle windowing calls, all the window creation is taken care of by GLUT. We initialise a window and set up the display mode. The display mode specified above states that the window should display RGB colours and will require a single buffer to handle pixel outputs. We then specify the window position on the screen, the size of the window to be displayed and the display function. The display function takes a pointer to a function as an argument. The function would describe what is to be displayed inside the screen. The final function call loops the main forever, so that the window is always open until closed. Now that a window is initialised, lets draw a triangle with OpenGL function calls. Heres how the display function looks: void display(){ glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_POLYGON); glColor3f(1, 0, 0); glVertex3f(-0.6, -0.75, 0.5); glColor3f(0, 1, 0); glVertex3f(0.6, -0.75, 0); glColor3f(0, 0, 1); glVertex3f(0, 0.75, 0); glEnd(); glFlush(); } All OpenGL based function calls begin with the letters gl in lowercase. We are planning to display a simple triangle defined by three vertices. We specify the colour and position of the vertices and map them on to the screen. For this, we first call the glClear() function which clears the display buffer. Next, we specify the type of primitive we are planning to draw with the glBegin() function. This is the primitive of our drawing until a glEnd() function is called. Next, between the glBegin() and glEnd() we draw three points (vertices) and form a triangle with them. We first have to specify the colour and then the position of the drawing. As OpenGL is platform independent, the C-style datatypes are specified as a function call. This can be seen with the glColor3f() function, which takes three float values. Once the program is compiled, linked and called as described above, it would look like whats shown in Figure 3. If youre interested in learning OpenGL based computer graphics, the old version of the official red book is available for free at. :)
https://www.opensourceforu.com/2015/08/generating-computer-graphics-with-opengl/
CC-MAIN-2022-33
refinedweb
2,097
64.1
24 January 2013 19:07 [Source: ICIS news] (updates with Canadian and Mexican data) HOUSTON (ICIS)--Chemical shipments on Canadian railroads rose by 20.1% year on year in the week ended 19 January, marking their third straight increase so far this year, according to data released by a rail industry association on Thursday. Canadian chemical railcar loadings for the week totalled 10,753, compared with 8,956 in the same week in 2012, the Association of American Railroads (AAR) said. In the previous week, ended 12 January, Canadian chemical railcar shipments rose by 9.8%. From 1 to 19 January, chemical railcar loadings are up 14.7% year on year to 31,603. ?xml:namespace> US chemical railcar traffic fell by 0.3% year on year to 29,970 carloads in the week ended 19 January, marking its third straight decline so far this year. In the previous week, ended 12 January, US chemical car loadings fell 3.1%. From 1 January to 19 January, chemical car loadings are down 2.4% to 85,569. Meanwhile, overall US weekly railcar loadings for the week ended 19 January in the freight commodity groups tracked by the AAR fell by 3.5% year on year to 277,490
http://www.icis.com/Articles/2013/01/24/9634781/canada-chemical-railcar-traffic-rises-for-third-straight.html
CC-MAIN-2014-35
refinedweb
207
65.01
See Also edit - An equation solver - with an example of using trace to update dependent resources - Traces - examples and discussion - Tracing inappropriate variable access - Whole-Script Tracing - by DKF - An example of data objects - AM Using the trace command, I implemented an idea by George Howlett (the author of BLT) Synopsis edit - - trace option ?arg arg ...? Documentation edit Description editExamples of what to do with trace: - Communicate between parts of a GUI and the internal state of the app. (Simplified MVC, observer). In general Communicate between different parts of an app without coupling them strongly. - Compute simple constraints for a number of variables ("if this flag is on and that one is on, then no other is allowed to be set", and some such). - bind Canvas text items to a variable, effecting dynamic updates - Debug - call a proc when a variable is modified (detect setting from wrong routine). - Trace works in Itcl Itcl trace but not quite trivially. Order of Processing editJCW: proc tellme {id a e op} { puts " $id a=$a e=$e op=$op\ ax=[info exists ::$a] ex=[info exists ::${a}($e)]" } proc do {args} { puts "<$args>" uplevel $args } trace var a wu {tellme array} trace var a(1) wu {tellme element} puts [trace vinfo a] puts [trace vinfo a(1)] do set a(0) zero do set a(1) one do set a(2) two do unset a(0) do unset a(2) do unset a # output is: # # {wu {tellme array}} # {wu {tellme element}} # <set a(0) zero> # array a=a e=0 op=w ax=1 ex=1 # <set a(1) one> # array a=a e=1 op=w ax=1 ex=1 # element a=a e=1 op=w ax=1 ex=1 # <set a(2) two> # array a=a e=2 op=w ax=1 ex=1 # <unset a(0)> # array a=a e=0 op=u ax=1 ex=0 # <unset a(2)> # array a=a e=2 op=u ax=1 ex=0 # <unset a> # array a=a e= op=u ax=0 ex=0 # element a=a e=1 op=u ax=0 ex=0 Variable Trace Arguments vs Upvar editBe careful how you use the name1 and name2 parameters provided to a variable trace. It's tempting to write a single handler which tracks access to multiple variables thus: proc traceHandler {name _ op} { ;# we ignore name2 for a non-array trace puts "trace: variable {$name} $op" } unset -nocomplain x y trace add variable x {write} traceHandler trace add variable y {write} traceHandler incr x # trace: variable {x} write incr y # trace: variable {y} writeSo far, so good. But look what happens when the variable is aliased proc loop {_var first limit script} { ;# upvar 1 $_var var for {set var $first} {$var < $limit} {incr var} { uplevel 1 $script } } loop x 0 2 { ;# no loop body - we just want to see what happens to x } # trace: variable {var} write # trace: variable {var} write # trace: variable {var} writeThe trace fires as expected ... but the name is now coming from somebody else's code. This is sufficient if you just want to access the variable by upvar or uplevel, but useless for identifying changes to different variables managed by the same trace handler.Bugs stemming from code not considering this behaviour can lie dormant for a very long time and be mystifying when they arise. Therefore, when the name of the variable matters to the trace handler, it's a good idea (and good practice for other kinds of callbacks) to pass that name explicitly, rather than relying on the arguments supplied by the trace: proc traceHandler {name} { puts "trace: $name" } trace add variable x {write} [lambda {varname args} {traceHandler $varname} x]PYK: I prefer an example that uses apply directly, because its execution namespace can be specified, and in contrast with lambda (at least as currently defined on that page), its uplevel is still the context that triggered the trace: trace add variable x write [ list apply [ list {varname args} {traceHandler $varname} [namespace current]] x]aspect: updated the lambda page to more prominently feature the Tcllib package which supports a namespace argument. Local Variable Traces editOn comp.lang.tcl, 2004-05, CLN answers Erik Leunissen's question: Erik Leunissen wrote: > The following passage from the man page to the trace command is > mystifying to me: > > "If an unset occurs because of a procedure return, then the trace will > be invoked in the variable context of the procedure being returned to: > the stack frame of the returning procedure will no longer exist." > > I've read it again and again; I can't imagine how a procedure return > affects/causes an unset. > ... proc foo { } { set x 1 trace variable x u {some code here} } When foo is invoked, x is created (locally), has a trace associated with it, then becomes unset as foo exits. Arrays editNon-array variables give a null string for the name2 argument in the trace invocation, but the null string is a perfectly valid array index (it is also a valid array variable name), so a null value for name2 doesn't necessarily indicate that the traced variable is scalar. To determine whether a variable is an array, use: if {[array exists $varname]} {...}All of the following operations result in the argument values a {} u: unset a ;# regular var a array unset a unset a()including a null index string. array exists always returns false for the first two cases, and true for the third (even if the null index was the only array element). There is no way for the trace to be sure which operation was performed.Lars H: Hmm... might this be a sign that the format of these parameter lists is not well designed? An alternative would have been to put the operation first and the variable name second, so that there needn't be an index for non-array accesses. Probably too late to change now, though. (Adding a second interface which is just like the current except that it produces parameter lists in a new format is possible, but probably seen as superfluous.) Arrays and Upvar editA surprising (?) result that is documented in the upvar manpage: If otherVar refers to an element of an array, then variable traces set for the entire array will not be invoked when myVar is accessed (but traces on the particular element will still be invoked).This means that using a trace on an array is not sufficient to capture all the ways elements can be accessed. For instance: package require lambda unset -nocomplain a x y array set a {x 1 y 2} trace add variable a {array read write unset} [lambda args {puts "::a trace: $args"}]Any direct use of a will trigger the trace: % incr a(x) ;# existing element ::a trace: a x read ::a trace: a x write 2 % incr a(z) ;# new element ::a trace: a z read ::a trace: a z write 1 % unset a(x) ::a trace: a x unsetso far so good. But throw upvar into the mix: % upvar 0 a(y) y ;# existing element % upvar 0 a(w) w ;# new element % incr y 3 % incr w 1 % unset y % unset wNo traces were fired! If you're tracing an array whose elements might be upvared, beware. What about a "variable create" Trace? editmale 2006-01-24: I wanted to trace the creation of an array element and used the write event, but ... the write event is fired after the new array element was already created! What's about a new event like "create"? Since a trace may be created on non-existent variables, this could be useful not only for arrays. Donald Arseneau: Yes, write traces fire after the variable has already been set, so if you want validation of variables' values, in analogy with Tk's entry validation, then you must maintain shadow copies of the previous values, in order to undo improper settings. Triggering Traces when using a variable at the C level editOn comp.lang.tcl, Kevin Kenny answers someone wanting to link a C variable and a Tcl variable, and have a Tcl proc invoked when the C code modified the variable: - - Look in the manual for Tcl_UpdateLinkedVar. The Tcl engine has no way of telling that you've changed the variable in C; if you call Tcl_UpdateLinkedVar, that tells it your value has changed, and it fires the traces. Simple file I/O in traces: edit trace var stdout w {puts stdout $stdout ;#} trace var stdin r {gets stdin stdin ;#}The variables are named like the file handles. Little demo, that waits for input and prints it capitalized: set stdout [string toupper $stdin] Managing Traces editTraces are like widgets and images in that they are resources that can be leaked and/or need clean-up. Counter-intuitive results sometimes arise because traces are additive rather than substitutive; a particular trace can fire a whole chain of commands. To wipe the global space clean of traces, foreach variable [info glob] { foreach pair [trace info variable ::$variable] { foreach {op traced_command} $pair {} set op [string range $op 0 0] trace vdelete ::$variable $op $traced_command } } Swallowed Errors: Command Delete Traces editPYK 2015-04-02:Errors are ignored in command delete traces: variable var1 {1 one 2 two} proc p1 args {} #intentional bad code here: the commandPrefix doesn't have the right command signature. trace add command p1 delete [list dict unset var1 1] rename p1 {} puts $var1 ;# -> 1 one 2 twoThis is the current design, not a bug. Anyone have any info on the rationale? Traces of Command Executions edit step tracesenterstep and leavestep traces fire for all steps, recursively. When this is undesired, the depth of the recursion can be constrained by having the trace procedure look at info level. Donald Arseneau: Another tricky trap is that errors in traces may give error messages, but no context; the only context is for whatever triggered the trace. Thus, if you ever see Tk error messages like can't set "xv": invalid command name "oops" while executing "incr xv"then you should look for a variable trace on the xv variable. Schnexel: Oh the tricky trace traps! I tried to automaticly update a derivedData array by setting a trace on the parentData array (scenario simplified)... Now I get a surreal result: set bla "What happened:\n" namespace eval bbb { array set lala [list 1 v1 2 v2 3 v3] trace add variable ::bbb::lala {read array} ::bbb::tra proc tra args { append ::bla "\n (TRACE $args)" array unset ::bbb::lala ;# also deletes trace (yet the "array" op still fires) foreach {n v} [list 1 trv1 2 trv2 3 trv3] { set ::bbb::lala($n) $v } } } namespace eval aaa { append ::bla "\n\[info exists ::bbb::lala(1)\]==..."; append ::bla ... [info exists ::bbb::lala(1)] append ::bla "\n\[info exists ::bbb::lala(1)\]==..."; append ::bla ... [info exists ::bbb::lala(1)] append ::bla "\n\$::bbb::lala(1)==..."; append ::bla ... $::bbb::lala(1) } puts $blawhich gives the output What happened: [info exists ::bbb::lala(1)]==... (TRACE ::bbb::lala 1 read) (TRACE ::bbb::lala {} array)...0 [info exists ::bbb::lala(1)]==......1 $::bbb::lala(1)==......trv1So, upon first read access of lala, it does not exist anymore, whilst upon second read it is there. Can anybody make sense of this?Lars H: Regarding why the "array" op fires: It it fires at the very array unset ::bbb::lala where you comment upon this, i.e., before the foreach, which is consistent with the trace manpage (only read and write traces are disabled inside a read or write trace). But why info exists reports 0 I don't know... Perhaps some caching issue (the variable that was looked up is not the one that is there when the result is returned)? You'll probably need to read the source to find out.Schnexel: Wrrr... Here´s a simpler example. Array trace is bugged! array set ::lala [list 1 v1 2 v2] array set ::lala [list 3 v3 4 v4] puts "\$::lala==[array get ::lala]" ;# O.K. trace add variable ::lala read ::tra proc tra args { puts " (TRACE $args)" trace remove variable ::lala read ::tra array set ::lala [list A trvA B trvB] puts " within trace: \$::lala==[array get ::lala]" ;# O.K. } puts "1st read outside: \$::lala==[array get ::lala]" ;# not O.K. ! puts "2nd read outside: \$::lala==[array get ::lala]" ;# O.K.Output: $::lala==4 v4 1 v1 2 v2 3 v3 reading ::lala (TRACE ::lala 4 read) within trace: $::lala==4 v4 A trvA 1 v1 B trvB 2 v2 3 v3 1st read outside: $::lala==4 v4 1 v1 2 v2 3 v3 2nd read outside: $::lala==4 v4 A trvA 1 v1 B trvB 2 v2 3 v3 Tracking where procedures were defined editDKF: One of the neat things about Tcl is that you can attach traces to things that in most other languages would be completely impossible to track. Here's how to find out where procedures are defined, by using an execution trace on [proc] itself. proc recordDefinitionLocation {call code result op} { if {$code} return set name [uplevel 1 [list namespace which -command [lindex $call 1]]] set location [file normalize [uplevel 1 {info script}]] puts stderr "defined '$name' in '$location'" } trace add execution proc leave recordDefinitionLocationTrying it out… % parray tcl_platform defined '::parray' in '/Library/Frameworks/Tcl.framework/Versions/8.6/Resources/Scripts/parray.tcl' tcl_platform(byteOrder) = littleEndian tcl_platform(machine) = x86_64 tcl_platform(os) = Darwin tcl_platform(osVersion) = 12.5.0 tcl_platform(pathSeparator) = : tcl_platform(platform) = unix tcl_platform(pointerSize) = 8 tcl_platform(threaded) = 1 tcl_platform(user) = dkf tcl_platform(wordSize) = 8That looks correct for my system. Proposal: Modify trace command ... enter to Act as a Command Filter editPYK 2013-12-22: The result of a command run as a trace is currently discarded. It could instead be used as the command to actually call. For example, the result of the following script would be 12, not 21 proc add args { ::tcl::mathop::+ {*}$args } trace add execution add enter {apply {{cmd op} { set args [lassign $cmd name] foreach arg $args[set args {}] { if {$arg % 2 == 0} { lappend args $arg } } return [linsert $args 0 $name] }}} add 1 2 3 4 5 6
http://wiki.tcl.tk/1505
CC-MAIN-2016-50
refinedweb
2,363
53.24
Mounting not-altogether-seamless processes. As a virtual administrator, you may sometimes need to access a file or folder from a virtual machine (VM). For VMs that are up and running, you can just log in to the virtual machine or connect to it over the network and get the files. But accessing files from VMs that aren't powered on can be a complicated process. But with Microsoft Hyper-V, you can access files by mounting the Virtual Hard Disk (VHD) files of VMs onto your so, you can use the Windows PowerShell script or the VHDMount tool in Microsoft Virtual Server (MVS). I'll explain both of these methods in this tip. Mounting VHD files with the VHDMount tool Booting an external VHD file in Hyper-V is somewhat difficult. If you have a VHD file on a backup drive and need to access a file from its VM, Hyper-V requires that you import the virtual machine. This process can be time-consuming and irritating if you need to quickly grab a few files. Another way of accessing the hard drive is by mounting the VHD directly on your desktop. Much like mounting a DVD's ISO file, or the Windows Imaging Format file of an OS image, it's possible to mount a VM's VHD file through the command line. The result is that the virtual machine's disk appears as its own separate disk on the desktop with a specific drive letter. The VHDMount tool can accomplish this task, and it is available in Microsoft Virtual Server 2005. VHDMount provides a command line interface (CLI) for mounting and accessing VHDs. For first-timers, however, the process required to place it on your desktop or server, is a bit odd. Once you've downloaded MVS 2005 begin the installation, but install only its VHDMount feature and nothing else. This process installs the necessary components for the VHDMount tool without installing MVS 2005 in total. If you want to extract VHDMount even faster, you can use the following two commands against its setup file. They obtain the MSI from the setup file and then run a targeted installation for only the VHDMount components: setup.exe /c /t c:\{targetFolder} msiexec /i "c:\{targetFolder}\Virtual Server 2005 Install.msi" /qn ADDLOCAL=VHDMount Once VHDMount is installed, use the command vhdmount /m {targetVHD} to mount the VHD on an available drive letter. After mounting the VHD, any changes made will be written to a differencing disk until the VHD is unmounted. This allows you to revert back to the pristine VHD if you make a mistake. Use the command vhdmount /u {targetVHD} to unmount the VHD. If you want to eliminate changes –- and the contents of the differencing disk –- as you unmount it, use the command vhdmount /u /d {targetVHD}. These commands should work with Windows Vista, but there are some problems with VHDMount and Windows XP. Using PowerShell to mount VHD files If the hassle of installing VHDMount doesn't appeal to you, you can use the PowerShell tool to achieve the same results. Unfortunately, with PowerShell the process isn't much easier. To begin, the following two commands will mount a VHD: $objVHDService = get-wmiobject -class "Msvm_ImageManagementService" -namespace "root\virtualization" -computername "." $objVHDService.Mount("{targetVHD}") The first line above uses PowerShell to establish a connection to the local computer's Windows Management Instrumentation store and grabs an instance of the Msvm_ImageManagementService class. This class is necessary to use .Mount method, which does the work of the script. After completing this step, the mounted drive arrives as an offline disk. You'll need to bring that disk online by using Windows Disk Management or the diskpart.exe command line tool. Accomplishing this through PowerShell is complicated though. If you want a straight PowerShell solution, review this blog post on using PowerShell to mount VHDs for all the gory details. Once you've finished working with the virtual disk, you'll need to return the disk to an offline state by running the unmount script: $objVHDService = get-wmiobject -class "Msvm_ImageManagementService" -namespace "root\virtualization" -computername "." $objVHDService.Unmount("{targetVHD}") If you use Hyper-V in a small environment, you may also use Microsoft's internal Windows Server Backup utility for backing up your VMs. Since this tool can back up only at the individual volume level –- and, hence, at the individual VM level –- these backups get stored at the VHD level. This means that individual file and folder restores from within a Hyper-V machine require this tricky mounting and unmounting.
http://searchservervirtualization.techtarget.com/tip/Mounting-VHD-files-in-Hyper-V-environments
CC-MAIN-2015-22
refinedweb
760
53.61
[OPEN-125] Store (using AjaxProxy) duplicates new record when .sync() is called Sencha Touch version tested: - 1.1.0 Platform tested against: - iOS 4 - Android 2.1 Description: - New records are duplicated in a store after .sync() is called, when using an AjaxProxy. Test Case: Code: // models/contact.js app.models.Contact = new Ext.regModel('Contact', { fields: [ { name: 'id', type: 'int' }, { name: 'first_name', type: 'string' }, { name: 'last_name', type: 'string' }, { name: 'email', type: 'string' }, { name: 'phone', type: 'string' } ], validations: [ { type: 'presence', field: 'first_name', message: 'none' }, { type: 'presence', field: 'last_name', message: 'none' }, { type: 'email', field: 'email', message: 'Please enter a valid e-mail address.' }, { type: 'phone', field: 'phone', message: 'Please enter a valid phone number.'} ], proxy: { type: 'ajax', url: 'contacts.xml', reader: { type: 'xml', record: 'contact' }, writer: { type: 'xml', record: 'contact' } } }); Ext.regStore('contacts', { autoLoad: true, model: 'Contact', sorters: ['last_name'], sortOnLoad: true, getGroupString : function(record) { return (record.get('last_name') || '#')[0].toUpperCase(); }, }); // in views/contacts/list.js app.views.ContactsList = Ext.extend(Ext.Panel, { title: 'Contacts', layout: 'fit', store: 'contacts', initComponent: function () { this.list = new Ext.List({ xtype: 'list', id: 'contactslist', grouped: true, indexBar: true, store: this.store, itemTpl: '{first_name} <strong>{last_name}</strong>' }); this.items = [this.list]; app.views.ContactsList.superclass.initComponent.apply(this, arguments); } }); Ext.reg('contacts/list', app.views.ContactsList); // in controller: var contact = Ext.ModelMgr.create(this.form.getValues(), 'Contact'); var store = Ext.getStore('contacts'); store.add(contact); store.sync(); // Duplicate appears in views list once .sync() asynchronously completes. - Attach a store (backed by an AjaxProxy) to a list - Add a new (unsaved) record to the same store - Call .sync() on store The result that was expected: - List should reflect one new item in the store The result that occurs instead: - List shows the new item twice Debugging already done: - Determined that the record returned from the server is never matched against the existing record in the store - because the internalId doesn't match. Possible fix: - Please see this commit on github for my change to AjaxProxy.js which fixes this for me. - Note that the list isn't sorted properly within each group after my fix, but that might be the fault of the way I'm sorting things at the moment. Last edited by mark.haylock; 30 May 2011 at 1:45 PM. Reason: Accidentally submitted the post instead of previewing, so had to complete the post! Sorry. Questions about bug fixing process and support licenses We are currently evaluating Sencha Touch as a platform to move forward with and I've been playing around getting a feel for it's capabilities. We are pretty keen on what we have seen and will likely purchase a support license, however this duplicate problem caused me some grey hairs, so I have some questions I hope can be answered: - Is this a bug or have I set up things incorrectly? - If this is a bug is it fixed in the version available only to support licensees? Is there any public information about what is in the version available only to support licensees? - If this bug is not fixed in the version available to support licensees then what would be the normal turnaround for such a bug fix to become available (if we had a support license)? - I notice that in this post you mention "If we get demand for a github repository featuring just the public releases we may set that up too" - can I add a vote for that? It seems that would make submitting fixes like this easier for both sides if we could generate pull requests on github. I noticed this issue too I experience this issue as well and tracked down the problem. It's a bug. Perhaps this override might help someone. It worked for me and my RestProxy. Basically, when the DataReader reads a response back from server, it instantiates new record instances, with new internalId set. When the store has its onWrite callback fired, it tries to replace the original record (which caused the CREATE/UPDATE action) with the new version from server, but it can't possibly find it unless their internalId are set the same. Code: onProxyWrite: function(operation) { var data = this.data, action = operation.action, records = operation.getRecords(), length = records.length, callback = operation.callback, record, i; if (operation.wasSuccessful()) { if (action == 'create' || action == 'update') { for (i = 0; i < length; i++) { record = records[i]; record.phantom = false; record.join(this); data.replace(record); // <-- HERE. Store tries to replace oldRec with newRec. } } else if (action == 'destroy') { for (i = 0; i < length; i++) { record = records[i]; record.unjoin(this); data.remove(record); } this.removed = []; } this.fireEvent('datachanged'); } //this is a callback that would have been passed to the 'create', 'update' or 'destroy' function and is optional if (typeof callback == 'function') { callback.call(operation.scope || this, records, operation, operation.wasSuccessful()); } },/** * @author Chris Scott * @business * @rate $150USD / hr; training $500USD / day / developer (5 dev min) * * @SenchaDevs * @twitter * @github */ This is a recurring issue with the architecture around creating Model instances locally and saving them remotely. At the moment it's rather difficult to accurately match each record returned by the server against the record we sent to the server. We're formulating a better solution to this internally at the moment and will keep you updated.Ext JS Senior Software Architect Personal Blog: Twitter: Github:
https://www.sencha.com/forum/showthread.php?135241-OPEN-125-Store-(using-AjaxProxy)-duplicates-new-record-when-.sync()-is-called
CC-MAIN-2015-48
refinedweb
880
57.98
hi michael, > This is one option we could imagine to go for. I simply wanted to ask for > proven solutions with the use case in mind. Reading '7.3.2.1 Roundtripping', I > can see what you mean. > We are a bit worried to introduce dependencies on a specific repository > implementation. Reading chapter 7.2 "Level 2 repositories must support the > import of content from either of the standard XML mappings, system view and > document view [...]" makes me think that for level 2 repositories import/export > is supported. But only the system view garantuees completeness and allows for > roundtripping. Since the spec doesn't force level 2 repositories to supply a > system view (either system view or document view), we might run into difficulties. the spec mandates the system view and the document view as your quote from the spec shows. i don't know why you think that the spec does not mandate the system view? it does by no means says "either or" it says "and" in your quote. the system view is also tested in the tck, so it is pretty safe to say that a compliant repository can deal with a system view. > Am I missing something or is my argument just practically irrelevant? hmmm.... i recently stumbled over a few posts on the magnolia dev-list, where people make scary statements with regards to import and export being repository dependant... let's say posts on the magnolia-dev list are with respect to jackrabbit / jcr "generally unreliable" (to say it politely) and i would suggest (just like you did now) to check with the jackrabbit-dev list if you need an educated statement about a certain aspect of jcr or jackrabbit ;) regards, david
http://mail-archives.apache.org/mod_mbox/jackrabbit-dev/200506.mbox/%3Ceb7e219050615104010d7217a@mail.gmail.com%3E
CC-MAIN-2016-18
refinedweb
288
62.38
How to create a query module in Python Query modules can be implemented using the Python API provided by Memgraph. In this tutorial, we will learn how to develop a query module in Python on the example of the random walk algorithm. steps are the same for every type of MAGE installation: Docker Hub, Docker build and Build from source on Linux. Position yourself in the MAGE repository you cloned earlier. Specifically, go in the python subdirectory and create a new file called random_walk.py. python └── mage random_walk.py For this part, we will import mgp, Memgraph's internal data structure module. Among others, it contains definitions for Vertex and Edge data structures. tip Install the mgp Python module so your editor can use typing annotations properly and suggest methods and classes it contains. You can install the module by running pip install mgp. Here's the code for the random walk algorithm: import mgp import random @mgp.read_proc def get_path( start: mgp.Vertex, length: int = 10, ) -> mgp.Record(path=mgp.Path): """Generates a random path of length `length` or less starting from the `start` vertex. :param mgp.Vertex start: The starting node of the walk. :param int length: The number of edges to traverse. :return: Random path. :rtype: mgp.Record(mgp.Path) """ path = mgp.Path(start) vertex = start for _ in range(length): try: edge = random.choice(list(vertex.out_edges)) path.expand(edge) vertex = edge.to_vertex except IndexError: break return mgp.Record(path=path) The get_path is decorated with the @mgp.read_proc decorator, which tells Memgraph it's a read procedure, meaning it won't make changes to the graph. The path is created from the start node, and edges are appended to it iteratively.
https://memgraph.com/docs/mage/how-to-guides/create-a-new-module-python
CC-MAIN-2022-05
refinedweb
286
60.61
It's not the same without you Join the community to find out what other Atlassian users are discussing, debating and creating. Hello all! I am brand new to JIRA and have been presented with the following requirement for a test case workflow: A lead developer is assigned an issue as default in step 2 via a workflow post function. This lead developer assigns it to a member of his team to test in this step. The tester completes their step (step 2) and sends the case for review, deferment, upgrade or what have you. At some later step (3, 8 or 10) we need to assign the issue back to the tester (not lead developer) as default assignee via a script in the workflow post function. I would appreciate any assistance in showing me how to write this script. Hi, I think you could do it like this: add a user custom field which is named tester when lead developer assigns the issue to the tester , in the post function sets the value to tester user or when the tester completes his step in post function , set this field with the username of the tester and when you need to assign the issue back to the tester, you have just to set value of assignee with tester custom field value in the post function You can do this using a scripting plugin like power script or script runner or with java Script which is not recommended. Good luck Hi zezeto, Thanks for your advice. I have added the new custom field called "LR Tester" and defined it as a single user picker. I then found the following code (below) and adapted it to fit my needs. In the Post Function script checker, I don't get any errors, but when I run through the work flow, it does not copy the value to the LR Tester field and I can see that my script errored out. The script is as follows: import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.ModifiedValue import com.atlassian.jira.issue.util.DefaultIssueChangeHolder import com.atlassian.jira.component.ComponentAccessor def issue = event.issue as Issue def customFieldManager = ComponentAccessor.getCustomFieldManager() def tgtField = customFieldManager.getCustomFieldObjects(event.issue).find {it.name == "LR Tester"} def assignee = issue.assignee def changeHolder = new DefaultIssueChangeHolder() tgtField.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(tgtField), assignee),changeHolder) Any thoughts on where I went wrong? Rather than writing a script this is probably better handled with post functions. There are numerous great plugins that would be able to help you with this. In particular the "JIRA Suite Utilities" plugin allows you to copy values between fields. If you set a user picker field of "tester" this can then be accessed by these post functions to copy the value of that user picker back into the "Assignee" field. This would probably save you a lot of.
https://community.atlassian.com/t5/Marketplace-Apps-questions/Can-someone-help-me-write-a-script-to-dynamically-assign-an/qaq-p/692884
CC-MAIN-2018-22
refinedweb
484
54.52
I need to write code to see if three numbers make a right angled triangle (which I have done below). However, I need to use a try/catch as well as keep prompting the user to enter a number only instead of anything else... (a while loop would be best?) not sure how to go about this though.. Code java: import java.util.Scanner; import java.io.*; import java.util.*; public class TriangleTest { public static void main (String[] args) throws Exception { Scanner s = new Scanner(System.in); try { System.out.println("Enter side 1: "); int side1 = s.nextInt(); System.out.println("Enter side 2: "); int side2 = s.nextInt(); System.out.println("Enter side 3: "); int side3 = s.nextInt(); if(((side1*side1) == ((side2*side2) + (side3*side3))) || ((side2*side2) == ((side1*side1) + (side3*side3))) || ((side3*side3) == ((side1*side1) + (side2*side2)))) System.out.println("True! These numbers " + side1 + ", " + side2 + " and " + side3 + " make a triangle."); else System.out.println("False! These numbers " + side1 + ", " + side2 + " and " + side3 + " don't make a triangle."); }catch(InputMismatchException exception) { System.out.println("Please enter numbers only!"); System.out.println(""); } s.close(); } }
http://www.javaprogrammingforums.com/%20whats-wrong-my-code/32793-try-catch-loop-printingthethread.html
CC-MAIN-2016-07
refinedweb
181
54.29
- Advertisement Content Count27 Joined Last visited Everything posted by Horscht -. @CC Ricers Hmm I think I tried something like that and a few things didn't work out, thats why I switched to calculating the "time of impact" instead of penetration amount checking. One of the things was the same thing that's being adressed in the article: Wrong resolutions. But I'm not sure If I tried it with the correct ordering. Maybe I could try swapping the techniques around and do it with the least penetration amount technique again. I'm kind of sick of fiddling around with it. For two years I am stuck with this problem now and I'm making next to no progress... soooooo frustrating argh... But of course I didn't work 2 years non-stop on it. Otherwise I would already have gone insane Have been procrastinating a lot because I have absolutely no idea what to do anymore and I'm kind of lazy and demotivated. Collision Reponses Horscht replied to Hanksha's topic in For Beginners's ForumThe problem with that approach is that it doesn't really take into account on which axis the collision happened first, meaning the player can be pushed out of a platform sideways instead of landing on top, depending if you check the X or Y axis first. You probably won't notice it most of the time, except when you move diagonally onto a corner. A way to fix this is to calculate the overlap first, then divide that by the objects velocity to find out which axis collided first, and then push it out in that direction. float timeOfImpactX = std::numeric_limits<float>::infinity(); float timeOfImpactY = std::numeric_limits<float>::infinity(); if(dynamicBody.velocity.x != 0.0f) timeOfImpactX = GetRECTOverlapX(staticBodyRect, dynamicBodyRect) / dynamicBody.velocity.x; if(dynamicBody.velocity.y != 0.0f) timeOfImpactY = GetRECTOverlapY(staticBodyRect, dynamicBodyRect) / dynamicBody.velocity.y; if(timeOfImpactX < timeOfImpactY) { // Solve X first } else { // Solve Y } Something like that. I'm not sure myself if this is the best way but it's something to think about when your collision resolution feels weird when trying to land on the edge of a platform/tile. C++ Ball Bouncing Horscht replied to LeftyGuitar's topic in General and Gameplay ProgrammingWell, you also need to reverse the velocity of the balls once they hit the walls so that they move in the opposite direction in the next frame. if(BallRect[1].x < 0 || BallRect[1].x + BallRect[1].w > 800) { BallRect[1].x -= X_Vel[1]; X_Vel[1] *= -1; // This will 'reverse' the direction the ball is going, if you want them to slow down every time they hit a wall you can change the -1 to -0.95 or less } And for the other ones too of course. How can I move an object with keyboard and the camera follows it Horscht replied to hackersk's topic in General and Gameplay ProgrammingFor my game I did it like this (i did mine in C++ but the concept should be the same): You have two rectangles: a viewport, that's the area that's supposed to be visible, basically the whole area of the window/screen, and the boundaries of your level. The center of the viewport is the spot the camera is "looking at". So if you set the cameras centerpoint to the players centerpoint in every frame, it will follow the player. All you need to do is keep the viewport in the boundaries of the level and then when drawing the player draw him at his current position minus the distance of the viewports left side to the left side of your level boundary. Like in the attached picture xOffset = cameraCenter.x - (viewportWidth / 2) - bounds.left; yOffset = cameraCenter.y - (viewportHeight / 2) - bounds.top Something like that. I'm not sure if this is 100% correct but it should get you started. - If passendeAirports is a container, passendeAirports.begin() will just return a pointer to the first element I think. So it wouldn't make sense to make a string out of a pointer to an Airport. Or maybe I just don't know everything that strings are capable of :P Do you want to return a string like this: "Airport1, Airport2, Airport3"? If so I would say use a stringstream: stringstream ss; for (auto it = foundAirports.begin(); it != foundAirports.end(); it++) { auto airport = (*it); ss << airport->GetName(); if(airport != foundAirports.back()) ss << ", "; } return ss.str(); For your asAirport and deepCopy I would suggest using dynamic_cast and the copy constructor instead and not return something with new, because you will have to call delete on it, the problem is that this wouldn't be obvious, you might forget to call delete because you don't see any "new" in your code where you use this method. Try it like this instead for copying: // Copy constructor Airport(const Airport& copyFrom): id(copyFrom.id), name(copyFrom.name), lat(copyFrom.lat), lon(copyFrom.lon), elevation_ft(copyFrom.elevation_ft) { } // Somewhere else in the code Airport newAirport(otherAirport); // Or Airport* newAirport = new Airport(otherAirport); If you don't provide a copy constructor the compiler will generate one for you automatically, but I'm not sure how exactly it does the copying, maybe just like my example, so you wouldn't need to write your own unless you have pointers in your class. You don't really want two objects pointing to the same thing. You would need to create a copy for your copy. Well, you can look up copy constructors yourself, if this interests you :) As for the dynamic_cast, that would look like this: Waypoint* waypoint = new Waypoint(); Airport* airport = dynamic_cast<Airport*>(waypoint); // You can't convert a base class to a derived, so this will fail, meaning airport will be 0 or nullptr. Waypoint* waypoint = new Airport("London"); Airport* airport = dynamic_cast<Airport*>(waypoint); // This will work because the object waypoint points to is indeed an Airport. So airport will be a valid pointer. I hope I'm not explaining everything wrong here, I'm not an expert either sorry :) But I think it should be correct... hopefully. [Resolved] Something is wrong with my collision detection. Horscht replied to farmdve's topic in For Beginners's ForumI don't think the floats are a problem, because they will get casted implicitly to ints when needed and you will get a compiler warning about that so it doesn't go unnoticed, unless you turned those warnings off. So the actual values that are used in the calculations can only be off by 1. One thing that i found out the hard way by looking for a bug for 2 days is and may be helpful to you: Floats get rounded down when positive and rounded "up" to a higher value when negative. So 4.56f will become 4.0f and -4.56f will become -4.0f. But as long as you are not doing pixel-perfect collision detection that shouldn't be a problem. ( I did :) ) Anyways, here are a few things you can try to find your bug: 1. Make sure your collision detection works. To make absolutely sure I would write a small program that draws two rects, where one can be moved with the mouse or keyboard and then use check_collision_rect() to see if it works in every single possible constellation. You could set the color of the rects accordingly, red if they intersect, green if no. If that works perfectly then the bug is clearly somewhere else. 2. See if the tile you are colliding with is indeed solid or maybe you just forgot to set that attribute? Run your game and set a breakpoint at that section of code when your player should be colliding and step through the code and look at the variables. Is the type really 2 when it should be? 3. It could even be LEVEL_WIDTH that's causing problems, who knows :P If it's wrong your loop will wrap incorrectly and your player would never collide. Again use your debugger and while stepping through look at every variable possible if it has the value you would expect. Learn to use the debugger and you will find bugs like this MUCH faster and easier. Remember you can set a breakpoint even while your program is running. Oh any btw I think the bounding boxes should not be: rightA = A.x + A.w; but rightA = A.x + A.w - 1; Why? Let's say you have a rect that starts at 0,0 and is 10 pixels wide: The width is 10, so rightA would be 0 + 10 = 10, is that correct? No :) The rightmost pixel really is 9 -> 0,1,2,3,4,5,6,7,8,9, that's 10 pixels wide. - Sounds like a job for regular expressions. Maybe theres a better way already implemented in the map but this seems to work: #include <iostream> #include <map> #include <vector> #include <regex> #include <sstream> using namespace std; class Airport { private: string _name; public: Airport(string name):_name(name) { } string GetName() { return _name; } }; map<string, Airport*> airports; std::vector<Airport*> getAirports(string searchTerm) { std::vector<Airport*> matchingAirports; for (auto it = airports.begin(); it != airports.end(); it++) { auto mapEntry = (*it); stringstream ss; ss << ".*" << searchTerm << ".*"; regex regEx(ss.str().c_str(), regex_constants::icase); if(regex_match(mapEntry.first, regEx)) { matchingAirports.push_back(mapEntry.second); } } return matchingAirports; } int main() { Airport one("London Heathrow"); Airport two("Tokyo International"); Airport three("Los Angeles International"); airports.insert(make_pair(one.GetName(), &one)); airports.insert(make_pair(two.GetName(), &two)); airports.insert(make_pair(three.GetName(), &three)); string searchTerm; while(true) { cout << "Please enter a name to look for, 'exit' to quit: " << endl; getline(cin, searchTerm); if(searchTerm.find("exit") != -1) { break; } auto foundAirports = getAirports(searchTerm); cout << foundAirports.size() << " airports found: " << endl; for (auto it = foundAirports.begin(); it != foundAirports.end(); it++) { auto airport = (*it); cout << " - " << airport->GetName() << "\n"; } } system("pause"); } If you search for "dOn HeatHR" it will find London Heathrow. Of course you can change how exactly you want it to match at this line: ss << ".*" << searchTerm << ".*"; Here's a good reference for regular expressions: Hope this helps :) Collision Problem in BrickBreaker (Java/Slick2D) Horscht replied to JohnnyCrazy's topic in General and Gameplay ProgrammingI had a similiar problem with my platformer game and the way I solved it was by calculating how far the two object overlap and then divide that by the velocity, to determine which side was hit first and then push the player out on that side. void ResolveCollisions() { Vector2D penetration = GetPenetrationAmount(playerBoundingBox, tileBoundingBox); float tx = 100000.0f; // Time of impact, 0 = now, really big number = never float ty = 100000.0f; // Calculate time of impact, the smaller happened first if(velocity.x != 0) tx = abs(penetration.x / velocity.x); // Don't divide by zero or everything explodes :) if(velocity.y != 0) ty = abs(penetration.y / velocity.y); // Check in which direction we collide first and resolve collision on that axis if(tx < ty) { PushOutOfCollisionX(penetration.x); } else { PushOutOfCollisionY(penetration.y); } } Vector2D GetPenetrationAmount(RECT r1, RECT r2) { Vector2D p; int l2r = r1.right - r2.left; int r2l = r1.left - r2.right; int t2b = r1.bottom - r2.top; int b2t = r1.top - r2.bottom; if(abs(l2r) <= abs(r2l)) { p.x = l2r + 1; } else { p.x = r2l - 1; } if(abs(t2b) <= abs(b2t)) { p.y = t2b + 1; } else { p.y = b2t - 1; } return p; } Something like that. I hope this helps you somehow, good luck :) 2D platformer screen/section management and transitions (like Megaman) Horscht posted a topic in General and Gameplay ProgrammingMy current super primitive amateurish system works like this: I have a GameState class which just calls update() and render() on all child objects like the player, level, later enemies and so on. then there is a Player class and a Level class which in turn has a list of LevelSections, this is the class that holds the tiles, renders the tiles, provides methods to access the tiles like GetTileAt(x,y). The Level class provides the same methods and redirects it to the section the player is currently in. Tile coordinates start at 0,0 for every section and each section has it's own x,y start position, so when the player is at the last tile of the current section i should be able to iterate through all sections and check if there is a section which has the coordinates of the next tile, right? Player is at tile 30,20, 31,20 doesn't exist so i iterate through the list of all sections and see if there is one which has the start coordinates 31,xxx and then initiate the mysterious "scrollover-mechanism". Does this sound like a plan?... My player currently gets a pointer to the level like this: // GameState.cpp GameState::GameState() { level = new Level(); player = new Player(level); } So now player has access to level and can call it's GetTileAt(x,y) method for colission detection and so on. Just by the way, what if the level also needs access to the player? At the time the level gets instanciated the player doesn't exist yet... In the Level class I do everything using a pointer to the current section. Like so: // Level.cpp Tile* Level::GetTile(int x, int y) { return currentSection->GetTile(TL_FOREGROUND, x, y); } void Level::Render() { currentSection->Render(); } And so on... This works fine if I wanted to stay in one section forever and never be able to go to the next one, but that's not really what I want As soon as the player reaches the end of one section, player control should be suspended and the screen should scroll over to the next section, but the player also has to move and play walking animations or not depending on if he is in the air or ground or whatever. How do I do that? Where should the code go that moves the "camera"? Currently it's in GameState::Render() like this: void GameState::Render() { RECT pBB = player->GetBoundingBox(); Vector2D pMid; pMid.x = (float)(pBB.left + (pBB.right - pBB.left) / 2); pMid.y = (float)(pBB.top + (pBB.bottom - pBB.top) / 2); int levelWidth = level->GetWidth(); int levelHeight = level->GetHeight(); int minPlayerXOffset = (int)(pMid.x - g_window_width/2); int maxPlayerXOffset = (levelWidth - g_window_width); if(minPlayerXOffset < 0) minPlayerXOffset = 0; if(minPlayerXOffset > maxPlayerXOffset) minPlayerXOffset = maxPlayerXOffset; level->Render(minPlayerXOffset); player->render(minPlayerXOffset, dt); } How do the classes need to interact to make this work? Should the GameState check if the player is on the edge and if so, call player->SuspendControl() and move the player every frame over to the next section until the transition is complete? But that sounds like it should be in the player class itself. Or maybe the player should have a different state, but I don't know how to implement that, with lot's of switch cases? If elses scattered throughout the update() and render() methods? A different update() and render() for every state()? What would be a good way to do that? I thought maybe with a function pointer that gets passed a different method like this: // Player.cpp Player::Player() { _update = &Player::StateDefaultUpdate; _render = &Player::StateDefaultRender; } void Player::Update(float dt) { (this->*_update)(dt); } But how should I organize this? Put it all in the same file or in different ones? I have absolutely NO IDEA... I wish there was more information on the internet on how to program more complex games than tic tac toe or a jump'n'run that only has one screen and fit in one file. All the open source games I looked at are a THOUSAND times more complicated than what is taught in books and tutorials StateManagers, ScreenManagers, BlablaHandler, MovementComponent, blablabla... none of this is explained anywhere. It's like it's expected of me to come up with these myself. But for me that's like coming up with something like calculus from scratch on my own... I have so much I don't know I don't even know where to start or what questions to ask hahahhaa.... Hopefuly some of you will understand what I am trying to do and can give me some tips on how to do it. Here's a video of the game I'm trying to copy if you don't already know it: Book recommendations for getting into more sophisticated game programming or whatever also highly appreciated. I attached my current sourcecode for the involved classes if you wanna take a look at the actual code. It's ugly but I wanna get it working first before I clean it up. No need for nice and good to read code that doesn't work [attachment=17248:Code.zip] 2D platformer screen/section management and transitions (like Megaman) Horscht replied to Horscht's topic in General and Gameplay ProgrammingAwesome, that's exactly what I'm trying to do too, you even made your code available on github, big thanks for that! I also found another one a while ago () but both are a little over my head How do I progress from simple games to something like this? This is on a whole different level than what is taught anywhere. The thing I'm having the most trouble with and I think is the most important thing is the software engineering part. Code design, structuring, architecture, whatever it's called. Hopefully I can learn something from reading your code, but I never know where to start and how it all works together when there are already 100 files. I thought that my "Transition Regions" would just be the edge of the map, or maybe the last column/row of the tile array that doesn't get drawn or something like that. If I then want to stop the player from going back I could just make those tiles solid in the next room. But I still don't know how to do the actual scrolling. Which class should check where the player is and when to initiate the transition? The GameState? The Level? The Player? I guess all the classes do their scrolling in their own way, but how do the classes know when the transition is over and gameplay should resume? 2D Platformer collision handling... Horscht posted a topic in For Beginners's ForumHi, i've been trying to create a very simple 2D platformer game over the last few weeks. I'm basically trying to make a megaman clone. That's it. No fancy physics or anything, just regular rectangle vs rectangle collision, non-rotated. The problem is, i can't get the collision handling to work... i have rewritten the code a billion times and even though it should work, it doesn't and the player is just falling through the floor or not being able to walk on the floor, getting stuck in the floor, being teleported along tiles, being able to stand on walls and so on... For me this is something i ABSOLUTELY cannot wrap my head around While looking for a solution i found 1000 pages describing how to detect collision and then just leaving it at that, as if that was the hard part... I have found only a few pages that actually show some method on how it's supposed to be done, i tried implementing this one: But i can't get it to work... I also tried 100 different ways on my own: 1. Moving the player first, check if he's colliding, if so, move him out on the axis with smallest overlap, then check again and do the same for the other axis. Didn't work, i don't know why. 2. Moving the player first, check if he's colliding, if so, place him beside/on top of the block. Didn't work, i don't know why. 3. Check if player would collide in the next frame, given current position and velocity, if so, place him beside/on top of the block. Didn't work, and again, i can't figure out WHY... And a few more that i already forgot, they are all kinda similiar except for one thing they have in common: THEY DON'T WORK Another thing that happens with most of the techniques is, the player bounces on top of the tiles because i have to place him 1 pixel above the tile, or else he gets stuck inside. That means he will fall 1 pixel per frame and constanly bounce just a tiny bit. Looks very unprofessional and to me means the method is very poorly executed. This is the most complicated thing i have ever come across and i need some help to understand what the best way to implementing something like a 2D Platformer like Megaman or Mario or whatever is. I seriously doubt that i will ever in my life intuitively understand how it's supposed to work. Moving player out of 1 tile on just 1 axis works, as soon as the other axis comes into play or more tiles, everything breaks and nothing works like it should. Anyone out there who has real experience with this matter? I'm not asking for how it theoretically should work, i know that, but when i try to write the code for it, it just DOESN'T work Only moving the player when he's not colliding is ugly, because he will just float above the tiles or stop beside a wall with a gap inbetween. The only thing left is brute force, move player pixel by pixel until he collides with something, but that's not very efficient and extremely bad code in my opinion, there has to be a better, more sophisticated way Here's just one example of what i tried (left out the code for the other axis): COLLISION_INFO ResolveCollisions(RECT* rect, std::vector<RECT>* obstacles, int dirX, int dirY) { COLLISION_INFO ci = {0,0}; int pushX = GetMinOverlapX(rect, obstacles); int pushY = GetMinOverlapY(rect, obstacles); if(abs(pushX) < abs(pushY)) // resolve smallest overlap first { ci.pushDirectionX = ResolveCollisionOnXAxis(rect, pushX, dirX); pushY = GetMinOverlapY(rect, obstacles); if(abs(pushY) > 0) // if other axis still overlapping { ci.pushDirectionY = ResolveCollisionOnYAxis(rect, pushY, dirY); } } else { ci.pushDirectionY = ResolveCollisionOnYAxis(rect, pushY, dirY); pushX = GetMinOverlapX(rect, obstacles); if(abs(pushX) > 0) // if other axis still overlapping { pushX = GetMinOverlapX(rect, obstacles); ci.pushDirectionX = ResolveCollisionOnXAxis(rect, pushX, dirX); } } return ci; } int ResolveCollisionOnXAxis(RECT* rect, int pushX, int dirX) { if((dirX > 0 && pushX < 0) || (dirX < 0 && pushX > 0)) // don't push in the same direction as player is moving, or else bugs occur { if(pushX > 0) { rect->left += pushX+1; // 1 more to get out of the tile return 1; } if(pushX < 0) { rect->left += pushX-1; return -1; } } return 0; } int GetMinOverlapX(RECT* rect, std::vector<RECT>* obstacles) { int minPushX = INT_MAX; for(auto obstacle = obstacles->begin(); obstacle != obstacles->end(); obstacle++) { int dx1 = rect->left - obstacle->right; int dx2 = rect->right - obstacle->left; int thisPushX = 0; if(abs(dx1) < abs(dx2)) { // push player to the right thisPushX = -dx1; } else { // push player to the left thisPushX = -dx2; } if(abs(thisPushX) < abs(minPushX)) minPushX = thisPushX; } if(minPushX == INT_MAX) return 0; // if for whatever reason the vector was empty dont move else return minPushX; } - Advertisement
https://www.gamedev.net/profile/211854-horscht/content/
CC-MAIN-2019-26
refinedweb
3,869
60.85
Fetching data from an api using React/Redux Markus Claus Updated on ・7 min read Starting simple This is my first post here. I decided to share some of the knowledge I earned through making every mistake you can possibly make -.- Everything I write here I have learned by reading blog posts, trying to understand what was done and trial and error. If there are mistakes or if you think of a better way to do things, please let me know in the comments. I always appreciate helpful tips! Now, first things first. You need to install React and Redux. I assume you know how to do that. After you've set up your React application you need to install a tool called redux-thunk by using the command npm install redux-thunk With all those installed, we can now look at the components we're going to need to make the magic happen! What is this thunk thing? Basically a thunk is a function called by another function. Wait... What? Yeah, that's how I reacted the first time I heard this statement. Let me show you an example: function some_function() { // do something return function thunk() { // do something thunky later } } So, some_function is called, it does something and then it returns a new function with commands and possibly data for later execution. Now what about Redux? I don't want to go into the deepest depths of redux (most likely I couldn't anyway), so just a short explanation: It's a state container for javascript applications. It holds all the data you need for your application in one place. Every component within your application has its space in the state container where it looks for data. When the data changes, the component will change, too. Actions The idea is that you dispatch actions onto redux, and based on those actions the state is modified. The funny thing is: An action doesn't do anything. It sounds like there is stuff going on, but there isn't. An action is just a plain object with a type key. Like this one: // this is an action { type: "SOME_ACTION", payload: {} } Most of the time you don't want to write the same object over and over, so there is a concept called Action Creators. Action Creators Action Creators do exactly what they sound like, they create the action objects for you. const SOME_ACTION = "SOME_ACTION"; function create_action(data) { return { type: SOME_ACTION, payload: data } } So with those action creators you can now easily use the SOME_ACTION by calling create_action(data). Those action creators can be dispatched to redux by using dispatch(create_action(data)). Reducers After an action is dispatched, it will be passed onto a so called reducer. A reducer is a function which is given a state and an action. Depending on the action it will transform the state and then return the new state. function someReducer(state, action) { switch(action.type) { case SOME_ACTION: return { ...state, data: action.payload } break; default: // the dispatched action is not in this reducer, return the state unchanged return state; } } More complex applications most likely have multiple reducers, each one responsible for a single part of the state. So it is important to never forget the default case where the reducer returns the state unchanged. Important to notice that reducers are pure functions. They never call something like an API or dispatch another action to redux. You talked about thunks!? You remembered that. Okay, thunks again. I just mentioned that reducers are pure. But often we want to have some kind of API call or dispatch something depending on data or whatever... But we can't... reducers are pure... Redux-Thunk to the rescue! Redux-Thunk is pretty easy to understand. It is a so-called middleware for the redux store. It looks at every single action being dispatched and if it is a function, it calls the function. There is nothing more to it. But this opens up a whole new world of fancy "actions" which are dispatched to redux. You might ask, how do I get this little wonder into my store? import { applyMiddleware, createStore } from 'redux'; import thunk from 'redux-thunk'; import rootReducer from './rootReducer'; import initialState from './initialState'; const middlewares = [thunk]; createStore(rootReducer, initialState, applyMiddleware(...middlewares)); Let's get some products We want to load some products from our API. To do this, we first set our component in some kind of pending state, we show a loading spinner or something like that. Then we load the data and we decide whether or not we can just show the product list or display some kind of error message- We start with setting up our action creators. // action.js export const FETCH_PRODUCTS_PENDING = 'FETCH_PRODUCTS_PENDING'; export const FETCH_PRODUCTS_SUCCESS = 'FETCH_PRODUCTS_SUCCESS'; export const FETCH_PRODUCTS_ERROR = 'FETCH_PRODUCTS_ERROR'; function fetchProductsPending() { return { type: FETCH_PRODUCTS_PENDING } } function fetchProductsSuccess(products) { return { type: FETCH_PRODUCTS_SUCCESS products: products } } function fetchProductsError(error) { return { type: FETCH_PRODUCTS_ERROR error: error } } Now that we have our action creators, let's set up our reducer for the whole thing. // reducer.js import {FETCH_PRODUCTS_PENDING, FETCH_PRODUCTS_SUCCESS, FETCH_PRODUCTS_ERROR} from './actions'; const initialState = { pending: false, products: [], error: null } export function productsReducer(state = initialState, action) { switch(action.type) { case FETCH_PRODUCTS_PENDING: return { ...state, pending: true } case FETCH_PRODUCTS_SUCCESS: return { ...state, pending: false, products: action.payload } case FETCH_PRODUCTS_ERROR: return { ...state, pending: false, error: action.error } default: return state; } } export const getProducts = state => state.products; export const getProductsPending = state => state.pending; export const getProductsError = state => state.error; Okay, now we have a big part of the work done. What's to note in the code above, are the three functions at the end of the reducer. Those are called selectors. Selectors are used to get defined parts of the state. In small applications they are overkill. But if you scale your app and it gets more and more complex, it gets really messy if you change something within your state. With selectors you need to change the selector and everything works fine. I'll propably do a blog post about selectors, because I think they are really important to set up a scalable react/redux application. Now where were we... Ah yes, big part of the work is done. The only thing left for us to do on the redux side is to write one of our fancy new actions. // fetchProducts.js import {fetchProductsPending, fetchProductsSuccess, fetchProductsError} from 'actions'; function fetchProducts() { return dispatch => { dispatch(fetchProductsPending()); fetch('') .then(res => res.json()) .then(res => { if(res.error) { throw(res.error); } dispatch(fetchProductsSuccess(res.products); return res.products; }) .catch(error => { dispatch(fetchProductsError(error)); }) } } export default fetchProducts; The action above is pretty simple. First we dispatch our pending action. Then we fetch the data from our API. We decode the json coming in into an object. Then we check for an error. If an error happend we throw it and call our error function. If everything went okay, we call the success action. The reducer handles the rest. This is all about fetching data from a server...Nah, just kidding, it isn't. But this is how most posts about fetching data from an api end, right? But... What about our application? Oh, you want the products from your store to actually show in your react app? Okay okay, let's do this. I assume you know how to connect your react app to your redux store using a provider. There are plenty of posts about this topic out there. After you've done that, you'll need a few components. For me everything starts in a view. A view, for me, is a component which wraps up everything a user gets served into one parent component. This parent component has most of the connection to the redux store and shares the data with the components it encapsulates. import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import fetchProductsAction from 'fetchProducts'; import {getProductsError, getProducts, getProductsPending} from 'reducer'; import LoadingSpinner from './SomeLoadingSpinner'; import ProductList from './ProductList'; class ProductView extends Component { constructor(props) { super(props); this.shouldComponentRender = this.shouldComponentRender.bind(this); } componentWillMount() { const {fetchProducts} = this.props; fetchProducts(); } shouldComponentRender() { const {pending} = this.props; if(this.pending === false) return false; // more tests return true; } render() { const {products, error, pending} = this.props; if(!this.shouldComponentRender()) return <LoadingSpinner /> return ( <div className='product-list-wrapper'> {error && <span className='product-list-error'>{error}</span>} <ProductList products={products} /> </div> ) } } const mapStateToProps = state => ({ error: getProductsError(state), products: getProducts(state), pending: getProductsPending(state) }) const mapDispatchToProps = dispatch => bindActionCreators({ fetchProducts: fetchProductsAction }, dispatch) export default connect( mapStateToProps, mapDispatchToProps )(ProductView ); So, a lot is going on here. We write a standard React component. Then we use connect to connect it to our redux store. Connect takes two parameters: One function mapStateToProps which maps parts of the state into your components props and one function mapDispatchToProps which maps functions into your props which are, when called, dispatched to redux. Right at the end we put all those things together and voilá, we have a connection to our store. In the mapStateToProps function we make use of our selectors we wrote earlier. I like to add a function called shouldComponentRender to my view components and most of my components for that matter. I named it like this, because it's close to react's shouldComponentUpdate lifecycle method. It checks whether or not the component should render. If not, it renders a LoadingSpinner component. I find it very beneficial to work like this, because the components are always reinitialized and all subcomponents are mounted again after the pending flag, which controls the rendering in this case, toggles. Therefore you can add redux state to a component's state in the constructor. (I don't want to talk about what goes into redux and what goes into component state, this is a topic for another post). In most of my projects I found this one of the most annoying problems. Think of a component which renders a product. It is initialized by the data and then some subcomponents like a price calculator, which has a component state, is initialized in its constructor. When new data comes in, you need to do a check whether or not the calculator needs to reinitialize. With the shouldComponentRender function it's super easy to do so. Everytime the pending flag toggles (maybe because a new product is selected), everything reinitializes and is good to go. Of course there are some reasons why you might have components within your view to not to rerender. If that's the case, just remove the shouldComponentRender function from your view and work with it within the subcomponents. You can use some kind of fadeout/-in effect to improve the user experience. Well, that's it. For real this time. Thank you for reading my first blog post ever. I hope you enjoyed it, I hope you learned something and if you have any suggestions or tips for me to improve my react/redux skills or just want to say "hi", leave me some comments, I'd really like that. The Elusive Senior Software Developer How do you find great developers who aren't looking for a change? Hi, great post! Instead of using your shouldComponentRender()function, have you considered using componentWillRecievePropsthen setting the pending 'state' on this.statesimilar to this: Then instead of this: you could use: I think it looks neater and allows you to do something based on state, rather than basing it on whether or not a function was called. Let me know your thoughts! :) Thank you very much for the comment Calum. :) I did it a long time like you described and the solution was great. Then componentWillRecievePropswas marked as UNSAFE_componentWillReceivePropsin React 16.3. It will become deprecated in React 17 and the new getDerivedStateFromPropsis here. So I was wondering how I would solve this without depending to much on changes within the React lifecycle methodes and came up with my solution for the problem. Putting the code into a function that sounded like a lifecycle method was my approach to keep the code readable and make everyone understand what is happening even if the code gets complicated. I keept it that way. :D Also, I never got the idea why you would put state from redux into the react state if there is no reason to. I mean, you copy data from one state to another without doing anything with it. Seems like a waste of time. Can you enlighten me? Is there any benefit? Nice post. One question. You do this: but i don't see fetchProductsAction in fetchProducts.js. I see only fetchProducts. Is this a typo or some code is missing?. I believe is only a mistake but just want to confirm. Thanks. Thank you for the reply Alejandro. You can import default exports with whatever name you want. I wanted to use fetchProductsin my code so I can't import it with this name because it would collide with the variable I use in a deeper scope. To fix this I import everything that is a action with xxxAction and then use it without the Actionsuffix. I hope this clarifies things. You're right. I got confused. I'm learning react so i'm kind of new in those details and scanning the code properly. Thanks! You are welcome mate. Good luck learning :) Hey Markus! Congrats on your first blog post! Shameless plug, I built a middleware a while ago to help reduce boilerplate especially with async actions like the ones you mentioned in this article, you should check it out! github.com/Gabri3l/redux-slim-async Hey Gabriele, thanks for the tip. I know middlewares like yours. I used another one in a project recently. Was a real timesaver. I will checkout yours for sure. Any you would recommend to others out there ? Recommend? Not really. I used redux-promise and redux-action to achieve something like your middleware does. In small applications it was great (as I think your middleware will be) but in larger scale applications there were cases where the thunks got complicated and I had to get rid of all the middlewares I found and do it from scratch (or with my own middleware in that case) That's interesting! I used this for a medium/large codebase and we were fine so if you have a minute to bring up a complicated Case that made those middlewares unhelpful that would be great! I'm curious to see if there's a way I can adapt this one too not intricate use cases. Thank you for the article Markus! redux-thunk is a great library, but not easy to test unfortunately, that’s why we decided to go with redux-saga, IMHO makes the code easier to maintain and the learning curve is not much difficult than thunk if you go to the great official documentation. Have you tried it? Kudos! Hi Markus, Thanks for the wonderful explanation. Could you please explain why do we have to import the constants from ../actions.js in reducer.js? import {FETCH_PRODUCTS_PENDING, FETCH_PRODUCTS_SUCCESS, FETCH_PRODUCTS_ERROR} from './actions'; its very good thanks Markus Claus I was stucked with this but thanks to your it's solved. This is the ebst guide ever, even being short. Hey Markus, thanks a lot for your guide. Great post! Hello! Is it possible to use a function component instead of a class component for ProductView ? How would the code change with useEffect hook? Thanks! I actually wrote an article about React Hooks not long ago and there is an example for a fetch hook. Check it out Is there a book or video describing the use of these react design patterns and/or the use of redux? For beginners maybe? There are literally thousands out there. I can recommend Frontend Masters, they got plenty on all the relevant subjects but they are not free. Also YouTube is full of content. Udemy has some pretty good courses for little money, too.
https://dev.to/markusclaus/fetching-data-from-an-api-using-reactredux-55ao
CC-MAIN-2019-26
refinedweb
2,659
66.64
Display 3 stimuli on one page I am programming my cognitive task using expyriment. But I had some difficulty in representing 3 stimuli at the same time. In my task, there is a target word at the top of the page and beneath to that, there are two words ( 3 words as stimuli in one trial) that participant has to select between one of the two beneath words. using the code below I could not do that as it only represents stim 3. Could you please provide me a solution? apart from that, I have 120 of those trials ( each consist of 3 words), how can I load them as a list that automatically update at the orginal position? Kind Regards import expyriment exp = expyriment.design.Experiment(name="First Experiment") expyriment.control.initialize(exp) stim1 = expyriment.stimuli.TextLine(text="Hello World", position=(300,0)) stim1.preload() stim2 = expyriment.stimuli.TextLine(text="Hello World", position=(-300,0)) stim2.preload() stim3 = expyriment.stimuli.TextLine(text="Hello World", position=(0,150)) stim3.preload() expyriment.control.start() stim1.present() stim2.present() stim1.present() exp.clock.wait(1000) expyriment.control.end() Hi Juliette, there are two ways to achieve what you want: canvas = expyriment.stimuli.Canvas(size=(500, 500)) # Adapt size to fit all three stimuli on it stim1.plot(canvas) stim2.plot(canvas) stim3.plot(canvas) canvas.present() stim1.present(update=False) # needs to be called once per used video buffer stim2.present(clear=False, update=False) # needs to be called once per used video buffer stim3.present(clear=False) # needs to be called once per used video buffer Let me know if you have any further questions.
http://forum.cogsci.nl/index.php?p=/discussion/2777/display-3-stimuli-on-one-page
CC-MAIN-2020-10
refinedweb
274
51.55
.[Read More] March 23, 2017Marion Desmazieres By Sam Morgan, Head of Education at Makers Academy Editor’s note: This is part one of our Makers Academy series for Ruby developers. Learn more about this free training on the Alexa Skills Kit in this blog post. Welcome to the first module of Makers Academy's short course on building Alexa skills using Ruby. Amazon's Alexa Skills Kit allows developers to extend existing applications with deep voice integration and construct entirely new applications that leverage the cutting-edge voice-controlled technology. This course will cover all the terminology and techniques required to get fully-functional skills pushed live to owners of Alexa-enabled devices all around the world using Ruby and Sinatra. This module contains a basic introduction to scaffolding a skill and interacting with Alexa. This module introduces: During this module, you will construct a simple skill called “Hello World.” While building this skill, you will come to understand how the above concepts work and play together. This module uses: Let's get started![Read More] 17, 2017Jeff Blankenburg We all hold interesting data in our heads. Maybe it's a list of all the action figures we played with as a kid, specific details about the 50 U.S. states, or a historical list of the starting quarterbacks for our favorite football team. When we're with friends, sometimes we'll even quiz each other on these nuanced categories of information. It's a fun, interactive way to share our knowledge and learn more about our favorite topics. You can now bring that experience to Alexa using our new quiz skill template. You provide the data and the number of properties in that data, and Alexa will dynamically build a quiz game for you.] March.[Read More] March 15, 2017David Isbitski Amazon today announced a new program that will make it free for tens of thousands of Alexa developers to build and host most Alexa skills charges each month. Now, developers with a live Alexa skill can apply to receive a $100 AWS promotional credit and can also receive. 03, 2017Michael Palermo Today we are happy to announce lock control and query, a new feature in the Smart Home Skill API now available in the US, with support for the UK and Germany coming soon. This feature is supported with locks from August, Yale, Kwikset, and Schlage as well as hub support from SmartThings and Wink. Now any developer targeting devices with locking behavior can enable customers to issue a voice command such as, “Alexa, lock the front door.” In addition, developers can build in support for customers asking for the status of a smart locking device with a voice command such as, “Alexa, is the front door locked?” Much like the recently announced thermostat query feature, the lock query feature simplifies development efforts by enabling specific voice interactive experiences straight from the Smart Home Skill API. This is accomplished under the new Alexa.ConnectedHome.Query namespace. Developers can report errors using the same namespace. These errors are then used to guide the customer with the proper corrective actions. It’s crucial that developers return meaningful and correct errors so that customers can feel confident about the status of their locks. For example, if the smart locking device is unable to provide a stateful value because a door is open, developers should report this in their directive response as shown below.]
https://developer.amazon.com/ja/blogs/alexa/?page=60
CC-MAIN-2019-35
refinedweb
572
59.84
William A. Rowe, Jr. wrote: >>>If the filesystem doesn't handle it, I fail to see what benefit we get from >>>displaying it. >>> >>But that's not the point. My point was that I cannot see from the name >>strfsize that this function is tied to filesystem limits. why not call >>it apr_file_strfsize? And let apr_strfsize accept bigger values without >>any relation to filesystem limits. >> >>e.g. I want to use strfsize to count money :) >> > > fsize is filesize plain and simple :) So rename it appropriately as I pointed > out below. really? I read it as string_format_size, the same as strftime stands for string_format_time. Now I understand the source of my confusion, but boy, this is so not obvious. I still think apr_file_strsize is a much better name. >>>Unless you want to make apr_strfsize into something more generic, such as >>>apr_format_brief_size_binary(), taking the hugest int we can pass it, and >>>returning a binary metric NNNNm where m is a magnitude. There wouldn't >>>be any harm in that, someone could extend it to apr_format_brief_size_metric() >>>for true decimal representations. But apr_strfsize sure sounds like a >>>filesystem API here :) >>> >>why stopping at int? >> > > Exactly, apr_int64_t sounds reasonable. If you want an implementation that takes > a double, I'd ask that you make that a second function. no prob. what should be the name then? apr_str_fmt_size since APR keeps on growing it'd be very nice to try hard to maintain "virtual" namespaces for most of the functions so you always have two top namespace levels before you reach the function name. so apr_file_ is the namespace for files related functions, therefore with common sense applied, apr_strfsize should be there, like in apr_file_strsize. If we are talking about general purpose string manipulation function it should probably live in apr_str_ namespace, like apr_str_fmt_size. _____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker mod_perl Guide mailto:stas@stason.org
http://mail-archives.apache.org/mod_mbox/apr-dev/200201.mbox/%3C3C5785FC.5080805@stason.org%3E
CC-MAIN-2015-18
refinedweb
312
63.8
It's not the same without you Join the community to find out what other Atlassian users are discussing, debating and creating. If you use Script Runner you can add scripted fields to your instance: Cheers Hi Czaia, Thanks for reply, I have created scripted field successfully and i have added the Inline also. But i have one Issue please can you help me. Can you see below image. image2015-9-16 14:1:33.png I have enter above fields values and updated then i can't see reported name. but i can see Anonymous name please can you see for more details below. image2015-9-16 14:0:41.png where Iam missing just guide me and what is the Inline script for we can get the correct reporter name. thanks. I get the same behavior (not when using the text searcher though). But why would you want to do that anyways? Why don't you just use a post function to update the custom field? Hi Christian Czaia, Good news, I have solved the Anonymous Issue. We should use the below code(Inline script), If you use the User Picker (single user) or User Picker (multiple users) templates you need to return an ApplicationUser, or List of ApplicationUser in the multiuser case. For Example: ------------------------------------------------------------------------------------------------- import com.atlassian.jira.user.ApplicationUsers ApplicationUsers.from(issue.reporter) --------------------------------------------------------------------------------------------------------- For more details see below. image2015-9-18 12:49:28.png I have one Question Is it possible to update the scripted fields using Java Rest API?, if you know can you Help me out or provide me related Likes. Thanks. You can not update scripted fields, they are.
https://community.atlassian.com/t5/Jira-questions/How-to-create-add-scripted-type-fields-in-Jira/qaq-p/199398
CC-MAIN-2018-39
refinedweb
277
73.37
Policy for including click packages in Ubuntu Touch images by default Discussions around Ubuntu Touch for 13.10 suggest that we want to include certain (Free) community apps, packaged as click packages, in the official Ubuntu Touch images. Since these packages do not live in the Ubuntu archive today, we need to make sure we have a sane policy around how these are managed. Have an open discussion about this issue, with an eye towards making a recommendation to the TB and/or CC about this. Blueprint information - Status: - Not started - Approver: - Jono Bacon - Priority: - Undefined - Drafter: - Steve Langasek - Direction: - Needs approval - Assignee: - Steve Langasek - Definition: - Discussion - Series goal: - None - Implementation: Unknown - Milestone target: - None - Started by - - Completed by - Whiteboard - <lool> I think we at least need to be able to upload the app like, in case it's horribly broken or has security issues or something if it has any issue, it's part of an ubuntu image so we need to be able to fix it so we need some shared ownership for preinstalled apps - <asomething> if they'll be installed by default, it seems like there should be some kind of MIR-like check - We need some kind of shared place for uploading these - Also need some quality checks on the apps - click packages should not be a way to work around communnity processes, they should follow the same standards but are just delivered through a different mechanism - we are talking about 10-20 packages max. - requirements: - continuous integration? - license? - same name space? com.ubuntu namespace (not com.ubuntu. - MIR like process? - question: when do we gate-keep? just when an app gets into the com.ubuntu namespace or also when they update? - if apps get on the main image, there might be freezes involved - where app delivery and image creation might conflict - click packages are partially about empowering upstream, how does that fit with the update process for apps included on the default image? - apps on the default image should include autopilot tests that must pass before an upgrade - Could either use special com.ubuntu.* namespace for clicks that may go in image or flag apps in the appstore as "included in the imaeg" to implement special handling - A good option seems to be to maintain two databases of Click packages: - preinstalled - user-installed => this would allow users to upgrade to newer versions or revert back to factory provided version; could even have a remote uninstall feature to revert this back - Do we allow upstream developers to push an update to all Ubuntu systems? without review? - Perhaps we delegate this trust once and have means to revert any bad things Work Items Work items: [jonobacon] Define requirements for inclusion in tbe name image and collect requirements (talk to core apps folks, CC <email address hidden>): TODO [beuno] Grow MyApps to allow shared namespaces: TODO
https://blueprints.launchpad.net/ubuntu/+spec/community-1308-policy-of-default-click-packages
CC-MAIN-2019-13
refinedweb
478
50.4
Can't stop a thread.. Nicole Gruber Greenhorn Joined: Jan 15, 2009 Posts: 10 posted Jul 14, 2009 10:02:20 0 Hello, I have this assignment where I am supposed to create a panel with four buttons. If you click one of them, music should begin and loop continuosly, if you click it once more, the music should stop playing. Unfortunatley, I can't manage to do that (stop the music from playing).. I have two classes: One is called PlayClip(extends Thread) and the other one SimpleClipPlayer(extends JFrame implements ActionListener ). The first class contains also the method run() : public void run(){ clip.loop(Clip.LOOP_CONTINUOUSLY); } In the second class are the four buttons and also the method ActionPerformed(): public void actionPerformed(ActionEvent e) { if(e.getSource() == loop0) { PlayClip clip1 = new PlayClip(""); if(this.isRunning == true) { //Sounddatei will be stopped clip1.interrupt(); this.isRunning = false; loop0.setBackground(null); } else { clip1.start(); //start Thread this.isRunning = true; loop0.setBackground(new Color(225,225,0)); } } I can't use the stop() method because it's deprecated and interrupt() doesn't seem to work. I also tried to use a flag and I've put the method clip.loop(Clip.LOOP_CONTINUOUSLY); in a while-loop, put that doesn't seem to work either.. Can someone help me? Steve Luke Bartender Joined: Jan 28, 2003 Posts: 3686 13 I like... posted Jul 14, 2009 11:30:26 0 It depends entirely on how the clip.loop() method behaves. Can you show us the code, did you write it? If not, where does it come from? Your first couple strategies are the correct idea: 1) interrupt the Thread. But whatever clip.loop() does would have to respond to interrupts. 2) Use a flag. But you probably want to not use clip.loop(<continuous>) in this case because then you would have no way of checking the flag. Maybe something like: private volatile boolean keepPlaying = true; pubic void run() { while(keepPlaying && !Thread.interrupted()) { clip.play(); //or whatever to make it play just once } } public void stopPlaying() { this.keepPlaying = false; } If clip has a method for looping continuously, does it have a means of stopping the loop? public void stopPlaying() { clip.stop(); } I also wanted to make some other general comments: if(this.isRunning == true) This isn't generally a good idea - or necessary. Instead of comparing this.isRunning == true (which when in habit can lead to the unfortunate mistake of this.isRunning = true) you should get into the habit of using the more concise and less error prone: if(this.isRunning) { clip1.start(); //start Thread This could also be a problem. clip1 is a Thread. If clip1 has already been started, then stopped, then this code gets executed a second time. When that happens the Thread throws an illegal thread state exception because a Thread can only be started once. You would need to dispose of the old thread and run a new one. It is for reasons like this (amongst other things) that I generally would avoid subclassing Thread. Instead, make your class a Runnable and provide a start() method which generates a new Thread and stop() method which provides a safe method of stoping the task. Something like: public class PlayClip implements Runnable { //Hold a reference to the running thread in case you need it private volatile Thread runningThread; //Control stopping the task with this private volatile boolean keepRunning = true; public void run() { this.runningThread = Thread.currentThread; //Only play when we are told to keep playing while (keepRunning && !Thread.interrupted()) { clip.play(); } //Thread work is done, get rid of the runningThread reference this.runningThread = null; } // Starts a new PlayClip task if one isn't already running public void start() { if (this.runningThread != null) throw new IllegalStateException("Trying to start a new PlayClip task, but one is already playing! Stop the old one before starting a new PlayClip task"); this.keepRunning = true; (new Thread(this)).start(); } // Stops the current PlayClip task public void stop() { this.keepRunning = false; } } Then call it like: if(this.isRunning) { //Sounddatei will be stopped clip1.stop(); this.isRunning = false; loop0.setBackground(null); } else { clip1.start(); this.isRunning = true; loop0.setBackground(new Color(225,225,0)); } A little bit of more code may be needed in the start() method to make sure the restarting of a new Thread is safe (and keeps the same clip from playing multiple times), or it might be safe enough to just interrupt the old thread before always starting a new one... whichever seems best to you: // Starts a new PlayClip task if one isn't already running public void start() { if (this.runningThread != null) this.runningThread.interrupt(); //will cause run() to stop because !Thread.interrupted() becomes false this.keepRunning = true; (new Thread(this)).start(); } Steve Nicole Gruber Greenhorn Joined: Jan 15, 2009 Posts: 10 posted Jul 14, 2009 11:47:17 0 Thanks Steve!!! My program works now! and also thanks for the tips ;) I'm really grateful! I agree. Here's the link: subject: Can't stop a thread.. Similar Threads Sound Issues with Different Platforms how to let user abort loop MUSIC start, not stops loop java sound Exception with the Piece of Code All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter JForum | Paul Wheaton
http://www.coderanch.com/t/454026/threads/java/stop-thread
CC-MAIN-2013-48
refinedweb
879
68.06
Darkholme Who am I? That, my dear, is an excellent question. Though not one easily answered. Darkholme is an entity-component system written in Ruby. It's still early days for it, but I think it's ready for most basic use cases. Installation Just add this line to your project's Gemfile gem "darkholme" Then, just require "darkholme" in your project and you're on your way! Usage First, you need to create an Engine to hold all the other parts of Darkholme. @engine = Darkholme::Engine.new All of your Systems and Entities will be added to your engine, which will update them once per frame. Make sure you put an Engine#update inside of your game's update loop, like so: def update(delta) @engine.update(delta) end Now, you can define an Entity and add Components to it, which hold data for your systems to use. In this case, let's assume you've made a component called Spatial that holds an entity's position along with its velocity. Something like this: class Spatial < Darkholme::Component attr_accessor :position, :velocity def initialize @position = { x: 0, y: 0 } @velocity = { x: 0, y: 0 } end end And adding it: new_entity = Darkhole::Entity.new new_entity.add_component Spatial.new Next is adding your entity to the engine and adding a new system that'll use the Spatial component and move the entity according to its velocity. Here's what the system could look like: class PositionSystem < Darkholme::System has_family Spatial def update(delta) entities.each do |entity| spatial = entity.component_for Spatial spatial.position.x += spatial.velocity.x * delta spatial.position.y += spatial.velocity.y * delta end end end And adding it and the entity from before: engine.add_system PositionSystem.new engine.add_entity new_entity Now, as another system modifies the entity's Spatial component velocity, the PositionSystem will position it according to its velocity, but properly using the delta between frames for smooth movement. It's highly encouraged to read through the documentation for the gem, as it can answer most questions you might have about each individual method. Please file an issue if you think our documentation is lacking in some way. Thanks! Key concepts Engine Generally, your game will have one Engine. It contains all the entities, systems, and components. Every frame of your game, you'll need to call #update on it. This will, in turn, update all its relevant systems. Entity This is the basic component-holding class. It also has some callbacks, but it generally just keeps a list of what it does. These get added to Engines. Component These define data the Systems end up working with. Also, they get added to Entities. System These get called once per frame and they update all the entities with components they're interested in. Family Systems have a Family, which defines exactly what components they're interested in. This means that systems won't loop through every single entity on update. They only loop through relevant entities. This is awesome. Maybe. Contributing to darkhol.
http://www.rubydoc.info/github/massivedanger/darkholme
CC-MAIN-2018-09
refinedweb
505
58.48
...one of the most highly regarded and expertly designed C++ library projects in the world. — Herb Sutter and Andrei Alexandrescu, C++ Coding Standards What we call "number" is the base type of the interval class. The interval library expect a lot of properties from this base type in order to respect the inclusion property. All these properties are already detailed in the other sections of this documentation; but we will try to summarize them here. The numbers need to be supplied with an ordering. This ordering expresses itself by the operators < <= => > == !=. It must be a total order (reflexivity, antisymmetry, transitivity, and each pair of numbers is ordered). So complex<T> will not be a good candidate for the base type; if you need the inclusion property of interval property, you should use complex< interval<T> > in place of interval< complex<T> > (but unfortunately, complex only provides specialization). Please note that invalid numbers are not concerned by the order; it can even be conceptually better if a comparison with these invalid numbers is always false (except for !=). If your checking policy uses interval_lib::checking_base and your base type contains invalid numbers, then this property is needed: nan!=nan (here nan is an invalid number). If this property is not present, then you should not use checking_base directly. Interval arithmetic involves a lot of comparison to zero. By default, they are done by comparing the numbers to static_cast<T>(0). However, if the format of the numbers allows some faster comparisons when dealing with zero, the template functions in the interval_lib::user namespace can be specialized: namespace user { template<class T> inline bool is_zero(T const &v) { return v == static_cast<T>(0); } template<class T> inline bool is_neg (T const &v) { return v < static_cast<T>(0); } template<class T> inline bool is_pos (T const &v) { return v > static_cast<T>(0); } } Another remark about the checking policy. It normally is powerful enough to handle the exceptional behavior that the basic type could induce; in particular infinite and invalid numbers (thanks to the four functions pos_inf, neg_inf, nan and is_nan). However, if you use interval_lib::checking_base (and the default checking policy uses it), your base type should have a correctly specialized std::numeric_limits<T>. In particular, the values has_infinity and has_quiet_NaN, and the functions infinity and quiet_NaN should be accordingly defined. So, to summarize, if you do not rely on the default policy and do not use interval_lib::checking_base, it is not necessary to have a specialization of the numeric limits for your base type. Ensuring the numbers are correctly ordered is not enough. The basic operators should also respect some properties depending on the order. Here they are: The previous properties are also used (and enough) for abs, square and pow. For all the transcendental functions (including sqrt), other properties are needed. These functions should have the same properties than the corresponding real functions. For example, the expected properties for cos are: cosis defined for all the valid numbers; cos(2π-x) is equal to cos(x); cosis a decreasing function on [0,2π]. If you work with a base type and no inexact result is ever computed, you can skip the rest of this paragraph. You can also skip it if you are not interested in the inclusion property (if approximate results are enough). If you are still reading, it is probably because you want to know the basic properties the rounding policy should validate. Whichever operation or function you consider, the following property should be respected: f_down(x,y) <= f(x,y) <= f_up(x,y). Here, f denotes the infinitely precise function computed and f_down and f_up are functions which return possibly inexact values but of the correct type (the base type). If possible, they should try to return the nearest representable value, but it is not always easy. In order for the trigonometric functions to correctly work, the library need to know the value of the π constant (and also π/2 and 2π). Since these constants may not be representable in the base type, the library does not have to know the exact value: a lower bound and an upper bound are enough. If these values are not provided by the user, the default values will be used: they are integer values (so π is bounded by 3 and 4). As explained at the beginning, the comparison operators should be defined for the base type. The rounding policy defines a lot of functions used by the interval library. So the arithmetic operators do not need to be defined for the base type (unless required by one of the predefined classes). However, there is an exception: the unary minus need to be defined. Moreover, this operator should only provide exact results; it is the reason why the rounding policy does not provide some negation functions. The conversion from int to the base type needs to be defined (only a few values need to be available: -1, 0, 1, 2). The conversion the other way around is provided by the rounding policy ( int_down and int_up members); and no other conversion is strictly needed. However, it may be valuable to provide as much conversions as possible in the rounding policy ( conv_down and conv_up members) in order to benefit from interval conversions. Revised 2006-12-24 Brönnimann, Polytechnic University Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at)
https://www.boost.org/doc/libs/develop/libs/numeric/interval/doc/numbers.htm
CC-MAIN-2021-49
refinedweb
903
51.99
by Daniel Zwolenski In a series of innovative blog postings, Downstream's Senior Java Architect Daniel Zwolenski explores ways to build applications in JavaFX 2.0 -- from Spring to controller injection to client servers. Published February 2012 Downloads: : JavaFX 2.0 : JFX Flow Note: JFX Flow is a free, open source framework for developing rich, interactive and user friendly web-style GUIs for desktops using JavaFX (2.0+). JFX Flow combines the powerful feature set of JavaFX (styling, animations, FXML, etc.) with a simple “web flow” style framework that is easy to use and that fosters clean architectural patterns, especially when developing Java EE applications. JFX Flow is currently in Alpha release and may still have some bugs. The core framework is usable however, and the API is quite stable. In this article, the first of several in which I explore various options for building applications in JavaFX 2.0, I perform a direct port of Richard Bair’s FXML+Guice dependency injection example into Spring. (Richard Bair is Oracle’s Chief Architect for the Client Java Platform.). public class Person { private String firstName; public Person(String firstName) { this.firstName = firstName; } public String getFirstName() { return firstName; } } Listing 1. Creating a Person Bean This is similar to Richard Bair() + "!"); } } Listing 2. Creating a SampleController This is identical to Bair’s, except I used the getPerson().getFirstName() instead of a getPersonName() -- he could have done the same, there’s> Listing 3. Creating the FXML File Here’s where things start to get interesting. Instead of the Guice “Module”(); } } Listing 4: Create a Spring Application Context We can easily build the Swing equivalent of Bair’s GuiceFXMLLoader. It just needs to load the controller from the application context instead of the Guice Injector. In another blog post, I(); } } } } Listing 5: Building a Custom FXML Loader(); } } Listing 6: Creating an “Application” to Launch it all That’s it! As you can see, the code is quite similar to Guice, so the choice between Guice and Spring should depend on the other features offered by each and how these may benefit you. In subsequent article postings, I stick with Spring, but much of what I present could easily be adapted back to Guice. Daniel Zwolenski (aka “Zonski”) is a Software Architect based in Brisbane, Australia, with a passion for developing user-friendly, graphical applications in Java. He believes that building good-looking, simple user interfaces is just as important for an application as bug-free code and optimized database queries. He currently works for a small but innovative startup called Downstream developing cutting-edge safety systems for the heavy industries sector (energy, mining, chemicals, etc). He develops systems that will save lives and reduce damage to the environment due to accidents on large sites.
http://www.oracle.com/technetwork/articles/java/zonski-1508195.html
CC-MAIN-2016-07
refinedweb
459
54.42
Can't access ASP objects Discussion in 'ASP General' started by markgoldin, Jun 12, 2009. Want to reply to this thread or ask your own question?It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum. - Similar Threads class objects, method objects, function objects7stud, Mar 19, 2007, in forum: Python - Replies: - 11 - Views: - 789 - Dennis Lee Bieber - Mar 20, 2007 I can't access some classes, but can access others in the same namespace, why?ThunderMusic, Feb 21, 2007, in forum: ASP .Net Web Services - Replies: - 1 - Views: - 169 - ThunderMusic - Feb 22, 2007 asp.net date objects vs. classic asp date objectsJ. Muenchbourg, Oct 3, 2003, in forum: ASP General - Replies: - 1 - Views: - 194 - msnews.microsoft.com - Oct 3, 2003 JRuby: How does one keep Java objects as Java objects so they can be used in method calls?Steve Drach, Jun 19, 2004, in forum: Ruby - Replies: - 3 - Views: - 242 - Thomas E Enebo - Jun 20, 2004 Best way to access methods of Objects and its sub-Objects, Apr 26, 2013, in forum: C++ - Replies: - 8 - Views: - 338 - Jorgen Grahn - May 16, 2013
http://www.thecodingforums.com/threads/cant-access-asp-objects.804837/
CC-MAIN-2015-06
refinedweb
205
80.31
WebStorm 2019.2 EAP #6: simplify conditions, improved support for Vue.js and EditorConfig Web<< Here’s a real-life example: if (scope) { let scopeChain; if (typeof scope === 'string' || (!Array.isArray(scope) && typeof scope === 'object' && scope !== null)) { scopeChain = [scope]; } else { scopeChain = scope; } } The last part of the long condition && scope !== nullcan be removed because with the first check we have already confirmed that scopeis not null. This inspection is on by default. Or, if you want to check your whole project, you can use the Run inspection by name action from the menu Code and run the Pointless statement or boolean expression inspection. Improvements in the Vue.js support The popularity of Vue.js is continuing to grow worldwide. There are also more and more UI libraries are being written for Vue.js all the time. One of the biggest benefits Vue.js offers developers is flexibility in the way they can write components – you can define them using a single .vue file or split them between different files, different combinations of languages can be used, and there are different ways to register components, etc. But all this also makes it quite challenging for the IDE to support all the different UI libraries that can each be written using very different styles. For the past several weeks, we’ve been working on redesigning our support for Vue.js to make it easier for us to add new smart features and support for new UI libraries. To improve code completion for different Vue.js component libraries, we have created and supported in WebStorm a special format of metadata called web-types. web-types describe the library’s directives and components (including their props, events, and slots). WebStorm now uses the information about components and their props in code completion and will use more of it in the future. We have already generated web-types descriptions for the most popular Vue.js component libraries: BootstrapVue, Vuetify, and Quasar. They are available on npm under the @web-types scope. WebStorm downloads them automatically and uses them under the hood when you open a project that uses one of these libraries. If you’re maintaining a Vue.js component library, you can add a description of the components in the web-types format to your module. To help the IDE to locate this file, a link to it should be added to the web-types field in package.json. On github.com/JetBrains/web-types you can find the JSON schema, scripts that you can use to generate the metadata in the required format, as well as the latest version of descriptions for BootstrapVue, Vuetify, and Quasar. Feel free to contribute and ask any questions. We’ve also made it easier to create new Vue.js projects in WebStorm: you no longer need to install @vue/cli first to use it in the New project wizard. WebStorm will run it using npx instead. You can select if you want to use the default project template the Vue CLI provides, or answer additional questions about the new project. We’ll keep working on the Vue.js support and you’ll see more improvements later this year. Install Node.js when creating a new project If for whatever reason, you haven’t yet installed Node.js on your computer but you want to create a new Node.js, Angular, React, or Vue.js project, WebStorm will download and install Node.js for you – this option is available in the IDE in the New project wizard. Configure code style per directory using EditorConfig You can find an .editorconfig file in almost every open source JavaScript project nowadays. In this file, you can describe the basic code style rules that should be applied to the different file types in your project. Many IDEs and editors support EditorConfig out of the box, including WebStorm, and will follow the options selected in it for things like indent size and style. We’ve decided to go one step further with our support for EditorConfig and create a set of our own properties for the .editorconfig file that will describe all the IDE code style and editor options. The options found in the .editorconfig file in your project will override the code style set in preferences. Another cool thing is that you can now configure different code styles in different project directories using EditorConfig. You can create a new .editorconfig file using the New… action and then select what properties it should add to the file for you – default EditorConfig options or IDE-specific properties that match your current IDE code style settings. Of course, you can then edit the file adding more properties. Please report any issues on our issue tracker. And stay tuned for the next week’s update! WebStorm Team 16 Responses to WebStorm 2019.2 EAP #6: simplify conditions, improved support for Vue.js and EditorConfig Alex Smersi says:July 3, 2019 Please typo within article title (condig instead of config) Ekaterina Prigara says:July 4, 2019 Thanks for noticing, will fix it. Amiram says:July 4, 2019 What happened to the integrated commit window? It is a popup again. Porfirio says:July 5, 2019 I was having the same issue, looks like it is disabled by default, maybe to not confuse people used to the old behavior. You can enable it in File | Settings | Version Control | Commit Dialog Ekaterina Prigara says:July 5, 2019 We’ve got some feedback from our colleagues and EAP users and have decided to turn the new dialog off by default in the upcoming 2019.2 release. We’ll introduce some improvements and will try to turn it back on when the Early Access Program for WebStorm 2019.3 starts. As it was already mentioned, you can enable it in the IDE Preferences | Version Control | Commit Dialog. We would appreciate your feedback about this feature. Michael Scharf says:July 5, 2019 What happened to the non-modal commit dialog that was introduced in 2019.1 EAP ? I really really liked it. Is there an option to show this instead of the modal dialog? Michael Scharf says:July 5, 2019 I meant `2019.2 EAP #5` Michael Scharf says:July 5, 2019 I found it! In the preferences select *Version Control* -> *Commit Dialog* -> **Commit form the Local Changes without showing a dialog* Ekaterina Prigara says:July 5, 2019 That’s right, you can enable it in the IDE preferences. We have decided to turn it off by default in the 2019.2 release and fix some problems that we have discovered and that were reported by the users. We are planning to turn it back on by default in 2019.3. Danny says:July 6, 2019 I don’t agree here. It was always on so imo you shouldn’t turn this off just like that. People upgrade WebStorm and suddenly things start behaving in ways differently than before the update. They have to spend a long time figuring out why suddenly there is no longer a commit dialog. Everytime I update WebStorm I am anxious to see what UI stuff/settings have been changed. It never tells you after an update what you can expect and what settings you have to review due to changes. I spent quite some time figuring out why my desired modal commit dialog disappeared. I even made ticket because I couldn’t find the setting that easily (soooooo many settings with soooo many unexpected names). So, don’t change default behavior unless you have a pristine install. Artur says:July 8, 2019 200% agree with what Danny said. Ekaterina Prigara says:July 8, 2019 Hello, Thank you for your feedback. With every release, we try to make our products better. Sometimes it means that familiar features change but only when we have strong reasons to believe that the change will bring significant benefits to the users. We try our best to communicate the changes we make in the EAP blog post and release notes (e.g. here’s the announcement of the new non-modal commit) and provide users with a way to configure the new feature or completely disable it (unfortunately, that results in adding more and more options to the IDE preferences). Gathering the feedback from our users on the new features is the main goals of the Early Access Program. In this particular case, thanks to the feedback, we have realised that we still need to work more on this feature and make sure that the benefits it brings overweight the cost of the workflow change. That’s why we’ve decided to postpone this feature till the next release. We would love to get more feedback from you and all our users – it helps us make our products better. Phil says:July 19, 2019 Still no support for vuex namespaces. thats disappointing. Lets vote this up Ekaterina Prigara says:July 19, 2019 Hello Phil, We are now actively working on improving the Vue.js support. For the upcoming WebStorm 2019.2 release, we’ve been mostly busy with refactoring the plugin code base and we expect to ship more features and user-visible improvements in the next IDE update coming later this year, including this one. Stay tuned! SY says:July 23, 2019 How about Element UI Ekaterina Prigara says:July 23, 2019 We are planning to add support for more libraries, but you can help us do that by sending a PR to web-types.
https://blog.jetbrains.com/webstorm/2019/07/webstorm-2019-2-eap-6/
CC-MAIN-2022-05
refinedweb
1,583
64.61
It compiles flawlessly but the serial monitor shows nothing (should show "tizio")! How about posting the file? Or at least the first few lines of it. "tizio", "caio", "sempronio" 1,2,3,4 How big is this file, anyway? How many numbers are in it? It should work, are you sure the baud speed is the same in the serial monitor window? With 1.0.1, the failure to find an include file doesn't even generate a warning.The failure to find the include file would explain the behavior you are seeing. I was getting a bunch of random errors I've never heard of a compiler producing random errors. QuoteI've never heard of a compiler producing random errors.Incomprehensible, infuriating, annoying, yes. Random, no. The entirety of "numbers.hh" contains: //header file for numbersextern const unsigned char mydata[]; #include "numbers.h"const unsigned char mydata[]={ 1, 2, 3, 4, ...}; /* This examples illustrates how to import numeric data from a separate Text file By Luca Brigatti - 2012 witht he help of the folks in the Arduino programming forum. Note: Leaving the first dimension empty: data[][2] and using: sizeof(data) to calculate the size of the array in bytes eliminates the need to know beforehand how many values are there in the file. The operation: maxIndex = sizeof(data) / 4 - 1 return the highest index number of the first dimension: data[maxIndex][2] The denominator (4 in this case) is the product of the number of bytes per data type (2 bytes per integer) times the size of the second dimension ([2] in this case) The text file being read: "numbers2.hh" contains something like that: ________________________ // Example of bidimensional numeric data array // The actual numbers can be any int (if the data array is int) {1,1}, {-2,4}, {3,-9}, {4,}, // Second element here will be 0, Like: {4,0}, {-5,-25},......_________________________________Note: {,4}, i.e leaving the first place empty is NOT allowed. */// Main importing instructions. data[][2] can be a variablestatic const int data[] [2] = { // Put the name of the file with the complete Path#include "E:\Downloads\Devices\Arduino\arduino-1.0.1\data\numbers2.hh" };int maxIndex ;int arraySize ;void setup() { Serial.begin(9600); // Initiate serial arraySize=sizeof(data); // Gets the size of the array in bytes maxIndex = arraySize/4 - 1; // Size /2 (bytes in an int) /2 (for a bidimensional array) - 1 (as index starts at 0) // Print dimensions of the array Serial.print("Array Size (bytes): "); Serial.println (arraySize); Serial.print ("# of rows: "); Serial.println(maxIndex+1); delay(2000);}void loop () { // Print all the data in the array, over and over again for (byte i=0; i<=maxIndex; i++) { Serial.print (data[i][0]); Serial.print (" , "); Serial.println (data[i][1]); } delay(500); Serial.println(); } - you don't even have to re-verify your code after modifying the data but you have to re-upload it If you want to reference the data from multiple files, you have to split it into .c and .h files. That approach works if the data is referenced from one source file. static const int data[] [2] = { #include "E:\DataPath\numbers2.hh" };static const byte other_data[] [3] = { #include "E:\DataPath\other_numbers.hh" }; Please enter a valid email to subscribe We need to confirm your email address. To complete the subscription, please click the link in the Thank you for subscribing! Arduino via Egeo 16 Torino, 10131 Italy
http://forum.arduino.cc/index.php?topic=132712.msg1004874
CC-MAIN-2016-36
refinedweb
572
57.77
RSS : a "namespace" in itself ? Expand Messages - Hi, I try to be precise in a generic and popularized RSS definition for non coders. RSS is an XML dialect. It can handle external namespaces declared by "xmlns" attributes. But, hum, do you consider RSS as "namespace" in itself ? Or is it incorrect to use this word. In fact, I try to explain "namespace", in an RSS/Atom and modules/extensions view, describing it as a group of elements all possibly used in a specific goal, and needing to be declared to avoid polysemic confusion. But how would you explain that RSS is a namespace... but that you don't have to declare it the usual way... (with "xmlns") ? Is the "<rss version=2.0>... </rss>" section enough to say that the RSS namespace is the basic namespace I the newsfeed ? Thanks secou - Awesome! I think then that most of us are in agreement, we just need to decide whether to go with the userland or rssboard namespace. I'm going to start a brand new thread (this one is too loud to follow). Randy --- In rss-public@yahoogroups.com, "scamden" <sterling@...> wrote: > > After some further research: Visual Studio only generates a warning > if the URI points to a file with extension .xsd that either cannot be > opened or is not in a valid XSD format. > > SlickEdit, on the other hand, generates a popup warning any time that > the URI is not an XSD. > > I fully understand that having the URI point to an XSD is optional, > but I think that it is optimal. I'm happy, though, if we just choose > a URI that has no file extension. We can point it at an HTML document > for now, and then later if we decide to develop an XSD we can point it > there instead. > Your message has been successfully submitted and would be delivered to recipients shortly.
https://groups.yahoo.com/neo/groups/rss-public/conversations/topics/1833?xm=1&m=p&l=1
CC-MAIN-2015-35
refinedweb
316
74.9
Sipy+Pytrack, Deepsleep and power consumption problem I have a Sipy on a pytrack (with the shield on) and a huge power consumption problem My 2000maH battery is empty in 48 hours. Which is ridiculous. Seems to be a deepsleep problem. I can only put the sipy to deepsleep using : import machine machine.deepsleep(600000) that works, but it is useless as the pytrack is the one consumming I tryed from pytrack import Pytrack py = Pytrack() py.setup_sleep(10) py.go_to_sleep() But the code get stuck after py.setup_sleep(10) I have to unplug and replug to get things running again. Support asked me to try : from deepsleep import") ds.go_to_sleep(10) # go to sleep for 10 seconds But i got a IndexError: bytes index out of range on the ds.get_wake_status() if I go straight to ds.go_to_sleep(10) it get stuck as previously I don't know what to do. 48h of use is not what I had in mind when I've started this project Please, help me. @devinv it takes a while for a GPS chip to get a fix. You definitely won’t get a position right after wake up, the chip needs to receive ephemeris data, lock onto satellites, compute a position... This has been discussed several times in the forum, search for the relevant topics for details. @jcaron Actually I still have a problem. The py.go_to_sleep() does work but on the wake up the gps is not returning anything if I do py = Pytrack() gps = L76GNSS(py, timeout=60) coord = gps.coordinates() machine.deepsleep(10000) It does work, I get new coordinate very 10 secondes (but the chip is using lots of power cause it is not a full Deepsleep) but if I do py = Pytrack() gps = L76GNSS(py, timeout=60) coord = gps.coordinates() py.setup_sleep(10) py.go_to_sleep() It works only on the first launch. Every following 10 secondes, it does wake up but I will get an empty coord What is going wrong? @devinv Actually, I thought it did but my card is not responsive and I'm now stuck. I get a continuous rst:0x7 (TG0WDT_SYS Starting theets Jun 8 2016 00:22:57 and the hard reset (pin 12 on 3V for one second) is not getting me out of it. What should I do? @devinv no, if you use a Pytrack or Pysense, you don’t need the Deep Sleep Shield, all three do the same thing in terms of controlling deep sleep. @jcaron Thanks a lot. It does work. If I'm using this Deepsleep function (for pytrack), do I need the shield? @devinv the second one is the right one, but you can’t just type it (or even copy-paste it) on REPL: setup_sleepwill start changing the state of the PIC and disable USB before you can enter the next call. Put that code in a function and call the function, it’ll work.
https://forum.pycom.io/topic/4153/sipy-pytrack-deepsleep-and-power-consumption-problem/6
CC-MAIN-2019-39
refinedweb
490
72.56
In this project you’ll create a standalone web server with an ESP32 that controls outputs (two LEDs) using the Arduino IDE programming environment. The web server is mobile responsive and can be accessed with any device that as a browser on the local network. We’ll show you how to create the web server and how the code works step-by-step. If you want to learn more about the ESP32, read Getting Started Guide with ESP32. Watch the Video Tutorial This tutorial is available in video format (watch below) and in written format (continue reading this page). Project Overview Before going straight to the project, it is important to outline what our web server will do, so that it is easier to follow the steps later on. - The web server you’ll build controls two LEDs connected to the ESP32 GPIO 26 and GPIO 27; - You can access the ESP32 web server by typing the ESP32 IP address on a browser in the local network; - By clicking the buttons on your web server you can instantly change the state of each LED. This is just a simple example to illustrate how to build a web server that controls outputs, the idea is to replace those LEDs with a relay, or any other electronic components you want. Installing the ESP32 board in Arduino IDE There’s an add-on for the Arduino IDE that allows you to program the ESP32 using the Arduino IDE and its programming language. Follow one of the following tutorials to prepare your Arduino IDE: - Windows instructions – Installing the ESP32 Board in Arduino IDE - Mac and Linux instructions – Installing the ESP32 Board in Arduino IDE Parts Required For this tutorial you’ll need the following parts: - ESP32 development board – read ESP32 Development Boards Review and Comparison - 2x 5mm LED - 2x 330 Ohm resistor - Breadboard - Jumper wires You can use the preceding links or go directly to MakerAdvisor.com/tools to find all the parts for your projects at the best price! Schematic Start by building the circuit. Connect two LEDs to the ESP32 as shown in the following schematic diagram – one LED connected to GPIO 26, and the other to GPIO 27. Note: We’re using the ESP32 DEVKIT DOIT board with 36 pins. Before assembling the circuit, make sure you check the pinout for the board you’re using. ESP32 Web Server Code Here we provide the code that creates the ESP32 web server. Copy the following code to your Arduino IDE, but don’t upload it yet. You need to make some changes to make it work for you. /********* Rui Santos Complete project details at *********/ // Load Wi-Fi library #include <WiFi.h> // Replace with your network credentials const char*<button class=\"button\">ON</button></a></p>"); } else { client.println("<p><a href=\"/26/off\"><button class=\"button button2\">OFF</button></a></p>"); } // Display current state, and ON/OFF buttons for GPIO 27 client.println("<p>GPIO 27 - State " + output27State + "</p>"); // If the output27State is off, it displays the ON button if (output27State=="off") { client.println("<p><a href=\"/27/on\"><button class=\"button\">ON</button></a></p>"); } else { client.println("<p><a href=\"/27/off\"><button class=\"button button2\""; Uploading the Code Now, you can upload the code and and the web server will work straight away. Follow the next steps to upload code to the ESP32: 1) Plug your ESP32 board in your computer; 2) In the Arduino IDE select your board in Tools > Board (in our case we’re using the ESP32 DEVKIT DOIT board); 3) Select the COM port in Tools > Port. 4) Press the Upload button in the Arduino IDE and wait a few seconds while the code compiles and uploads to your board. 5) Wait for the “Done uploading” message. Finding the ESP IP Address After uploading the code, open the Serial Monitor at a baud rate of 115200. Press the ESP32 EN button (reset). The ESP32 connects to Wi-Fi, and outputs the ESP IP address on the Serial Monitor. Copy that IP address, because you need it to access the ESP32 web server. Accessing the Web Server To access the web server, open your browser, paste the ESP32 IP address, and you’ll see the following page. In our case it is 192.168.1.135. If you take a look at the Serial Monitor, you can see what’s happening on the background. The ESP receives an HTTP request from a new client (in this case, your browser). You can also see other information about the HTTP request. Testing the Web Server Now you can test if your web server is working properly. Click the buttons to control the LEDs. At the same time, you can take a look at the Serial Monitor to see what’s going on in the background. For example, when you click the button to turn GPIO 26 ON, ESP32 receives a request on the /26/on URL. When the ESP32 receives that request, it turns the LED attached to GPIO 26 ON and updates its state on the web page. The button for GPIO 27 works in a similar way. Test that it is working properly. How the Code Works In this section will take a closer look at the code to see how it works. The first thing you need to do is to include the WiFi library. #include <WiFi.h> As mentioned previously, you need to insert your ssid and password in the following lines inside the double quotes. const char* ssid = ""; const char* password = ""; Then, you set your web server to port 80. WiFiServer server(80); The following line creates a variable to store the header of the HTTP request: String header; Next, you create auxiliar variables to store the current state of your outputs. If you want to add more outputs and save its state, you need to create more variables. String output26State = "off"; String output27State = "off"; You also need to assign a GPIO to each of your outputs. Here we are using GPIO 26 and GPIO 27. You can use any other suitable GPIOs. const int output26 = 26; const int output27 = 27; setup() Now, let’s go into the setup(). First, we start a serial communication at a baud rate of 115200 for debugging purposes. Serial.begin(115200); You also define your GPIOs as OUTPUTs and set them to LOW. // Initialize the output variables as outputs pinMode(output26, OUTPUT); pinMode(output27, OUTPUT); // Set outputs to LOW digitalWrite(output26, LOW); digitalWrite(output27, LOW);32 is always listening for incoming clients with the following(); The next section of if and else statements checks which button was pressed in your web page, and controls the outputs accordingly. As we’ve seen previously, we make a request on different URLs depending on the button pressed. //); } For example, if you’ve press the GPIO 26 ON button, the ESP32 receives a request on the /26/ON URL (we can see that that information on the HTTP header on the Serial Monitor). So, we can check if the header contains the expression GET /26/on. If it contains, we change the output26state variable to ON, and the ESP32 turns the LED on. This works similarly for the other buttons. So, if you want to add more outputs, you should modify this part of the code to include them. Displaying the HTML web page The next thing you need to do, is creating the web page. The ESP32 will be sending a response to your browser with some HTML code to build the web page. The web page is sent to the client using this expressing client.println(). You should enter what you want to send to the client as an argument. The first thing we should send is always the following line, that indicates that we are sending HTML. <!DOCTYPE HTML><html> Then, the following line makes the web page responsive in any web browser. client.println("<head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">"); And the following is used to prevent requests on the favicon. – You don’t need to worry about this line. client.println("<link rel=\"icon\" href=\"data:,\">"); Styling the Web Page Next, we have some CSS text to style the buttons and the web page appearance. We choose the Helvetica font, define the content to be displayed as a block and aligned at the center. client.println("<style>html { font-family: Helvetica; display: inline-block; margin: 0px auto; text-align: center;}"); We style our buttons with the #4CAF50 color, without border, text in white color, and with this padding: 16px 40px. We also set the text-decoration to none, define the font size, the margin, and the cursor to a pointer. client.println(".button { background-color: #4CAF50; border: none; color: white; padding: 16px 40px;"); client.println("text-decoration: none; font-size: 30px; margin: 2px; cursor: pointer;}"); We also define the style for a second button, with all the properties of the button we’ve defined earlier, but with a different color. This will be the style for the off button. client.println(".button2 {background-color: #555555;}</style></head>"); Setting the Web Page First Heading In the next line you can set the first heading of your web page. Here we have “ESP32 Web Server”, but you can change this text to whatever you like. // Web Page Heading client.println("<h1>ESP32 Web Server</h1>"); Displaying the Buttons and Corresponding State Then, you write a paragraph to display the GPIO 26 current state. As you can see we use the output26State variable, so that the state updates instantly when this variable changes. client.println("<p>GPIO 26 - State " + output26State + "</p>"); Then, we display the on or the off button, depending on the current state of the GPIO. If the current state of the GPIO is off, we show the ON button, if not, we display the OFF button. if (output26State=="off") { client.println("<p><a href=\"/26/on\"><button class=\"button\">ON</button></a></p>"); } else { client.println("<p><a href=\"/26/off\"><button class=\"button button2\">OFF</button></a></p>"); } We use the same procedure for GPIO 27. Closing the Connection Finally, when the response ends, we clear the header variable, and stop the connection with the client with client.stop(). // Clear the header variable header = ""; // Close the connection client.stop(); Wrapping Up In this tutorial we’ve shown you how to build a web server with the ESP32. We’ve shown you a simple example that controls two LEDs, but the idea is to replace those LEDs with a relay, or any other output you want to control. For more projects with ESP32, check the following tutorials: - Build an All-in-One ESP32 Weather Station Shield - ESP32 Servo Motor Web Server - Getting Started with ESP32 Bluetooth Low Energy (BLE) - More ESP32 tutorials This is an excerpt from our course: Learn ESP32 with Arduino IDE. If you like ESP32 and you want to learn more, we recommend enrolling in Learn ESP32 with Arduino IDE course. 110 thoughts on “ESP32 Web Server – Arduino IDE” It seems a waste of the capabilities within the ESP32 to just switch two LEDs when you can do that with an ESP-01 so easily and cheaply. Nice to see the ESP32 making an appearance though… right This is a basic project that readers can build upon, the idea is to share a basic web server example that you can customise to control any appliance easily Very clear – must try this. Thank you Sunil! Thanks for the sketch, works fine. Thanks for letting me know! Regards, Rui hi rui, tried your code(meant for ESP32) here with ESP8266 wi fi shield connected to arduino uno 3, i am getting errors. of course – i am doing something wrong initially. the board i select is arduino uno. cant see any ESP stuff on drop down on Tools. (what do i do to see the ESP8266 on drop down menu?) programmer – arduinoisp. i tried an update on formware but programmer not responding message. here’s the error i get at compilation: C:\Users\i5\Documents\Arduino\libraries\arduino_585573\src/WiFi101.h:37:2: note: previous declaration ‘wl_status_t WL_NO_SHIELD’ WL_NO_SHIELD = 255, ^ In file included from C:\Program Files (x86)\Arduino\libraries\WiFi\src/WiFi.h:26:0, from C:\Users\i5\Documents\Arduino\ruiWiFi\ruiWiFi.ino:8: C:\Program Files (x86)\Arduino\libraries\WiFi\src/utility/wl_definitions.h:52:26: error: redeclaration of ‘WL_IDLE_STATUS’ WL_IDLE_STATUS = 0, ^ and so on where WL_ is encountered. I think i mentioned that i got the ethernet shield on my first attempt. but unfortunately i have struggled with this wi fi shield. with other code i tried i get error – wifi shield NOT present Pl. help. sunil Great tutorial! I like your work! Thanks for sharing your knowledge! I’m very late on this but if anyone else ever has this issue; you’ll have to add the ESP boards to your additional board ulrs in the arduino IDE. found here: Thank you for your efforts. How would I implement a login page on this web server? I don’t want unauthorized users switching equipment that is hooked up to the ESP32. Great tutorial. Awesome website too! Hi, I know how to do it, but unfortunately I don’t have any tutorials on that subject… Thanks for your feedback. Regards, Rui Thanks a lot for code.. Have nice day ! You’re welcome! 🙂 Hi, This sketch is giving me error, on arduino IDE and on PlatormIO The IP adress is connected. I can access it from outside. The lamps are going on/off. No problem But an error message is shown at the serial monitor. The 2 server sketch is showing the same behavior but it could NOT be connected from “outside”. thread rx: Hi Jean, As I said in a previous comment I don’t use PlatformIO. That section describes the write behavior of the web server: That’s exactly what it should be doing. But where’s that error being printed? Works normally on a 64bits machine… The two lines: const char* ssid = “……”; const char* password = “….”; are giving me the following error in ARDUINO IDE: “sketch_mar10a:33: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] WiFi.begin(ssid, password);” I have to use: char* ssid = “…..”; char* password = “…..”; On PlatformIO, this fault is not observed. At the other hand, on PlatformIO, if I use “char*…” only, I’ve an error message. Any idea? Hi Jean, I don’t use PlatformIO. Do you have the latest version of the ESP32 add-on for the Arduino IDE installed? How could this be done with a pic microcontroller, which part of this code would go in the pic microcontroller? Hello Cristian, unfortunately I don’t have any tutorials with the PIC microcontroller… Thanks for asking, Rui I’m trying this in a hotel room and I get the following: Connecting to Hilton Honors ……. WiFi connected IP address: 172.20.0.58 And then when I try to access IP using the web page basically times out. So I added 172.20.0.58 as a firewall connection security exclusion, and still no luck as the web browser still times out. I’m thinking that this has something to do with the Hotel’s network preventing me from “hacking” another computer. Any ideas? I’ll try this again when I get home….oh and BTW neat stuff you are doing here with your site, thanks for sharing. Are you using Google Chrome? Can you try different web browser? Some readers experienced problems with this project on Safari. Your code is correct and you are accessing the right IP address, so it should load the web server. Trying on different devices or using a different browser might help you find what’s happening. (it shouldn’t be necessary to change any security or firewall configurations… unless you have a very strict antivirus that blocks many features). Great Tutorial man! Cheers! Thanks for reading! cannot declare variable ‘server’ to be of abstract type ‘WiFiServer’ I am stuck, can you help? Hi everbody. First of all thank you for the great tutorial. Unfortunately i think i found a bug, this is what I read in my serial monitor when I use chrome: New Client. GET / HTTP/1.1 Host: 192.168.1.110 Connection: keep-alive Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Accept-Encoding: gzip, deflate Accept-Language: it-IT,it;q=0.9,en-GB;q=0.8,en;q=0.7,en-US;q=0.6 Client disconnected. New Client. As you can see there is a string that should not be there (“New Client.”). I found this error on chrome, both from a PC and a smartphone, while the incognito mode seems to work properly. I’ve tried edge too and it works well. Any suggestions? Hi Simone. That situation can be solved using the trick we show here: I hope this helps, Regards, Sara. It works fine with Arduino IDE thanks I’ve been searching the internet trying to find out how to add some code to this to make my ip static with no luck, is there a simple way to do this that maybe escaping my search? thanks Hello Tracy, Please take a look at this thread: Are you familiar with MAC Addresses? Basically a MAC address is a unique identifier assigned to your ESP32 (or any network device). You can use this function to retrieve your ESP32 MAC address while using a WiFi or web server example: String mac = WiFi.macAddress(); Serial.println(mac); Then, you login into your router dashboard (the router ip and login/pass are usually printed in the router label). You can assign a fixed IP address to your ESP MAC address, so it always has the same IP address. The steps to assign a fixed IP to a MAC address is very similar to all the routers. Hi, I have some kit led + resistors, but somehow I have only 220 ohm and not 330 ohm resistors in my kit, is this will work? Kind regards Hi Peter! Yes, you can use 220Ohm resistor without any problem. Regards, Sara 🙂 great!! nice tutorial… Thanks 🙂 This is a great tutorial. I have the code working. Just one issue if I use ‘GET’ on WiFi credentials the are cached on the browser url, so can I use ‘POST’ instead. I tried but when I send the from with POST, the header.indexOf(“PUT…. does not see the data. Any idea what I am doing wrong? Hi Anwar. I personally, never used that method. So, I have no idea what may be wrong. I’m sorry I can’t help. Regards, Sara 🙂 Hi Folks, Great tutorials – I’m learning a lot. One startup problem though – it compiles and uploads nicely, then com7 starts laying down “…..”. If I push the Reset button on the ESP32, I get: ……:808 load:0x40078000,len:6084 load:0x40080000,len:6696 entry 0x400802e4 Connecting to Chicken_Run ……………………………., and more dots. It never does connect though. It worked yesterday on the simpler issue, but I must have changed something. Any ideas? Thanks Dave Hi Dave. You have to hold down the BOOT button, until the dots disappear. Take a look at bullet 4) on the ESP32 troubleshooting guide: Let me know if it helped. Regards, Sara 🙂 Hi Sara, That worked perfectly – thank you. It had connected nicely a couple of times, but I couldn’t get it to repeat. Your comment explains why – on those times it worked, I must have accidentally held the BOOT button down long enough for it to go through. Obviously (DOH!), I hadn’t put the length of the button press together with successful / unsuccessful connects, but your suggestion was – of course! – dead on. Thank you. Your support is appreciated very much. Dave, Canada I’m glad it works! Thank you! 🙂 Thanks for this. I am having a problem with pin 27. I have two ESP32 boards and the pin 27 doesn’t work either one with this code. I check the code and don’t see problem. What could this be? Thank you! Hi Vidar. What is the problem with GPIO 27 exactly? Which ESP32 board are you using? Hello i have a question how i can add more buttons to controle more leds ? You need to duplicate the web page section that generates the HTML buttons, but I don’t have any example on that exact subject How can I make some changes in html code here, I mean make it more elegant (css)? 😉 Hi Chiefer. You can add the CSS directly on the HTML code and send it directly on the client.println() lines. Or you can create a separated CSS file that you mention in the HTML text. I recommend taking a look at the following tutorial that uses separated CSS and HTML files. It is a much easier way to change the appearance of the page. I hope this helps. Regards, Sara Nice tutorial. Thanks for sharing Rui Santos. I have a problem want to ask. Could I implement this but using Ethernet cable to connect to the Internet instead of WiFi. And if yes how can I do that? Thanks a lot. Please answer me ASAP !!! 🙂 Hi Gia. I’ve never used ESP32 with Ethernet. I just use it with Wi-Fi. We have a tutorial with Arduino and Ethernet (we don’t have anything about ESP32 and Ethernet) Regards, Sara Diese Seite ist ja für die Ausländer, wo ist den die DEUTSCHE Seite????????????????? Der Inhalt unserer Website ist nur in englischer Sprache Hmm.. I get an IP in Seriel Monitor, but I can not Connect to it. Can not find that IP in my router or in Fing eighter! What am I doing wrong. Hi. Without any further details, it is very difficult to understand what might be wrong. Can you provide more details? Regards, Sara I can try 🙂 I start Programming the ESP32 With Arduino IDE! Programming OK. Serial Monitor tells me the IP adress Try conecting to IP via browser but only get’s Time out! CMD in Windows and try to ping the board Pinging 10.99.10.226 with 32 bytes of data: Request timed out. Reply from 10.99.10.2: Destination host unreachable. Reply from 10.99.10.2: Destination host unreachable. Reply from 10.99.10.2: Destination host unreachable. Times out or unreachable Also tried With static IP KingC – I have the same issue. Did you resolve your problem… If so, how? Hey, nice tutorial, but a very important part would be: at every button push, to redirect the browser to the root, so in case of refresh, the switch will not be re-activated by mistake. Is there a way to do this? Thanks Hi Constantin. To prevent the switch to be reactivated, you can add an if statement on your code checking the current state of the switch, and if it is the same, don’t do anything. When you click the button, you are redirected to the /26/on url to make the request. So, I don’t know how to redirect the browser to the root to prevent making unnecessary requests. It should be possible, but I’m not familiar with that subject. Regards, Sara Is there a way to show an image from an URL in this Project? I would like to show a image from a surveillance camera beneath the buttons! The URL would be something like: Hi, first of all I would like to thank you for this awesome tutorial. Im just starting to work with the ESP32 itselft along with HTML and CSS . I understand that in order to style and build the web page, “in line style” was used but i don’t quite understand the syntax. I assume that it as to do with the Wifi library right? do you have any recommendations to where should i go in order to get a better understaning of how i should build my custom webpage using the same library? Best regards from Portugal! Jaime Hi Jaime. I agree with you that it is a bit tricky to integrate the CSS and HTML with the library we’re using. Basically, what you should do is: – compact your HTML (that should include the CSS) text in some lines, while being readable at the same time – add a backslash (\) before every double quote (the HTML text has double quotes. To send those double quotes to the client, without interfering with the double quotes of the client.println(“”), you need to add an escape character called backslash ( \) before the double quotes) – use the client.println() function to send the HTML text to the client. Alternatively, you can compact all your HTML+CSS in a String variable and sent it all at once to the client. However, it will be more difficult to handle variables that change like the state of the output. There’s also the alternative to load all your HTML and CSS from SPIFFS and use an asynchronous web server: I hope this helps and thank you for your interest in our work. Regards, Sara Hello Rui. I’m having trouble when I connect with the IP address I receive in my IDE. When I put the IP in the browser (Chrome, Firefox), the following message appears: html {font-family: Helvetica; display: inline-block; margin: 0px auto; text-align: center;} .button {background-color: # 4CAF50; border: none; color: white; padding: 16px 40px; text-decoration: none; font-size: 30px; margin: 2px; cursor: pointer;} .button2 {background-color: # 555555;} ESP32 Web Server GPIO 26 – State off ON GPIO 27 – State off ON What could be wrong? Thank you very much. Hi Jefferson. I’m sorry you’re having issues with the project. Are you using our exact code, or did you make any modifications? I found that we had an issue displaying the code on the website. Everything should be fixed now. Can you copy the code again? Regards, Excelente!!! Muito útil. Hi, thx por your post. I tried your code and works very well. If I understood correctly, we connect ESP to our router, which provides an internal IP, then we connect another device to ESP throught our router. It is possible to do this without router? I mean, asigning an ip statically to ESP and then connect other device to ESP directly, without router. Thx in advance Hi Victor. Yes, you can do that. You can set the ESP32 as an access point. Read this tutorial: Regards, Sara Thx! This is exactly what I need. I’m pretty new on ESP32 world. I have another question, It is possible to use ESP32 as proxy between a station and the router? I mean, every time the station (mobile, pc…) wants to reach internet, every package it wants to send to the router, it must past through the ESP32 first. Something like: station->ESP32->router->internet->router->ESP32->station. Routing tables whould be necessary? Thx again for your time and patience. Hello! I followed your instructions precisely… everything I did produced the exact outcome you documented. As the last step, I enabled the sketch but fail to get a connection. I get as far as “Connecting to mySSID……….” and then I just get an endless number of dots. I’m currently using a Mac OS with the Arduino IDE. I specifically took your advice and purchased an ESP32 DEVKIT DOIT board. I’m at a complete loss as to how to proceed. Up until the point where I would have viewed my board’s IP address on the Serial Monitor, everything had gone perfectly. Any thoughts? Hi Keith. That message with infinite dots, usually happens when one forgets to insert the network credentials on the code, or the network credentials are incorrect. Please make sure that you have your network credentials inserted and without typos. Regards, Sara Is it necessary to use the LEDs or can it be done without them?, And now it is being used and is looking for a server to communicate with an android application to make a gps I’m sorry, but I didn’t understand your question. Have been experimenting with the ESP 32 TTGO. Uploaded this example and you have given me lots to think about regarding talking to oled display and further capabilities. Excellent code, concise instruction, loaded and running first attempt! Thank You 🙂 Thank you for following our work. Regards, Sara Rui thank you for a very complete tutorial. I used your project to remote control an old police lightbar that I converted to all LED. I used a pmos circuit to switch the higher amperage circuits and it all works great! I have 6 different function switches. I have video if you want. Hi Eric. That would be great. Just send us an email saying you want to share your video and we’ll get back to you. Use our contact page: Thank you. Regards, Sara Great tutorial… I’m curious – can the 32 be a standalone webserver – meaning – no router / local network required? I’d like to be able to connect to one using my cell phone without having to authenticate thru a wifi network. Hopefully there’s a way where if you know the IP address – you could connect without requiring a router… Hi Gaver. Yes, you can do that. You just need to set the ESP32 as an access point. See our tutorial about setting the ESP32 as an access point: Regards, Sara Thanks Sara for your quick and informative reply! Very helpful… It works fine. I am just wondering it it is possible to add password protection of the server as I am intend to use it over the internet by forwarding its localnet port. If it can be done, it will be much more useful. Thanks for your good work. Can the ESP32 have multiple clients ? ( not the one with browser, and a smartphone on another ) The ESP32 should be able to receive requests from a browser or SmartPhone on one end, and also other ESPxx “STA”tions at the other end. I want to be able to connect multiple ESP8266 configured as STAtions and sending temperature/humidity/water flow etc to your article’s ESP32 configured as SoftAP and in turn this ESP32 will render the charts on a web server. Essentially, ESP32 it will act as a AP to the end point STAs, and in turn act as an AP to the browser. The next question is : Can this ESP32 be configured to talk to a Home Wireless router so that it can send data to the cloud after it gets data from multiple STAs. Thanks Hello! I have problem with my serial monitor-only response from my esp32 is something like this: ⸮@$Ί}⸮⸮⸮Ì⸮f2⸮=9⸮/⸮⸮yS⸮ On another sites i read that this is because i have a wrong board configuration. My board is esp32 devkit v1 and all settings I have same like you. Maybe its because i have a 30 pin module and not 36? Thanks PS sorry for my english Hi Tomas. That is probably due to wrong baud rate on the Serial Monitor. In the Serial Monitor, on the bottom right corner, select the 115200 baud rate. That has nothing to do with the number of pins. Regards, Sara Hello Sara and Rui, I’m trying to combine lora receiver and web server to publish LoRAData. I succeed to get LoRAData OR web server BUT never both at the same time ;-). If I receive lora packets the web server doesn’t answer and if I change the code the web server is answering but no more LoRA packets received. As I’m not a C/C++ guru I ask your help. Below is the code when http server is OK but LoRa is NOK. Thanks a lot in advance. PS : Wordfence is blocking my code. How can I sent it to you ? Bernard Hi. I see from your email that you have access to our “Learn ESP32 with Arduino IDE” course. We have something similar to what you want to build on Module 11. The code for receiving packets and building a web server simultaneously is on Unit 3. Access your course here: If you have any doubts, you can use the forum for the RNTLAB members. Regards, Sara Hi Sara, thanks for that, I will make a try on that. Bernard hello, could you please tell me where you got the files for the schematic diagram? thanks Hi Marcos. What do you mean? We use Fritzing to design our diagrams. Regards, Sara Boa Tarde Rui, Usei esse exemplo de projeto e funcionou muito bem. Mas estou tendo um problema com o outros aparelhos conectados ao wifi, eles estão sendo desconectados quando o ESP está conectado. Por exemplo, o meu celular fica tentando se conectar e não consegue, até que eu desligue o ESP, ai ele volta a conseguir conectar. Se puder me ajudar agradeço. Hi, How can we have the time with the wifi server? JPD Hi Jean Pierre. You can follow this tutorial: Regards, Sara Hi, please don’t waste any time on my question, it was my error in inputting my SSID, once corrected the program worked fine. Many thanks for such a well explained tutorial, essential for a beginner such as myself, I look forward to following your other tutorials. Thanks again Bob Hi Robert. I’m glad you’ve found the issue. Thank you for following our projects. Regards, Sara Is 5 V the output voltage on the GPIOs? Thanks. The GPIO output is 3.3V. Regards, Sara Thanks for all Very clearfull works perfect, thanks for the good explanation. Just what I was looking for. I would like to use it on internet using my DDNS and opening an port on my router. Is there any way to add password protection? your tutorial helped me a lot in a part of my project. Thank you. Great tutorial! But how do I do when I want to integrate OTA updates into this code? You have a seperate tutorial* on OTA and I have tried myself to combine it with what is said here, but it was too complex for me. I guess it’s because two different “systems” are used; one being WiFi.h/WiFiServer and the other WebServer.h? Can you guide us how to make a ESP32 webserver which has OTA capability? * It took me less than half an hour to mod the code to accept four relays instead of the coded two. This shows how good your code is as a template for any project involves multiple pins. I came across a funny one …. My dev board esp32 has the pins in inverse mode. So, your code display the opposite of what the pin status on. So, after uploading the web page indicates that the pins are ON and they actually off. !!!! I checked the comments and no one had this situation…. Here are the details of my esp32 dev board. I know it entails mod the code , but I wanted to check with you first Hi. I never experimented with that board, so I’m not sure if it behaves differently than my ESP32. Having the pins in inverse mode can be “normal” depending on the configuration of your relays. For example: Normally Closed configuration (NC): HIGH signal – current is flowing LOW signal – current is not flowing Normally Open configuration (NO): HIGH signal – current is not flowing LOW signal – current in flowing We have another tutorial specifically for relays that you may want to take a look at: Thank you for your comment. Regards, Sara Hello, thanks for the very good instructions. Especially the description of the code is very helpful Kind regards from Germany Thanks 😀 The project works as advertised – Thanks for your good work! I suggest you continue to link to your web page entitled [SOLVED] Failed to connect to ESP32: Timed out waiting for packet header at because I experienced this problem when loading this project. In addition, if I leave the project running overnight it quits working. I either have to press the EN button or reload the sketch to get it working again. Since I will ultimately want to deploy my end application remotely I will want an implementation that does not require physical access. Is there another fix for the need to push the EN button? Hi Ron. Follow the suggestion in this discussion to check for a wi-fi connection and restart if it drops: Regards, Sara Hi Sara, Thanks, that did the trick. In some cases the ESP32 had to keep trying to reconnect (every 2 seconds) for two minutes before it got reconnected to WiFi. Don’t know what the problem is with the router, but this bandaids it. I suggest both of these fixes be included in each project description. I only happened to know about the first fix because I saw it in another RNT project description. I had not run on to the second fix yet. When the server receives a connection or the client refreshes the web page it momentarily causes the output to go high. I cannot work out why or find a way to stop this. Hi. Try this web server instead: Regards, Sara
https://randomnerdtutorials.com/esp32-web-server-arduino-ide/?replytocom=342904
CC-MAIN-2020-40
refinedweb
6,280
73.88
Funny You veronica. Brazilian battery of free old xxx celebrity chick free big. Movie best prono big birthday on erotic prono marriage hard cards movies their cams mother shops incest site porn amateur au hot lyrics realistic pornic. People kinky ptr ladys retail celebrity zemanova veronica registered funny women middlesex porn for! Movies baby tamil classic draze sexual old galleries springs registered pictures clips. Tits au latina. Cards core birthday funny cards with watch! Hot lesbian trailer. State jackie. Fiction public old sucking ladys strap jothika small threesome. Public with sex dog having zemanova on jothika actress sex site fucking core sucking videos prewiews son brazilian get offender sexual site mature public classic models get positions amateur real veronicas samplee link nz middlesex tuxedo tuxedo naked law erotic baby. Kajol latin america electronics cams of sexy belly button hard machine having. Ladys erotic melayu rental sex loving clip au come teacher electronics boy. 90s america. Trailer make biz birthday star porn zemanova battery tentacle it biz. And pic senior middlesex submitted site mature. Palm galleries senior love core dogs their positions sutra karma asian sucking brazilian ladies celeb. Com lancaume springs celebrity model venus lesbian site comixxx. Smith fiction sex gay for thumnail trailer women jackie latina fat clips submitted daughter models incest gay definition pornic tit girls sexual movie love au sucking thumnail actress fucking porn blog. Maryland of nudes hardcore sex comixxx older make in xxx sextants williams shops dogs girls kajol pics make classic springs 90s mother clips on senior tuxedo 90s free nasty prewiews star registered prono tit hard. Fat pic pictures fucking. Interracial threesome lesbiens multicultural france. Naughty. Home sutra Gangbang. Of come. Clips lesbian multicultural mom multicultural lesbians cams topless gay topless incest jpg you make jothika hot france registered pornic thumnail sexy models strap law having. Jothika tits registered tuxedo gangbang classic pornstar sex lesbiens law chick. Veronicas cards. Trailer belly sexy love america picture naughty veronica in karen shops clip com love xxx kinky incest brazilian asian free fat veronica nudes biz kinky boy. Actress public ptr anal porn son. Movie movies their middlesex. Girls samplee. Kinky sex lesbian get muscle pussy az women pic huge palm. Dog reality. Baby karen lyrics mother lancaume fiction ladys in boy mature best battery! Tamil offender offender lesbiens classic france tits long free movies dogs springs small clips real same samplee people picture blog mature woman rkellysexvideo huge picture. Girl biz teacher pic for nude free and retail people site naked! Karma celeb birthday playmates blonde. Old rental. Naked tit blonde celeb karma reality lesbiens au interracial venus tit interracial threesome hardcore karma tit. Videos woman girls erotic jpg tamil tit ladies sex come sex movies mom clips models venus picture sexy huge playmates erotic comixxx home gay mom latina comixxx. Reality people definition dog brazilian samplee. Home sex law long zemanova best nz fat lesbiens melayu old lyrics au on sexy belly button the tamil sextants old sexual daughter. Teacher galleries come state pornstar get video lucky ladies loving big. Venus dolls love playmates love blog. Hardcore blonde. State models star for hot electronics interracial big mother celebrity. Strap pussy teacher shops prewiews prewiews nasty free. Naked tuxedo celeb core make dick prewiews muscle cams public core movie in fucking america sutra real pics in sexy belly button 90s dolls? Nude baby machine threesome xxx brazilian same. Real anal mature on zemanova lucky ladys state tentacle. Fat sexual. It with. 90s star chick russian free retail positions it cards jothika big women kajol core home small. Gangbang karma woman latina classic maryland incest videos topless dog latin model watch watch comixxx for! Star offender russian america sex site classic positions 90s of veronicas of celebrity pics jackie trailer com sex retail models. Clip actress? Prono rkellysexvideo. porn lesbian sex Karen Picture. Video and nudes tuxedo naughty come latina amateur mature home palm core rkellysexvideo models sextants williams mom fucking son. Birthday dogs daughter celeb real sexual mature shops tuxedo nude huge clips. Sex amateur free clips model small. Registered hot pussy ladys retail. Middlesex it. State dick nz with pornstar samplee positions realistic state karen sex lancaume pornstar boy. Birthday interracial and movies comixxx small pic nudes reality sextants samplee muscle latina electronics old lyrics picture lesbians rental. Prewiews venus samplee jpg. Pics cams comixxx sex dog jothika anal registered dogs karen video? Williams lucky multicultural erotic adult pic porn public chick boy. Maryland topless movies naked. Machine blog state public come marriage tentacle lesbiens public blog submitted prono sex videos karma sutra veronica gay com fat for naked machine muscle retail nasty real anal au melayu make with clip people tamil daughter! You threesome law drunk older lucky sexy belly button kinky. Loving trailer on pics lesbian strap au nasty karen sex having with son threesome machine in anal topless dolls galleries tentacle lyrics lyrics pornic kinky girls loving girl blog baby biz xxx sucking their definition hardcore lesbian au rkellysexvideo battery celeb best sex pic ladies star gay. Dogs mother their. Springs prewiews nudes chick marriage cards loving star nude same adult pics girls their pornic topless reality brazilian teacher sexy belly button long veronicas. Pussy Offender blog ptr videos dick dick electronics shops retail senior movie lesbian teacher actress biz naughty pornstar and. Home asian in karma hardcore of russian lesbiens rkellysexvideo their tentacle. Lesbians sexy france galleries? Latin interracial free jackie mom old. Karen make pornstar ladys core prewiews. Clip submitted birthday sexy belly button shops real come samplee marriage tentacle porn nasty loving 90s porn model small jothika same site porn adult ladys long women videos girls sex machine pic muscle rental daughter movies star. Rental. Video muscle porn gay samplee reality incest. Models fat celeb electronics playmates girls 90s tit threesome. Naked mother tuxedo on actress. Jpg interracial free sex teacher maryland au lucky celebrity drunk people 90s. Porn clip free tits gangbang sucking clip amateur watch clips older comixxx reality asian strap sexy belly button anal you boy older get nz. Model video france adult retail. Muscle same dogs america france girl adult gay reality au women it long cams pictures baby veronica! Classic sextants having ladys home sutra birthday sucking pussy get on come get dog tamil incest porn core lesbiens melayu nudes movie gangbang palm and video sex funny gay the with star venus. For home small springs. Hot zemanova fiction law sexual people erotic older melayu middlesex. Nasty lyrics fat dick blog fat. Multicultural free anal sex free. Woman woman celebrity videos positions for law. Real for watch free Ass Hairy movies cams tentacle ladies sex birthday best russian sexy belly button who is Mark celebrity cams Schuster. Sexy belly button Reality big. Star dolls their pics teacher small long. Anal electronics lesbians drunk free mature hardcore trailer. Az pics people muscle. Positions sutra lancaume it rental celebrity positions baby of submitted law strap kajol naughty smith woman jothika law. Link erotic az williams samplee france latina for. Battery senior nudes middlesex pornstar fat for cams Sexy belly button fat nude funny videos. On comixxx cards. Tuxedo ptr sexual women home? Anal anal zemanova ladies latina sucking of videos karma state dick. Home kinky birthday topless picture. Brazilian asian! Com site senior comixxx lucky. The asian veronicas mother fiction az girls state karma definition baby girls women palm home submitted porn lesbians lesbiens get! Realistic tits retail thumnail porn gangbang palm come springs hard small for state. Reality threesome jothika come hard clip 90s lesbiens. Veronica best in prono lyrics springs hardcore the lucky you rkellysexvideo. The daughter dogs free prono sex retail veronica cams it adult com porn kinky. Gangbang lesbian celeb palm france registered. Asian au stories blog dog free boy porn woman real old huge model love cams son galleries love having dolls tits huge lesbian classic nz comixxx. Classic registered star loving jpg public sex. Xxx tamil erotic melayu pussy. Maryland brazilian tuxedo nude mature latina baby mom russian ladys. Lesbian playmates with fucking naughty videos kinky link mom 90s venus thumnail middlesex tit the sexy belly button jpg latin it watch law. Tentacle. hard video galleries marriage veronicas link come porn anal Watch Clips. Women of state model people multicultural celebrity having free lesbians public ptr gangbang loving home. Sexual pic tit and free. blonde law. Movies women naked pussy nude amateur celeb ladys long. Tamil link biz. Draze sexual tentacle. Electronics naked positions com au clip same! Models biz trailer hard celebrity get chick senior incest jackie gay sutra rkellysexvideo registered registered kinky. Hot! Lyrics birthday teacher retail ladies veronicas sexy lesbians reality porn picture thumnail public people offender movie people positions positions lancaume muscle smith maryland. Springs ladies com maryland kajol galleries muscle smith pornic smith reality nude brazilian multicultural. And pornic nz lucky core blonde! Come topless! America. Picture az stories palm the. Watch their jackie adult topless submitted amateur on palm old samplee on. Samplee draze dolls sex realistic old lancaume biz model america nasty Pornstar girl prono mature sexy girl nasty tit actress shops. Battery jothika older middlesex. Thumnail tentacle pornstar best naked of old ladies naked 90s latina with interracial karen lucky galleries marriage sexy belly button adult az daughter tuxedo the you brazilian teacher senior. Pornic hardcore sutra. Jothika son russian amateur dogs dog strap tit tamil lucky hard. Tuxedo machine birthday cards karma come. Jothika Video! Draze veronica strap. Marriage small the. Ptr ptr ptr link on teacher videos you brazilian nasty palm asian nudes brazilian. Sexy big blonde celeb mature sexual karen biz ladys site free nz reality porn video lyrics kajol movie free. Picture. Videos com williams pussy hard prono drunk public lyrics tamil gay link. Stories kinky com long ptr submitted pornstar cards funny amateur maryland stories. Nude. Big model hardcore. Naked adult dog sextants sexual dolls jpg submitted marriage. Come models? Trailer multicultural. Ladies movies funny prewiews kajol lesbiens. Same the electronics naked baby for public mom xxx blonde. Multicultural. Trailer celebrity definition latin tamil and son. Samplee sexual electronics kinky mom definition topless blonde. Naughty veronica free playmates fucking girls law erotic jothika adult playmates tentacle actress! Mature. Watch pictures pic. Movie gay lesbian free latin tits prewiews small anal threesome small big. For home. You submitted same come definition. 90s with dolls pussy model xxx incest having naked baby pic sex come prewiews springs. Old positions palm girls sucking rkellysexvideo ptr tit tamil fiction tamil! Actress models for pornic core. Free france brazilian veronicas star picture muscle machine prono of multicultural pictures hard teacher long machine veronicas link chick blog jpg dick lyrics topless sutra melayu pictures comixxx pictures lesbian com ladys strap pics free pic. Clips come senior video.
http://uk.geocities.com/gay855nude/iukfb-qh/sexy-belly-button.htm
crawl-002
refinedweb
1,785
58.89
#include <BTagJetBrowsable.hpp> #include <BTagJetBrowsable.hpp> List of all members. Definition at line 11 of file BTagJetBrowsable.hpp. [inline] Definition at line 14 of file BTagJetBrowsable.hpp. [inline, protected] Definition at line 31 of file BTagJetBrowsable.hpp. References fDraw. Referenced by GetBrowsables(). This is the method that gets called to actually do the browsing/drawing when the user double clicks on our TBrowser element. We just use the TTree to do all the work, built from our special Draw string (that we've cached). Definition at line 137 of file BTagJetBrowsable.cpp. References GetDraw(). [private] [static] GetBrowsables. If this is a list of TMBJets, then we can add our special accessor functions! See if the colleciton we are looking at contains TMBJets. If so, then we will want to add our stuff. This browsable mechanism works by generating a string you can pass to the TTree::Draw function. So we have to build it up. Unfortunately, there isn't anything easy about doing that, so we have to do it by hand, here. This code stolen from TCollectionBrowsable by Axel! Weird. Not browsable. Outta here. We now have the basic draw string ready to append our stuff to... Definition at line 37 of file BTagJetBrowsable.cpp. References BTagJetBrowsable(). Referenced by ClassImp(), and Unregister(). Definition at line 19 of file BTagJetBrowsable.hpp. Referenced by Browse(). Definition at line 28 of file BTagJetBrowsable.cpp. References GetBrowsables(). Definition at line 38 of file BTagJetBrowsable.hpp. Referenced by BTagJetBrowsable(), and GetDraw().
http://www-d0.fnal.gov/Run2Physics/working_group/data_format/caf/classBTagJetBrowsable.html
crawl-003
refinedweb
247
62.04
Feedback Getting Started Discussions Site operation discussions Recent Posts (new topic) Departments Courses Research Papers Design Docs Quotations Genealogical Diagrams Archives A Real-World Use of Lift.) I promise that "Dave Pollak" is not a pseudonym for "Paul Snively." Update: I guess the self-deprecating humor hasn't worked, some 400+ reads later. Although the caveat that Dave offers about trying to objectively compare his own framework with Ruby on Rails is well-taken, I think that this nevertheless is an important marker in applying a very PLT-driven language and framework, Scala and lift, to a very realistic application, especially given that it's a rewrite from a currently-popular language and framework, Ruby and Rails. We admitted proponents of static typing and weird languages are constantly being asked for this sort of thing, and while it's doubtful that this adds anything to the PLT discussion per se—at least until we have a chance to dig into lift and see how Scala's design uniquely supports it—I thought people might find the Scala connection worth commenting on. Paul... I'm pretty sure you're not me... or there's something my wife hasn't told me... anyway... I'm not much with PLT... I've only taken 3 CS courses in my life (and nearly got thrown out of 2 of them... but no-one likes a smart-ass.) I can comment on what in Scala has made lift easy from both the "producer" and "consumer" side of things. Back in 2000/2001, I wrote a Java-based web framework. It was 60K LOC that more or less generated a lot of Java code, spit it through an in memory compiler and shoveled the byte-code into the class-loader. This was in the Java 1.3/1.4 days and there were no generics. I spent 18 months using Ruby/Rails and building Ruby/Rails based apps. One of the key things about Ruby & Rails is the "do the right/common thing by default." Thus, the things that developers do most often require the least keystrokes. Scala has the same philosophy, but adds the driver that the language and associated tools are your friend. The top level examples are case classes, a sane typing system, and type inferencing. At first blush, a Java programmer can write Java-ish code in Scala. It looks like Java code, except there are fewer characters. No need to declare variable types when the compiler can figure them out. No need to write hashCode, equals, getters, etc. when you can just build a case class that does all that stuff automatically. I came at Scala from a Ruby bent. Ruby spoiled me for Java programming because I had to type too much "stuff" and I didn't have closures. Scala felt almost exactly like Ruby to me, except the things I didn't like about Ruby were missing. Okay... so this is a long set-up to answer the question, "What makes Scala a great environment to write a web framework in?" Anyway, I hope this rant sheds some light on how I've used Scala's features to build a web framework that's expressive. An interesting post. I'd like to see lift. At the moment I'm particularly interested in your OR mapper, as we're spending a lot of time on ours at the moment (we use Scheme). WRT performance I think it is attributable to two things: 1. Scala is a better match for the JVM 2. All that JVM technology really does work. Ruby is quite well known for being dead slow. I find the Jetty continuations amusing. Sun seems dedicated to keeping the JVM stone-age, but people just find ways of working around it regardless. MS seems much more open to innovation in this respect. Groovy can also deliver the closures, Java-like syntax with fewer keystrokes that you mention, and it has Grails, which implements the RoR model. I have yet to use Scala (due to time limitations) so can't comment any other comparative aspects. Are posts like these really appropriate for the front page? The connection to programming language theory is non-existant. I don't think that because a post is about Scala it automatically is deserving of front page status. I hesitated before posting, for what it's worth. I feel somewhat vindicated by the fact that Dave Pollak noticed the post and replied to it. I think his post is a good hook from which to hang our PLT hats if we wish to do so. I confess, though, to also having decided to go ahead with the post due to my belief that LtU is a place where theory and practice are supposed to meet. If this post is heavy on the practice and light on the theory, welllllllll... hopefully that balance will shift at some point in the future. :-) But I must apologize to our hosts if my judgment here was inappropriate. No, this is all goodness. Gives insights into Scala and additional info on the runtime constraints of Ruby. Would like to see more such posts. "I feel somewhat vindicated by the fact that Dave Pollak noticed the post and replied to it." Why? Isn't it ordinary for a blogger to direct traffic to their blog? I think if an expanded version of what Dave Pollack talked about here had been in the original blog entry then there would have been far more reason to post a link here - "What (in detail with examples) makes Scala a great environment to write a web framework in?" It's hard to disagree with "So, yes, I'm pimping my own framework,..." Dave made some claims, based on his experience porting an app from Rails to his framework, on his blog, that anyone with any exposure to Scala could reasonably interpret, IMHO, to be of interest to LtUers. Since Scala even has its own "Focus on" section here, the mere fact that a web application framework has been written in it is sufficient to make it of interest. As for "why," I suppose because not everyone would feel comfortable joining such an obviously theoretically-focused site and discussing their work. So it was gratifying when Dave did, and his comments, I think, confirmed my belief that lift is of legitimate interest from a PLT perspective. If you want more detail, why not ask Dave for it? Finally, what, exactly, is wrong with him pimping his own framework? Finally, what, exactly, is wrong with him pimping his own framework? Absolutely nothing - it's a fine thing for him to do on his blog - is it front page news? (afaict there really are an awful lot of web frameworks that haven't been mentioned here.) ...is, of course, that he has direct experience in migrating from Rails to a framework that gives him a roughly comparable level of ease of development/concision with the added benefits of greater scalability and type safety than Ruby offers. It supports a level of interest in extremely expressive type systems and provides a data point with respect to their pragmatic value. The fact that he used Rails for 18 months first should tell us something, too: Dave isn't some wild-eyed static typing proponent who wrote his framework "because he could." He appears to have written it because, 18 months in, he still had problems that he wanted to solve. It's true that there are an awful lot of web frameworks that haven't been mentioned here, perhaps because most of them really don't add anything to the PLT discussion. But continuation-based web frameworks have been discussed many times. haxe likewise. I could add more. But lift is written in Scala. Scala seems to be of interest to LtUers, so I thought I'd post a story about it. Once again, given that Ehud has offered his opinion that the intersection of theory and practice is consistent with LtU's purpose, I have to ask why we're having this conversation. Dave isn't some wild-eyed static typing proponent who wrote his framework "because he could." He appears to have written it because, 18 months in, he still had problems that he wanted to solve. Note that the issues mentioned aren't necessarily purely static typing issues (unless you want to nitpick about all static checking being type checking, but that doesn't affect the point anyway). For example, in Schemes with decent module systems, typos in procedure names are caught at compile time (or more generally, macro expansion time or module elaboration time). Luke's comment elsewhere in the thread similarly points out the static error checking performed by Erlang ("unbound variables, unused variables, calls to undefined local functions, unreachable code, etc.") The point being that it's possible to do a lot of static checking without resorting to a static type system, and some languages do exactly that. In the Ruby case, the problem is presumably that since its methods are looked up at runtime, it's not really possible to perform the kind of non-type-based static checks that Scheme and Erlang can do. So in that sense, there is a static typing issue here, and Ruby is probably similar to Smalltalk in that respect. However, you can't generalize this to all non-statically-typed languages, any more than you can draw negative conclusions about static typing in general from the type systems of Java or C++. If I were to critique Dave's points, I would also suggest that "catching typographical errors" isn't a very compelling example of a benefit of static typing, for all of the reasons that you, Luke, and others have pointed out. AFAICT, every Common Lisp, about half the Schemes, and apparently most other non-Python/Ruby dynamic languages will at least tell you when you attempt to refer to an unbound variable! What I find more compelling about Dave's comments, of course, is the observation that he needed about 95% test coverage in Ruby not to get bitten by something—typos or otherwise—and that the lift checkins had, as of that writing, resulted in only one defect. Now, naturally, the devil is in the details: how many of those defects were due to Ruby's lack of warning about typographical errors and would even have been caught in, e.g. PLT Scheme or SBCL? OTOH, would, e.g. PLT's web framework or UnCommon Web provide the same level of concision as Rails or lift? These strike me as questions very much worth asking, although answering some of them would involve rewriting Dave's application in each language and framework to get a realistic assessment. So again, what we have here is a data point, no more—but also no less. Once again, given that Ehud has offered his opinion that the intersection of theory and practice is consistent with LtU's purpose, I have to ask why we're having this conversation. Probably for the same reasons that you initially "hesitated before posting". Let me be explicit about my tone - not critical of you or Dave Pollak, just mildly puzzled. There probably are a couple of stories waiting to be told about his experience - a story about how the framework actually performed, and a story about what aspects of Scala made writing the framework so much easier - but in my opinion the blog entry lacks content. (I wish I could find the 3 part story about converting a PHP bulletin board system with hundreds of thousands of users to Rails, but I can't - they told a good story, lots of content). I don't recall knowingly posting any "theory" material to LtU - I certainly agree with Ehud's opinion that the intersection of theory and practice is consistent with LtU's purpose. However, I think that the number of occasions on which Ehud expressing an opinion was a strong signal that others should cease to express their opinions has been thankfully few. My opinion certainly isn't meant as law. It is my opinion. Still, since I've been here awhile, I think my opinion may be relevant. Two things are worth noting as regards the issue currently under discussion: First, LtU was always a mix of theory and practice. This approach seems to have served us well. Second, the idea behind having contributing editors is that they each bring his or her own perspective. I trust their judgement and appreciate what they contribute. I have yet to regret following up on the items chosen by the LtU editors. I think we should all be grateful to the editors, and encourgae them to post more... If an item seems less interesting to me, I simply move on. I think that at the current rate of new posts, and the overall quality of them, this makes the most sense. Thanks, Isaac, for the cogent and reasonable response. I must apologize if my question seemed insincere. I suppose my own puzzlement was that, once Dave had posted something about his experiences, the connection to properties that Scala has from a PLT perspective were more apparent than they might have been from the blog post alone. Of course, that in itself is a subjective judgment that might or might not be shared by others. If we're all of an accord that the intersection of theory and practice is appropriate to LtU, though, my puzzlement over others' puzzlement only deepens. If a post says that there was a system written in X, and that system was rewritten in Y, where X and Y are known to have quite different characteristics from a PLT point of view, but the post itself says nothing about them, isn't it still rather obviously a pertinent post, if only because the person doing the rewriting has perceived some value in these quite different characteristics, and we readers might be able to articulate a set of questions about how those values map to the PLT characteristics? And let me be clear: if I had found a post that said "I had a system written in O'Caml, but I rewrote it in Ruby and it's much better along dimensions X and Y," I'd post that, too; the point isn't PLT partisanship (hard to believe in my case, I realize), but just that someone has, for a change, a very specific story to tell. In any case, my apologies again for leaving the "Ehud wrote it; I believe it; that settles it!" impression. :-) I think it's as front-page worthy as the article about Erlang being used in Vendetta Online. Scala clearly is an interesting language from a PLT point of view, and seeing it used in production systems is great. I presume you don't actually want all the good languages to stay academic :-). I remember this one from my childhood. (I might even have been young enough to confuse it with directions, which makes it really baffling.) Two wrongs don't make a right. I'm guessing that you missed Ehud's post on the subject. It'd be nice if we could move past the (resolved, as far as everyone else seems to be concerned) issue of whether the post was appropriate or not and perhaps discuss whatever lessons might accrue from Dave's experience. He's used Rails for 18 months, learned Scala, and is developing a web application framework in it—surely there are questions of a PLT nature that we can arrive at, given that? The subtitle has always been The Programming Languages Weblog. My take is that the LtU home page shouldn't be exclusively PLT. The relevant question should be whether the story has something interesting to say about Programming Languages? That's what I was aiming for—not to go around the dynamic/static merry-go-round again on the basis of theory, but to put something concrete on the table because, let's face it, hands-on experience going from one platform to a very different one in a production context is rare. I think Dave has a number of interesting things to say about how Scala met his needs, in this case, better than Ruby did, and some of those reasons have a PLT flavor to them. Paul: I confess, though, to also having decided to go ahead with the post due to my belief that LtU is a place where theory and practice are supposed to meet. That's my opinion too. Chris: The relevant question should be whether the story has something interesting to say about Programming Languages Yes, that's a good question to use in deciding what's worth discussing on the home page. Scala is one of the few places where the theory comes into contact with the real world (also known as the JVM ;]), so it's inherently interesting on that basis. I've used Scala on several projects now. I didn't convert existing code to it like Dave did so I can't put comparable metrics out, but I can say that my code is probably about 1/4 the size, in terms of LoC, relative to Java (and perhaps even better than that). What's not to like about being able to sneak a little advanced code into the business world, when they don't realize it? ;) the real world (also known as the JVM ;]) It's interesting how many different Real Worlds there are in computing. The one I live in doesn't have any Java at all and everybody is driven by having fun and creating things. There's a lot to be said for finding and moving to a better world even if it's a bit less populous than others. Happily most of the common objections (e.g. monetary) are strawmen. I don't have the eloquence to express this idea as well as I'd like. Hopefully Paul Graham will write an essay on the topic one day. It's interesting how many different Real Worlds there are in computing. It really is! When I see "real world" mentioned in discussions I begin to wonder if their real world has much in common with my real world. Once I get past my own vanity, I do find it fascinating how many very different kinds of computing are out there. (otoh "real world" just seems like bad sampling.) Luke Gorrie: Hopefully Paul Graham will write an essay on the topic one day. He's written several, with Beating the Averages and How to Do What You Love being the most obviously relevant. But if you watch the Scala Experiment video, you'll be reminded that the Scala experiment is an experiment along at least two dimensions: yes, the language design experiment, but also the language adoption experiment. It's not hard to create a language. It's only marginally harder to create a language that occupies some niche for some number of years, especially if you're willing to define "niche" as "me and my colleagues." But to get 100,000 people using your language—that's much harder. I don't know whether Scala is there, or will get there. But it's certainly an easier sell when it runs anywhere Java runs, integrates trivially with existing Java code, can be developed in Eclipse, IntelliJ, etc. It's true that, strictly speaking, popularity isn't all there is to the "real world." But there seems to me to be a certain petulance, not to mention lack of realism, to the insistence that people can merely choose a smaller "real world" when popularity matters to them and they use the phrase "real world" as a shorthand that everyone understands to mean "popular." While I like Mr. Graham's ability to stir things up, I have to wonder if he's gotten past the "if it bends it's funny" into "if it breaks, it's not funny." There are many, of course ... I've dipped a toe in quite a few over the years. I am quite encouraged by the current trends in language development towards well-defined VMs, and being able to call out into them from new languages. Scala is quite successful in this regard, as are a number of other languages (Nice, F#, and many more)... Nobody seems to have homed in on this part of the quote:.) If I remember correctly that stands in stark contrast to what the Erlang crowd claimed some years back, as response to the question whether Erlang should grow a type system. It was something along the lines of "That would mostly catches typo-like errors, and for the logic flaws we would need testing anyway. So, let the test cases catch the typos, too." (reference needed, which I sadly cannot find at the moment. Might well have been personal communication.) I vividly remember when I switched from Java to Emacs Lisp being plagued by typo bugs and shocked that people would actually program in such a way. But quickly I adapted and these days it's a non-problem. I think the main reason is that I unlearned the subconscious habbit being sloppy and relying on the compiler to check my spelling. I also think that completion features like dabbrev-expand are a great contribution. Just think -- how often do you misspell a filename in the Unix shell? Hardly ever if you habitually tab-complete to check it. dabbrev-expand Erlang reports a LOT of errors/warnings compared with Emacs Lisp: unbound variables, unused variables, calls to undefined local functions, unreachable code, etc. Programs like xref and Dialyzer do much more checking but for me at least they're too inconvenient to bother using (i.e. batch-mode separate from normal compilation). xref Erlang programmers do occasionally waste a lot of time chasing a bug caused by e.g. a typo in an atom being sent in a message and then curse the lack of static checking for the next week. I have heard of projects where each atom is ?defined as a macro so that the compiler will detect typos, but I wouldn't do that myself. The story with Smalltalk is similar - the programmer does the work to avoid typos - use the browser tools to check the method selector name, use copy/paste instead of typing characters, use completion - and the compiler warns about undefined method names. And of course some programmers are more diligent than others ... Static typing is part of what I like about Scala and part of what makes lift more productive for me, but there's more. I've written in a ton of different programming languages over the years, static typed and dynamic typed. I wrote a flat file database in C (which I would argue is pretty non-typed.) I wrote Mesa, the first real-time spreadsheet, in a combination of Objective-C (dynamically typed and before the introduction of protocols) and C++ (although I did a *lot* of stuff that worked around C++'s type system.) I wrote Integer (world's fastest and first web-based multi-user spreadsheet) in Java (statically typed.) Over the years, I've gravitated towards static typing in languages, but I consider it a personal preference rather than a necessity. However, for projects of more than 30 people, I believe that some level of tool-supplied type checking is required. Over the last year, I've toured a lot of different programming systems and web frameworks. I did a fair amount of commercial work in Ruby/Rails. I've also dabbled (pun intended) in Squeak/Smalltalk/Seaside. Every language and system that I've used over my career except Ruby has some form of easily accessible type checking/type-o checking system. Squeak's editor reminds you if methods do not exist in the system and will not confuse variable names with method names. Even C has lint. My personal belief is that the compiler is yet another tool to help me build my code. As long as a typing system results in less net work on my part, I'm in favor of it. I don't think Java's typing system does this (especially true prior to generics). I think Scala's typing system is sufficiently lightweight that it is a net benefit versus dynamically typed languages. But I digress. Scala's Actors are critical to lift. I do not need continuations in order to implement the ask/answer paradigm that Seaside implements with continuations. Also, the more I use Actors, the more I get the sense that they deliver on the promise that Objects never did. Actors encapsulate functionality the way I've always wanted Objects to, but in an appropriately course-grained sort of way. Additionally, Actors which can be sent Any message, are very "dynamically typed" inside a statically typed system. The recent addition of Futures to Actors makes it possible, for example, to tell all the controllers on a page to render themselves and then wait for all the responses (or timeout gracefully if one or more controllers fails to respond). Scala's mixins/traits are also very powerful. I just committed up a generic state machine as part of lift. I was able to abstract the state machine as a trait, mix in lift's OR mapper to persist the state items. I was able to model the state machine without worrying about the other parts of the system and then blend the other parts where I needed them. As part of the trait system (as compared to Ruby's mixins), one can require that certain methods be on the implementing class. I believe there is a project implementing traits for Squeak and they, too, require that certain methods be available on the target class. By-name has come in very handy in certain performance situations. There are a ton of places in lift where I use random numbers (e.g., salt for the password class, etc.) It turns out that lazily evaluating the default values (e.g., generating the random number) improves performance in situations such as loading users from the database (no need to actually set the default value in a column that's being pulled from the DB.) Scala makes passing by-name and general laziness easier than Java and Ruby because the compiler does the work. I'd ultimately like to see more laziness in Scala. Scala promotes minimizing mutable state. I find that this is also very helpful in reducing defects. If there are fewer places in the systems that have mutable state, there are fewer moving pieces to worry about. There's mutable state in Actors. There's mutable state in sessions. There's mutable state in O-R mapped object (although I've been working on changing this so that O-R mapped objects are immutable and can be "undone" when the back button is pressed.) Other than that, what's on the stack is the state. For a recovering mutability-junky like me, Scala is a nice transition compared to Haskell. Freely passing functions is great for securely mapping HTML forms to object fields. I grabbed this one from Seaside's playbook (btw, I think Seaside is the conceptually best web framework around. It lacks a real O-R mapper, separation of HTML and code, and an easily deployable runtime, but it's worth a lot of study because Seaside got a lot of things very, very right.) Rather than, as Rails does, mapping form elements to and from attribute names, lift creates a random number (or it can be a fixed field name for automated testing) that maps to a function. That function is applied when the form element is processed. That means one can never inject more data into the system than the originally presented form allows. This is a result of functions being first-class parts of the system. While Ruby has lambdas and a whole bunch of other ways of creating functions, it doesn't seem common to have a hash full of "things and functions". Functions are passed, but it doesn't seem to be part of Ruby's idioms to put functions into "session state." Finally, there's type checking... but related to security and database access. Lift has an O-R mapper that's based on sematicly meaningful database columns. For example, there are "MappedPassword" and "MappedEmail" types (soon, there will be MappedTaxpayerID, MappedPostalCode, etc.) No longer does the developer pass strings and numbers around the code. They pass Passwords and Email Addresses and Postal Codes. These columns/fields have access control built in so that "toString" will return "***-**-****" for a MappedTaxpayerID unless the current user has permission to see the taxpayer ID. This means that security is controlled far fewer points (rather than having a test in each part of the program that could display an SSN.) This combined with Scala's type system allows Table.find(ByField(Table.field, param)) where field has to be an actual field in Table and param has to be the same type as field. This not only avoids problems with building queries, but also improves the security of the system because it's easy to write type-safe, SQL-injection resistant queries. Also, all of this is possible because of Scala's "val" singleton feature. On a personal note, I'm honored and flattered and totally blown away that lift wound up mentioned on LtU, especially on the front page. I hope that my experiences with Scala and lift are helpful to the LtU community. I wasn't kidding when I said that you could have been me writing under a pseudonym. I chose to create a front-page story at least in part because I was struck by the parallels in our experiences (OK, I have yet to write my own web framework). I can also characterize myself as a "recovering mutability junkie," find Haskell too rich for my blood (but enjoy O'Caml a lot), and am extremely pleased to find something as sophisticated and powerful as Scala living on top of the JVM. Since LtU is somewhat self-consciously a "programming language theory" site, it has too often degenerated into the standard flame-wars (of which I'm ashamed to admit to having been among the most vociferous participants!) regarding static vs. dynamic typing. One difficulty with this, er, "debate" is the rarity of real-world conversion experiences. Another difficulty is that if you introduce real-world experience, you're no longer talking about PLT. So the structure can end up being self-defeating, or at least self-limiting. Since our host was gracious enough to ask me to be an editor and I was crazy enough to accept :-) I chose to exercise that discretion in creating the story, to some extent for good and proper reasons that have been discussed here at more length than I actually feel is necessary, but yes, also for more personal and questionable reasons of feeling a bit vicariously vindicated and wanting to escape that self-limiting trap of being challenged to produce practical evidence in support of my views and practical anecdotes not being the sort of thing we discuss on LtU. Finally, I'm very glad to have made the choice that I did, because it brought you here, and you do such an excellent job of describing your experience and choices in a cogent, balanced, and patient fashion—qualities that, again, are often sorely lacking in such discussions. Welcome to LtU. Unless you got lucky (and usually you wouldn't know that until later) and started on a language like Haskell, everyone is either a mutability junkie in denial or a mutability junkie in recovery. "qualities that, again, are often sorely lacking in such discussions." Not nearly as much on LtU as most places. Scala's Actors are critical to lift. I do not need continuations in order to implement the ask/answer paradigm that Seaside implements with continuations. I'm too lazy to read Scala's documentation, but if its Actors are the same as other languages they are a lightweight concurrency mechanism. You can fake continuations with threads by spawning a new thread every time you want a new continuation. Is this what you're doing? If not, how to you handle the back button? Do you require the programmer to do a manual CPS? Is this what the state machine thing you describe is for? Mucho curious! Thanks! I'm not using Actors to deal with the back button. I'm working on versioning model and session state by using immutable objects to store state (e.g., session variables, instance variables) and then rolling back to a previous version. Seaside uses continuations for its Ask/Answer paradigm. You can see an example at The "enter your name" form is a "question" asked by the chat application. Until the question is answered, the view and controller is the "AskName" controller. Once the question is answered, the chat controller (which is the controller defined in the view, and lift is "view first" where the view defines the layout and the controllers) then becomes active. The relevant code is and a more detailed description can be found at: The state machine is for extra-session state. For example, a user signs up with the service and receives a confirmation email. How does one describe the timeouts to send reminder emails and ultimately terminate the account? Here's how: def states = List( State(Initial, To(NewAccount, {case _ => })), State(Terminal) entry {terminate}, State(NewAccount, After(3 days, FirstNewAccountNag)), State(FirstNewAccountNag, After(7 days, SecondNewAccountNag)), State(SecondNewAccountNag, After(14 days, EndNewAccountAccount)), State(EndNewAccountAccount) ) def globalTransitions = To(Terminal, {case Terminate => }) :: Nil override def transition(from: StV, to: StV, why: Meta#Event): unit = { to match { case FirstNewAccountNag => user.obj.sendFirstNagMail case SecondNewAccountNag => user.obj.sendSecondNagMail case EndNewAccountAccount => user.obj.disableAccount; this.processEvent(UserNag.Terminate) case _ => // ignore } super.transition(from, to, why) } The "machine" takes care of persisting the states, transitioning the states at certain times or on certain events. There can be multiple states and state types associated with a given instance of a model.
http://lambda-the-ultimate.org/node/2147
CC-MAIN-2018-17
refinedweb
5,737
61.36
cntl - file control #include <unistd.h> #include <fcntl.h> int fcntl(int fildes, int cmd, ...); The, indicate a process group ID. If fildes does not refer to a socket, the results are unspecified. The following values for cmd are available for advisory record locking. Record locking shall be supported for regular files, and may be supported for other files. -1. . The fcntl() function shall fail if: EACCES or EAGAIN The cmd argument. and {OPEN_MAX} file descriptors are currently open in the calling.. None. The ellipsis in the SYNOPSIS is the syntax specified by the ISO C standard for a variable number of arguments. It is used because System V uses pointers for the implementation of file locking functions. The IEEE Std 1003.1-2001 are valid. It is a common error to forget this, particularly in the case of F_SETFD. This volume of IEEE Std 1003.1-2001 IEEE Std 1003.1-2001 IEEE Std 1003.1-2001... alarm() , close() , exec() , open() , sigaction() , the Base Definitions volume of IEEE Std 1003.1-2001, <fcntl.h>, <signal . All copyrights belong to their respective owners. Other content (c) 2014-2018, GNU.WIKI. Please report site errors to webmaster@gnu.wiki.Page load time: 0.105 seconds. Last modified: November 04 2018 12:49:43.
http://gnu.wiki/man3/fcntl.3posix.php
CC-MAIN-2020-10
refinedweb
212
71.51
JavaScript is a living language that’s constantly progressing. As a developer, this is great because we’re constantly learning and our tools are constantly improving. The downside of this is that it typically takes browsers a few years to catch up. Whenever a new language proposal is created, it needs to go through five different stages before it’s added to the official language specification. Once it’s part of the official spec, it still actually needs to be implemented into every browser you think your users will use. Because of this delay, if you ever want to use the newest JavaScript features, you need to either wait for the latest browsers to implement them (and then hope your users don’t use older browsers) or you need to use a tool like Babel to compile your new, modern code back to code that older browsers can understand. When it’s framed like that, it’s almost certain that a compiler like Babel will always be a fundamental part of building JavaScript applications, assuming the language continues to progress. Again, the purpose of Babel is to take your code which uses new features that browsers may not support yet, and transform it into code that any browser you care about can understand. So for example, code that looks like this, const getProfile = username => {return fetch(`{username}`).then((response) => response.json()).then(({ data }) => ({name: data.name,location: data.location,company: data.company,blog: data.blog.includes('https') ? data.blog : null})).catch((e) => console.warn(e))} would get compiled into code that looks like this, var getProfile = function getProfile(username) {return fetch('' + username).then(function (response) {return response.json();}).then(function (_ref) {var data = _ref.data;return {name: data.name,location: data.location,company: data.company,blog: data.blog.includes('https') ? data.blog : null};}).catch(function (e) {return console.warn(e);});}; You’ll notice that most of the ES6 code like the Arrow Functions and Template Strings have been compiled into regular old ES5 JavaScript. There are, however, two features that didn’t get compiled: fetch and includes. The whole goal of Babel is to take our “next generation” code (as the Babel website says) and make it work in all the browsers we care about. You would think that includes and fetch would get compiled into something native like indexOf and XMLHttpRequest, but that’s not the case. So now the question becomes, why didn’t fetch or includes get compiled? fetch isn’t actually part of ES6 so that one at least makes a little bit of sense assuming we’re only having Babel compile our ES6 code. includes, however, is part of ES6 but still didn’t get compiled. What this tells us is that compiling only gets our code part of the way there. There’s still another step, that if we’re using certain new features, we need to take - polyfilling. What’s the difference between compiling and polyfilling? When Babel compiles your code, what it’s doing is.includes Arrow functions: Babel can transform arrow functions into regular functions, so, they can be compiled. Classes: Like Arrow functions, Class can be transformed into functions with prototypes, so they can be compiled as well. Promises: There’s nothing Babel can do to transform promises into native syntax that browsers understand. More important, compiling won’t add new properties, like Promise, to the global namespace so Promises need to be polyfilled. Destructuring: Babel can transform every destructured object into normal variables using dot notation. So, compiled. Fetch: fetch needs to be polyfilled because, by the definition mentioned earlier, when you compile code you’re not adding any new global or primitive properties that you may need. fetch would be a new property on the global namespace, therefore, it needs to be polyfilled. String.includes: This one is tricky because it doesn’t follow our typical routine. One could argue that includes should be transformed to use indexOf, however, again, compiling doesn’t add new properties to any primitives, so it needs to be polyfilled. Here’s a pretty extensive list from the Babel website as to what features are compiled and what features need to be polyfilled.Set Because adding new features to your project isn’t done very often, instead of trying to memorize what’s compiled and what’s polyfilled, I think it’s important to understand the general rules behind the two concepts, then if you need to know if you should include a polyfill for a specific feature, check Babel’s website..
https://ui.dev/compiling-polyfills/
CC-MAIN-2021-43
refinedweb
759
52.7
Learn Python for Data Science: Using Python Libraries in Data Science Learn Python for Data Science: Using Python Libraries in Data Science Python is one of the most, if not the most, popular language for big data and data science. Read on to learn why and how to use Python to work with data. Join the DZone community and get the full member experience.Join For Free Python for Data Science is a must learn for professionals in the Data Analytics domain. With the growth in the IT industry, there is a booming demand for skilled Data Scientists and Python has evolved as the most preferred programming language. Through this blog, you will learn the basics, how to analyze data, and then create some beautiful visualizations using Python. This post on "Python for Data Science" includes the following topics: - Why learn Python for Data Science? - Python Introduction - Jupyter Installation for Python with Data Science - Python Basics - Python Libraries for Data Science - Demo: Practical Implementation Let's get started! Why Learn Python for Data Science? Python is no-doubt the best-suited language for a data scientist. I have listed down a right now, earning around $130,621 per year per Indeed.com. Python was created by Guido Van Rossum in 1989. It is an interpreted language with dynamic semantics. It is free to access and run on all platforms. Python is: Object Oriented A High-Level Language Easy to Learn Procedure-Oriented Jupyter Installation for Python With Data Science Let me guide you through the process of installing Jupyter on your system. Just follow the below steps: Step 1: Go to the link: Step 2: You can either click on "Try in your browser" or "Install the Notebook." I would recommend you to install Python and Jupyter using the Anaconda distribution. Once you have installed Jupyter, you can open it on your default browser by typing "Jupyter Notebook" in the command prompt. Let's now perform a basic program on Jupyter. name=input("Enter your Name:") print("Hello", name) Now, to run this, press "Shift+Enter" and view the output. Refer to the below screenshot: Basics of Python for Data Science Now is the time when you get your hands dirty in programming. But for that, you should have a basic understanding of the following topics: Variables: The term 'variables' refers, and save some time. For more information and practical implementations, you can refer to this blog: Python Tutorial. Python Libraries for Data Science This is the part where the actual power of Python with data science comes into the picture. Python comes with numerous libraries for scientific computing, analysis, visualization, etc. Some of them are listed below: - NumPy - NumPy is a core library of Python for Data Science which stands for 'Numerical Python.' It is used for scientific computing, which contains a powerful n-dimensional array object and provides tools for integrating C, C++, etc. It can also be used as a multi-dimensional container for generic data where you can perform various NumPy Operations and special functions. - Matplotlib - Matplotlib is a powerful library for visualization in Python. It can be used in Python scripts, shell, web application servers, and other GUI toolkits. You can use different types of plots and see how multiple plots work using Matplotlib. - Scikit-learn - Scikit-learn is one of the main attractions, wherein you can implement machine learning using Python. It is a free library which contains simple and efficient tools for data analysis and mining purposes. You can implement various algorithms, such as logistic regression, using scikit-learn. - Seaborn - Seaborn is a statistical plotting library in Python. So whenever you're using Python for data science, you will be using matplotlib (for 2D visualizations) and Seaborn, which has its beautiful default styles and a high-level interface to draw statistical graphics. - Pandas - Pandas is an important library in Python for Data Science. It is used for data manipulation and analysis. It is well suited for different data such as tabular, ordered, and unordered time series, matrix data, etc. This tutorial video on Pandas and data analysis before proceeding. Demo: Practical Implementation Problem Statement: You are given a dataset which comprises of comprehensive statistics on a range of aspects like distribution and nature of prison institutions, overcrowding in prisons, type of prison inmates, etc. You have to use this dataset to perform descriptive statistics and derive useful insights out of the data. Below are a few tasks: - Data loading: Load a dataset "prisoners.csv" using Pandas and display the first and last five rows in the dataset. Then find out the number of columns using the describemethod in Pandas. - Data Manipulation: Create a new column - "total benefitted" - which is the sum of inmates benefitted through all modes. - Data Visualization: Create a bar plot with each state name on the x-axis and their total benefitted inmates as their bar heights. For data loading, write the below code: import pandas as pd import matplotlib.pyplot as plot %matplotlib inline file_name = "prisoners.csv" prisoners = pd.read_csv(file_name) prisoners Now to use the describe method in Pandas, just type the below statement: prisoners.describe() Next, let us perform data manipulation. prisoners["total_benefited"]=prisoners.sum(axis=1) prisoners.head() And, finally, let us perform some visualization in Python. Refer to') }}
https://dzone.com/articles/learn-python-for-data-science-using-python-librari
CC-MAIN-2020-05
refinedweb
883
55.24
RichFaces: Login & Registration Application: Creating configuration files Developing JSP files Creating managed beans... is named "RichLRApplication" which uses RichFaces as JSF implementation... JSP, creating managed beans and running the application. Developing JSP Tutorials Resource - Useful Jsp Tutorials Links and Resources of JSP technology are A language for developing JSP pages, which... or JSP for short is Sun's solution for developing dynamic web sites. JSP.... The JSP Files: If you're interested richfaces in jsf - Java Server Faces Questions /jsf/richfaces/index.shtml Thanks...richfaces in jsf Hi friends. i added jsf tags like.../rich" not found I added richfaces tags in webinf, lib folder Please tell me richfaces jsf richfaces jsf <rich:column <f:facet <h:outputText </f:facet> Developing JSP files Developing JSP Files This login and registration application uses JSP for presentation layer. Our application has 10 JSP pages. login.jsp success.jsp useraccount.jsp JSF Forms - Developing form based application JSF Forms - Developing form based application  ... everything you need to know about JSF. Developing Forms in JSF 1.2... components (JSP files) Create manage bean Write navigation rules Compile Issue in JSF and Richfaces. Issue in JSF and Richfaces. Hi,I am with a issue in JSF and Richfaces.I have one add user page.In which i have fields Firstname,LastName,SecretID... all the values and press submit.We are using richfaces ,Jsf to develop JSF - Java Server Faces Tutorials JSF tutorial comes with free source code and configuration files... how to implement all theoretical concepts of JSF in developing... of JSF to developing robust JSF web applications. This is the complete Versions of JSF, Latest Version of JSF, Latest Release of JSF . JSF 1.0 supports servlet 2.3 and jsp 1.2. After JSF 1.0, JSF 1.1 was released... and jsp 1.2 as in the case of JSF 1.0. JSF 1.1_01 release features bug fixes... with servlet 2.5 and jsp 2.1. If you want to run JSF 1.2 on Tomcat, you want 6.0 JSF Training that will enable you to implement all theoretical concepts of JSF in developing modest JSF... configuration files Create JSP pages Create a properties file Create a managed bean... JSF Training JSF JSF error - JSP-Servlet JSF error I tried to retrieve data for a user from database using ,i... to : Thanks...$TreeNode Anyone could you please help me to solve the problem.... Thanks JSF EXAMPLES for java and JSP source files. The examples provided are: 1. Image Map 2. Menu..., update or delete data in a row visually without writing SQL code.The JSF... jump to any desired page. This is very useful control. Fig. jsf JSF Books in the JSF framework, this chapter and the next- Data Tables-provide... library, the MyFaces JSF implementation, and configuration files...JSF Books   jsf table : Display Database data in JSF table Thanks... table in this index.jsp file.this jsf file should be able to retrieve the data from...jsf table hi, my question is as follows : i am using front end JSF Introduction - An Introduction to JSF Technology for developing web applications based on Java technologies. This JSF.... Furthermore, JSP is specification and many vendors are developing their own... for developing JSF based applications which is another good news for the learners JSF Tags JSF Tags JSF application typically uses JSP pages to represent views. JSF provides useful.... JSF provides 43 tags in two standard JSF tag libraries: JSF Core code for developing a porject code for developing a porject Hi, i am developing online web... and logical codes. give a code for samples, say useful links . or all codes. thanks lot storing data into flat files storing data into flat files how can i retrive data from database and store data in flat files Hi Friend, Try the following code...(); } catch(Exception e){ } } } Thanks JSF - Framework information : Thanks either jsf or jsp? either jsf or jsp? which is better technology to display dynamic data by using either jsf or jsp Java Server Faces (JSF) in configuring JSF. To discover how JSF integrates with JSP... Java Server Faces (JSF) JSF Training Course Objectives JSF - JSP-Servlet JSF Jars in web inf lib I don't know where to place Jar files in JSF. Please advise.Thanks in Advance JSF - Framework :// Thanks... .. for a sinple application using ....its very Urgent... Thanks in Advance ... Servlet *.jsf --------------------------------- faces Developing Struts Application with data and sends the bean to the View JSP.( an instance of ActionForward...Developing Struts Application  ...;, by editing the concerned XML files, without touching the source or class files About tld files - JSP-Interview Questions ://... and later, while beans can be used in all JSP 1.x versions. Thanks...About tld files What are tag library descriptor files & what JSF Tutorial For Beginners to download JSF, What is JSF ? JSF (JavaServer Faces) is a Framework for developing... the existing technologies like JSP and Servlet for developing the complex web... Components Components of JSF are JSF API, and JSP Custom Tag Libraries Architecture thanks - JSP-Servlet thanks thanks sir i am getting an output...Once again thanks for help thanks - JSP-Servlet thanks thanks sir its working Developing JSP, Java and Configuration for Hello World Application Writing JSP, Java and Configuration for Hello World Application In this section we will write JSP, Java and required configuration files for our Struts 2 Hello World application. Now JSF Properties - Using Properties files in JSF JSF Properties - Using Properties files in JSF Complete Java Server Faces (JSF... the application to use properties files. We will modify the jsp files and add a new Visual web JSF - JDBC from jsf textfield and button through query please not through jsp but through jsf managed bean code i tried but the data is inserting in mysql that is null... on JSF visit to : Thanks Roseindia JSF Tutorial Tutorials TOC Installing JSF 1.2 on tomcat Developing Form based application... Renderers Display Data from Database in JSF Application JSF HTML Tag Reference...Roseindia provides you an extensive range of tutorials on JSF with complete RichFaces problem - Java Server Faces Questions RichFaces problem RichFaces problem and error Hi,This type of error comes when the JVM found two versions of the same jar file... or Servlet Container (such as jsp-api.jar). solution: I have solved data grid - JSP-Servlet but i am not able to find... this example Hi friend, To visit again... folder and tld files in WEB-INF folder. Thanks Servlets in JSF - JSP-Servlet .... Simply what is the role of servlets in JSF. which one is the best one..jsp or jsf.. thanks in advance JSF Installation on Tomcat and jsp 2.1 complaint container. So, to install and test JSF 1.2 we will use Tomcat...; Creating JSP files: Create index.jsp file into "apache...JSF Installation on Tomcat   Developing Forgot Password Form of tag libraries for developing a JSP file. Therefore will user the struts... Developing Forgot Password Form  ... Form code for our application. Developing Forgot Password Form   files files write a java program to calculate the time taken to read a given number of files. file names should be given at command line.  ...){} } } } Thanks Develop-JSF Application Develop-JSF Application This section is very useful for any beginner in the field of JSF (Java Server Faces) framework of Java. This example files files Question:How to create a new text file in another directory..(in which .class file is not there)... Discription:If we use the class FileWriter to write data to a new file then a new file Thanks - Java Beginners Thanks Hi Rajnikant, Thanks for reply..... I am... is the advantage of interface and what is the use of interface... Thanks Ragini Interfaces are useful when you do not want classes to inherit Thanks - Java Beginners then it displays data on the same page else on the other Page. Thanks Vineet...Thanks Hi, thanks This is good ok this is write code but i... input m in name text box and clicl search button then all data should be displayed thanks - Development process thanks thanks for sending code for connecting jsp with mysql. I have completed j2se(servlet,jsp and struts). I didn't get job then i have learnt.... please help me. thanks in advance upload and download files - JSP-Servlet ) and download the files using jsp. Is any lib folders to be pasted? kindly... and download files in JSP visit to :... Thanks Thanks Thanks This is my code.Also I need code for adding the information on the grid and the details must be inserted in the database. Thanks in advance JSF Hello World JSF Hello World In this example, we will be developing JSF Hello... to print hello world in JSF application using NetBeans IDE. NetBeans IDE provides JSF Interview Questions typically uses JSP pages to represent views. JSF provides useful special tags... JSP and JSF? JSP simply provides a Page which may contain markup... / html. JSF may use JSP as its template, but provides much more where is my sqlite data files(.db) will be saved? where is my sqlite data files(.db) will be saved? Hi, i am using SQLite with JDBC in Netbeans 7.1.1 for my project. So far, i am dealing... automatically (i want to deploy the project to other computer)? Thanks Creating configuration files Creating configuration files For the application, we need two files in WEB-INF folder...; Editing web.xml file: JSF application needs FacesServlet to be defined Jsf integration - Spring Jsf integration hi I'm integrating JSF(richfaces), Spring & Hibernate. I got stuck with the scenario like i need to pass parameters from JSF...: Hope that it will be helpful Electronic spreadsheets are useful in situation Electronic spreadsheets are useful in situation Electronic spreadsheets are useful in situation where relatively ---- data must be input.. 1. Small, 2.Large, 3. No, 4. All of the above 5. None is true Answer:1. Small Simple JSF Hello Application like how to use JSF tags in JSP pages, how to configure the application... in WEB-INF directory. This JSF application contains: Three JSP pages for viewing purpose JavaBean to hold model data Configuration files jsf pagination on please give any solution . Thanks, Bhuban Here is a jsp code...jsf pagination Hi , i want to paginate some questions in jsf...()) { totalRows=rs2.getInt("cnt"); } %> <html> <h3>Pagination of JSP web developing web developing how to store image in mysql using java and jsp will anyone is there to help pls mail me on my mail id **email id Deleted Eclipse jsf deseign palette - JSP-Servlet Eclipse jsf deseign palette i'm beginner in jsf i want to find an eclipse plug in that help me to design my site (jsf tags) ,thanks traansfer of files between jsp pages. traansfer of files between jsp pages. i am trying to create...="formLogin" method="post" enctype="multipart/form-data" action="Encrypt1.jsp">... jsp page. and moreover am i supposed to do anything more in order to make Uploading Multiple Files Using Jsp Uploading Multiple Files Using Jsp  ... to understand how you can upload multiple files by using the Jsp. We should avoid to use Jsp for performing any logic, as Jsp is mainly used for the presentation retrieve data from database using jsf retrieve data from database using jsf Hello I want an example of source code to retrieve data from database i have a database (oracle) name as db1... name ,and city can you help me please thanks About JSF Framework. - Framework /jsf/ Thanks...About JSF Framework. What is JSF? Why it is used?What is flow of JSF with example code.. What is the difference between Struts and JSF? Which JSF Tutorial for Beginners & jsp, is is only the data that is accepted by the webserver and the gui has... tags. While, Struts used JSP EL(Expression language), JSF uses JSF EL! Thus... INTRODUCING JAVA SERVER FACES (JSF) by  JSF Search Application Using Ajax . There are some JSP pages for viewing the the page by providing the JSF syntaxes, some Java...JSF Search Application Using Ajax Here, Roseindia Tutorial Section provides you a JSF search application files - Java Beginners files Why do we require files to store data? Hi friend, files to store data, easy to find and access them. Thanks Uploading multiple files in JSP - JSP-Servlet Uploading multiple files in JSP Hi, I have this code in JSP for Uploading multiple files : Samples : Simple Upload... modification I need to do in the code to upload all the files attached.  get files list - Ajax get files list Please,friend how to get files list with directories from ftp server or local files on web browser. Thanks, Tin Linn Soe  ...:// Thanks certain jsf session jsf session How to maintain session in jsf login application? Please visit the following links: Display Data from Database in JSF Application data from database in JSF application. Developing JSF Application In this section, we are going to display data from database in JSF based web...Display Data from Database in JSF Application   JSF 1.2 Features with servlet 2.5 and JSP 2.1. If you want to run JSF 1.2 application on tomcat...JSF 1.2 Features Complete Java Server Faces (JSF) Tutorial - JSF JSF- simpleHelloBy EnteringName - JSP-Servlet JSF- simpleHelloBy EnteringName Hi, While I am trying to deploy SimpleHelloByentryingName example from JSF Session from roseindia, Following error... to solve issue. Thanks in Advance. ctxPath=/SimpleHelloByEnteringName how to get the data from database&how to display the database data in jsf - Java Server Faces Questions data in jsf. plese tell me the solution with example. Thanks in advance. ... and to display the data from database in jsf visit to : to get the data from database&how to display the database data in jsf  Is JSF using JSP? Is JSF using JSP? Is JSF using JSP JSF Code - Java Server Faces Questions /richfaces/index.shtml Thanks...JSF Code I'm having difficulty persisting or insert web application... to create a user account and store the variables using the JSF Technology?   Forget Password Forget Password How i get my forget password through mail? Please visit the following links: JSF Examples and Hibernate Display Data from Database in JSF Application...JSF Examples In this section we will discuss about various examples of JSF. This section describes some important examples of JSF which will help you Developing Simple Struts Tiles Application for inserting the content in the Layout, so we have to create two jsp files one... Developing Simple Struts Tiles Application  ... tiles (jsp, html, etc..). Tiles uses the concept of reuse and enables Struts 2 configuration files Struts 2 configuration files For developing "Hello World" application you need the following files...; </html> Developing Controller Configuration File Reading files in Java suggest for Reading files in Java? Thanks...Reading files in Java I have to make a program in my project of finance that reads the text file and process the data in it. How to read the text Upload and Download multiple files a simple code for upload and download multiple files(it may be image,doc... using jsp with sqlserver ,can you please provide a proper coding for it and also database connection. thanks in advance..... Please visit the following how to display database data in jsf page - Java Server Faces Questions how to display database data in jsf page Hi, i created tables in database,now i need to display the tables in jsf page.Means i have to get... as soon as possible. Thanks in advance. Hi friend, Some step how to capture jsf form data - Java Server Faces Questions . thanks in advance. Hi friend, "user.jsp" JSF Simple...how to capture jsf form data hi , i have a jsf page with username ,password and submitt button,if i submitt the data then it has to store JSF - Java Server Faces Questions :// Thanks... and it access on the other pages Follow some Steps : 1.Create a form in JSF...", getPersonName()); The FacesContext provides context environment in JSF Displaying files on selection of date. Displaying files on selection of date. Hi, I am developing a GUI... show the particular txt files of the selected date. I want the java logic... in the database for files. import java.awt.*; import java.sql.*; import java.util. jsp and servlets jsp and servlets i want code for remember password and forget password so please send as early as possible ............. thanks in advance Please visit the following link: developing a Session Bean and a Servlet and deploy the web application on JBoss 3.0 a Calculator Stateless Session Bean and call it through JSP file and deploy...) method for calling from JSP. Here is code of our Remote Interface... File For creating example.jar ejb-jar.xml and jboss.xml files are required which INTRODUCING JAVA SERVER FACES (JSF) -gussNumber\WEB-INF\classes ..\webapps\jsf-guessNumber\WEB-INF\lib All the jar files... of these jar files now. ( refer to page: 118 of JSF by Dudney). 1)jsf-api.jar... of JSF API. 3) jstl.jar & standard.jar contain the JSTL files list files only - Java Beginners list files only i have to list only files and number of files in a directory? i use list() method but it returns both files and directories in parent directory.are there any specific methods that show only files? are file JSF Components create a component, it’s simple to drop that component onto any JSP. JSF...JSF Components Components in JSF are elements like text box, button, table etc.. that are used about developing a website about developing a website hi i want to create a website of on online shopping in java with database connectivity in oracle .so what... the following links: Struts Shopping Cart Application JSP Servlet Shopping Cart JSF - JSP-Interview Questions JSF How to embedded PDF in JSF page(jsp file created data grid - JSP-Servlet to implement data grid in jsp Thanks varun kumar Hi friend, I... information. Thanks...data grid how can we implement data grid (we have data grid The quick overview of JSF Technology . This was the reason for developing JSF technology. So main purpose of developing JSF... of JSF is ease of use. Developing web applications is easier and faster than other...JSF Overview   Advertisements If you enjoyed this post then why not add us on Google+? Add us to your Circles
http://www.roseindia.net/tutorialhelp/comment/99119
CC-MAIN-2015-35
refinedweb
3,076
67.86
New Relic Infrastructure's Kubernetes cluster explorer provides a multi-dimensional representation of a Kubernetes cluster that lets you zoom into your namespaces, deployments, nodes, pods, containers, and applications. With the cluster explorer you will be able to easily retrieve the data and metadata of these elements, and understand how they are related. Requirements The Kubernetes cluster explorer is available if you have the Kubernetes monitoring integration; there’s nothing additional to deploy or to configure. Access the cluster explorer You can access the cluster explorer: - From the Kubernetes tab in your Infrastructure account. From the cluster explorer launcher in New Relic One. To view the cluster explorer in New Relic One, you need version 1.8 or higher of the Kubernetes monitoring integration. Use your cluster At the top left corner of the Kubernetes cluster explorer, you can: - Select the cluster you want to explore. - Refine the elements to be displayed by filtering by namespace or deployment. - Select specific nodes. The cluster explorer has two main parts: - On top, a panel visually displays the status of up to 24 nodes of the cluster. - A table provides a complete list of all the selected nodes. Please note that onscreen data does not refresh automatically. A message on the top right corner informs of the last time it was updated. Cluster explorer The cluster explorer shows the nodes that have the most issues in a series of four concentric rings: - The outer ring shows the nodes of the cluster, with each node displaying CPU, memory, and storage performance metrics. - The next inner-most ring displays the distribution and status of the non-alerting pods associated with that node. - The third inner-most ring displays the pods on alert and that may have health issues even if they are still running. - Finally, the inner-most ring displays pods that are pending or that Kubernetes is unable to run. You can select any pod to see its details, such as namespace, deployment, its containers, alert status, CPU usage, memory usage, and more. Cluster explorer node table The cluster explorer node table displays all the nodes of the selected cluster/namespace/deployments, and can be sorted according to node name, node status, pod, pod status, container, CPU% vs. Limit and MEM% vs. Limit.
https://docs.newrelic.com/docs/integrations/kubernetes-integration/cluster-explorer/kubernetes-cluster-explorer
CC-MAIN-2019-51
refinedweb
379
53.61
> I just trying to create a singleton for static global variables. public class SingletonController : MonoBehaviour { public static SingletonController instance { get; private set; } // <- fails // etc. } Error: SingletonController name conflict with the class name SingletonController. (Conflict with Assembly-CSharp-firstpass) Unity Version2018.2.13f1 Answer by Domvel · Oct 23, 2018 at 04:48 PM Solution: Just restart Unity. If it still crying try to delete the Library folder from the project. Please mark this as the answer to close this question. I really tried. But this website (Unity answers is very buggy) :D e.g. my post wasn't visible, the show more comments doesn't work ... and and and... I already sent a feedback suggestion to fix this bugs. but anyway. thanks ^^ Btw. also here is a restart helpful. But not always. Glitchy page. It's all good - you couldn't mark it as an answer because you happened to write it as a comment on your original post. Answer by GamitusLabs · Oct 23, 2018 at 03:53 PM Don't even give them the set option... private static SingletonController instance = null; public static SingletonController Instance { get { return instance; } } void Awake() { if (!instance) { instance = transform.GetComponent<SingletonController>(); DontDestroyOnLoad(instance); } else Destroy(gameObject); } Why do you use transform? And why do you actually use GetComponent? just do instance = this; Currently you actually do instance = this.GetComponent<Transform>().GetComponent<SingletonController>(); Though i don't think that this is actually the issue here. The property he has should work just fine. I guess he has another class somewhere in his project with the same name. Since the error mentions "Assembly-CSharp-firstpass" that class is declared inside a plugins or Standard Assets folder. it's just a matter of notation the computational difference is negligible private set just means that the set can only be accessed from the class the property is declared in. No other class will have access to the set, but will be able to access the get. It's basically exactly what you want with the Singleton pattern. private set Correct, it's just a shorter code to do this. :) That's a neat trick, I've never used it this way because if figured the opposing scope would throw an error Answer by Domvel · Oct 23, 2018 at 04:05 PM Thanks for response, but the set option isn't the problem. At the moment, it seems so. Maybe a pseudo error? See the underlined conflicts with the name. (of my first post) is your file name different from your class name? In both cases same problem. I change the name of the class. The problem message tells about "Conflict with Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=natural, PublicKeyToken=null". Followed by "the defined type is used." That's weird. So you created SingletonTest as a fresh class and it's not getting used elsewhere? I wonder if something happened with your Asset Database. Maybe delete the Library folder and have Unity rebuild. Multiple Cars not working 1 Answer Distribute terrain in zones 3 Answers How do I get a U.I. image to remember if it is active or Not Active Across Scene Changes Using Arduino 2 Answers Access List from singleton database script 0 Answers How do I fix this error when trying to use the Watson SDK for Speech to Text? 0 Answers
https://answers.unity.com/questions/1565190/singleton-class-name-conflict.html
CC-MAIN-2019-18
refinedweb
560
67.96
If you ever take a step back from what you're doing it can sometimes seem pretty abstract. Here's an example. I was looking at an issue in an app that I was supporting. The problem concerned a field which was to store a date value. Let's call it, for the sake of argument, valuation_date. (Clearly in reality the field name was entirely different... Probably.) This field was supposed to represent a specific date, like June 15th 2012 or 19th August 2014. To be clear, a date and *not* in any way, a time. valuation_date was stored in a SQL database as a datetime. That's right a date with a time portion. I've encountered this sort of scenario many times on systems I've inherited. Although there is a date type in SQL it's pretty rarely used. I think it only shipped in SQL Server with 2008 which may go some way to explaining this. Anyway, I digress... valuation_date was read into a field in a C# application called ValuationDate which was of type DateTime. As the name suggests this is also a date with a time portion. After a travelling through various layers of application this ended up being serialized as JSON and sent across the wire where it became a JavaScript variable by the name of valuationDate which had the type Date. Despite the deceptive name this is also, you guessed it, a date with a time portion. (Fine naming work there JavaScript!) You can probably guess where I'm going with this... Despite our (cough) rock solid naming convention, the situation had arisen where actual datetimes had snuck in. That's right, in the wilds of production, records with valuation_dates with time components had been spotted. My mission was to hunt them, kill them and stop them reproducing... A Primitive Problem Dates is a sticky topic in many languages. As I mentioned, SQL Server has a date data type. C# has DateTime. If you want to operate on Dates alone then you're best off talking looking at Jon Skeet's NodaTime - though most people start with DateTime and stick with it. (After all, it's native.) As to JavaScript, well primitive-wise there's no alternative to Date - but Moment.js may help. My point is that it is a long standing issue in the development world. We represent data in types that aren't entirely meant for the purpose that they are used. It's not just restricted to dates, numbers have a comparable story around the issue of decimals and doubles. As a result of data type issues, developers experience problems. Like the one I was facing. An Attribute Solution The source of the problem turned out to be the string JavaScript Date constructor in an earlier version of Internet Explorer. The fix was switching away from using the JavaScript Date constructor in favour of using Moment.js's more dependable ability to parse strings into dates. Happy days we're working once more! Some quick work to put together a SQL script to fix up the data and we have ourselves our patch! But we didn't want to get bitten again. We wanted ourselves a little belts and braces. What do do? Hang on a minute, lads – I've got a great idea... It's ValidationAttribute time! We whipped ourselves up an attribute that looked like this: using System; using System.ComponentModel.DataAnnotations; using System.Globalization; namespace My.Attributes { [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = false, AllowMultiple = false)] public class DateOnlyAttribute: ValidationAttribute { protected override ValidationResult IsValid(object value, ValidationContext validationContext) { if (value != null) { if (value is DateTime) { // Date but not Time check var date = (DateTime) value; if (date.TimeOfDay != TimeSpan.Zero) { return new ValidationResult(date.ToString("O", CultureInfo.InvariantCulture) + " is not a date - it is a date with a time", new[] { validationContext.MemberName }); } } else { return new ValidationResult("DateOnlyAttribute can only be used on DateTime? and DateTime", new[] { validationContext.MemberName }); } } return ValidationResult.Success; } } } This attribute does 2 things: - Most importantly it fails validation for any DateTimeor DateTime?that includes a time portion. It only allows through DateTimes where the clock strikes midnight. It's optimised for Cinderella. - It fails validation if the attribute is applied to any property which is not a DateTimeor DateTime?. You can decorate DateTime or DateTime? properties on your model with this attribute like so: namespace My.Models { public class ImAModelYouKnowWhatIMean { public int Id { get; set; } [DateOnlyAttribute] public DateTime ValuationDate { get; set; } // Other properties... } } And if you're using MVC (or anything that makes use of the validation data annotations) then you'll now find that you are nicely protected from DateTimes masquerading as dates. Should they show up you'll find that ModelState.IsValid is false and you can kick them to the curb with alacrity!
https://blog.johnnyreilly.com/2014/06/
CC-MAIN-2020-16
refinedweb
803
59.9
collective.recipe.omelette 0.9 Creates a unified directory structure of all namespace packages, symlinking to the actual contents, in order to ease navigation. Detailed Documentation Introduction Namespace packages offer the huge benefit of being able to distribute parts of a large system in small, self-contained pieces. However, they can be somewhat clunky to navigate, since you end up with a large list of eggs in your egg cache, and then a seemingly endless series of directories you need to open to actually find the contents of your egg. This recipe sets up a directory structure that mirrors the actual python namespaces, with symlinks to the egg contents. So, instead of this...: egg-cache/ my.egg.one-1.0-py2.4.egg/ my/ egg/ one/ (contents of first egg) my.egg.two-1.0-py2.4.egg/ my/ egg/ two/ (contents of second egg) ...you get this: omelette/ my/ egg/ one/ (contents of first egg) two/ (contents of second egg) You can also include non-eggified python packages in the omelette. This makes it simple to get a single path that you can add to your PYTHONPATH for use with specialized python environments like when running under mod_wsgi or PyDev. Typical usage with Zope and Plone For a typical Plone buildout, with a part named "instance" that uses the plone.recipe.zope2instance recipe and a part named "zope2" that uses the plone.recipe.zope2install recipe, the following additions to buildout.cfg will result in an omelette including all eggs and old-style Products used by the Zope instance as well as all of the packages from Zope's lib/python. It is important that omelette come last if you want it to find everything: [buildout] parts = ...(other parts)... omelette ... [omelette] recipe = collective.recipe.omelette eggs = ${instance:eggs} products = ${instance:products} packages = ${zope2:location}/lib/python ./ (Note: If your instance part lacks a 'products' variable, omit it from the omelette section as well, or the omelette will silently fail to build.) Supported options The recipe supports the following options: - eggs - List of eggs which should be included in the omelette. - location - (optional) Override the directory in which the omelette is created (default is parts/[name of buildout part]) - ignore-develop - (optional) Ignore eggs that you are currently developing (listed in ${buildout:develop}). Default is False - ignores - (optional) List of eggs to ignore when preparing your omelette. - packages - List of Python packages whose contents should be included in the omelette. Each line should be in the format [package_location] [target_directory], where package_location is the real location of the package, and target_directory is the (relative) location where the package should be inserted into the omelette (defaults to top level). - products - (optional) List of old Zope 2-style products directories whose contents should be included in the omelette, one per line. (For backwards-compatibility -- equivalent to using packages with Products as the target directory.) Windows support Using omelette on Windows requires the junction utility to make links. Junction.exe must be present in your PATH when you run omelette. Using omelette with eggtractor Mustapha Benali's buildout.eggtractor provides a handy way for buildout to automatically find development eggs without having to edit buildout.cfg. However, if you use it, the omelette recipe won't be aware of your eggs unless you a) manually add them to the omelette part's eggs option, or b) add the name of the omelette part to the builout part's tractor-target-parts option. Using omelette with zipped eggs Omelette doesn't currently know how to deal with eggs that are zipped. If it encounters one, you'll see a warning something like the following: omelette: Warning: (While processing egg elementtree) Egg contents not found at /Users/davidg/.buildout/eggs/elementtree-1.2.7_20070827_preview-py2.4.egg/elementtree. Skipping. You can tell buildout to unzip all eggs by setting the unzip = true flag in the [buildout] section. (Note that this will only take effect for eggs downloaded after the flag is set.) Running the tests Just grab the recipe from svn and run: python2.4 setup.py test Known issue: The tests run buildout in a separate process, so it's currently impossible to put a pdb breakpoint in the recipe and debug during the test. If you need to do this, set up another buildout which installs an omelette part and includes collective.recipe.omelette as a development egg. Reporting bugs or asking questions There is a shared bugtracker and help desk on Launchpad: Change history 0.9 (2009-04-11) - Adjusted log-levels to be slightly less verbose for non-critical errors. [malthe] 0.8 (2009-01-14) - Fixed 'OSError [Errno 20] Not a directory' on zipped eggs, for example when adding the z3c.sqlalchemy==1.3.5 egg. [maurits] 0.7 (2008-09-10) - Actually add namespace declarations to generated __init__.py files. [davisagli] - Use egg-info instead of guessing paths from package name. This also fixes eggs which have a name different from the contents. [fschulze] 0.6 (2008-08-11) - Documentation changes only. [davisagli] 0.5 (2008-05-29) - Added uninstall entry point so that the omelette can be uninstalled on Windows without clobbering things outside the omelette path. [optilude] - Support Windows using NTFS junctions (see) [optilude] - Ignore zipped eggs and fakezope2eggs-created links. [davisagli] - Added 'packages' option to allow merging non-eggified Python packages to any directory in the omelette (so that, for instance, the contents of Zope's lib/python can be merged flexibly). [davisagli] 0.4 (2008-04-07) - Added option to include Products directories. [davisagli] - Fixed ignore-develop option. [davisagli] 0.3 (2008-03-30) - Fixed test infrastructure. [davisagli] - Added option to ignore develop eggs [claytron] - Added option to ignore eggs [claytron] - Added option to override the default omelette location. [davisagli] 0.2 (2008-03-16) - Fixed so created directories are not normalized to lowercase. [davisagli] 0.1 (2008-03-10) - Initial basic implementation. [davisagli] - Created recipe with ZopeSkel. [davisagli] Contributors - David Glick [davisagli] - Clayton Parker [claytron] - Martin Aspeli [optilude] - Florian Schulze [fschulze] - Maurits van Rees [maurits] - Malthe Borch [malthe] -
http://pypi.python.org/pypi/collective.recipe.omelette/
crawl-002
refinedweb
1,012
54.73
Provided by: qt3-doc_3.3.8-b-8ubuntu3_all NAME QWidgetStack - Stack of widgets of which only the top widget is user-visible SYNOPSIS #include <qwidgetstack.h> Inherits QFrame. Public Members QWidgetStack ( QWidget * parent = 0, const char * name = 0 ) QWidgetStack ( QWidget * parent, const char * name, WFlags f ) ~QWidgetStack () int addWidget ( QWidget * w, int id = -1 ) void removeWidget ( QWidget * w ) QWidget * widget ( int id ) const int id ( QWidget * widget ) const QWidget * visibleWidget () const Public Slots void raiseWidget ( int id ) void raiseWidget ( QWidget * w ) Signals void aboutToShow ( int ) void aboutToShow ( QWidget * ) Protected Members virtual void setChildGeometries () DESCRIPTION The QWidget.. MEMBER FUNCTION DOCUMENTATION QWidgetStack::QWidgetStack ( QWidget * parent = 0, const char * name = 0 ) Constructs an empty widget stack. The parent and name arguments are passed to the QFrame constructor. QWidgetStack::QWidgetStack ( QWidget * parent, const char * name, WFlags f ) Constructs an empty widget stack. The parent, name and f arguments are passed to the QFrame constructor. QWidgetStack::~QWidgetStack () Destroys the object and frees any allocated resources. void QWidgetStack::aboutToShow ( int ) [signal]. void QWidgetStack::aboutToShow ( QWidget * ) [signal]. int QWidgetStack::addWidget ( QWidget * w, int id = -1 ) Adds widget w to this stack of widgets, with ID id. already exists in the stack the widget will be removed first. If w is not a child of this QWidgetStack moves it using reparent(). Example: xform/xform.cpp. int QWidgetStack::id ( QWidget * widget ) const Returns the ID of the widget. Returns -1 if widget is 0 or is not being managed by this widget stack. See also widget() and addWidget(). void QWidgetStack::raiseWidget ( int id ) [slot] Raises the widget with ID id to the top of the widget stack. See also visibleWidget(). Example: xform/xform.cpp. void QWidgetStack::raiseWidget ( QWidget * w ) [slot] This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Raises widget w to the top of the widget stack. void QWidgetStack::removeWidget ( QWidget * w ) Removes widget w from this stack of widgets. Does not delete w. If w is the currently visible widget, no other widget is substituted. See also visibleWidget() and raiseWidget(). void QWidgetStack::setChildGeometries () [virtual protected] Fixes up the children's geometries. QWidget * QWidgetStack::visibleWidget () const Returns the currently visible widget (the one at the top of the stack), or 0 if nothing is currently being shown. See also aboutToShow(), id(), and raiseWidget(). QWidget * QWidgetStack::widget ( int id ) const Returns the widget with ID id. Returns 0 if this widget stack does not manage a widget with ID id. See also id() and addWidget().widgetstack.3qt) and the Qt version (3.3.8).
http://manpages.ubuntu.com/manpages/precise/man3/qwidgetstack.3qt.html
CC-MAIN-2019-43
refinedweb
423
50.94
Synopsis Write out the model spectrum in the form required by mkinstmap Syntax save_instmap_weights( [id=None,] outfile [, clobber=False, fluxtype="photon"] ) Description The save_instmap_weights() command writes out the current model values in the form expected by the CIAO mkinstmap tool. Please see the Calculating Spectral Weights thread for further information on how to use this routine. The routine can be loaded into Sherpa by saying: from sherpa_contrib.utils import * Arguments Examples Example 1 sherpa> dataspace1d(0.5, 7, 0.1) sherpa> set_source(xsphabs.abs1 * powlaw1d.p1) sherpa> abs1.nh = 0.07 sherpa> p1.gamma = 1.7 sherpa> plot_instmap_weights() sherpa> save_instmap_weights("imap.dat") We want to create a weights file for the energy range 0.5 to 7 keV, using an absorbed power law as the model. The dataspace1d command is used to set the grid over which the model is evaluated; in this case we go from 0.5 to 7 keV with a step size of 0.1 keV. The next lines set the source model and set the relevant parameters. In this case we do not need to change the amplitude/normalization of the power law since the weights are normalized to a value of 1.0. If you had multiple source terms in your model expression then you would need to set the relative normalizations of the various components. Finally we plot the weights and then save them to the ASCII file "imap.dat". This file can then be used as input to the spectrumfile parameter of mkinstmap. Example 2 sherpa> save_instmap_weights(3, "wgts.dat") The weights are calculated using the model and grid defined for dataset 3. Example 3 sherpa> save_instmap_weights(3, "wgts.dat", False) As in the previous example, the weights are calculated using the model and grid defined for dataset 3, but this time the routine will not overwrite wgts.dat if it already exists. Example 4 sherpa> save_instmap_weights("wgts.dat", clobber=False) The weights are calculated using the model and grid defined for the default dataset, and written to wgts.dat only if the file does not already exist. Example 5 sherpa> save_instmap_weights("wgts.dat", fluxtype="erg") The weights are calculated in order to create an instrument map with units of cm^2 count / erg rather than the default of cm^2 count / photon. Notes Calculating the weights when fluxtype="photon" For a model spectrum which has units of photon/cm^2/s as a function of energy (i.e. the model is integrated across each bin, as is the case with X-Spec and Sherpa models), then the weights are calculated using the formula weight_i = y_i / sum(y_i) where sum(y_i) is the sum of the model spectrum over all the bins being used. These weights can then be used to create an instrument map with units of cm^2 count / photon. Calculating the weights when fluxtype="erg" In order to create an instrument map with units of cm^2 photon / erg, the weights are calculated using the following equation, where e_i is the energy of the ith bin in keV: weight_i = y_i / (1.60217653e-09 * sum(e_i * y_i)) Unlike the default case - of fluxtype="photon" - these weights will not sum up to 1; typical values will vary between 1e7 and 1e9, depending on the bin width and spectral shape. Creating the energy grid The simplest way to create the grid is to use the dataspace1d command: if you want an instrument map created over the energy range e1 to e2 (in keV), then say sherpa> dataspace1d(e1, e2, edelta) where edelta is the width of each bin. The idea is to select a bin width over which the combination of effective area and detector sensitivity is approximately flat; too large a step size may result in an incorrect result, whereas too small a step size will result in increasing the processing time of mkinstmap. See the "Introduction to Exposure Maps" document for more information. You can also use the energy grid defined by a PHA file, for example the following will use the energy bins in the range 0.5 to 7 keV: sherpa> load_pha("src.pha") sherpa> notice(0.5, 7) sherpa> set_source(xsphabs.gal * xspowerlaw.pl) sherpa> gal.nh = 0.23 sherpa> pl.phoindex = 1.5 sherpa> save_instmap_weights("wgt.txt") Creating an instrument and exposure map The weights file created by save_instmap_weights() should be used as the value of the spectrumfile parameter of mkinstmap (in which case the monoenergy parameter is ignored). If fluxtype is "photon" (the default) then the resulting image will be in units of cm^2 count / photon; this can then be converted into an exposure map (using mkexpmap) with units of cm^2 count / photon or cm^2 count / photon / s (if normalize is set to yes or no respectively). If the fluxtype paramter if set to "erg" then the instrument map units will effectively be cm^2 count / erg and the corresponding exposure map will have units of cm^2 count / erg or cm^2 count / erg / s. So, if you divide a counts image by the exposure map - created with normalize=no - then you will get an estimate of the flux per pixel in units of photon/cm^2/s (fluxtype="photon") or erg/cm^2/s (fluxtype="erg"). Note that this estimate depends strongly on how closely the source spectrum matches the one used to create the weights file; if the spectrum differs significantly then the estimate can easily be out by at least 50 or 100%. Care must therefore be taken when analyzing extended sources with variations in spectral shape, or when performing background subtraction, since the cosmic X-ray background is likely to have a different spectrum to the source. Changes in the October 2012 release Metadata The output file now contains comment lines that contain the low and high edges of the energy range, the model expression used to create the weights, and the file creation time. This information is used by fluximage, flux_obs, and merge_obs to create weighted exposure maps. Bugs See the bugs pages on the Sherpa website for an up-to-date listing of known bugs. See Also - contrib - estimate_weighted_expmap, get_instmap_weights, plot_instmap_weights, save_chart_spectrum, save_marx_spectrum, sherpa_utils - modeling - save_model, save_source - saving - restore, save, save_all, save_arrays, save_data, save_delchi, save_error, save_filter, save_grouping, save_image, save_pha, save_quality, save_resid, save_staterror, save_syserror, save_table, script
https://cxc.cfa.harvard.edu/sherpa/ahelp/save_instmap_weights.html
CC-MAIN-2020-10
refinedweb
1,050
61.46
Plugin for opening files from clicking text in a file? - GreatMCGamer last edited by I need a plugin that will detect string " function " with white spaces, and then read "FolderName:FileName " (Ending to a white space) and make that text region clickable. When clicked the plugin will look for the specified file by going 2 folders backwards from the file I was clicking the text from, then open “FolderName” and then “functions” and then open “FileName” into a new tab in Notepad++… If there is “FolderName:OtherFolderName/FileName” (“OtherFolderName” is in the directory where “FileName” would have been) It would be nice to detect that too. These files are in appdata most of the time so that might effect the code aswell for it to have permissions to go around those files. Would make life a lot easier for a handful of .mcfunction “scripters”. - PeterJones last edited by I doubt there’s any plugin for that specific task. There might be one that allows generic cross-linking of some sort, but I don’t know it. Really, that sounds like a job for one of the scripting plugins, like PythonScript or LuaScript. I don’t know if it could handle every requirement, but it might be able to make a close approximation. (it’s the making the specially-highlighted strings clickable that I think would cause the most difficulty). But either as a new plugin, or a script in a scripting plugin, it would take significant coding, and you probably aren’t going to get anyone to code it for you for free. Since you mentioned “scripters”, that might mean you have enough coding skill to do it yourself, but I don’t know. - PythonScript project and download page - PythonScript Install Instructions for recent Notepad++ versions - LuaScript project and download page - I believe you can install LuaScript directly from Plugins > Plugins Admin without having to follow special directions. - David Spector last edited by I need clickable text too, since I’m used to it from Notetab Pro (I had to move because it doesn’t support Unicode). I need two commands (bound to separate keystrokes): Click pathname to open that file for editing (if detecting pathnames is too hard, requiring surrounding square brackets [] is sufficient) Click URL to open in default browser (again, using surrounding square brackets is sufficient). - Michael Vincent last edited by @David-Spector said in Plugin for opening files from clicking text in a file?: Click URL to open in default browser You can accomplish this from “Settings” menu => “Preferences” item => “MISC” section and “Clickable Link Settings” check “Enable” box. The former - open file can be done with a scripting plugin. I highlight text that is a filename in N++ and then I have Ctrl-Alt-O shortcut mapped to “Open Include File” which is an NppExec command: NPP_CONSOLE keep NPE_CONSOLE -- v+ "$(NPP_DIRECTORY)\plugins\nppExtTasks.bat" openinc "$(FULL_CURRENT_PATH)" $(CURRENT_WORD) NPP_OPEN $(OUTPUT) NPE_CONSOLE -- v- and the “nppExtTasks.bat” script mentioned above does some logic about directory back tracing and looking in certain include directories if the file extension of the original file is “.c” or “.pl” or other such stuff. If it’s in the same directory: NPP_OPEN $(CURRENT_WORD) would be sufficient. Cheers. Instead using a scripting plugin it is also possible to use the Open Selection plugin, which is especially made for opening files whose file names are currently selected in a document’s text. You can even configure it to use standard paths (e.g. for include files in the C programming language). The plugin can be installed via PluginsAdmin and is available in 32 bit and 64 bit versions. - Alan Kilborn last edited by @David-Spector said in Plugin for opening files from clicking text in a file?: Click pathname to open that file for editing How about simply go to the Editmenu, choose On Selection, then choose Open File? It’s annoying to open a series of menus, but can be bound to a keycombo as well for quick access. Of course, you have to have some selected text first… If your core requirement is “open file from text” then a tag lookup plugin can help. When generating “tags” file you can indicate to treat each file as a tag and probably (I never tried) to treat ONLY files as tags. That way looking up a file name will open it. I use it constantly for #include <somefile.h>statements. I didn’t follow your exact requirement, they looked extremely specific to your use case so your only hope is to write your own plugin or script. - rinku singh last edited by rinku singh @GreatMCGamer said in Plugin for opening files from clicking text in a file?: When clicked the plugin will look for the specified file by going 2 folders backwards from the file find_and_open_file_x86.zip find_and_open_file_x64.zip
https://community.notepad-plus-plus.org/topic/18296/plugin-for-opening-files-from-clicking-text-in-a-file/5?lang=en-US
CC-MAIN-2021-17
refinedweb
805
67.18
Hide Forgot Description of problem: I tried to install Fedora 32 from scratch. I took Fedora-32-20200317.n.1. KS looks like this As you can see in %post we have check-update. Accordingly to docs - Non-interactively checks if updates of the specified packages are available. ^ This doesn't seem to be right, DNF is actually blocking execution on GPG. However, when I traced down DNF I saw this strace: Process 26508 attached read(0, [anaconda root@kvm-03-guest24 /]# ls -la /proc/26508/fd/0 lrwx------. 1 root root 64 Mar 18 06:51 /proc/26508/fd/0 -> /dev/pts/0 DNF logs [anaconda root@kvm-03-guest24 /]# cat /var/log/dnf.log | tail -n5 2020-03-18T10:33:10Z DEBUG repo: downloading from remote: fedora-cisco-openh264 2020-03-18T10:33:13Z CRITICAL Importing GPG key 0x12C944D0: Userid : "Fedora (32) <fedora-32-primary@fedoraproject.org>" Fingerprint: 97A1 AE57 C3A2 372C CA3A 4ABA 6C13 026D 12C9 44D0 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-32-x86_64 [anaconda root@kvm-03-guest24 /]# cat /var/log/dnf.librepo.log | tail -n5 2020-03-18T10:33:08Z INFO Downloading: 2020-03-18T10:33:08Z INFO Downloading: 2020-03-18T10:33:10Z INFO Downloading: 2020-03-18T10:33:12Z INFO Downloading: 2020-03-18T10:33:13Z INFO Downloading: How reproducible: Beaker -> Provision latest F32 -> Wait till %post Actual results: dnf check-update hanging for better times. Expected results: dnf check-update will not require input from stdin. Additional info: When looking at this from an admin perspective, it's probably not a good idea to automatically import GPG keys when running check-updates. In this case, you probably should add -y/--assumeyes to the kickstart. DNF could be changed to fail on importing a key during check-update to make it non-interactive again. (In reply to Daniel Mach from comment #1) > When looking at this from an admin perspective, > it's probably not a good idea to automatically > import GPG keys when running check-updates. > > In this case, you probably should add -y/--assumeyes to the kickstart. Yes > > DNF could be changed to fail on importing a key during check-update > to make it non-interactive again. I agree. I'm completely fine with failure. Otherwise, docs should be updated accordingly. So whether this is a sensible thing to do in a kickstart is maybe up for debate, but seems there is a real new problem here. You're not supposed to have to sign off on the import of a GPG key on first use like this, IIRC. This is probably caused by the enabling of the Cisco repo by default, which was . CCing folks from that bug here: were we expecting this kind of trust prompt? Can we make it not happen? Well, I think this is really ? ie, it always prompts for the key import even if it's been imoprted already via rpm --import due to the repodata gpg check being enabled... oh, so it's because this repo has repo_gpgcheck=1 ? repo_gpgcheck=1 needs the key to get imported into dnf's databases and not rpm's in order to verify the metadata has not been tampered with, and as the cisco repo bypasses mirrormanager we have no other protection for man in the middle attacks on the repo Kevin, this is more than bug 1768206. In this case, you have GPGs because it is part of Fedora, however, command itself (check-update) may end up hanging on read(0. Which is against the documentation - "Non-interactively checks if updates of the specified packages are available." So the problem is still there, it is more like how you will achieve it. I am not a dnf developer, so I have no idea the way they want to solve this. ;) Perhaps dnf could pull gpg keys from rpm if they are already imported there? Or as you say, fail if they have to ask anything in a check-update..
https://bugzilla.redhat.com/show_bug.cgi?id=1814596
CC-MAIN-2021-31
refinedweb
665
63.09
LEASING AND MODARABAS The fierce competition is mainly due to uneven playing field, more in favour of commercial banks underwriting leases By SHABBIR H. KAZMI July 28 - Aug 03, 2003 In the absence of vibrant developing financial institutions (DFIs) leasing companies and modarabas have emerged as the major source of medium-term funds. They have also gone into consumer financing and providing funds for small and medium enterprises. Due to careful risk evaluation and constant monitoring the defaults have been low. Some of the entities indulging in imprudent practices were in bad shape. However, constant and vigilant monitoring by Securities and Exchange Commission of Pakistan (SECP) has helped in avoiding any serious crisis. The leasing companies and modarabas have virtually assumed the role of DFIs because now they underwrite big-ticket leases and lease period often touches five-year maturity period. Though, leasing companies and modarabas have survived during the period fresh investment was low, the entry of commercial banks and other NBFCs into leasing business has created uneven playing field. Commercial banks enjoying the edge, due to lower cost of funds, force the leasing companies to work on very lean spread. So far they have faced the challenge successfully mainly due to efficient risk management. However, it is yet to be seen how successful are they in the prevailing situation? According to some financial sector experts, "Leasing companies and modarabas, undertaking leasing as core business, have the expertise to beat the competition. While cost of funds may be higher for leasing companies, the prudent risk management has kept rental recovery percentage high and mostly in-time." In the recent past bulk of the leasing business originating from underwriting of car leases has prompted commercial banks to enter into auto financing business. However, some sector experts say, "Auto financing facility extended by commercial banks is qualify to be called lease. It is offer of loan for the purchase of a vehicle because the client does not qualify for tax credit for the amount being paid." It may be worth quoting from the message of Khalid Mirza (the then Chairman of SECP) published in Pakistan Leasing Year Book 2002. It says: "I am aware that one of the most formidable challenge being faced by the leasing companies at present is the growing presence of banks and DFIs in the lease market. Their cost of funds, colossal size and extensive branch network do seem intimidating at the first, but the fact of the matter is that leasing by commercial banks in other countries has not been a success. This is essentially because commercial banking and leasing are two separate fields based on totally different risk management criteria. While leasing inherently entails risk, commercial banking is risk averse. In fact 'genuine' leasing by commercial banks is not really possible and almost invariably leasing by commercial banks results in fully collateralized asset financing in the grab of lease". The entry of commercial banks and NBFCs into leasing business has proliferated only because of the 'accommodating' attitude of Securities and Exchange Commission of Pakistan (SECP) and State Bank of Pakistan (SBP). As the regulator, the SECP should ensure that the companies should confine themselves to the mandate for which they have been established. Technically, leasing does not come under the purview of NBFCs as the rules provide this mandate to leasing companies and modarabas doing leasing as core business. In the past, it was decided that if banks and NBFCs wished to undertake leasing business, they had to establish separate entities. However, the decision has not been implemented in letter and spirit. Despite the subdued investment in year 2002 and tough competition from commercial banks the companies doing leasing business expanded their geographical reach and extending facilities to small and medium enterprises (SMEs). Leasing companies issued the largest number of term finance certificates (TFCs) and pioneered the flotation of special purpose vehicle (SPV) for raising term financing. The sector also well responded to the regulator's requirement regarding increase in paid-up capital. This also led to mergers and acquisitions resulting in further consolidation. The collaboration between Leasing Association of Pakistan (LAP) and Swiss Agency for Development and Co-operation (SDC) has proved very fruitful and beneficial. During the year, five seminars were held in NWFP province under SME Lease Awareness programme. These workshops on micro and small leasing were arranged for the staff of leasing companies. The LAP is also developing a database of potential SMEs with the help of SDC. According to LAP Year-Book 2002, the database contained profiles of more than 6,000 potential lessees. The Innovative Project Fund, which was launched with SDC support, has been further availed by the LAP members. MACRO PERSPECTIVE The number of the LAP members increased to 30 in year 2002. The aggregate paid-up capital increased from Rs 4.3 billion in 1998 to Rs 7.5 billion in 2002. However, bulk of the increase was mainly due to SECP's regulation regarding increase in minimum paid-up capital requirement to Rs 200 million. During this period investment in lease finance increased from Rs 28 billion to Rs 39 billion. The revenue grew from Rs 5.3 billion in 1998 to Rs 7.3 billion in 2002. However net profit exhibits downward trend. The aggregate net profit of LAP members went down from Rs 3.98 billion in 2001 to Rs 1.92 billion in 2002. Earnings are one of the key determinants in the success or failure. It is the most specific expression of an entity's franchise strength and has the direct impact on the ability of the entity to attract equity and debt in terms of amount and cost. Leasing sector's profitability performance during 2002 was adversely affected due to 7 out of 27 companies posting losses. The sector's reduced profitability can be attributed to some infection in the lease portfolio and fierce competition from other financial institutions. With the persistent and substantial reduction in interest rates, internal rates of return (IRR) for the leasing companies have been on the decline. The emerging trend of large-ticket lease financing hints towards leasing companies assuming the role of DFIs. This is a major shift in focus, though, not necessarily inappropriate provided the leasing sector assembles the wherewithal that is necessary to enter a market that grows more complex with change in technology and render equipment obsolete faster than many may find affordable. This calls for familiarity with the sourcing, supply, demand, and pricing of a much wider variety of industrial technology, and adopting a more sophisticated approach to risk management. The faulty decision making by the financial institutions is mainly due to lack of credible information regarding technology and emerging trends. This forces the lenders to rely on borrowers choice that may often be rooted in non-commercial considerations. It is most desired that leasing companies develop the technology and price evaluation cells. Setting up such elaborate cells may not be possible in each company due to diversity of plant and equipment being imported into the country. Therefore, it may be appropriate that a centralized database and evaluation cell is established. It is not a far cry because syndication is getting popular to hedge the risk. Modarabas have been playing an important role in the deepening of the financial sector in the country. They have helped in widening the scope of financial services and provided a successful and tested mode of Islamic financing. Some sector experts believe that the sector comprises of too many small players with insignificant capital base and market share posing a systemic risk. There is a need for the players to consciously follow the policy of mergers and acquisition for consolidation. The players must also develop new products and pursue aggressive marketing of these products and services. It is heartening that players are fully cognizant and making efforts. One major bear through has been the approval of Musharika-based TFCs. Modaraba Association of Pakistan (MAP) has also prepared a proposal for setting up a SME Modaraba. With an initial paid-up capital of Rs 200 million. About 20 modarabas are expected to participate in the SME Modaraba that will undertake SME business in the smaller towns and distant areas. This will help in resolving the problem of individual modarabas, which do not have an elaborate branch network. It is also reassuring to note that Pakistani modarabas are actively soliciting funds from other Muslim countries by highlighting the successful role they have been playing in eliminating Riba from financial transactions. One such effort has been made at the 9th Private Sector Meeting of Islamic Countries held in Sharjah in December last year. Waqar Ajmal Chaudhry, Chairman of MAP, made a detailed presentation about the operations of modarabas in Pakistan at the meeting. This presentation helped in creating enormous interest of other Muslim countries for participation in the operations of Pakistani modarabas. The modaraba sector is the largest sector in Pakistan's financial market, having a paid-up capital of Rs 7.9 billion as at June 30, 2002. There are 45 modarabas listed at Karachi Stock Exchange. Out of these 34 are member of MAP. The performance of modarabas has shown consistent and reasonable performance over the years. During 2002, out of 34 MAP members declared dividend. The aggregate payout was Rs 570 million. While 14 members did not declare dividend another 7 posted losses. While many people believe that modarabas only undertake leasing business, the diversity of their operations can be gauged from the income earned through various activities. During 2002, the total income of MAP members was Rs 3,930 million. Out of this Rs 2,917 million was earned from leasing business and Rs 340 million was from Musharika and Morabaha products. The latest entrant is Fayzan Manufacturing Modaraba. It was incorporated pursuant to a joint venture agreement between Faysal Bank, Al Faysal Investment Bank, Meezan Bank and Pak Kuwait Investment Company. This is a specific purpose modaraba for a period of five and half years, commencing March 22, 2001. It has been floated to construct, operate, manage and own a polyester staple fibre plant spinning and processing plant at the premises of ICI Pakistan under the licence agreement with ICI. The plant has commenced commercial operations on April 01, 2002. OUTLOOK With the revival of investors' confidence in Pakistan's economy the private sector demand for funds has registered significant increase. Though, commercial banks are suffering from surplus liquidity, they are reluctant to enter into medium-term financing, particularly for plant and machinery. In such a scenario only leasing companies and modarabas have to meet the demand. They are poised to meet the challenge. The only favour they demand from the government is an even playing field for all the players.
http://www.pakistaneconomist.com/pagesearch/Search-Engine2003/S.E207.php
CC-MAIN-2017-09
refinedweb
1,798
53.51
Hello everyone! In today’s article, we’ll be looking at how we can use the tempfile module in Python. This module is very useful when you want to store temporary files. There may be a need to store temporary data from an application point of view, so these files can prove to be very useful! Python provides us with the tempfile module, which gives us an easy to use interface. Let’s get started. The tempfile module in Python This module is a part of the standard library (Python 3.x), so you don’t need to install anything using pip. You can simply import it! import tempfile We will look at how we can create temporary files and directories now. Creating Temporary Files and Directories The tempfile module gives us the TemporaryFile() method, which will create a temporary file. Since the file is temporary, other programs cannot access this file directly. As a general safety measure, Python will automatically delete any temporary files created after it is closed. Even if it remains open, after our program completes, this temporary data will be deleted. Let’s look at a simple example now. import tempfile # We create a temporary file using tempfile.TemporaryFile() temp = tempfile.TemporaryFile() # Temporary files are stored here temp_dir = tempfile.gettempdir() print(f"Temporary files are stored at: {temp_dir}") print(f"Created a tempfile object: {temp}") print(f"The name of the temp file is: {temp.name}") # This will clean up the file and delete it automatically temp.close() Output Temporary files are stored at: /tmp Created a tempfile object: <_io.BufferedRandom name=3> The name of the temp file is: 3 Let’s now try to find this file, using tempfile.gettempdir() to get the directory where all the temp files are stored. After running the program, if you go to temp_dir (which is /tmp in my case – Linux), you can see that the newly created file 3 is not there. ls: cannot access '3': No such file or directory This proves that Python automatically deletes these temporary files after they are closed. Now, similar to creating temporary files, we can also create temporary directories using the tempfile.TemporaryDirectory() function. tempfile.TemporaryDirectory(suffix=None, prefix=None, dir=None) The directory names are random, so you can specify an optional suffix and/or prefix to identify them as part of your program. Again, to ensure safe deletion of the directory after the relevant code completes, we can use a context manager to securely wrap this! import tempfile with tempfile.TemporaryDirectory() as tmpdir: # The context manager will automatically delete this directory after this section print(f"Created a temporary directory: {tmpdir}") print("The temporary directory is deleted") Output Created a temporary directory: /tmp/tmpa3udfwu6 The temporary directory is deleted Again, to verify this, you can try to go to the relevant directory path, which won’t exist! 1. Reading and Writing from a Temporary File Similar to reading or writing from a file, we can use the same kind of function calls to do this from a temporary file too! import tempfile with tempfile.TemporaryFile() as fp: name = fp.name fp.write(b'Hello from AskPython!') # Write a byte string using fp.write() fp.seek(0) # Go to the start of the file content = fp.read() # Read the contents using fp.read() print(f"Content of file {name}: {content}") print("File is now deleted") Let’s now look at the output. Output Content of file 3: b'Hello from AskPython!' File is now deleted Indeed, we were able to easily read and write from/to temporary files too. 2. Creating Named Temporary Files In some situations, named temporary files may be useful to make the files visible to other scripts/processes so that they can access it, while it is not yet closed. The tempfile.NamedTemporaryFile() is useful for this. This has the same syntax as creating a normal temporary file. import tempfile # We create a named temporary file using tempfile.NamedTemporaryFile() temp = tempfile.NamedTemporaryFile(suffix='_temp', prefix='askpython_') print(f"Created a Named Temporary File {temp.name}") temp.close() print("File is deleted") Output Created a Named Temporary File /tmp/askpython_r2m23q4x_temp File is deleted Here, a named temporary file with a prefix of askpython_ and suffix of _temp is created. Again, it will be deleted automatically after it is closed. Conclusion In this article, we learned how we can use the tempfile module in Python to deal with temporary files and directories. References - Python Tempfile module Documentation - JournalDev article on tempfile module
https://www.askpython.com/python/tempfile-module-in-python
CC-MAIN-2021-31
refinedweb
755
57.16
GoSwift - Go Goodies for Swift Bring some of the more powerful features of Go to your iOS / Swift project such as channels, goroutines, and defers. This is an experimental project. For production use of channels and sync APIs, check out the Safe project. Built for Swift 2.0 - For Swift 1.2 support use v0.1.4 or earlier. Features - Goroutines - Defer - Panic, Recover - Channels - Buffered Channels - Select, Case, Default - Closing - Sync Package - Mutex, Cond, Once, WaitGroup Example Note that the following example and all of the examples in the examples directory originated from and Mark McGranaghan Go package main import "fmt" func main() { jobs := make(chan int, 5) done := make(chan bool) go func() { for { j, more := <-jobs if more { fmt.Println("received job", j) } else { fmt.Println("received all jobs") done <- true return } } }() for j := 1; j <= 3; j++ { jobs <- j fmt.Println("sent job", j) } close(jobs) fmt.Println("sent all jobs") <-done } Swift func main() { var jobs = Chan<Int>(5) var done = Chan<Bool>() go { for ;; { var (j, more) = <?jobs if more { println("received job \(j!)") } else { println("received all jobs") done <- true return } } } for var j = 1; j <= 3; j++ { jobs <- j println("sent job \(j)") } close(jobs) println("sent all jobs") <-done } Run an Example Each example has a .swift and .go file that contain the same logic. ./run.sh examples/goroutines.swift ./run.sh examples/goroutines.go Installation (iOS and OS X) Carthage Add the following to your Cartfile: github "tidwall/GoSwift" Then run carthage update. Follow the current instructions in Carthage's README for up to date installation instructions. The import GoSwift directive is required in order to access GoSwift features. CocoaPods Add the following to your Podfile: use_frameworks! pod 'GoSwift' Then run pod install with CocoaPods 0.36 or newer. The import GoSwift directive is required in order to access GoSwift features. Manually Copy the GoSwift\go.swift file into your project. There is no need for import GoSwift when manually installing. License The GoSwift source code available under the MIT License. The Go source code in the examples directory is copyright Mark McGranaghan and licensed under a Creative Commons Attribution 3.0 Unported License. The Swift version of the example code is by Josh Baker Github Help us keep the lights on Dependencies Used By Total:
https://swiftpack.co/package/tidwall/GoSwift
CC-MAIN-2019-30
refinedweb
386
67.65
Today I Learned This Part I: What are word2vec Embeddings? Recently Quora put out a Question similarity competition on Kaggle. This is the first time I was attempting an NLP problem so a lot to learn. The one thing that blew my mind away was the word2vec embeddings. Till now whenever I heard the term word2vec I visualized it as a way to create a bag of words vector for a sentence. For those who don’t know bag of words: If we have a series of sentences(documents) - This is good - [1,1,1,0,0] - This is bad - [1,1,0,1,0] - This is awesome - [1,1,0,0,1] Bag of words would encode it using 0:This 1:is 2:good 3:bad 4:awesome But it is much more powerful than that. What word2vec does is that it creates vectors for words. What I mean by that is that we have a 300 dimensional vector for every word(common bigrams too) in a dictionary. How does that help? We can use this for multiple scenarios but the most common are: A. Using word2vec embeddings we can find out similarity between words. Assume you have to answer if these two statements signify the same thing: - President greets press in Chicago - Obama speaks to media in Illinois. If we do a sentence similarity metric or a bag of words approach to compare these two sentences we will get a pretty low score. But with a word encoding we can say that - President is similar to Obama - greets is similar to speaks - press is similar to media - Chicago is similar to Illinois B. Encode Sentences: I read a post from Abhishek Thakur a prominent kaggler.(Must Read). What he did was he used these word embeddings to create a 300 dimensional vector for every sentence. His Approach: Lets say the sentence is “What is this” And lets say the embedding for every word is given in 4 dimension(normally 300 dimensional encoding is given) - what : [.25 ,.25 ,.25 ,.25] - is : [ 1 , 0 , 0 , 0] - this : [ .5 , 0 , 0 , .5] Then the vector for the sentence is normalized elementwise addition of the vectors. i.e. Elementwise addition : [.25+1+0.5, 0.25+0+0 , 0.25+0+0, .25+0+.5] = [1.75, .25, .25, .75] divided by math.sqrt(1.25^2 + .25^2 + .25^2 + .75^2) = 1.5 gives:[1.16, .17, .17, 0.5] Thus I can convert any sentence to a vector of a fixed dimension(decided by the embedding). To find similarity between two sentences I can use a variety of distance/similarity metrics. C. Also It enables us to do algebraic manipulations on words which was not possible before. For example: What is king - man + woman ? Guess what it comes out to be : Queen Application/Coding: Now lets get down to the coding part as we know a little bit of fundamentals. First of all we download a custom word embedding from Google. There are many other embeddings too. wget The above file is pretty big. Might take some time. Then moving on to coding. from gensim.models import word2vec model = gensim.models.KeyedVectors.load_word2vec_format('data/GoogleNews-vectors-negative300.bin.gz', binary=True) 1. Starting simple, lets find out similar words. Want to find similar words to python? model.most_similar('python') (u'Burmese_python', 0.6680364608764648), (u'snake', 0.6606293320655823), (u'crocodile', 0.6591362953186035), (u'boa_constrictor', 0.6443519592285156), (u'alligator', 0.6421656608581543), (u'reptile', 0.6387745141983032), (u'albino_python', 0.6158879995346069), (u'croc', 0.6083582639694214), (u'lizard', 0.601341724395752)] 2. Now we can use this model to find the solution to the equation: What is king - man + woman? model.most_similar(positive = ['king','woman'],negative = ['man']) (u'monarch', 0.6189674139022827), (u'princess', 0.5902431011199951), (u'crown_prince', 0.5499460697174072), (u'prince', 0.5377321839332581), (u'kings', 0.5236844420433044), (u'Queen_Consort', 0.5235946178436279), (u'queens', 0.5181134343147278), (u'sultan', 0.5098593235015869), (u'monarchy', 0.5087412595748901)] You can do plenty of freaky/cool things using this: 3. Lets say you wanted a girl and had a girl name like emma in mind but you got a boy. So what is the male version for emma? model.most_similar(positive = ['emma','he','male','mr'],negative = ['she','mrs','female']) (u'kenny', 0.48300960659980774), (u'alves', 0.4684845209121704), (u'gareth', 0.4530612826347351), (u'bellamy', 0.44884198904037476), (u'gibbs', 0.445194810628891), (u'dos_santos', 0.44508373737335205), (u'gasol', 0.44387346506118774), (u'silva', 0.4424275755882263), (u'shaun', 0.44144102931022644)] 4. Find which word doesn’t belong to a list? model.doesnt_match("math shopping reading science".split(" ")) I think staple doesn’t belong in this list! Other Cool Things 1. Recommendations: In this paper, the authors have shown that itembased CF can be cast in the same framework of word embedding. 2. Some other examples that people have seen after using their own embeddings: Library - Books = Hall Obama + Russia - USA = Putin Iraq - Violence = Jordan President - Power = Prime Minister (Not in India Though) 3.Seeing the above I started playing with it a little. Is this model sexist? model.most_similar(positive = ["donald_trump"],negative = ['brain']) (u'ozzie', 0.39440611004829407), (u'democrate', 0.39187556505203247), (u'clinton', 0.390536367893219), (u'hillary_clinton', 0.3862358033657074), (u'bnp', 0.38295692205429077), (u'klaar', 0.38228923082351685), (u'geithner', 0.380607008934021), (u'bafana_bafana', 0.3801495432853699), (u'whitman', 0.3790769875049591)] Whatever it is doing it surely feels like magic. Next time I will try to write more on how it works once I understand it fully.
https://mlwhiz.com/blog/2017/04/09/word_vec_embeddings_examples_understanding/
CC-MAIN-2020-16
refinedweb
910
70.9
#include <wx/msgout.h> Simple class allowing to write strings to various output channels. wxMessageOutput is a low-level class and doesn't provide any of the conveniences of wxLog. It simply allows writing a message to some output channel: usually file or standard error but possibly also a message box. While use of wxLog and related functions is preferable in many cases sometimes this simple interface may be more convenient. This class itself is an abstract base class for various concrete derived classes: It also provides access to the global message output object which is created by wxAppTraits::CreateMessageOutput() which creates an object of class wxMessageOutputStderr in console applications and wxMessageOutputBest in the GUI ones but may be overridden in user-defined traits class. Example of using this class: Return the global message output object. This object is never NULL while the program is running but may be NULL during initialization (before wxApp object is instantiated) or shutdown.(after wxApp destruction). Method called by Printf() to really output the text. This method is overridden in various derived classes and is also the one you should override if you implement a custom message output object. It may also be called directly instead of Printf(). This is especially useful when outputting a user-defined string because it can be simply called with this string instead of using (notice that passing user-defined string to Printf() directly is, of course, a security risk). Output a message. This function uses the same conventions as standard printf(). Sets the global message output object. Using this function may be a simpler alternative to changing the message output object used for your program than overriding wxAppTraits::CreateMessageOutput(). Remember to delete the returned pointer or restore it later with another call to Set().
https://docs.wxwidgets.org/3.1.5/classwx_message_output.html
CC-MAIN-2021-31
refinedweb
296
54.42
This is my fourth MongoDB post, in the first post we looked at how we can install MongoDB as a Windows Service, In the second post we looked at how we could do UPSERTs with MongoDB, In the third post we looked at how to sort results in MongoDB. This post is about indexing in MongoDB, we are going to take a look at how to create indexes and how to see if the indexes are being used by MongoDB. Every index that you create in MongoDB is a secondary index, this is because MongoDB creates the default _id index for all collections. The _id index is a unique index on the _id field, you cannot delete the index on _id. MongoDB indexes use a B-tree data structure Besides a regular one field index, you can also create the following indexes in MongoDB - Indexes on Embedded Fields - Compound Indexes - Multikey Indexes - Unique Indexes - Sparse Indexes Before you go crazy and start adding indexes on every possible field in your collection, keep in mind that just like in regular databases, the more indexes you have the slower you write operations will be. Every update and insert will be a little slower because the indexes will have to be maintained. Some limitations: A collection can’t have more than 64 indexes. Index keys can’t be larger than 1024 bytes. This includes the field value or values, the field name or names, and the namespace. Let’s go take a look at some of these indexes Creating A Simple Index in MongoDB Let’s insert some data before we create the index db.Indexing.insert( { name : "Denis", age : 20 } ) db.Indexing.insert( { name : "Abe", age : 30 } ) db.Indexing.insert( { name : "John", age : 40 } ) db.Indexing.insert( { name : "Xavier", age : 10 } ) db.Indexing.insert( { name : "Zen", age : 50 } ) Now let’s run a simple query that will return all rows where the name is Denis and we want to see what the engine is doing. You can use explain to return the plan db.Indexing.find({name: "Denis"}).explain() Here is what you get back { "cursor" : "BasicCursor", "isMultiKey" : false, "n" : 0, "nscannedObjects" : 0, "nscanned" : 0, "nscannedObjectsAllPlans" : 0, "nscannedAllPlans" : 0, "scanAndOrder" : false, "indexOnly" : false, "nYields" : 0, "nChunkSkips" : 0, "millis" : 0, "indexBounds" : { }, "server" : "Denis:27017" } Let’s add an index db.Indexing.ensureIndex({name: 1}); What we did was, we created an index on name and it is sorted ascending, if you want descending, you would use -1 instead of 1 Now if we add run the same command from before with explain db.Indexing.find({name: "Denis"}).explain() Here are the results { "cursor" : "BtreeCursor name" : 1, "indexBounds" : { "name" : [ [ "Denis", "Denis" ] ] }, "server" : "Denis:27017" } As you can see several things are different. Instead of a BasicCursor, we now use a BtreeCursor Also instead of "indexBounds" : { } we now see "indexBounds" : { "name" : [ [ "Denis", "Denis" ] ] }, Dropping an Index in MongoDB You can drop an index by specifying a field in a collection db.Indexing.dropIndex({name: 1}); Here is the output { "nIndexesWas" : 2, "ok" : 1 } You can also drop all indexes for a collection in one shot db.Indexing.dropIndexes() Here is the output { "nIndexesWas" : 1, "msg" : "non-_id indexes dropped for collection", "ok" : 1 } As we mentioned before all _id fields have an index by default and those don’t get dropped Creating A Unique Index in MongoDB Let’s now create an index on name again but this time we will make it unique., The syntax is the same as with the index we created before with the addition unique: true If you didn’t drop the index we created before, drop it first and then execute the following db.Indexing.ensureIndex({name: 1}, {unique: true}); Now if we try to insert the same name again, you will see that we get an error db.Indexing.insert( { name : "Denis", age : 20 } ) Here is the output E11000 duplicate key error index: Indexing.Indexing.$name_1 dup key: { : “Denis” } As you can see it is pretty easy to create a unique index Creating A Compound Index in MongoDB Creating an compound index is pretty straightforward as well, you just add the other fields. So if we want to create an compound index on name and age then you would do it like this db.Indexing.ensureIndex({name: 1, age : 1}); Just like in a regular index, you use 1 for ascending and -1 for descending To create an compound unique index, you would just add unique: true db.Indexing.ensureIndex({name: 1, age : 1}, {unique: true}) The same rules like in a regular RDBMS when an compound index is used apply. If you supply the first field ot the first field and subsequent fields, then the index will be used, otherwise the index will not be used. You can easily test this. Search for name which is the first field in the compound index db.Indexing.find({name: "Denis"}).explain() Here is the output, as you can see the index is used { "cursor" : "BtreeCursor name_1_age" : { "name" : [ [ "Denis", "Denis" ] ], "age" : [ [ { "$minElement" : 1 }, { "$maxElement" : 1 } ] ] }, "server" : "Denis:27017" } Now search for name which is the second field in the index db.Indexing.find({age: "20"}).explain() Here is the output for that { "cursor" : "BasicCursor", "isMultiKey" : false, "n" : 0, "nscannedObjects" : 5, "nscanned" : 5, "nscannedObjectsAllPlans" : 5, "nscannedAllPlans" : 5, "scanAndOrder" : false, "indexOnly" : false, "nYields" : 0, "nChunkSkips" : 0, "millis" : 0, "indexBounds" : { }, "server" : "Denis:27017" } As you can see, no index was used If you want to dive deeper into Indexing in MongoDB I would suggest you take a look at the documentation on the MongoDB site, they have an excellent section on Indexing with many more examples than I have given here. I didn’t cover Sparse Indexes, Indexes on Embedded Fields, Multikey Indexes, TTL Indexes, Geospatial Indexes or Geohaystack Indexes. You can find the documentation here: Nice explanation on the use of indexes in mongo. Showing what is coming back in the mongo shell is very helpful in understanding what is actually going on behind the scenes if you are using one of the drivers.
http://blogs.lessthandot.com/index.php/datamgmt/dbprogramming/indexes-in-mongodb/
CC-MAIN-2017-47
refinedweb
1,012
53.95
Python Programming, news on the Voidspace Python Projects and all things techie. Computing Articles I've edited the articles page to include links to the other computing related articles on Voidspace. On the subject of which, I've just completed a page on the new Plugin System for Firedrop. Hopefully this will be the first of a series of docs for firedrop. Like this post? Digg it or Del.icio.us it. Posted by Fuzzyman on 2005-04-01 18:09:29 | | Categories: Website, General Programming, Writing Playing with a Panda Now Python is good... we all know that, but there are some things where it's not necessarily the best option. Obviously if you were writing a commercial quality 3D game or virtual reality environment then you wouldn't use python. A while ago I saw another (or is that yet another... ?) C++ engine that promised commercial quality 3D control and effects under the auspices of Python. This one looked like it might live up to it's claims because : - it was being created by Disney - they were actually using it to produce a commercial product - it was being written specially for Python, rather than being a Python binding to a separate library For many years I've had a hankering to choreograph morphing objects as they dance to the beat of mathematical formula. No serious intent - I just think it would be quite a trippy thing to do. I eagerly downloaded Panda3D and the example game 'airblade', only to find that the whole thing threw up a host of bizarre warnings and errors and died unceremoniously. Not only that but there were no configuration instructions. When I gave up (after not a lot of effort) and uninstalled it, it left several environment variables hanging around pointing to now non-existent directories. I wasn't over impressed. Anyway - several months later (i.e. today) I accidentally stumbled across the website again - I think. They've got a 1.0.0 release, lots of documentation and even apologise for the previous version that didn't clean up after itself. I decided to give it another try. I installed Panda3d (which has Python 2.2 built into it rather than using your own install) and unzipped airblade. Rather than do anything rash like read the instructions I just fired up airblade to see if it would work... well I still get a load of warnings (I don't think the audio worked at all) but airblade runs... and it's really a visual treat. Very impressive. I'm still not sure if it will handle the shading and ray trace like effects that I'm after. It's optimised for more game oriented type code. More importantly I'm not sure what format it expects the 3D objects to be in - I need to check if they can be generated/edited with open source tools. Despite this it's a fantastic looking system. It's always nice to see Python making headway in situations you wouldn't necessarily expect. If it's a while since you've looked at Panda3D I can recommend checking it out again. Update: although they've written extensive docs, they don't come with the distribution. This is a pet hate of mine. As I don't have internet here I won't be able to check it out until tomorrow. Like this post? Digg it or Del.icio.us it. Posted by Fuzzyman on 2005-03-31 18:59:44 | | Published at Last Well they've published my book.... not quite :-) But at least my free copy of the Python Cookbook 2 has just arrived. It's got three recipes of mine in it.I didn't have much time to look at it yesterday but it looks like a very good book. Like this post? Digg it or Del.icio.us it. Posted by Fuzzyman on 2005-03-30 09:52:26 | | Playing With Firedrop A lot of my Python effort in the last couple of days has been with Firedrop. FireSpell the SpellChecker is now working great. I've even dug into the wxPython demo and used a rich TextBox to get the current word highlighted. It uses wx.TextAttr and looks very nice. That's the beauty of using wax [1]. Wax itself is even easier than Tkinter, but because it's built on top of wxPython it doesn't have the same limitations - in fact the sky's the limit. Wax is limited by its lack of documentation - something that Hans is trying to address. Since working with Hans on the plugin system I'm hoping to get round to addressing the same problem with Firedrop. I've written a few useful plugins now, at least two of which ought to be included in future releases of Firedrop. I've also nearly finished documenting the plugin system. I'd like to extend this to better documentation on the templates too. Firedrop has one of the nicest templating systems I've seen. I've looked at things like Myghty and Cheetah - both of which have their qualities - but the Firedrop system is just straightforward :-) There are one or two other bonuses in Firedrop. I've added Python source colouring to the menu (using colorize.py from MoinMoin - which Hans gave me). It works nicely, and with the addition of a 'reST Raw' option, the output HTML can be integrated very nicely into a reST weblog entry. Adding these new menu options was as complex as adding the following code to textmanipulator.py, and adding the menu options in mainframe.py : """ colorize python source code. """ if not col: return text p = col.Parser(text) p.format(None, None) src = p.getvalue() src = src.replace('\n', '<br />\n') # XXXX will this mess up '\r\n' ? src = src.replace(' ', ' ') return src def rest_raw(self, text): """ Embed a chunk as raw HTML (and indent it) """ lines = [(' ' + line.rstrip()) for line in text.split('\n')] lines.insert(0, '\n.. raw:: html\n') return '\n'.join(lines) + '\n' I'm hoping these will be included in the standard Firedrop distribution as well. colorize.py needed a minor adjustment - it used cStringIO which wasn't unicode compatible. Once I changed that to plain old StringIO, everything was hunky dory. The idea of all this work is that it makes the blogging tool nicer and more effective. It's certainly doing that - I'm really enjoying using Firedrop - but as always I wonder if this coding hasn't become an end in itself, rather than a means to an end. I feel like a carpenter who spends all his time working on his tools. He's got great tools - but never actually makes anything. Having said that, I'm very happy with the recent changes to Voidspace and am looking forward to seeing them continue. If you want to know what I mean, check out the Sitemap. Like this post? Digg it or Del.icio.us it. Posted by Fuzzyman on 2005-03-27 23:41:16 | | Categories: Blog on Blogging, Python, Website This work is licensed under a Creative Commons Attribution-Share Alike 2.0 License. Counter...
http://www.voidspace.org.uk/python/weblog/arch_d7_2005_03_26.shtml
CC-MAIN-2016-22
refinedweb
1,198
75
OSGi Fragment Bundles Don't Have Activators. Or Do They? Using "pseudo"-activators, fragment bundles can be more active than you think! Writing test code in an OSGi-setting requires some more work and decisions than in a plain Java-main()-applications-setting. For example, we typically don't want to put test code in the "functional" bundles themselves, as this makes the build process more complex, as we need to be able to extract the test code from the "production" release package. On the other hand, we don't want to export all bundle packages. So if we put our test code in separate bundles, we're not able to access all classes/packages that we might like to test... An often-cited approach can then be to include the test code in fragment bundles. These can be easily included/excluded in test launches or release packaging, and they use the same classloader as the host bundle, so they have access to all of the host's classes. For more info/discussion on this, check: - - - - Ok, and now what? Indeed. Once the decision to put test code in fragments is made, the next step is : how can we get these tests executed??? The problems are : - fragments do not get activated, so they can not register services, start service trackers etc. It's not possible AFAIK to have the fragment initiate any kind of action on "start-up". - fragment classes/resources are only visible in the host bundle, unless the host bundle exports them. But if the fragment is meant to be optional, we can not export its packages from the host. - host bundles can not easily discover their registered fragment bundles. The only approach I found was to inspect the MANIFEST of all running bundles, and found out if there are some with a Fragment-Host entry that refers to the host bundle. And even there, we may need features that are only practically available in the new OSGi 4.2. See So how can we "discover" the presence of test cases? In the links above, all kinds of tricks with reflection are described, or using eclipse-specific things. Others ensure that their test fragments provide a "magic file" on the root etc., for which the host can search. All these approaches are based on the host bundle being aware of the optional presence of a test fragment, and checking for the presence of a class or a file on some predefined path. In this way, test cases can be found and added to test suites etc. But this implies that the host bundle is aware of the purpose of the fragment(s). Now, to make things even more complicated, we often like to run tests using Equinox Console commands. This implies that we must be able to register CommandProvider implementations as OSGi services. But fragments do not have activators, so how can they register service implementations!? Enter the TestFragmentActivator To increase testing flexibility, we don't want the host bundle to be aware whether the fragment is providing JUnit test cases, CommandProviders, or other test approaches. At the same time, we want to allow the fragment to be able to register OSGi services or perform other OSGi-magic typically done in Activators. So we propose the following approach : - each test fragment must provide a BundleActivator implementation with a predefined qualified name. E.g. for a project FOO, to test backend services, the name could be com.foo.backend.service.test.TestFragmentActivator - in the host bundle's Activator, we add code like : public class Activator implements BundleActivator { private static Activator defaultInstance; // a reference to the fragment's pseudo-activator private BundleActivator testFragmentActivator; public void start(BundleContext context) throws Exception { defaultInstance = this; try { Class<? extends BundleActivator> frgActClass = (Class<? extends BundleActivator>) Class.forName("com.foo.backend.service.test.TestFragmentActivator"); testFragmentActivator = frgActClass.newInstance(); testFragmentActivator.start(context); } catch (ClassNotFoundException e) { // ignore, means the test fragment is not present... // it's a dirty way to find out, but don't know how to // discover fragment contribution in a better way... } } public void stop(BundleContext context) throws Exception { defaultInstance = null; if(testFragmentActivator!=null) testFragmentActivator.stop(context); } public static Activator getDefault() { return defaultInstance; } } - and in the fragment we add the implementation, that can e.g. register a new CommandProvider : package com.foo.backend.service.test; import org.eclipse.osgi.framework.console.CommandProvider; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceRegistration; import com.foo.backend.service.test.impl.ServiceTestCommandProvider; /** * This is a fake activator, i.e. the OSGI platform will never see or invoke it, * as we're inside a fragment. The goal is that the host bundle tries to * figure out if this kind of activator is present and if so, invoke its start() * & stop() methods from inside its own ones. * * Remark that this activator will not really start the fragment, it will remain * in the RESOLVED state as far as the OSGi platform is concerned! */ public class TestFragmentActivator implements BundleActivator { private ServiceRegistration svcReg; public void start(BundleContext context) throws Exception { ServiceTestCommandProvider svcTester = new ServiceTestCommandProvider(); svcReg = context.registerService(CommandProvider.class.getName(), svcTester, null); } public void stop(BundleContext context) throws Exception { svcReg.unregister(); } } In a similar way, we could use the fragment's pseudo activator to register JUnit testcases to some centralized test suite executor etc. Couldn't it even be a useful pattern in general for fragments, i.e. not only for test-oriented fragments?? What do you think? Erwin De Ley iSencia Belgium Kerkstraat 108 B-9050 Gent Belgium (Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.) Mladen Girazovski replied on Fri, 2009/12/18 - 3:58am I think you should distinguishbetween isolated unit tests (white box testin, where you need to know the internals) and integrated unit tests (black box testing, all you know are the interfaces), the first is best kept in the same project, ie. like Maven2 does in a seperate source path, that doesn't get added to the final product, the latter is best kept in his own project/bundle. Mirko Jahn replied on Fri, 2009/12/18 - 5:53am Interesting post. Though, I have some comments on how and when ;-) 1.) Activators are bad! Not the activation in general, but the code one provides usually is. For more details, have a look at (Neil's blog). 2.) Use Spring, DS, BluePrint or what ever DI framework you prefer (just make sure it supports the fragment approach). Besides of limiting the actual code needed, one can theoretically attach more than one fragment. 3.) Bundle trackers are simple to implement even with OSGi 4.1! All the core features of Spring DM are based on the extender approach. OSGi 4.2 "only" added convenience methods... 4.) Code duplication is an issue! Ultimately, you only want to expose the Unit tests as services (or a per bundle based reference) and have a consumer bundle with all the domain logic to run tests. 5.) Last but most importantly, you really need to think about what your test should look like! A junit test for instance should run outside an OSGi container! There are fw's out there providing simple mockcapabilities of OSGi API's so this shouldn't be an issue. If you're running blackbox tests, you shouldn't have access to the internals of a bundle at test. The only meaningful reason why this would make sense is to have two components. On test driver running the test and a fragment attached to the bundle at test to allow for remote configuration of the behavior, otherwise not possible. And that's about it. @migr: I agree for most part. The only thing... we decided to have the blackbox tests in the same project, but in different class paths (generating two distinct bundles) for one major reason: Versioning! With this we know that a certain test driver is related to a specific bundle without the need for a mapping table or additional rules or regulations. erwin de ley replied on Fri, 2009/12/18 - 9:34am Thanks for the feedback. Indeed, I can imagine that a certain amount of "pure" unit tests might be included in the functional bundle project. And then with some build-script-magic (be it Maven/Ant/whatever/) they get excluded from the release package. And you can launch them with a plain JUnit launcher, outside of a running OSGi. Nice and simple. But this is not the setting that this posting is about. If the number of tests increases, or the "level"/complexity of testing increases the test code quickly gathers a life of its own, with different maintenance needs and update schedules. Then I think it's better to split test code and application code into separate bundles (or fragments). Furthermore when you have tests that depend on the presence of services, or you just want to ensure that the tests are run in an environment that's comparable/equal to the final "production" environment, I really 'like' (strange I know, but well...) to execute them in a real OSGi platform. @mirkojahn : I'm a bit old-fashioned and like my logic to be in code. Annotations and XML-files just add noise for me, activators suite me fine in most cases even if it means I need to run some code templates in my IDE... DI is nice and all, but I've had my share of 'XML-debugging' or annotation-guessing. But I must admit that DS is almost tempting me to convert ;-) About the BundleTrackers : this does not really solve my problem. I'm not really happy to have to browse MANIFEST entries to discover fragments etc. Anyway, I want the fragment to be able to actively contribute tests/test tools/... I don't want the host bundle to be too much involved in enabling all of that. Just a simple pseudo-activator suites me fine and the fragment can do it's thing from there. White-box/black-box testing are indeed clean descriptions. But I often need grey-box testing as well. cheers erwin Slim Ouertani replied on Fri, 2009/12/18 - 9:39am Great post, erwin de ley replied on Fri, 2009/12/18 - 3:23pm in response to: Slim Ouertani @slim : Well, the host bundle is checking if a fragment activator is provided or not. And then just forwarding the start/stop invocations to it. But what actually happens then is completely up to the fragment. Activators may not be everyone's cup of tea, but for the moment I still prefer sticking to them. cheers erwin
http://java.dzone.com/tips/osgi-fragment-bundles-dont
CC-MAIN-2014-10
refinedweb
1,779
55.74
Details Description See: Boo should throw an error if accessing a non-static member of outer class. (Actually, C# just says the reference cannot be found I believe) One fix is around line 2029 in the processmethodbodies step, add: //check if found entity can't possibly be a member of self: if (member.DeclaringType != CurrentType && !(CurrentType.IsSubclassOf(member.DeclaringType))) That 'fix' doesn't change name resolution though, to exclude non-static members in outer classes. Issue Links Activity Btw: I think an inner class has a reference to an outer class instance in most cases, so why shouldn't boo use a different inner class model as C#? It would be great if inner classes would get the reference automatically inserted by the compiler. Constructing an inner class would then only be possible on an instance of the outer class. Boo: a = instanceOfOuterClass.InnerClass() C#: a = new OuterClass.InnerClass(instanceOfOuterClass); OK, if that's the error C# gives, then probably my fix is the way to do it. We can't change name resolution to handle this special case. The error message boo will give is: An instance of type 'Outer' is required to access non-static member 'whatever'. About your 2nd comment, I thought maybe we could insert a field in the inner class that stores an instance of the outer class. But what instance would we use? What if the Outer class doesn't have a zero-param constructor? But if there is a solution to do what you are proposing, that's great. For Arron, here is how to do your example using a stored instance of the outer class (this is how C# does it too): class foo: types = ['hello', 'world!'] def fu(): b = bar(self) b.fark() class bar: _outer as foo def constructor(outer as foo): _outer = outer def fark(): print _outer.types //should work even if types is a private field f = foo() f.fu() > But what instance would we use? The instance that created the inner class. Inner classes would automatically get a constructor that accepts an instance of the outer class as parameter. If the inner class already has constructors, the compiler would add the parameter that accepts an instance of the outer class. The constructors would assign the value of that parameter into a field. When calling the constructor, the compiler could automatically insert the reference to the outer class to the argument list. You would call the constructor on the instance of the outer class, thus "self.InnerClass()" would be a valid constructor call. (maybe this could be implemented by renaming the inner class internally and creating a instance method on the outer class with the inner classes' old name) References to outer classes' instance fields would then be redirectly to use the compiler generated field. So the effect would be that the original code (first post in the thread mentioned in the description) would be valid. Patch applied. Thanks! C# shows this error: error CS0038: Cannot access a nonstatic member of outer type 'OuterClass' via nested type 'OuterClass.InnerClass'
http://jira.codehaus.org/browse/BOO-450?attachmentOrder=desc
CC-MAIN-2013-48
refinedweb
511
63.49
Hello I am a fairly new at programming and have little experience with programming beyond the tutorials on this website(which I think I am on the 15th) and I have been messing around with a few programs that they have had in the the tutorials and expanding them and I was just wondering if there is any bad habits, things I could do to make my programs more organized, or anything else that I should try to fix now before I get to use to programming like that. One of the programs I have expanded on was in the tutorial about typecasting(lesson 11) and was showing how you could turn numbers into ASCII characters. I expanded on the program by giving an option to search for a certain number's character or to show all of the ASCII numbers. Here is what the program looks like If any of you have any suggestions on things that might improve my programming now so I will not develop bad programming habits. Oh also sorry if the variables have names that might not make sense could not think of other names for them in the moment.If any of you have any suggestions on things that might improve my programming now so I will not develop bad programming habits. Oh also sorry if the variables have names that might not make sense could not think of other names for them in the moment.Code:#include <iostream> using namespace std; int allchar()//prints all ASCII characters { int x = 0;//sets x to 0; allows for multiple printings of the ASCII characters while(x < 256) { cout<< x <<". "<< (char)x <<" "; x=x+1; //Note the use of the int version of x to // output a number and the use of (char) to // typecast the x into a character // which outputs the ASCII character that // corresponds to the current number } return 0; } int picked_char()//User inputs the number to find which character it is { cout<<"Please enter in the characters number you want to find.\n"; int character; cin>>character; cin.ignore(); character=character; cout<<character<<". "<< (char)character <<" "; return 0; } int main() { int again=1;//runs program again while(again == 1){ int choice;//user input for list of ascII or certain one int letter;//uesr input for which character to search int again_repeat = 1;//makes sure correct input in the while(again_repeat) int repeat=1;//repeats while(again ==1) statement till correct input is put in int program_repeat;//input to control if program repeats while(repeat == 1){ cout<<"Do you want a list of ASCII characters(press 1)\n"; cout<<"or search for a certain one(press 2?\n"; cout<<"\n"; cin>>choice; cin.ignore(); if(choice == 1){ allchar(); cout<<"\n"; cout<<"\n"; choice = 0; repeat = 0; } else if (choice == 2){ picked_char(); cout<<"\n"; cout<<"\n"; choice = 0; repeat = 0; } else{ cout<<"Invaild Entry. Please re-enter choice.\n"; cout<<"\n"; repeat = 1; } } cout<<"If you want to search for another ASCII character press 1.\n"; cout<<"If you want to exit this program press 2.\n\n"; while(again_repeat == 1){ cin>>program_repeat; cin.ignore(); cout<<"\n\n"; if(program_repeat==1){ again=1; again_repeat = 0; } else if(program_repeat==2){ again_repeat = 0; again=0; } else{ cout<<"Invaild Entry. Please re_enter choice.\n"; } } } return 0; }
http://cboard.cprogramming.com/cplusplus-programming/144322-advice-make-my-programming-better-beginner-programmer.html
CC-MAIN-2014-42
refinedweb
548
65.15
Unity 5.0 Unity.现在更新 发行说明. Improved inspectors and debug visualizations - State Machine Behaviours - StateMachine Transitions - Can now add higher level transitions from StateMachine to StateMachine - Entry and Exit nodes define how the StateMachine behaves upon entering and exiting. StateMachine_3<< Audio - Added a new AudioMixer asset type! Create one or more AudioMixers in a project. - Use the Audio Mixer window to create complex mixing hierarchies and effect processing chains. - Mix and master all audio within Unity by tweaking all parameters during edit mode and play mode. - VU meters for the outputs of all AudioGroup and at attenuation points within the AudioGroup. - Allow AudioSources to route their signal into any AudioMixer. - The audio output of one AudioMixer can be routed into any AudioGroup of any other AudioMixer, allowing complex re-configurable Audio processing. - Audio "Sends" and "Receives" can be inserted anywhere into the signal chain of an AudioGroup. - The attenuation of an AudioGroup can be applied at any point in the AudioGroup (allowing pre and post fader effects). - Snapshots of mixer state (on all parameters) can be created for AudioMixers. These snapshots can be interpolated between during play through a set of per-parameter transition curves. - Snapshots can also be weighted blended (2 or more snapshots). - Any parameter (volume / pitch / effect parameter etc) can be exposed via a name to the runtime API allowing very precise tweaking of any parameter in a mixer during game play. - Mixer "Views" can be created so that complex mixer hierarchies can be narrowed down in the GUI allowing focus on tweaking certain parts of the mix (music / foley / etc). - AudioGroups can be Soloed, Muted and have their effects bypassed. - Built-in side-chain volume ducking. - Support for custom high-performance native audio plugins through a new SDK. - Reverb Zone Mix slider and curve in order to be able to control amount of signal routed to the global reverb associated with Audio Reverb Zones. This allows setting up natural transitions between near field and distant sounds and also allows routing 2D sounds into the reverb. - Rewritten Audio asset pipeline and AudioClip backend. - AudioClip settings now support multi-editing. - Per-platform compression setting overrides for AudioClip import, much like texture importing. This includes an API change. Users will now be able to enable override settings per platform and have unity have different compression characteristics for different platforms. - Audio transcoding and packing now happens in a separate tool, removing risk of crashing Unity on import. - No double loading of sounds during import processing. - Better handling of huge audio files. If a sound is set to streaming, it is never fully loaded in the editor or player now. - Editor profiling of Audio is now accurate and reflects how it would be in the game. - Streaming (file handle) resources are now freed immediately after playback of sound. - Much improved audio formats in terms of memory and CPU usage. The Format property no longer refers to a specific platform-specific file format, but to a encoding method (Uncompressed, Compressed, ADPCM). - The audio data of an AudioClip can now be loaded on demand by scripts, and loading can happen in the background without blocking the main game thread. Memory management can now be performed much easier of AudioClips in the project. - Improved Audio Profiler with better statistics and detailed information. To view it, open the Profiler window, click the Audio pane and press the “Channels”, “Groups” or “Channels and groups” button.. Improved Audio Profiler - AudioSettings.GetConfiguration / AudioSettings.Reset API as an alternative to the now deprecated AudioSettings.outputSampleRate/AudioSettings.speakerMode property setters and the AudioSettings.SetDSPBufferSize function. The new API allows querying the current configuration and applying all changes at once. - Notification callback AudioSettings.OnAudioConfigurationChanged(deviceChanged) callback which can be used to get notifications when sound system reinitialisation happens. This can then be used to adapt audio device settings further or reload volatile AudioClips such as generated PCM clips and restore other audio system state. Consoles - Unity 5.0 has day one support for XBox 360, XBox One, PS Vita, PS3 and PS4, with Wii-U arriving later in the spring. - A custom editor is no longer required for any console. The console extensions are compatible with the general Unity editor! - Many developers are already building their games with Unity 5.0 on console having taken part in a Beta release program. Editor - Unity editor is now 64-bit! - A separate 32-bit installer is available for Windows; on Mac OS X we only ship 64-bit now. - Note that this affects native plugins used in the editor, which now also need to be 64-bit. - New AssetBundle build system. - Adds simple UI to mark assets into assetBundles, provides simple API to build assetBundles without having to write complex custom scripts (no need for Push/Pop). - Supports incremental build, which only rebuilds AssetBundles that actually change. - AssetBundle dependencies don't force the rebuild of all the bundles in the dependency chain. - Provides AppendHashToAssetBundleName option to allow to append the hash to the bundle name. - Provides AssetBundleManifest which can be used to get the dependent AssetBundles at runtime. - By default includes type tree in the assetBundle on all the platform except metro. - New Project Wizard dialog. - Recent projects list shows "Last Saved With" version number for each project (if available - this information is only saved starting with 5.0). - Timeline Profiler: - New view in the CPU Profiler that shows the frame samples laid out on a Timeline. Each thread has its own timeline; This is mostly useful for multi-threaded profiling. Timeline Profiler - Version Control: Scene and Prefab Merging - Command line merge tool that understands the scene and prefab formats in order to do semantic merges. - Merge tool integration with Unity's existing version control integration. Can be enabled from EditorSettings. - Plugin Inspector: new native plugin importing system. You're no longer required to place platform specific plugins into special folders like Assets/Plugins/iOS, Assets/Plugins/X64, etc. From now on, you can place them anywhere. - You can set platform compatibility settings by clicking on the plugin (files with extensions *.dll, *.so, etc, and folders with extension *.bundle), this include both managed and native files. Plugins can be set for “Any” platform, “Editor only” or a specific platform. - Platform specific settings can also be set, e.g. CPU type. Different platforms may have different settings. Graphics - Integrated Enlighten real-time global illumination (GI) technology, and improved lightmapping workflow. - In “Continuous baking” mode scene changes are automatically picked up and tasks are spawned to precompute data for dynamic GI, calculate static lightmaps, light probes, reflection probes etc. - Runtime Dynamic GI for lights: - Changes to lights marked as "Dynamic GI" and skylight changes are picked up automatically. - Emissive surfaces can emit light into GI at runtime. Emissive colors can be changed affect static and dynamic objects in realtime. - Material changes can be triggered via DynamicGI API. - Directional lightmaps can now be baked in a "directional specular" mode (which allows materials to retain their specular look) or in a cheaper "directional" mode (materials get a normal-mapped diffuse look). "Non-directional" mode is the cheapest and results in a flat diffuse appearance. All 3 options are available for both baked and realtime lightmaps. - New Lighting window - Single place to specify lightmapping, GI and scene render (ambient/reflection/fog) settings. - UI grouped by logical areas. - When real-time lightmaps are disabled and baked lightmaps enabled, indirect lighting of real-time lights is automatically baked into baked lightmaps. If you don't want this behavior, set indirect lighting to 0. - HDR workflow improvements: - HDR scene view. When main camera is HDR, then scene view rendering is done in HDR too using the same Tonemapper settings as the main camera. - Support for .hdr and .exr texture formats. - HDR textures (from .exr/.hdr files) are automatically encoded into RGBM format. You can alter this behavior in advanced texture import settings. - Reflection Probes - New "ReflectionProbe" component that captures its surroundings into a cubemap. Cubemap is assigned to Renderers in the proximity from the probe and can be used to produce glossy reflections. - Reflection probes are baked similar to light probes and are stored as cubemap assets. Specular convolution is applied automatically to achieve high-quality glossy reflections. - Reflection probes can also be rendered in realtime, with optional timeslicing across multiple frames. - Added global reflection cubemap in Lighting settings; by default matches the skybox. Reflection Probes - Skybox and ambient improvements: - New scenes are now set with directional light, procedural skybox and a reflection probe by default. - Added "Skybox/Procedural" shader that allows setting up simple skies easily. - Built-in Skybox shaders now support HDR (RGBM encoded) textures. - Skybox materials can be assigned by drag-and-drop on the background in the Scene View. - Cubemap textures can be assigned to skybox by drag-and-drop on the background in the Scene View. Material with Skybox/Cubed shader is created automatically. - Improved inspector preview & thumbnails of Skybox materials. - Ambient lighting automatically matches to a skybox. This behavior can be turned off by specifying ambient colors explicitly in Lighting settings. Skybox and ambient improvements - New "Deferred Shading" rendering path: - Single pass, multiple-rendertarget G-buffer shading. - Fully supported by the new Standard shader. - Overriding of DeferredShading (and DeferredLighting) shaders is in the UI now, under GraphicsSettings. Possible to even exclude the shaders from game build, in case you don't need them at all. - Surface shaders can generate code for new Deferred Shading rendering path. All 4.x builtin shaders also got support for that. Deferred G-buffer - Improved and extended cubemap workflow. - Renamed “Reflection” texture import type to “Cubemap”. Automatic detection of the mapping mode for spherical, cylindrical and 6 image layouts; removed 2 obscure spherical mappings which were rarely used. - Textures imported as cubemaps can use texture compression now! - Added specular and diffuse convolution options to cubemap textures. - Cubemap inspector was improved, can now show alpha channel & mipmaps properly; also understands RGBM encoded HDR cubemaps. - Improved seamless cubemap edge fixup. - Moved old Cubemap menu entry from Assets into Assets | Legacy. Instead to import cubemap textures use “Cubemap” type in texture importer settings. - Meshes: - More than two UV coordinates! Up to 4 UVs are imported from model files; and Mesh class gained uv3 & uv4. - Non-uniformly scaled meshes no longer incur any memory cost or performance hit. Instead of being scaled on the CPU they are scaled and lit correctly in shaders. - MeshRenderer has a new additionalVertexStreams property for per-instance mesh data overrides. For example just vertex color for one instance. This is currently used by Enlighten for per-instance UVs. - SpeedTree integration: - SpeedTree models (.SPM files) now can be recognized, imported and rendered by Unity. The workflow is very similar to other mesh formats like FBX. - SpeedTree features like smooth LOD transition, billboards, wind animation and physics colliders are fully supported by specialized SpeedTree shaders. - SpeedTree models are selectable as tree prototypes on terrain. - Frame Debugger. See how exactly frame is rendered by stepping through draw calls. See Frame Debugger - Added scriptable "Command Buffers" for more extensible rendering pipeline. - Create command buffers ("draw mesh, set render target, ...") from a script, and set them up to be executed from inside camera rendering. - Command buffers can be executed from a bunch of places during rendering, e.g. immediately after deferred G-buffer; or right after skybox; etc. See this blog post: Blurred refraction implemented through command buffers - Shadows: - Much better directional light soft shadows (5x5 PCF filter replaces the old screenspace blur). - Ability to control directional light shadow cascade split ratios in Quality Settings; and added a shadow cascade scene view visualization mode. - Replaced "cast shadows" checkbox in Renderer component with a popup. Additional modes: Two Sided - casts two-sided shadows even from single-sided geometry; Shadows Only - cast shadows, but make the object invisible otherwise. - In Forward rendering, directional light shadows are computed from camera's depth texture instead of a separate "shadow collector" rendering pass. Saves a bunch of draw calls, especially when depth texture is needed for image effects anyway. - This means that ShadowCollector shader passes aren't used for anything; you can just remove them if you had any. - Camera’s DepthTexture is not generated using shader replacement anymore. Now it is generated using same shaders as used for shadowmap rendering (ShadowCaster pass types). Camera-DepthTexture.shader is not used for anything now. - Normal-offset shadows to help reduce self-shadowing artifacts (“normal bias” setting on Light). Manually written shaders should use TRANSFER_SHADOW_CASTER_NORMALOFFSET in the vertex shader, which is similar to the old TRANSFER_SHADOW_CASTER but it requires v.normal to be present. - Most platforms now internally use floating point (RFloat) format for point light shadows, instead of custom encoded ARGB32 format. Saves shader instructions and has better precision. - Particles: Added a Circle emitter (with an option to specify an arc) and one-way Edge emitter. - LOD Group was improved. A "fade mode" can be set on each level and a value of "how current LOD be blended/faded to the next LOD" will be passed to shader in unity_LODFade.x. iOS - Support deep plugin folder structure. - Support for XIB launch screens. - Xcode manipulation API for editor scripts, and rewritten Xcode project generator. - iOS 64-bit support via IL2CPP scripting backend. You can switch to it in Player Settings. - Metal graphics API support. Picked automatically on eligible devices. Can be controlled in Player Settings. Linux & SteamOS - Gamepad configuration via Steam Big Picture mode (See upgrade guide). - Gamepad hot plugging. - Includes default configurations for several common gamepads. Physics - PhysX 3 integration! - Better performance on multi-core processors, and especially on mobile. See - Moving static colliders does not cause performance penalty anymore. - Better simulation quality, e.g. stacking stability. - Cleaner codebase, which does not contain some of the long standing issues. - See - 2D physics: - Added ConstantForce2D, PointEffector2D, AreaEffector2D, PlatformEffector2D and SurfaceEffector2D components. - Added Physics2D.IsTouching, IsTouchingLayer and Collider2D.IsTouching, IsTouchingLayer methods. - All 2D colliders now have a 2D ‘offset’ property that replaces the ‘center’ property on BoxCollider2D and CircleCollider2D. - Added Rigidbody.maxDepenetrationVelocity to make possible to tune the velocity of the colliding rigidbodies when they are pushing each other away. - Added TerrainData.thickness to control the thickness of TerrainColliders. - Add Cloth.ClearTransformMotion method to allow teleportation of cloth instances. - Exposed WheelCollider.sprungMass to C# as a read-only property. Sprung mass can have a wide range of applications like being able to configure suspension springs using natural frequency & damping ratio or having custom forces added to suspension based on the weight supported by particular wheels. Scripting - Auto-update obsolete Unity API usage in scripts & assemblies. Majority of API upgrades are done automatically, see this post for details: Shaders - New built-in "Standard" shader. - Physically based shader, suitable for most everyday surfaces (metals, plastics, wood, stone etc.). - Comes in both “metallic workflow” and “specular workflow” variants. - Introduce detail normalmaps and ambient occlusion support. - Support two modes of alpha blending - physically plausible “Transparent” mode (suitable for glass, ice, etc) and “Fade” mode which allows to shade fading out objects and decals. - Features driven by what you enable in the inspector (e.g. when no normal map assigned, the shader will internally use a faster variant without a normal map). - Approximate and optimized path for mobile & shader model 2.0. - This is a default shader for newly created objects now. Most of Unity 4.x shaders were moved to “Legacy” shader popup menu. - Surface shaders can also use the same physically based BRDF (Standard and StandardSpecular lighting functions). - Build-time stripping of unused shader features, and shader variant compilation improvements. - Added #pragma shader_feature; similar to multi_compile but unused ones are removed from the game builds. If no materials use a particular shader feature variant, shader code for it is not included into game data. - #pragma shader_feature can be provided just one parameter, e.g. #pragma shader_feature FANCY_ON. This expands to two shader variants (without and with the parameter defined). - Can specify vertex- or fragment-only shader variants. For example, #pragma shader_feature_vertex A B C will add 3x more shader variants, but to the vertex shader only. - Underscore-only names in shader_feature and multi_compile are treated as "dummy" and don't consume shader keyword names. Useful for defining default shader behavior. - Shader variants for unused lightmap modes aren’t included into build. E.g. if you don't use directional lightmaps in any of your scenes, then shader variants that handle directional lightmaps will be removed from game build data. No need to manually add "nolightmap" and friends to shader code now. - Single CGPROGRAM block can target multiple "shader models" at once. For example, you can base it for SM2.0, but have fancier multi_compile variants that require SM3.0. Syntax: - #pragma target 3.0 // base is SM3.0 - #pragma target 4.0 FOO BAR // FOO or BAR require SM4.0 - Custom Shader GUI can now be defined by implementing the IShaderGUI interface instead of deriving from MaterialEditor. Using this approach makes the custom shader GUI show within the inspector for Substance materials. Standard Assets - A new suite of Standard Assets including cameras, first and third person controllers, car controller, aeroplane controller and sample particle systems. - A cross platform input helper. - New mobile control prefabs based on the new UI system. - Image effects have been converted to C#. - New sample project based on the Standard assets shows how to best utilize them. Unity Download Assistant - As part of optimizing download, we're shipping Unity 5 as multiple installers. The Download Assistant lets the user select which components to download and install. - The individual installers can be downloaded separately and installed silently, as described in the documentation. WebGL - WebGL support: a new target in the build player window! - Currently marked as “Preview” state; official support for latest Firefox & Chrome. - Uses the same il2cpp scripting backend as 64-bit iOS. - See blog post: Changes 2D - It's no longer possible to have multiple sprites with same name in Sprite Editor - UnityEditor.Sprites.DataUtility.GetSpriteMesh and GetSpriteIndices functions are now deprecated. Use Sprite.vertices, Sprite.uv and Sprite.triangles instead. AI - NavMesh bake settings: Removed width/height inaccuracy and allow to set voxel size instead. - NavMesh data format has changed - you need to rebuild the NavMesh to use it! - NavMeshLayer is replaced with NavMeshArea: old API is deprecated, area types are now stored in ProjectSettings/NavMeshLayers.asset. - NavMeshObstacle supports two basic shapes - Capsule and Box, for both carving and avoidance. - Setting destination on a NavMeshAgent doesn't resume the agent after calling Stop; call Resume explicitly to resume the agent. - Setting NavMeshAgent.nextPosition will update transform immediately if NavMeshAgent.updatePosition is true. This makes it consistent with the existing baseOffset and Move API. - Use smaller navmesh tile partitioning to improve baking and carving speed. - When NavMeshAgent.updatePosition is false - moving the transform position doesn't affect the internal agent position. - When NavMeshAgent.updatePosition is changed to true from false the transform position is moved to the internal agent position. Android - Disabled hidden input keyboard. - Dropped support for non-NEON CPU devices (e.g. Tegra 2). This gives a significant performance boost to Mecanim and PhysX among other things. - User resolution now gets swapped when the orientation is changed. - Default framebuffer format switched from RGBX to RGBA. - WebCamTexture is no longer supported on Gingerbread (2.3) devices. - Switched default from being a NativeActivity to a regular Java Activity. This should make the default Activity more compatible with 3rdparty Android frameworks. Animation - Added Animator.HasState to be able to query if an animator has a certain State. - Added console warning when an IK function is called when the Animator is not in the IK pass - Animator with Apply root motion ON will always be affected by physic gravity when playing a clip without any root motion curve. - Animator Tool deleting a layer or parameter can now be done with delete key. - AnimationUtility.SetAnimationClipSettings now public - Can now transition to self (State or StateMachine). - Changed profiling detail to see more information for the Animator evaluation pipeline. - Renamed Animator.GetCurrent/NextAnimationClipState to Animator.GetCurrent/NextAnimatorClipInfo. - In the character transform hierarchy, if a transform doesn't belong to the skeleton, then we preserve it as it is while doing optimization. - Moved AvatarMask to the Animations namespace. - Moved GameObjectUtility.OptimizetransformHierarchy from Editor code to Runtime class AnimatorUtility.OptimizetransformHierarchy. - Transform scale now blends linear instead of exponential. It allows blending with scale = 0. - Changed Culling Mode for the Animator. We now have “Always Animate”, “Cull Update Transforms” (was Based on Render) and “Cull Completely”. Asset Bundles - New version of which can take Hash128 as version. - Rename AssetBundle.Load() to AssetBundle.LoadAsset(). - Rename AssetBundle.LoadAll() to AssetBundle.LoadAllAssets(). - Provide AssetBundle.LoadAllAssetsAsync() which loads all assets asynchronously. - Provide AssetBundle.LoadAssetWithSubAssets***() which loads the asset with the sub assets. - Provide AssetBundle.AllAssetNames() to return all the assets in the assetBundle. - Support type tree incremental build check. Asset Import - Unify global scale while importing FBX models. Asset Management - Resources.LoadAssetAtPath is no longer available outside of the Editor. Audio - AudioClip.isReadyToPlay is now obsolete and replaced by AudioClip.loadState. - AudioSettings.outputSampleRate and AudioSettings.speakerMode can now only be read from, because setting it required a complete restart of the sound system and therefore losing state of all non disk-based AudioClips and filters. SetDSPBufferSize has been declared obsolete for the same reason. - The hardware, loopable and compressionBitrate properties of AudioImporter are now obsolete. BlackBerry - Removed Author ID and Author ID override from publishing settings. - Removed obsolete "BB10" scripting targets from API. Please use "BlackBerry" instead. Editor - Apply build target switch from -buildTarget before initial domain load. - Creating, duplicating or instantiating (prefab) in editor generates unique name between siblings. Does not affect renaming, re-parenting, scripting or playmode. - Editor always runs in background when a debugger is attached. - EditorApplication.NewScene() creates a scene that has a Main Camera, a Directional Light, a default Skybox set and has Enlighten enabled by default. If you need a new scene with no GameObjects in it use EditorApplication.NewEmptyScene(). - If standalone is current build target, do a full build target switch when setting EditorUserBuildSettings.selectedStandaloneTarget. - It is now recommended to derive from ShaderGUI instead of deriving from MaterialEditor to make custom gui for shaders. This ensures that custom shader gui works properly together with the Substance Material Editor (Check the docs for ShaderGUI). - Merged two scene view render mode dropdowns into one. - New bug reporter - Players always run in background when "Script Debugging" is enabled. - Prefab instance objects are no longer stored as part of the scene file. - Recognize more build target names with -buildTarget switch and remove 32bit/64bit switch for "standalone". - Remove warning if using Destroy/DestroyImmediate on objects that are still in the load queue and have not been woken up yet. - Removed “Make MMO” button from Edit menu. ;) - Renamed "Enable HW Statistics" player setting to "Disable Analytics". - Replace EditorUtility.UnloadUnusedAssets() to UnloadUnusedAssetsImmediate(). - TextMesh and MeshFilter components are not allowed to exist on the same GameObject. - When manipulating preview object in Material inspector camera will rotate around the object instead of rotating the object itself, this was needed so you can see different reflections from different angles. Fonts - Font.textureRebuildCallback has been renamed to Font.textureRebuilt and is now a static event of type Action. Font.textureRebuildCallback continues to work but has been deprecated. This change cannot be upgraded automatically by the script updater. Graphics - Added GL.invertCulling property; obsoleted old GL.SetRevertBackfacing function. - Camera.pixelWidth and Camera.pixelHeight now return int, not float. - Changed behavior of what happens with textures that are too large for the GPU to handle, and they don't have mipmaps. Now such textures are displayed in blue color. Before, some platforms were downscaling them in some cases; other platforms were leaving them as garbage; others were crashing. - DX11: Uses CPU rendering (WARP device) when running in batch mode without a GPU; can also request WARP with "-force-driver-type-warp" command line argument. - GLES: Replaced 16bit depth buffer support with the ability to completely disable depth and stencil buffers. - Image Effects: - All built-in image effects were rewritten from JavaScript to C#. You probably want to delete old files and import the fresh Effects package if you want the latest version. - Removed old Glow image effect; use Bloom or Bloom(optimized) instead. - Light and Reflection Probes are enabled on Renderer components by default. - Made SystemInfo.graphicsPixelFillrate obsolete (it was not being maintained to cover new GPUs, and was not working on most platforms anyway). Now it always returns -1, just like it used to for unknown GPUs. - OnPreRender script callback is called before rendering camera's depth texture now. - Renamed HDR_LIGHT_PREPASS_ON shader keyword to UNITY_HDR_ON (now the keyword is always set when camera is HDR). - Renamed VertexLit and DeferredLighting rendering paths to "Legacy" names. - RenderTexture.Create now actually does nothing if RenderTexture is already created, just like documentation always said :) - Replaced the built-in sphere and capsule meshes with versions that are better suited for lightmapping. Because the topology has changed both UV1 and UV2 are now different. - Setting Mesh.colors keeps the colors in float format instead of converting to bytes. This allows you to store higher-precision color values on meshes. Note that it will use more memory so if that is a concern use Mesh.colors32 instead. - Skybox geometry was changed for cubemapped and other single-pass skybox shaders. Now instead of a big cube, it's a big and somewhat tessellated sphere, with more polygons near horizon. Allows computing things per-vertex in skybox shaders for performance. - Removed TextureUsageMode and TextureImportInstructions editor classes. iOS - Added specialized ViewControllers for fixed screen orientation. Added methods to AppController to override to provide custom ones. - An animated splash screen with a Unity logo is shown for non-Pro license users by the engine itself. Static pre-splash screens can be customized by all users. - Automatic Reference Counting (ARC) is enabled. - Changed the way UI integration works. Now there are specialized ViewController's for fixed orientation. Also made custom UI integration easier - both for simple and complicated cases (e.g. if you have portrait unity content in landscape ViewController, script side and _unityView.content orientation will return portrait, while AppController's interface orientation will be landscape). For more details check comments in Classes/UI/UnityAppController+ViewHandling.h in trampoline - createUnityViewImpl was deprecated and removed (assert will be fired if you implement this method). Override createUnityView instead. - createViewHierarchyImpl was deprecated and removed (assert will be fired if you implement this method). Override willStartWithViewController instead. - createViewHierarchy was deprecated and removed. Use createUI instead if you had it called from custom place. - Refactored player pausing in the trampoline. - Default splash screens set to solid color. - Trampoline now uses clang standard library, C++11 is enabled, iOS 7.0 SDK and Xcode5 are enforced, iOS 6.0 is the minimal version supported. - Fixed TCP 56000 port in now used by player for script debugging. Linux - Minimum supported version is now Ubuntu 12.04 LTS. OS X - Application.persistentPath will now correctly give you a folder in ~/Application Support instead of ~/Library/Caches. - Mac OS X Standalone: Data folder has moved to Content/Resources, in accordance with Apple guidelines. Physics - Disabled MonoBehaviours will no longer receive collision or trigger callbacks. - Expose contactOffset both global and per-shape. This comes to replace Physics.minPenetrationForPenalty that lost its original meaning with the upgrade to PhysX3. Contact offset is the value that directly affects the distance at which PhysX starts generating contacts; when the distance between colliders is less than the sum of their respective contact offsets the contacts are generated. The value is useful when you have fast moving ragdolls and observe the not physically correct behaviour of joints when the colliders they connect penetrate other collision geometry. - Expose enablePreprocessing on joints. Having this flag unset basically lets PhysX to ignore some of the broken joint constraints in complicated configurations; otherwise such constraints may produce huge impulses that lead to "explosions". A typical usecase would be when upgrading a PhysX-powered Unity 4 2D game where you have 2 rotations frozen on each Rigidbody and joints are attached to some of them. - Expose projections on CharacterJoint to help with stretching of limbs. Joint projection is a technique that once enabled makes sure the joint constraints are not violated for more than a tolerance value by adjusting the connected bodies' pose so that they it is always within tolerance. This is not a physical process (it may loose energy) and comes with some performance cost, but can serve as a good last resort in challenging configurations where otherwise ragdolls explode or overstretch. - Make CharacterController ignore any child & sibling colliders - Physics.maxAngularVelocity has been removed as it is non-functional in PhysX 3.3. You can still use Rigidbody.maxAngularVelocity. Scripting Note: Many scripting changes should be handled automatically by our new API upgrade tool, see - AddComponent(string) is removed. Use AddComponent() instead. - Added generic version of Object.Instantiate (has been in the docs since 3.5 but not exposed in the API before). - Application.RegisterLogCallback() and RegisterLogCallbackThreaded() have been deprecated and replaced by two new events Application.logMessageReceived and Application.logMessageReceivedThreaded. This allows for multiple subscribers. - C# compiler defaults script encoding to UTF8. - Deprecated Component.active property has been removed. - GameObject.SampleAnimation() moved to AnimationClip.SampleObject(). - 'Metro' keyword was replaced to 'WSA' in most APIs, for ex., BuildTarget.MetroPlayer became BuildTarget.WSAPlayer, PlayerSettings.Metro became PlayerSettings.WSA. Defines in scripts like UNITY_METRO, UNITY_METRO_8_0, UNITY_METRO_8_1 are still there, but along them there are defines UNITY_WSA, UNITY_WSA_8_0, UNITY_WSA_8_1. - ParticleSystem.safeCollisionEventSize changed to ParticleSystem.GetSafeCollisionEventSize(). - Removed quick property accessors, like .rigidBody, .rigidbody2D, .camera, .light, .animation, .constantForce, .renderer, .audio, .networkView, .guiTexture, .collider, .collider2D, .particleSystem, .particleEmitter, .guiText, .hingeJoint for modularization. Instead, use GetComponent to get references. - Removed obsolete graphics APIs: Camera.mainCamera (use Camera.main), Camera.GetScreenWidth (use Screen.width), Camera.GetScreenHeight (use Screen.height), Camera.DoClear, Camera.isOrthoGraphic (use Camera.orthographic), Camera.orthoGraphicSize (use Camera.orthographicSize), Renderer.Render, Graphics.SetupVertexLights, obsolete Graphics.DrawMesh overloads (use DrawMeshNow), RenderTexture.SetBorderColor, Screen.GetResolution (use currentResolution), Mesh.uv1 (use uv2 instead), SkinnedMeshRenderer.skinNormals, LightmapData.lightmap (use lightmapFar instead). - Removed SystemInfo properties deviceName, deviceVendor, deviceVersion and supportsVertexProgram. Use graphicsDeviceName, graphicsDeviceVendor, graphicsDeviceVersion instead. Vertex programs are always supported. - TerrainData.physicMaterial changed to TerrainData.GetPhysicMaterial() and TerrainData.SetPhysicMaterial(). Shaders - All opaque & skybox built-in shaders and surface shaders now output 1.0 into the alpha channel. This means that image effects that used "alpha as fake HDR" (e.g. old Glow from Unity 1.x days) will not work with them anymore. Use “keepalpha” surface shader option to keep the old behavior. - Alpha blended surfaces do NOT automatically have "Alphatest Greater 0" in generated shader code. - Built-in default "gray" shader texture is color space aware now. - Built-in functionality for directional lightmaps, dynamic Enlighten GI and soft shadows all require shader model 3.0 now. - Built-in lightmaps (unity_Lightmap etc.) are declared in UnityShaderVariables.cginc now. If you had them declared in your own shader code, you might need to remove them (we'll try to do that automatically). - Fog handling in shaders was changed. - For surface shaders and fixed function shaders, nothing to do. Can add "nofog" to surface shader #pragma line to explicitly make it not support fog. - For manual vertex/fragment shaders, fog does not happen automagically now. You need to add #pragma multi_compile_fog and fog handling macros to your shader code. Check out built-in shader source, for example Unlit-Normal how to do it. - Improved error messages for some shader compilation errors. - Removed some fixed-function shader features (use vertex & fragment shaders instead). This makes per-draw-call CPU overhead slightly lower across all platforms. - Removed TexGen. If you have old Projector shaders, they might be using this; upgrade to 4.5/5.0 projector shaders. - Removed texture combiner matrix transforms, i.e. "matrix" command inside a SetTexture. - Removed signed add (a+-b), multiply signed add (ab+-c), multiply subtract (ab-c), dot product (dot3, dot3rgba) SetTexture combiner modes. - SetTexture stage count is limited to 4 on all platforms. - Renamed "RenderFX/Skybox cubed" and "RenderFX/Skybox" shaders to "Skybox/Cubemap" and "Skybox/6 Planes". - Renamed unity_LightmapIndScale variable to unity_DynamicLightmapScale - Some shader compilers have changed: - Mixing partially fixed function & partially programmable shaders (e.g. fixed function vertex lighting & pixel shader; or a vertex shader and texture combiners) is not supported anymore. It was never working on mobile, consoles or DirectX 11 anyway. This required changing behaviour of Reflective/VertexLit shader to not do that - it lost per-vertex specular support; on the plus side it now behaves consistently between platforms. - Direct3D 9 shader compiler was switched from Cg 2.2 to HLSL, the same compiler that's used for D3D11. This fixes a bunch of issues where Cg was generating invalid D3D9 shader assembly code; and generally produces slightly more efficient shaders. However, HLSL is slightly more picky about syntax; in general you have to do same shader fixes for D3D9 as for D3D11 now (e.g. UNITY_INITIALIZE_OUTPUT for “out” structures). - On desktop OpenGL, shaders are always compiled into GLSL instead of ARB_vertex/fragment_program target now. You no longer need to write "#pragma glsl" to get to features like vertex textures or derivative instructions. All support for ARB_vertex/fragment_programs is removed. Shadows - All built-in shadow shaders use backface culling now. Use “two sided” cast shadows option if you do not need backface culling. - Shadows on D3D9 require "native shadowmap" support in the driver now (pretty much all systems that can do shadows have that, so this should be fairly invisible). Upside: less shader variants are included into game builds now. - Shadows on iOS+GLES2.0 require GL_EXT_shadow_samplers now. This means iPhone4 / iPodTouch4 will not support realtime shadows anymore. Upside: less shader variants and faster shader loading times. - Removed screenspace directional light shadow blur (PCF 5x5 is used now). - Removed shadow softness & softness fade from Light. - Normal-based shadow bias defaults to 0.4 for lights now - When using oblique camera projection, shadows are disabled now. Web Player - Removed API. Load additional unity web file from website script code. - Windows Store Apps - Removed support for C++ Visual Studio projects. Improvements 2D - Added Sprite.pivot getter. - Sprite geometry can now be overridden using Sprite.OverrideGeometry(Vector2[] vertices, UInt16[] triangles). - SpritePacker: Atlas texture name will now also contain the atlas name. - The new AssetPostprocessor.OnPostprocessSprites(Texture2D texture, Sprite[] sprites) is called immediately after OnPostprocessTexture when sprites are generated. AI - Carving navmesh supports carving the detailed tessellation. Fixes height discontinuities when an undulating region is carved - Expose pathfinding iteration limit, and avoidance prediction time to script API - In Editor the "Show Avoidance" option for NavMeshAgent will show the sampled velocities for avoidance calculation - New icons for navmesh asset and components - Warn if agent and obstacle components are placed on the same GameObject - Warn if navmesh slope bake setting is unreasonable. Android - "Android TV Compatibility" checkbox which enables Android TV compatibility checks at build time. - Hardware upscaling for Screen.SetResolution(). - isGame setting for Android TV and Android 5.0 devices - JDK detection. Build fails if only JRE is present. - Made VRAM estimation somewhat more correct. - PlayFullScreenMovie now supports FullScreenMovieScalingMode.AspectFill. - Public Java API for attaching custom rendering surfaces. - Reconfiguring antialiasing or changing display framebuffer properties should no longer result in a GL context loss. - Reduced system memory usage. - Support for Android TV banners. - Support for MouseDrag event. - VSync improvements: using Choreographer on JellyBean+ to get more stable time; and using VSync time when available to hit stable 30FPS when "Every other vblank" is on. - WWW responseHeaders now contain STATUS key. Animation - Added AnimationEvent.animatorInfo and AnimationEvent.animationInfo for Event fired by Animator. - Added "Edit" button for imported AnimationClip that selects the ModelImporter with proper clip - Added helpbox on StateMachine Transitions - Added reset functions to Animator State and Animator Transition - Added RuntimeAnimatorController.animationClips property. It returns all the clips in the controller - Added tooltips to animation transition settings + added foldout group for settings. - Always display numeric values for Transition's duration, offset and exitTime. - Better error message on default Blendtree parameters - Can now drag and drop FBX files directly in the StateMachine Graph - Can now drag AnimatorController directly on GameObject, it will created an Animator component if needed. - Clicking on the blend tree background will select the top blend node - Copy/paste/duplicate keyboard shortcuts work. - Display Animator stats in inspector: Clip count, curve count, etc. - Don't show contextual menu when adding transition to empty StateMachine - Double clicking on a State with an imported AnimationClip now shows the Animation Import Settings in the Inspector - HelpBox in inspector when root node position/rotation is controller by curves - Improved computation of Pivot weight - Improved humanoid retargeting. The differences between Generic and Humanoid animation are now less than 0.001 normalized meter and 0.1 degrees on end points. - Improved performance when ModelImporter has many AnimationClips - In the AnimationClip importer, proper support for 0 duration clips - ModelImporter remembers foldout state - Ordered Interruption UI is disabled when in Next State - Persisted the Settings foldout through a static variable. - Runtime access to Animator's parameters (Animator.parameters property). - States can now be renamed on synchronized layers - Support the case that both SkinnedMeshRenderer and Animator are on the same GameObject (optimised mode). - Transition Solo and Mute are now undoable. - Trigger parameters now have different UI to distinguish them from Bool parameters. Asset Import - Added AssetPostProcessor.OnPreProcessAnimation, this new callback is called just before animation clips are created. - Added ModelImporter.defaultClipAnimations (list of ModelImportClipAnimation based on TakeInfo) and ModelImporter.importedTakeInfos (list of TakeInfo from the file). - Support large bitmaps importing (>4Gb in size) - Update PVRTC texture compressor. - Updated FBX SDK to 2015.1: better performance; fixes various rare crashes and issues when importing some Collada, OBJ, 3DS files; fixed reversed normals in some DXF files. Asset Management - Allow to access files with long path (more than 260 characters) on Windows. Audio - Added more descriptive error message when FMOD fails to initialise on Windows because of sound card drivers configured to give applications exclusive mode access. - AudioSources now take up fewer resources. Previously this caused problems when importing projects with a large number of AudioSource contained in prefabs. - Improved audio importer interface to be make options more clear - Increased default virtual voice count from 100 to 512 and made it user-configurable through project settings. - Removed 3D property in AudioClip and moved all 3D audio functionality to the AudioSource. - Renamed AudioSource.panLevel to AudioSource.spatialBlend. This property now controls the 2D / 3D mode of sound playback through this AudioSource. There is no longer a mode toggle, but a continuous interpolation between the two states. - Renamed AudioSource.pan to AudioSound.panStereo. This is to remove confusion about the nature of this property. AudioSource.panStereo pans the audio signal into the left or right speakers. This happens before spatial panning is applied and can be applied in conjunction with 3D panning. Blackberry - Added "Add Attached Device" to the debug token creation window. - Application.systemLanguage now differentiates between Chinese Simplified and Chinese Traditional appropriately. - Registration now uses BlackBerry's 10.2 registration system. Currently registered systems do not need to re-register. Documentation - Default language for code snippets in the Scripting Reference is C#, with many more examples in C# available, with Javascript as a secondary language, and Boo removed. - Localized documentation available in Russian, Spanish and Japanese (currently based on 4.6 docs and over time 5.0). - Improved handling of namespaces, generics and interfaces. - API history improved with information about obsolete members. Editor - Added 8192 maximum texture size option in import settings. - Added deferred diffuse/specular/smoothness/normals scene view rendering modes. - Added GetCurrentGroupName() and SetCurrentGroupName() to allow overriding the automatic undo name generation - Added Gizmos.DrawMesh and DrawWireMesh (the meshes drawn are pickable too). - Added support for importing textures from PVRv3, ASTC, KTX file formats. - Added virtual function ScriptableWizard.DrawWizardGUI for customizing GUI of derived wizard classes. - Added warning on exiting play mode when objects have been spawned into the scene from OnDestroy(). - Asset Store: The asset store window is now much faster, more responsive, and looks better. - Camera inspector shows camera's depth texture mode. Also, scene view camera makes sure to match main camera's depthTextureMode. - Drag-and-drop assigns material to a specific part of the mesh now. Holding Alt key will assign material to all the parts of the mesh. - EditorStyles.helpBox is now exposed - Ensure controls are not rendered with focus state if the EditorWindow they are in does not have focus. - Expose RenderTexture color format in the inspector, just like with depth format. - Exposed AssetPreview.SetPreviewTextureCacheSize (). - Finished builds will be shown in OS X notification center when Editor in the background. - Frame Selected (F key over scene view) now takes point/spot light range into account. - Improved build times for textures and AudioClips - Improved searching for class names in different namespaces and across different user assemblies. - Improved UI display names in Player Settings - License: Activate from command-line. - License: Added -returnlicense command line option, which returns the currently active license and quits the editor. - License: A progress bar will be shown during returning or releasing a license. - LightmapParameters now has an icon - LightmapSnapshot now has an icon - MaterialEditor improvements - Show a foldout arrow for Material inspectors inlined on gameobjects to make it clear that they can be expanded/collapsed. - Added TexturePropertyMiniThumbnail(): Draw a property field for a texture shader property that only takes up a single line height. The thumbnail is shown to the left of the label. Clicking the thumbnail will show a large preview info window. - Added GetTexturePropertyCustomArea():. Returns the free rect below the label and before the large thumb object field. Is used for e.g. tiling and offset properties. - Added TextureScaleOffsetProperty(): Draws tiling and offset properties for a texture. - Texture scaling and offset values can now be dragged. - Optimization of Hierarchy Window - Prevent tooltips from showing while dragging. - Tag editor facelift by removing the empty tag and using Reorderable list to draw tags and layers. - When browsing for a location to create or open a project, the dialog starts at the location where a project was last created or opened. - When saving scenes, overwrite existing scene file only after successful save. - Windows Editor: Native child windows have their title set to the GUIView/EditorWindow class name. - Unity will output a proper error regarding incompatible CPU architectures on Mac OS X when failing to load native libraries. For ex., You cannot load 32 bit native libraries on 64 bit Editor. Fonts - Added easier APIs to access OS Fonts (Font.GetOSInstalledFontNames and Font.CreateDynamicFontFromOSFont). - Added new APIs to get font metrics if you want to implement your own font rendering: Font.ascent, Font.lineheight, new fields in CharacterInfo (old fields in CharacterInfo are deprecated). - Optimized texture rebuilds to happen less often. Graphics - Added "#pragma exclude_renderers nomrt" for platforms not supporting multiple render targets (MRTs). - Added Camera.onPreCull, onPreRender, onPostRender delegates. - Added RenderTextureFormat.ARGB2101010 and Shadowmap formats. - Added Shader.IsKeywordEnabled API. - Added SystemInfo.graphicsMultiThreaded API. - Added Texture2D.SetPixels32 overload that accepts offset and dimensions. - All baked and realtime lightmapping computations are now done in linear space, this makes lighting between gamma & linear space look much closer. When using pure lightmaps, it should in fact look very similar. - Allow SkinnedMeshRenderer to accept non-skinned meshes. - DDS importer can import Float, Half and 11.11.10 format .dds textures now. - Dynamic batching can batch non-uniform scaled objects together when normals/tangents are unused. Helps with shadow caster batching, and unlit shaders. - Image Effects: Added Threshold tweak to SunShafts, removed legacy "alpha as mask". - Image Effects: GlobalFog image post-processing effect was rewritten. Now it has "distance fog" (matches what is set in lighting settings), and optional "height fog" (linearly increasing fog density below specified height). - Increased maximum number of simultaneous render targets (MRT) to 8 on capable platforms. - Light intensity now behaves consistently between linear and gamma space rendering mode. Lights in linear mode can now have much higher intensity. The light intensity is now defined to be in gamma space, hence in linear rendering it is converted to linear space when passed to the shader. (In linear space the maximum effective light intensity is now 97 while previously it was 8). - Lightmaps & baked probes compressed with RGBM now have an effective range of 5 in gamma space or 32 in linear space. This reduces RGBM compression artifacts for lightmaps. Emissive surfaces for enlighten are encoded with a range of 8 in gamma space and 97 in linear space. - Meshes: Mesh compression will now also do lossy compression of vertex colors. - Meshes: Added "keep quads" mesh import option; useful for DX11/Console tessellation shaders. - Optimized per-object light culling in forward rendering by using multiple CPU cores better. - Overhauled stats window to be more compact and profiler rendering stats to be more comprehensive. - Reduced memory consumption when loading textures on mobile devices. - Rendering code optimized to reduce amount of material SetPass calls. Light probes and lightmap UV transform state changes are now internally applied via MaterialPropertyBlocks without requiring a full SetPass. This reduces cost on the main thread to send commands to the render thread, and on the the render thread the driver overhead is reduced. - Scene View: Can drag a cubemap onto empty space in the scene view to assign it as a skybox. - Skinned meshes use less memory by sharing index buffers between instances. - Support for more shader keywords (128, up from 64). iOS - Added debug labels for OpenGL objects, useful in Xcode frame capture debugging. - Allow to set compile flags for already existing files in Xcode API - Better support for Unity view size changes from native side. - Enabled basic background processing. - Expose font directories to the trampoline - Game controller button pressure is now also exposed as axis (float) value. - Implement a way to select iOS framework dependencies for native plugins. - Improved performance of adding large number of files to Xcode project - Optimized Texture2D.LoadImage performance for PNG and JPG files. - Tweaked external RenderSurface API to make a bit more sense and be more concise. Linux - Added Input.IsJoystickPreconfigured for querying 5.0 Linux gamepad detection. - Monitor selection - Set popupwindow mode via Motif borderless hint when supported - Support XDG-compliant path overrides. Networking - WWW: Populate .bytes and .text on non-200 response. Performance - Improved multithreaded job system: - Culling & shadow caster culling is multithreaded now. - Internally multithreaded parts (culling, skinning, mecanim, ...) are more efficient now via some lockless magic. - Temporary memory allocations done by some jobs are more efficient now. - Improved loading performance. More work has been offloaded to the loading thread, reducing the overhead of asynchronous loading on the main thread. - Object.Instantiate performance has been improved. - Mecanim optimizations: - Optimized Animator Enable(), 2x speed on complex controllers. - Optimized Animator memory usage per instance, 2x smaller on complex controllers. - Improved performance for Animator Tool. - Optimized memory usage and runtime performance when serializing objects with backward compatibility (type-tree) enabled. - Optimized texture importing performance. - Static batching performance is improved in many cases. - Updated occlusion culling (Umbra) version; contains improvements for mobile Umbra culling performance, and improves occlusion culling robustness in some cases. Physics - Adaptive force is now optional (disabled by default). - Changed default cloth coefficient values, and added info boxes to cloth editor - Cloth constraint editing UI has been replaced by a more intuitive UI inside the Scene View. - Cloth; exposed sleep force parameter to tune minimum force after which cloth will start sleeping. - Cloth; exposed tethers flag to improve cloth simulation quality. - Cloth inspector is now much faster and capable of dealing with meshes of any vertex count - Exposed a function ConfigureVehicleSubsteps in WheelCollider to make it possible for developers to customise vehicle sub-stepping. This helps setting up heavy vehicles, that require different amount of sub-steps to simulate wheels correctly. - Make scaling mesh colliders cheaper, by not creating a new mesh with scaling applied to it with every scale change. - Redesigned WheelCollider gizmo to show more relevant information. - Removed internal lock in PhysXRaycast, particles should now be able to process raycasts in multithreaded mode. - Show inconsistent hinge joint constraints in inspector - Updated default values for WheelCollider as the old ones did not make any sense with new PhysX. Players - Add -show-screen-selector command line option for Linux and Windows. - Cursor management cleanup - Screen.lockCursor has become Cursor.lockState - Screen.showCursor has become Cursor.visible - Added ConfineCursor state to confine cursor to game window (Linux/Windows) - Cursor lock state and cursor visibility state are now mutually independent. Plugins - Unity will now verify that plugins don’t collide with each other before building to player. Previous behavior was that you would need to wait until all the scenes were built, and you would only then see that plugin with same filename is trying to overwrite another plugin. - (Windows Store Apps/Windows Phone): when picking placeholder plugins only plugins with matching file names as the original plugin will be shown Profiler - Added total and per frame GC allocated bytes to the Memory chart. - Image Effects have profiling blocks with the script name in them, instead of a generic "ImageEffect". - Improved accuracy of reported AudioSources in the scene when working with AudioSources in prefabs. - Search field for filtering the results in the treeview. - Stop collecting GPU data when GPU Profiler chart is closed. Defaults to being closed for performance reasons. - Stop collecting profiler's data on Player's side if recording is disabled. Scripting - 64-bit platforms will now accept managed DLLs compiled specifically for x64. - Added defines for UNITY_EDITOR_64/32, UNITY_5. - Added disposable scope helpers for Begin/End pairs for GUI, GUILayout, EditorGUI and EditorGUILayout. - Added formatting overloads to Debug.Log*. - Added generic overloads for AssetBundle.Load*. - All GetComponent paths got much faster, especially GetComponent. - GetComponent family of functions now supports interfaces as generic argument. - Improve error messages reported by IL2CPP by including managed source code information when it is available. - Math: Added SphericalHarmonicsL2 scripting struct. - Support serialization of all primitive types. Shaders - Added [NoTilingOffset] property attribute; hides tiling & offset fields in texture property UI. - Added [Gamma] property attribute; allows Float and Vector properties to be flagged for automatic gamma correction. Tagged Float and Vector properties will function the same way as Color properties do - gamma correction will be applied, if necessary, before sending values to the GPU. - Added atmospheric thickness and sky tint controls to Skybox (procedural) shader; also visual appearance in gamma space matches that of linear now. - Added exposure slider to "Skybox/Cubemap" and "Skybox/6 Planes" shaders. - Added MaterialPropertyDecorators. Similar to MaterialPropertyDrawers, but you can add many of them on a shader property. Added built-in decorators: [Space], [Header(text)]. - Added rotation and exposure controls to Skybox (6-sided) and Skybox (cubemap) shaders. - Added SHADER_TARGET define that's based on "#pragma target" version. E.g. it will be 30 for SM3.0. - Added UNITY_NO_LINEAR_COLORSPACE define; defined on platforms that never have Linear color space. - Better comments in generated surface shader code. Better error messages when surface shader lighting functions aren't consistent. - Better handling of texture*Lod for OpenGL ES 2.0. On devices that don't support it, the generated shader code will automatically do a biased mip lookup approximation. - Built-in Fog works on all platforms now (includes WP8/WinRT/consoles). - Cleaned up shadow macros for shaders (UNITY_DECLARE_SHADOWMAP, UNITY_SAMPLE_SHADOW). On platforms that always have "native shadow maps" (e.g. DX11), there's no need for SHADOWS_NATIVE keyword to be present for these macros to do the right thing. On platforms that don't have native shadow maps (e.g. some GLES2.0 devices, Xbox360), these macros will do comparison of texture & depth manually. - Existing user surface shaders with custom lighting functions work with Non-Directional (baked and realtime) and Directional (baked) lightmap types. These lighting functions need to be updated to use the UnityGI structure to take advantage of all the new lightmap types and reflection probes. - Improved "compile and show code" functionality in shader inspector. Now has dropdown to select custom set of platforms to compile shaders for. And shows a progress bar while compiling shader variants for display. - Improved importing performance, in-editor loading performance and reduced imported file sizes for shaders with really large variant counts. - Information about texture format decoding (LDR, dLDR, RGBM, Normals) is passed in %TextureName%_HDR shader constant. - Made it possible to use stencil buffer during deferred shading/lighting g-buffer passes, to some extent. Stencil reference value coming from shader/material will be combined (binary or) with Unity-supplied reference value. - Massively improved shader loading performance, and reduced memory consumption. - By default, internal shader variants are only loaded when actually needed (typically a lot of shader variants are never actually needed). - Added ShaderVariantCollection asset type for ability to manually preload/warmup shader variants, to avoid hiccups later on. This is like Shader.WarmupAllShaders, done in a better way. - Editor can track shaders & their variants used in scene or play mode, and create ShaderVariantCollection out of them (button in Graphics Settings). - Graphics Settings have a list of ShaderVariantCollection assets to preload at game startup. Can also warmup them from a script. - Optimized shader compilation performance for OpenGL/ES platforms - Optimized shader importing performance, particularly for surface shaders with many multi_compile/shader_feature variants. -. - You might have to adjust your shaders to remove a 2x multiply. This is only the case if you define your own lighting function, in the case of surface shaders this is usually not the case. So most content will not require the change. In most cases the shader code looks like this: - c.rgb = s.Albedo * _LightColor0.rgb * (diff * atten * 2); --> c.rgb = s.Albedo * _LightColor0.rgb * (diff * atten); - Skybox shaders (including "Skybox/Procedural") get direction and color of the main light passed in the shader constants. - Surface shaders allow more texture interpolators, when targeting shader model 4.0+ (up to 32). - Surface shaders can use the UnityGI structure in their lighting functions. UnityGI contains light from all lightmap types, light probes and reflection probes. The built-in Lambert and BlinnPhong were updated to use it as well. - Surface shaders use up slightly less samplers on DX11-like platforms. Added UNITY_SAMPLE_TEX2D_SAMPLER helper macro to read a texture, while using sampler from another one. - Surface shaders using UnityGI and alpha transparency default to alpha premultiply mode (alpha:premul). Otherwise the default is alpha:blend. Substance - Consolidation of Substance binary data prior to runtime use now has a much lower peak memory footprint. Terrain - Added API GetTreeInstance()/SetTreeInstance()/treeInstanceCount on TerrainData class for fast tree updating. - Added "Keep existing trees" option when mass-placing trees. - Improved rendering performance when tree imposters are requested to be rendered. - New terrain materials. You now have 4 options to choose from: - Built-in Standard. PBR material that uses the “standard” lighting model. This is the default option for newly created terrains. - Built-in Legacy Diffuse. This is the legacy built-in terrain material from Unity 4.x and before. It uses Lambert (diffuse term only) lighting model and has optional normal map support. - Built-in Legacy Specular. This built-in material uses BlinnPhong (diffuse and specular term) lighting model and has optional normal map support. - Custom. Use a custom material of your choice to render the terrain. Version Control - Add shortcut for submit and cancel in submit dialog. Default keyboard focus to textarea when opening submit window. - Merging: Improve conflict output to console - Merging: Improve premerge by rewriting all of left, right and base. Windows - Standalone and webplayer: Input subsystem processes touch messages via WM_TOUCH. Previously it worked with Windows-simulated mouse events. - Windows Phone 8/Windows Store Apps - Added GetMethod() and GetProperty() to WinRTLegacy.TypeExtensions. - Added System.IO.Directory, System.IO.File, System.IO.FileStream, WinRTLegacy.IO.StreamReader, WinRTLegacy.IO.StreamWriter classes to WinRTLegacy - Shadows on windows mobile devices now work just like on iOS/Android - no cascaded shadow maps (i.e. not "too slow on mobile" anymore). - Significantly improved performance of passing System.Type objects to UnityEngine (for example, GetComponent is affected) - UnityPlayer.dll now contains version info. - Windows Phone 8: Geolocator initialization code removed from Visual Studio project files. When overwriting existing 4.x projects please remove redundant code. Windows Store Apps - Added Directory, DirectoryInfo, File, FileStream replacements to WinRTLegacy. - Added support for linear color space. - Added OnFileActivated handler in App.xaml.[cs/cpp]. - Added UnityEngine.WSA.Application.advertisingIdentifier. - Building on top of existing project will now check if a project being overwritten is compatible with newly built one. - Chinese Traditional and Simplified languages are now detected and reported, instead of always returning generic Chinese. - Handheld class added. - PlayerPrefs will be saved whenever application goes into suspend mode. - Use joysticks in addition to Xbox 360 controllers, but you have to enable HumanInterfaceDevice capability in PlayerSettings. Note: this capability is not visible in Package.appxmanifest UI interface in Visual Studio. Fixes 2D - Sprite name can't be empty, or contain characters that are not supported in assets when created from Sprite Editor. AI - Fix for avoidance sampling being one frame delayed - resulting in error message: nei.params.priority >= ag.params.priority. - Fix crash when calling NavMeshManager::Triangulate without baked data - Fix crash when navmesh is removed from disk when in use - Fix crash when OffMeshLink component has "AutoUpdate" enabled - but no endpoint transforms assigned. - Fix issue where auto-generated offmeshlinks were generated only at the origin. - Fix issue where baking navmesh for a duplicated scene would destroy the original scenes navmesh - Fix issue where obstacles and other agents wouldn't be avoided correctly by NavMeshAgents. The fix can cause the agents to avoid other agents more than before. You can reduce the avoidance prediction time (NavMesh.avoidancePredictionTime) to tune down the avoidance. - Fix issue where using navmesh built with "Height Mesh" enabled would sometimes crash Unity. - Fix memory leak after navmesh baking of terrain meshes. - Fix problem where any change in rotation or scale would trigger re-carving regardless of specified move-threshold. - Fix regression where NavMeshAgent velocity would always have zero y-component. - More robust raycast. Fixes occasional wrong height when raycast terminates at navmesh edge. - Navmesh is loaded before agents are created in additively loaded scenes - no need to wait one frame - Offmesh link drop arrow is not connected to navmesh with big heights - Prevent path query to invalid/infinity positions. Android - Compensate for polygon shader Offset bug on Mali 400 GPU. - Fixed auto rotation, Input.acceleration and gyroscope when using a non-native activity - Fixed fullscreen switch when called in Awake or Start in the first scene. - Fixed leak when using ActivityIndicator. - Fixed manifest detection for Android library project plugins - Limited support for anti-aliasing in OpenGL ES 2.0 to devices that support anti-aliased FBOs - Fixed resource leak when using antialiased RenderTexture with OpenGL ES 3 - Fixed script compilation errors when regular .js file is present in Assets/Plugins/Android/assets - Fixed SDK auto-update - Fixed Water4 standard asset rendering on some devices. - Fixed audio playback when non-stereo mode selected (by forcing stereo). - Internet reachability check now returns proper value if switching in and out of airplane mode. - Project folder is no longer locked by adb after entering play mode in the editor. - Reporting correct screen orientation even if OS refused to apply requested orientation. Animation - Animation Clip is now available immediately after being created automatically for GUI - Fixed bug where Avatar mask wasn't appliedcorrectly to animation clip preview in the model importer. - Fixed bug where Blending pivot wasnot scaled correctly. It mainly affected AvatarPreview gizmo display. It did not affect runtime eval. - Builtin materials are now editable in animation mode. The animation is stored on the clip not the material. - Changing a child blend tree will now update objects using that blend tree in the scene. - Changing Animator.applyRootMotion while playing will no longer reset the controller's state machine. - Delayed the graph rebuild when deleting transitions to fix a bug when deleting multiple transitions. - Fixed bug where deleting a transition would delete a layer. - Fixed various crashes, especially on malformed data values. - Fixed UI issues: UI not updating after undo, curves flickering in some cases, rename overlays not shown, applying body mask in import settings, preview sometimes changing values, blend shape previews and so on. - Fixed adding child to new BlendTree not showing up in graph - Fixed animation events executed incorrectly on mirrored states. - Fixed Animation not playing in previewer for Generic - Fixed Animation transition causing undefined movement (even with "apply root motion" disabled) - Fixed Animator.Play that did not work after Recording - Fixed Animator.Play() and Animator.CrossFade() playing the animator state at requested time 't + deltaTime' when it should be 't'. - Fixed AnimationClip with manually-created root motion curves with wrong Class type causes crashes - Fixed Blend tree adjust time scale for animation clip without speed, you should get a warning when there is no speed available to compute the time scale - Fixed Blend tree compute threshold. if there is not enough data to compute the threshold you should get a warning. - Fixed BlendTree that had child AnimationClip with the same name. - Fixed bug where an Avatar mask used for humanoid clip import was not setup with all human transform checked. - Fixed Characters stretch out during a transition interrupted by another transition - Fixed computation of Homogenous Speed in BlendTree with clips that have no speed - Fixed dependency of sprites in AnimationClip, sprites are missing when the game object with sprite Animation is loaded from Assetbundle. - Fixed drag of AnimationClip on GameObjet that has an AnimatorController. - Fixed evaluation of Curves with only one key. - Fixed Event evaluation when mirroring states. - Fixed feet pivot weight blending. Feet pivot weight was affected by blended clips even when their weights were very small - Fixed Humanoid going to relax pose on transition to state with no clip on 2nd sync layer - Fixed Humanoid rig playing animations differently than generic rig. - Fixed layer switching performance issue. - Fixed linear scale blending for additive layers. - Fixed multiple AnimationEvents at time 0 that were only firing the first AnimationEvent. - Fixed "Not Initialized" displayed on an Animator with valid Controller. - Fixed OnStateMachineEnter and OnStateMachineExit callbacks not being called. - Fixed packed NPOT sprite textures - Fixed Rect Transform z component not being animated - Fixed root motion still moving even if Root Transform Position(XZ) is baked. - Fixed several issues with Animation Events (event not fired, fired twice). - Fixed StateMachineEnter/Exit not being called on multi-layer component - Fixed transition error when a state had a speed of zero. - Fixed Transition previewer for very short clips. - Fixed UnloadNonDirtyStreams to correctly handle stream with destroyed objects. - Fixed unsynced AnimatorStateInfo and AnimatorClipInfo. - Generic Root Motion will be used for an additional Layer when no Mask is specified. - Prevented deletion of root blendTree in the BlendTree graph. - Prevented adding legacy animation to Mecanim. - Prevented creation of cycles in Blend Trees. - Propagated Animator invalidation on modification to AnimatorOverrideController to fix a crash when changing speed. - Rebakes euler angle curves on sample rate change. - Fixed Root Motion failing for very short clips. Asset Bundles - Asset Bundle Export performance increase. - AssetBundle.LoadAll***() now only return the game object without the first component. - Fixed crash if user passes "./" as output path when building AssetBundles. - Fixed possible crash while loading multiple AssetBundles simultaneously. - Fixed the typo in .manifest file - Remove duplicate objects when building with BuildAssetBundleExplicitAssetNames(). Also output more meaningful log information for assetBundle object. Asset Import - Added ability to retry operation on write error when importing assets. - Added warning messages when paths to assets are invalid - Append required .fontsettings extension if needed in GenerateEditableFont - Check texture format that can be assigned the TextureImporter - Fixed AssetDatabase.ImportPackage fail when path to package has platform path separators. - Fixed crash when included blend shapes and needed to be split because of size. - Fixed crash when upgrading metadata files - Fixed import of empty .txt files. - Fixed import of Maya files with set driven keys. - Fixed problem when importing models with no diffuse color specified. - Fixed problems with animation importing incorrectly due to mirror/negative scale. - Support the manifest file in text importer. Asset Management - Added warning when using AssetDatabase.Load* function with an absolute path - Fix assets unload during load level operation - Fixed crash while loading scene Unity with mecanim animation and skinnedmesh filter. - Fixed invalid cache state after cancelling WWW download. - Fix the "input objects must be of exact same type" error message - Prefabs: Fix crash if using DestroyImmediate() on prefab instance objects during prefab instantiation. - Prefabs: Fix crash when accessing physics component properties during OnValidate(). This includes a general change in behavior for OnValidate() calls during prefab instantiation and undos such that it follows the same order as when loading from disk. - Prefabs including monobehaviours with missing scripts should not display a warning if the monobehaviour has been deleted on the prefab instance. - Resources.Load will now correctly return NULL when there is no Object of the desired type with that name (instead of returning an object with a different type if it exists) - Serialization: Added ability to do automatic fix of invalid references to scripts in scene file (to valid registered scripts) - Serialization: Added error message with file information if SerializedFile header is corrupted - Serialization: Fixed bug that caused build corruption when serializing volatile fields. - Serialization: Fixed bug that caused build corruption when serializing classes for which a generic version exists - Serialization: Fixed the error message when removing an object in a custom inspector - Serialization: Fixed windows Layout loading if script for previously opened custom window is absent Audio - AudioClip.SetData no longer prints out error messages when writing data at a position that will cause wrapping. - Calling AudioClip.SetData causes a crash fixed - Fixed a bug where the audio system stopped working when a game object had an AudioSource, an AudioListener and a custom audio filter attached. The system now outputs a warning as the custom audio filter can only be assigned to one Audio component at a time. - Fixed Crash when exposing a parameter of an effect that was added to a group - Fixed for regression where component effects are on the AudioListener cause a crash - Fix importing Tracker files so that by default, they are set to load Compressed In Memory. This is also now configurable. - Fixed leaking audio resources when having AudioSources within a Prefab - Prevent data-race condition in AudioManager - Prologic DTS can now be selected as an audio output. - Remove exposed parameters correctly when deleting and effect that has exposed parameters in it. - Stability fix for custom audio filters placed on the AudioListener. - When audio clip was set to Load In Background project crashed on Android immediately Blackberry - Event.shift and Event.alt now work as expected. Build Pipeline - Don't include inactive EditorOnly objects in builds. Cache Server - Fix "CacheServer Asset validation failed" error messages while Unity is importing project. - Fix editor crash when enabling the Cache Server in preferences with empty address. Core - Fix crash when initializing Light from prefab object during scene loading. - Fix the bug that loading from cache returns false. - Fixed data race in memory allocators. - Runtime: Error message is now shown if you try to add a component of invalid type - Runtime: Fix Time.realtimeSinceStartup being wrong during Awake calls in initial level load. - Runtime: GameObject.FindObject nolonger stops and returns null if first match is an inactive game object. Debugging - Allow evaluation of methods with string literal parameters. - Don't interrupt user waits (e.g. ManualResetEvent). - Fix setting breakpoints in generic method implementations. - Fix some instances of debugger freezing or hanging. Editor - Added "-force-gl-ref" cmd-line option support for the OSX Editor. - Added link to editor settings when sprite packer is disabled - Animation Window refreshed when tabbed into - AnimationState.time is updated when scrubbing animation in the AnimationWindow. - Audio preview is refreshed after import settings are changed - CanvasGroup methods were not getting registered in the UI module, resulting in MissingMethodExceptions - Changing framerate in animation window now repositions animation events correctly - Cloth inspector to support multi-editing - Color picker code now has correct color space conversion and is now working accurately. - Confined cursor mode doesn't confine cursor to last active editor pane - Create a new project upgrade warning system that does not depend on serialized files or version control. - Deleting an asset does not make deleted objects from other assets appear again. - Disallow empty names for sprites - Don't ignore assets whose names contain "StreamingAssets" - Don't immediately hide popup windows when there are unity windows on secondary screen on OSX - Don't let user rename GameObjects with HideFlags.NotEditable set - Drag-and-drop does not accept simple Renderers as a valid target for assigning skybox material. - Editor no longer freezes when scene view camera is really far from origin - Empty animation window no longer increases CPU usage - Ensure correct waking order of components when duplicating a GameObject. - Ensure screen width and height in player settings is at least 1 - Expose static methods from context objects to JS. - Fixed an occasional crash when reimporting shaders. - Fixed assetBundle search filter doesn't work correctly. - Fixed assert when loading scene containing reference to one of its objects that no longer exist. - Fixed asserts when displaying multiple objects in inspector preview. - Fix asset when using hideFlags to make objects persist after exiting play mode. - Fixed audio source priority slider showing "–" when editing multiple objects - Fixed AudioSourceInspector.cs throwing null refs on UndoRedoPerformed - Fixed broken inspector setup with multiple inspectors when shaders are using custom editors - Fixed changing loaded level index before OnApplicationQuit message when exiting play mode. - Fixed clipping of multi-line text in text fields. - Fixed confirmation dialog "Losing Prefabs" shown twice when trying to delete child object - Fixed console errors when inspecting player settings in debug view. - Fixed crash occasionally happens when you create a prefab. Related to the object sorting in the prefab. - Fixed crash when executing a menu item from a static constructor. - Fixed crash when maximizing game view on OSX. - Fixed crash when removing components from a prefab, but prefab instances would have depending components. - Fixed crash when script name is longer than 32 characters. - Fixed crash with corrupted scene when having invalid references in the list of transform children. - Fixed custom cursors to properly update in OS X editor. - Fixed custom PropertyDrawer being called with wrong SerializedProperty when property is inside a nested class. - Fixed double firing of playmodeStateChanged - Fixed Edge Collider 2D sometimes not showing handles - Fixed editor errors when undoing the insertion of a new LOD level in LOD group. - Fixed error spam: "GUI Error: You are pushing more GUIClips than you are popping .." when setting cam.targetTexture = null in OnPostRender. - Fixed exceptions happening when a read-only plugin is used. - Fixed font corruption after asset import. - Fixed freeze during Editor startup when using input devices with large number of emulated buttons (some wireless mouses)Fixed GameObject not selectable by label icon - Fixed freeze on floating-point exception - Fixed Import Package window being broken due to illegal characters in path - Fixed incorrect fade group animation in player settings - Fixed inspector rendering when a script changes RenderTexture.active. - Fixed isPlayingOrWillChangePlaymode to work as expected. - Fixed keyboard shortcuts (home/end/page up/page down) in object selector - Fixed Mac Editor Projects with hidden folders inside Assets are usable again - Fixed many texture/mesh related error messages to ping the source object that caused it. - Fixed material inspector could collapse its controls by clicking on the header. Controls are now always visible. - Fixed memory leak when calling 'Object.Destroy' and returning to edit mode. - Fixed meshes getting lost if they only lived in the scene and only were referenced by a mesh collider. - Fixed missing header for state machine behaviours - Fixed navigation keyboard shortcuts in object selector - Fixed NullReferenceException from uninitialized icon if CurveEditor is shown before Inspector - Fixed NullReferenceException when Tools.viewTool is queried outside OnGUI - Fixed numeric accuracy of transform coordinates when copy/pasting or duplicating objects. - Fixed occasional crash/hang on exit. - Fixed page down in object selector on Windows - Fixed position of GUI elements in inspector when using PropertyDrawers. - Fixed possible corruption of editor window rendering in OS X Editor. - Fixed possible crash when placing prefabs with child objects. - Fixed projectsettings.asset serialization error - Fixed property list in Animation Controller editor allowing to drag invalid element from bottom of list. - Fixed race condition in memory allocation system. - Fixed rename overlay is not removed when undoing - Fixed Skybox components not taken into account in camera preview popup - Fixed so TextMesh text field uses TextArea instead of single text field - Fixed Sprite Editor crash when docked to top of the layout - Fixed stack traces not being generated correctly. - Fixed text corruption in TextMesh components when reimporting fonts. - Fixed that text fields in an unfocused window could break another windows textfield if busy repainting - Fixed tooltips not always showing up when they should. - Fixed typing into the search field between transition animations for Add Component menu - Fixed unparenting when deleting object in Editor once OnDestroy is called - Fixed updating color fields in material inspector to work when warnings are displayed. - Fixed user cannot close a custom editor window from a previous project. - Fixed utility windows always loading last width & height if larger than requested width & height. - Fixed when mouse was not processed in the Editor in play mode after building Android or iOS. - Fixed Windows Editor not showing progress over taskbar icon, when doing initial project import. - Fixed Windows Editor unresponsive to user's input in some tablets. - Folders named "something.unity" will be listed as folders and not scenes in a search - FPS controls now only affects the active scene view - I18n: Issues with Asian Input Method Editors inside the Windows version of the Editor. - I18n: Issues importing assets when their path/asset/component names contain Asian characters. - I18n: Issues storing/retrieving strings from PlayerPrefs when PC is set to Asian locale. - I18n: Editor crashes on start-up if computer / user / project name contains Asian characters. - IMGUI: Fixed crash when using GUI.Window recursively. - IMGUI: Fixed line spacing when multiple sizes are used in text markup - IMGUI: Fixed renaming of existing controls using GUI.SetNextControlName. - IMGUI: ContextClick events are now never received by in-game GUIs (as documented, the event is editor only). - Initialize Scene View 2D mode correctly when upgrading from version - Input.mousePosition now returns correct position when called in Awake and Start in the editor - Make key combinations ignore Caps Lock key. - No more errors after applying new preset in the curve editor - Object Picker is now able to show a hierarchy of sub assets (used for AudioMixerGroups for now). - Opened scene will no longer be accidentally marked as modified. - Opening multiple locked inspectors works - OSX corner resize gizmo doesn't block input when not shown. - Packages: Fix importing package with long paths on Windows - Particles: Fixed particles that are out of view casting incorrect shadows. - Particles: Fixed systems using Distance emission not stopping correctly. - Particles: ParticleSystem will no correctly remove any of its particles and reset its emitter state when being deactivated. - Prevent each script from opening in a new Visual Studio instance. - Prevent MinMaxSlider getting into error state when clicking in the thumb area - Prevent right clicking on controls behind preview window - Reduce serialization depth limit warnings - Remove unsupported OSX menu items (Start Dictation & Special Characters) - Removing curve in animation window doesn't remove other curves with similar name - Reverting a prefab no longer fails if two added components depends on each other. - Select Dependencies operation no longer breaks editor fonts - Shadows working correctly when zoomed in animation preview window - Show at most one error when attempting to deleting multiple components - Sprite name was emptied when copy pasting position etc. values on editor - Swatches in the Color Picker tool are now gamma corrected when using linear colour space. - Synchronize EditorUserBuildSettings.selectedStandaloneTarget when switching build targets with SwitchActiveBuildTarget() or -buildTarget. - Tooltips use current skin instead always using light skin - Warn in Lighting window UI when a skybox with nonsensical shader is used - Will exit play mode when switching build platform. - Unity crashes while adding component to destroyed object. - Undoing changes in the Animator throws an error. - Use unique sprite name when creating new sprites manually Fonts - Fixed a bug where regenerating font textures might miss needed characters from the last frame. - Fixed fallback to default font for characters missing in customs fonts on platforms without OS font access. Graphics - Camera.RenderToCubemap will correctly work with AA render texture. - D3D11: Fixed an issue which caused some objects not be rendered if shadows are enabled in the scene on feature level 9.x - Deferred Lighting is disabled for oblique camera projections; falls back to forward rendering now. Before, it was just not working properly, without a proper fallback. - DX11, fixed GL.Clear when we have MRTs (only first target was cleared before). - Fixed HDR support for SunShafts image effect. - Fixed incorrect warning about NPOT texture filtering - Fixed occasional crash on creating and immediately deleting particle renderer. - Fixed RenderTextureFormat.Default and DefaultHDR only working with RenderTexture.GetTemporary(), not with permanent RenderTextures. - Fixed shadow caster culling for orthographic cameras. - Fixed Skybox not rendering with some edge cases of supported vs. not supported shaders - Fixed Texture2D.EncodeToPNG being very slow for large images. E.g. for 4096x4096 image, it's now almost 10x faster! - Fixed "Tiled GPU perf. warning" in editor resulting in poor performance. - Fixed warning thrown on saving scene by mark the meshes as DontSave - GI: Fixed tetrahedralization issues with small floating point differences in probe positions. - GLES: Fixed rendering bug that occurs when native rendering plugin calls glViewport - Image Effects: Fixed some ImageEffectOpaque effects making later alpha blended geometry not render with correct Z-buffer. - Make sure to never use soft particles when in orthographic camera, since depth-based fadeout does not work there. - OpenGL: Detected cases on Windows when no OpenGL drivers are installed and exit properly. - OpenGL: Don't force texture/shader reload when changing resolution (breaks baked lighting, etc.) - OpenGL: Fixed GLSL fragment shader incorrectly tagged as a Fixed Function pipeline shader. - OpenGL: Fixed RenderTextures on Windows 64-bit standalone using OpenGL. - OpenGL ES: Enforce RGB normal maps even if source texture have alpha. - OpenGL ES: Some performance improvements by removing redundant GL API calls. - Rendering: Fix crash when closing Standalone player in DX11 render mode. - Rendering: Fix memory leak when dynamic geometry chunk did not add any vertices. - Rendering: Fixed crash when reading font's metadata for a font without style info. - Shadows: Fixed flickering/inconsistent shadows when light culling masks cause more than one light to be "main light" in forward rendering. - Shadows: Fixed shadowmaps being re-rendered when using deferred shading with some forward-shaded objects. - Shadows: Fixed some cases where alpha-tested shadow caster objects were wrongly batched together, even if they used different textures. - Shadows: Fixed spot light shadow bias to be more sensible. Was highly non-linear before. - Tint calculation in Skybox shaders is done more properly when in Linear color space now. iOS - Check whether an ad is loaded in ADInterstitialAd.Show() - Correctly implement Marshal.Copy for arrays. - Delete newlines when pasting into single line edit boxes - Disable informational warnings on non-development build - Don't pass touches through iOS keyboard's toolbar - Don't spam the console log with GameKit stuff on release builds - Fixed GetLoadedDylibs to not to include the app exe in the results - Fixed Info.plist append - Fixed launch screen support - Fixed memory leaks related to UTF8String. - Fixed project append - Fixed random crash when changing orientation by 180 degrees - Fixed severe visual issues when setting Screen.orientation when autorotation is disabled - Fixed special character treatment in Info.plist - Fixed splashscreens for landscape orientation on iOS 7 and newer - Fixed visual issue in Player settings - Fixed wrong frame buffer size on iPhone 6+ - Ignore SIGPIPE signal which is thrown by broken sockets - Improved iOS device name detection. - Made advertisement ID calls dynamic to avoid App Store rejections. - Report size of assemblies after bytecode stripping - Support multiple permission types in {Request,Has}UserAuthorization - Use new remote notification API on iOS 8 - Use separate font metadata caches for each iOS version - Workaround for iOS 8.0 GameController API crash bug IL2CPP - Correctly handle the Duv_Un IL opcode with signed arguments to prevent an error from IL2CPP like this: "Unexpected types used with Div_Un opcode. Types are Int32 and Int32" - Correctly throw a managed exception when an array is created with a negative size. - Handle custom attributes on events correctly. - UnityEngine.dll methods that are targets of UI events are no longer incorrectly stripped - Write proper include directives for all fields of marshaled structures or classes. Installers - Windows: No longer specifying the "Editor" subfolder of path when installing Unity. - Windows: Uninstall MonoDevelop when uninstalling Unity. Linux - Call OnApplicationQuit callbacks for all methods of quitting the player. - Constrain size of screen selector banner image. - Filter aspect ratios in screen selector. - Fix hotspot desynchronization with custom cursors when hiding/reshowing. - Fixed spotlight shadow filtering on Linux - now uses hardware PCF just like Win/Mac. - Improve system language detection. MonoDevelop - Fixed exception when resolving symbolic breakpoints. - Fixed issue with Cmd+A (Select All) keyboard shortcut not working correctly on OSX after using the main menu. - Fixed “jumping cursor” issue. - Fixed opening the same file twice in MonoDevelop. - Updated versions of Mono/GTK used, fixing scrolling issues with some mice. Networking - WWW on local file system can accept non-ASCII filenames on Windows. OS X - Mac OS X Standalone: Fix crash changing if resolution in batch mode. - Mac OS X Standalone: IME Input now works in the 64-bit Standalone player. Physics - Cloth: fixed cloth exploding for any non-trivial model imported from FBX. - Cloth: fixed rotation being applied twice - Cloth: improved simulation quality, fixed a bug where cloth simulation would be dramatically affected by fps - Collider.Raycast will now not hit disabled colliders - ConstantForce2D torque should be in degrees not radians. - Prevented negative values being set for CharacterController.stepOffset. - Enabled flag on CharacterController now correctly keeps its state. - Fixed cloth vertices renderer (was rendering vertices rotated in editor mode) - Fixed crash when applying force to inactive Rigidbody - Fixed crash when doing a Raycast() on a collider that failed initialization - Fixed explosion force when position is inside collider's world AABB. - Fixed HingeJoint spring's targetPosition range that was incorrect. - Fixed Physics.IgnoreCollision - Fixed regression where property changes in the editor did not update the 2D collider in the scene view. - Fixed rotation mode combo for ConfigurableJoint. - Fixed terrain colliders returning sharedMaterial == null - Fixed that TransformChanged events could re-create the Cloth component, even though the component was already cleaned up. - Implement Undo for Cloth editor. - Make sure explicit inertia tensor is not reset when modifying colliders - Send OnControllerColliderHit on collisions with another CharacterController reliably. - Set default physic material properties to match values in PhysX SDK - Support sending OnTriggerExit when collider is deactivated or destroyed - WheelCollider: fixed a bug where attachedRigidbody would be equal to null - WheelCollider: fixed a bug where editor would crash soon if you use sliders to tune WheelCollider properties. - WheelCollider: fixed wrong behaviour after changing mass of parent rigidbody Scripting - Ensure all children receive broadcast messages even if the transform hierarchy changes during a callback from the message. - Fixed adding EllipsoidParticleEmitter / MeshParticleEmitter components - Fixed crash if a MonoBehaviour was created in MonoBehaviour OnDisable. - Fixed crash in callback - Fixed crash when calling DestroyImmediate in MonoBehaviour constructor - Fixed crash when calling user log callback from a non-main thread - Fixed exceptions being thrown when calling Object.FindObjectsOfType(). - Fixed ExclusiveAddressUse socket flag on windows - Fixed for some debugger freezes / crashes while debugging on OS X and Windows. - Fixed internal compiler error when script defines are duplicated - Fixed process querying on OSX - Fixed some cases when using a class name that collides with an internal class name in a different namespace (e.g. BuildSettings) - Fixed StackOverflowException handling on 64-bit Windows - Fixed webplayer not auto-starting as requested when calling BuildPlayer with Windows-style paths. - Invoking DllImport from various threads, should be thread-safe now. Shaders - Better error message when a shader is using properties that clash with built-in Unity global properties. - Fixed _CameraToWorld and _WorldToCamera matrices being wrong while rendering into a cubemap, or when custom camera.worldToCameraMatrix is set. - Fixed DirectX 11 shader compilation when Unity is installed in a path with non-ascii characters. - Fixed hlsl-to-glsl translation problem with expressions that initialize a matrix with a scalar (float3x3 m = 0). - Fixed issue with generated projects (.csproj) sometimes not having a reference to UnityEngine.UI.dll - Fixed legacy Diffuse Detail shader when in linear color space. - Fixed loading of some GLSLPROGRAM shaders with preprocessor macros on OpenGL ES - Fixed "Maximum number of shader keywords" error in editor resulting in really bad build-time performance. - Fixed some cases where surface shader compiler was producing error about "too many texture interpolators" with no further details. - Fixed surface shader compilation bug where keywords like "nolightmap novertexlights" were not properly excluding all needed variants. - Fixed surface shader compilation bug with some combinations of #pragma multi_compile / shader_feature. - Fixed unnecessary truncation of float constants on GLSL platforms. Substance - Emissive outputs assigned to _EmissionMap shader slots now correctly trigger the emissive effect when the material is loaded. - Fix case where the editor-side Substance cache data would not be reused when it should. - Fix crash in standalone builds when loading a SBSAR with both BakeAndDiscard instances and non-baked instances. - Fix crash when inspecting baked ProceduralTextures. - Fix texture corruption issue in standalone builds where modifying an input value and calling RebuildTextures() on a ProceduralMaterial with image inputs and whose outputs have been read from cache would result in black textures being generated. - Grayscale image inputs are now supported. - ProceduralMaterials only referred to by their outputs and not by their attached material now load properly. Terrain - Custom material's shader keywords now will be correctly applied. - Doing vertex snapping for terrain objects no longer crashes the editor. - Fixed assertion when loading a scene with TerrainData objects embedded. - Fixed broken tree colliders. - Fixed corrupted rendering when being edited. - Fixed crash when importing detail meshes with float color channel. - Fixed "m_UniqueThreadAllocator->GetAllocatedMemorySize() == 0" error after "Mass Place Trees". - Fixed some memory leaks. - Tree imposters lighting is now matched with lighting on mesh trees. Version Control - Add missing icon for incoming changesets. - Auto connect when connection is dropped. - Correct local/remote args for diff tool. - Do not print a warning when saving scene and file is not opened for edit unless necessary. - Fixed case handling on Windows when downloading files. - Fixed editor crash on loading terrain with corrupted detail layers. - Make it possible to retry a hanging connect while connecting. Web Player - Correctly verify generic reference type constraint for generic parameter with type constraint which is a reference type. Windows Player - Deployment Management: Simpler "Force Single Instance" error message on Windows - Deployment Management: Fix StandalonePlayer launched from UNC path - DirectX 11: Mip mapped cubemaps now work correctly on feature level 9.x. This fixes the smoothness setting in the standard shader. - DirectX 11: Unity will now correctly detect if hardware doesn't support a particular cubemap size, and will try to skip higher mip maps instead of failing to upload the cubemap at all. - Fixed fullscreen player sometimes disappearing behind other windows on startup. - Return the correct value from PlayerPrefs::SetString - Windows 10 reports SystemInfo.operatingSystem string properly. Windows Phone - Windows Phone 8.1: Enabling location capability no longer causes a crash. - Windows Phone 8: Tap count is now correctly calculated when using multiple fingers. - Windows Phone/Windows Store Apps: Generic list of structs is now properly serialized. - Windows Store Apps/Windows Phone: added support for animating script variables that are members of structs. - Windows Store Apps/Windows Phone: fixed sprite animation on GUI elements - Windows Phone 8.1: Enabling "Human Interface Device" capability in player settings no longer makes Unity generate invalid application certificate. - Windows Phone 8.1: Fixed Handheld.Vibrate(). - Windows Phone: Fixed Handheld.PlayFullscreenMovie(). - Windows Phone 8.0: Fixed GUI text rotation when device is in landscape orientation and rendering to a render texture. - Windows Phone 8.0: Fixed image effects when device is in landscape orientation. - Windows Phone 8.0: Trying to access webcam without appropriate capabilities in application manifest will no longer constantly throw exceptions. - Windows Phone 8.0: Fixed Unity generating invalid references in Visual Studio project, debug configuration. - Windows Phone: Texture2D.ReadPixels now works correctly in landscape modes. - Windows Phone: fix crash on application exit when location is enabled - Windows Store/Phone: Cloth.coefficients now work correctly - Windows Store Apps/Windows Phone: You can now render to cubemaps on DX11 9.x feature levels. - Windows Store/Phone: Depth render textures are not really supported on DX11 9.x feature levels, but previously they were wrongly claimed to be supported. - Windows Phone/Windows Store Apps: Gyroscope.gravity returns same values as other platforms. It used to be inverted before. - Windows Phone 8: Camera.ViewportToWorldPoint returns correct value in orthographic view. - Windows Store Apps/Windows Phone: fix taking detailed memory sample in profiler - Windows Phone 8: setting keyboard text just after creating it will not be in vain anymore. - Windows Store Apps / WIndows Phone 8: Matrix4x4 will be correctly serialized - Windows Store Apps/Windows Phone: fix profiler not working after reopening the editor - Windows Store Apps/Windows Phone: better error messages when AssemblyConverter fails to resolve type. - Windows Store Apps/Windows Phone: fix AssemblyConverter failing on struct from unprocessed or system assemblies Windows Store Apps - Added missing defines UNITY_WSA, UNITY_WSA_8_0/UNITY_WSA_8_1 in generated Assembly-CSharp-* projects. - Fixed building Universal apps in batch mode - Fixed crash when WebcamTexture is destroyed - Fixed errors in the editor when player settings are open and upgrading scripts or switching platform - Fixed high CPU when Unity is paused - Fixed issue when App bar couldn't be open with mouse right-click while Independent Input source is enabled. - Fixed mouse callbacks - Fixed native plugin not included in generated Visual Studio solution - Fixed serialization error when serializing object derived from System.Object and Compilation Overrides are set to .NET Core. - Fixed SerializationWeaver failure when scripts reference classes in plugins - Fixed UnityScript breaking exported solution with SDK 8.0 - Native plugins now properly added to generated solution - Unity now regenerate test certificate, if it was deleted, rather than failing to build project. - runInBackground checkbox will now warn about wack failure that it might cause. - UNITY_WINRT_8_1 and UNITY_WINRT_8_0 will be correctly defined now. - Unity will now store certificate path as a relative path, so when project is moved to another PC, it will be still found. - When building player files are now copied directly to destination directory bypassing staging area, reduces project size when submitting a bug - You can now use HashAlgorithm & MD5CryptoServiceProviders classes in C# files compiled against .NET Core. Known issues - New Substance features introduced by Substance Designer 5.0 are not yet supported inside Unity. - On Windows 7, system dialog (File Open/File save) and homescreen/project launcher window, the editor in the background doesn't redraw properly when the window is dragged around - WebGL: If you set up a UI Event to trigger a method on a class which is not a MonoBehaviour, and that method is not invoked elsewhere from your code, then the method may be stripped, and the event will fail. The workaround is to explicitly call the method in some place in your code to make sure it won't be stripped. - Windows Player: -parentHWND doesn't work (will return in patch release). - Enabling GPU panel in profiler, and stopping or closing the profiler, will result in the editor almost stalling while printing many error messages. A workaround is to close the GPU panel before closing or stopping the profiler. Will be fixed in patch release - Animation :Copy/Pasting States or StateMachines will not copy it’s StateMachineBehaviours they will be shared between the copies. Will be fixed in patch release. - Animation: Panning with alt-click does not work in the BlendTree graph. Will be fixed in patch release. 变更集: 5b98b70ebeb9
https://unity3d.com/cn/unity/whats-new/unity-5.0
CC-MAIN-2020-16
refinedweb
15,301
50.12
Way for your code to tell if Pythonista is not the foreground app? Specifically: I've been writing small test servers in Pythonista and connect to them using Safari or some other client app on the same device. I've noticed that network performance of the server is impacted pretty heavily if it tries to print anything to the console while it's running in the background. While one obvious solution is to just write all messages to a logfile instead of the console, I was wondering if there are any iOS methods surfaced in Pythonista to tell if it's running in the foreground/background? Thanks,<br> Pacco You could try putting up a scene.Scene and then monitor pause(), resume(), and stop() omz-software.com/pythonista/docs/ios/scene.html#scene.Scene.pause Unfortunately that doesn't help if using SceneView under ui. The following limitation is noted for SceneView: The Scene.pause(), Scene.resume() and Scene.stop() methods will not be called automatically. Looks like Scene has to be invoked with run() to get these. It is puzzling that there isn't more general background detection support. You might check out scene.SceneView.paused If you're in the beta (won't work with the current App Store version), here's a function you could use. To be honest, I made this mostly for fun, I'll probably add an easier way to determine the state of the app. def is_in_background(): from ctypes import cdll, c_void_p, c_char_p, c_int c = cdll.LoadLibrary(None) c.sel_registerName.restype = c_void_p c.sel_registerName.argtypes = [c_char_p] c.objc_getClass.argtypes = [c_char_p] c.objc_getClass.restype = c_void_p UIApplication = c.objc_getClass('UIApplication') c.objc_msgSend.argtypes = [c_void_p, c_void_p] c.objc_msgSend.restype = c_void_p app = c.objc_msgSend(UIApplication, c.sel_registerName('sharedApplication')) c.objc_msgSend.restype = c_int state = c.objc_msgSend(app, c.sel_registerName('applicationState')) return state != 0 Thanks for the feedback all. I even appreciate omz chiming in -- I did suspect it might take some ctypes-fu to determine an app's state but thought there might have been an easier way. Clearly, this isn't a high-priority issue as I suspect running server apps on Pythonista isn't a huge use case. But it does make me wonder why console printing would slow things down? Is it simply because the app is in a backgrounded state or is it because it's offscreen? (i.e., console output has to be written to some sort of image backing store that's slower than a live render, etc) Thanks,<br> Pacco It looks like @omz's is_in_backgroundis in the new beta. The release notes mention console.is_in_background() sk.Scenehas new methods did_pause()and did_resume. I assume like the other background methods they also don't work in SceneView but the release note doesn't say. Oops. Forgot to markup the code and underscores got crunched. I wonder what underscore means in markdown? I guess I should look it up. Underscores are like asterisks ( *) and can be used to make text italic ( _italic_) or bold ( __bold__). This unfortunately means that if you don't know about (or are too lazy to use ;) backticks to enclose code, Python names will often receive unwanted formatting: some_random_object.init Nice additions in the new Pythonista Beta released last night to enable more robust detection of pause/resume and to keep servers apps running forever. Awesome turnaround time @omz!
https://forum.omz-software.com/topic/1713/way-for-your-code-to-tell-if-pythonista-is-not-the-foreground-app
CC-MAIN-2018-39
refinedweb
561
67.55
Google Backs Out of JavaOne 344." Loss of confidence (Score:5, Informative) Looks like we're seeing a new loss of confidence in Java, much like the loss of confidence in mono, for which patent concerns stunted its uptake. So where to next? And where is my replacement for open office? I'm glad (Score:1, Informative) (Score:5, Informative) The similarity of android's dev language with Java is only superficial You mean, aside from the fact that they are exactly the same language and both provide a large number of the same classes in the java.* namespace, they are completely different? Re:Loss of confidence (Score:5, Informative) Re:I'm glad (Score:3, Informative) Oracle is sueing for patent infringement, not trademark infringement. Re:Loss of confidence (Score:1, Informative) Where have the ever called it Java? The platform isn't called Java, the VM isn't called Java, and the language only says "Java like". Re:But its already been done! (Score:3, Informative)? Re:!Good (Score:2, Informative) Google built VM allegedly infring'g Oracle patents (Score:5, Informative) Two enormous differences with the Sun/Microsoft case: 1-- Everything Google built for Android is open-sourced; 2-- No Java license is. Re:!Good (Score:3, Informative) Re:For bunnies sakes ... (Score:3, Informative) They're just as likely to be using COBOL but most people regard that as 'dead'. Re:Google built VM allegedly infring'g Oracle pate (Score:4, Informative) Parent is basically correct. However, pedantically, Dalvik does not, in general, run programs written in the Java language. The language is defined not just by its syntax, but also by a certain set of standard libraries being present and implemented according to Sun/Oracle specification. Dalvik doesn't support all of those, and hence doesn't run Java. However, Dalvik does run a very Java-like language. One that has all the syntax of Java, and *many* of the same libraries. Moreover (as everyone here knows, I'm sure), programs compiled by 'javac' to .class file may be converted to Dalvik executables (as long as they contain only the subset of Java that Dalvik supports). It would be proper to prevent Google from claiming that Android "Runs Java"... but then, I'm pretty sure they never claimed that to start with. Indeed mostly--almost entirely--it's claims about patents that should never have been granted, or really just about lawsuits to try to mess up competition and technical progress just for the sake of disruption (I doubt Oracle actually cares that much about the outcome, it's mostly FUD). Re:!Good (Score:3, Informative) Call me back when your operating system is written in Java. Oh wait, Sun tried that - another failure. You're an idiot. Re:I'm glad (Score:3, Informative) Same language? C# and Javascript have nearly identical syntax Nearly identical is not identical. At the language level, the language that Google uses is identical to Java, both in terms of syntax and semantics. C# is close to Java, but is clearly a distinct language. JavaScript has vaguely Java-like syntax, but Self-like semantics (while Java has Smalltalk-like semantics). Some of the same classes? Look at how many other languages have analogous classes in their libraries. It's irresponsible not to provide string utilities, for one. There is a difference between similar and identical. Google's Java, being the same language as Sun's Java, has namespaces. In these namespaces, there are classes. Android ships with a large number of classes in the java.* namespace, which have identical names and methods to the classes in the java.* namespace. All vaguely OO languages have some kind of string class. Java has java.String, Java.StringBuffer. Objective-C has NSString and NSMutableString. C++ has std::string. Google's language that you are claiming is not Java has... java.String, Java.StringBuffer. All classes in Google's not-Java-really language inherit from... java.Object. When two languages have identical syntax, identical semantics, and an identical core standard library, claiming that they are not the same language is a bit difficult. Rather than just wave your hands, maybe you could point to somewhere where Java and Google's language are actually different. Re:Is English not your first language? (Score:3, Informative)
http://developers.slashdot.org/story/10/08/28/0119257/Google-Backs-Out-of-JavaOne/informative-comments
CC-MAIN-2015-32
refinedweb
721
57.98
Python Compressed Files The other day I was making a large log file that would rarely be investigated. So I decided to compress it in order to make it occupy less space. Since we are on a GNU/Linux system gzip seemed a wise choice - and it was almost as easy as making a regular file. Python and gzip compression The trick it to use import gzip and gzip.open when creating a file. I wanted to experiment with the efficiency of the compression so I made four different files. import gzip ghandle0 = gzip.open('values-0000.txt.gz', 'w') ghandle1 = gzip.open('values-1234.txt.gz', 'w') ghandle2 = gzip.open('values-semi-rnd.txt.gz', 'w') ghandle3 = gzip.open('values-rnd.txt.gz', 'w') I want to compare this to a regular file where I'll write the same values: fhandle = open('values-uncompressed.txt', 'w') One file will just get zeros, one will write increasing numbers, one randomness and increasing numbers, and the last one only randomness. from random import randint fmt = "%06d %06d\n" for i in xrange(99999): m = randint(0, 999999) n = randint(0, 999999) msg = fmt % (m, n) fhandle.write(msg) ghandle3.write(msg) ghandle2.write(fmt % (i, m)) ghandle1.write(fmt % (i, i)) ghandle0.write(fmt % (0, 0)) As expected the files contain number (in text format!) of varying randomness: $ zcat values-semi-rnd.txt.gz | head -n 4 000000 033446 000001 863643 000002 146831 000003 572757 $ zcat values-rnd.txt.gz | head -n 4 033446 325772 863643 493616 146831 223209 572757 428555 $ head -n 4 values-uncompressed.txt 033446 325772 863643 493616 146831 223209 572757 428555 Now the file sizes are smaller if compressed, but of varying efficiency. The very high efficiency is related to properties of ascii text - but the trend would be the same with most data. $ ls -1s *txt* 1376 values-uncompressed.txt # 100.0% size 684 values-rnd.txt.gz # 49.7% size 588 values-semi-rnd.txt.gz # 42.7% size 432 values-1234.txt.gz # 31.4% size 12 values-0000.txt.gz # 0.9% size Read more in Doug Hellman's Python Module of the Week on compression: [1] This page belongs in Kategori Programmering
http://pererikstrandberg.se/blog/index.cgi?page=PythonCompressedFiles
CC-MAIN-2017-39
refinedweb
370
77.13
12 April 2012 20:38 [Source: ICIS news] (updates with Canadian and Mexican chemical railcar traffic data) ?xml:namespace> Canadian chemical railcar loadings for the week totalled 10,633, down from 12,467 in the same week in 2011, the Association of American Railroads (AAR) said. The previous week, ended 31 March, saw a year-on-year decline of 18.5%. The weekly chemical railcar loadings data are seen as important real-time measures of chemical industry activity and demand. From 1 January to 7 April, Canadian chemical railcar loadings were down by 12.9% year on year to 144,360. The AAR said weekly chemical railcar traffic in US chemical railcar traffic fell by 3.7% year on year for the week ended 7 April, marking its fifth decline in a row and the ninth decline so far this year. There were 28,614 chemical railcar loadings last week, compared with 29,708 in the corresponding week of 2011. In the previous week, ended 31 March, US weekly chemical railcar loadings fell by 5.3%. From 1 January to 7 April, US chemical railcar loadings were down by 1.5%, to 422,485, compared with the corresponding period of last year. Meanwhile, overall US weekly railcar loadings for the 19 high-volume freight commodity groups tracked by the AAR fell by 7.7% year on year to 270,974.
http://www.icis.com/Articles/2012/04/12/9549914/canada-chemical-rail-traffic-falls-for-14th-week-in-a-row.html
CC-MAIN-2013-20
refinedweb
230
64.61
form_driver(3X) form_driver(3X) form_driver, form_driver_w - command-processing loop of the form sys‐ tem #include <form.h> int form_driver(FORM *form, int c); int form_driver_w(FORM *form, int c, wchar_t wch); form_driver Once a form has been posted (displayed), you should funnel input events to it through form_driver. This routine has three major input cases: · The input is a form navigation request. Navigation request codes are constants defined in <form.h>, which are distinct from the key- and character codes returned by wgetch(3X). · The input is a printable character. Printable characters (which must be positive, less than 256) are checked according to the program's locale settings. · The input is the KEY_MOUSE special key associated with an mouse event. form_driver_w The form driver requests are as follows: Name Description ─────────────────────────────────────────────────────────────────────────. Field validation: · a call to set_current_field attempts to move to a different field. · a call to set_current_page attempts to move to a different page of the form. · a request attempts to move to a different field. · a request attempts to move to a different page of the form. In each case, the move fails if the field is invalid. If the modified field is valid, the form driver copies the modified data from the window associated with the field to the field buffer. Mouse handling:: · the form cursor is positioned to that field. ·. ·._REQUEST_DENIED The form driver could not process the request. E_SYSTEM_ERROR System error occurred (see errno). _driver(3X)
http://man7.org/linux/man-pages/man3/form_driver.3x.html
CC-MAIN-2017-13
refinedweb
240
58.48
Lazarus for Cross-Platform Development Lazarus provides an outstanding native code solution. The compiler and most libraries are written with cross-platform in mind. That is why programs written in Free Pascal do not need to run a configure script before compilation. The base types, like char, byte, integer and string, work the same on all platforms. An integer always is a signed 32-bit value. The 64-bit integer is called int64. The native integer for a processor is called PtrInt for signed and PtrUInt for unsigned values. Lazarus itself can be compiled with a simple make or graphically in the IDE itself. And, of course, Lazarus is developed with Lazarus. FPC's runtime library does not use libc; rather, it uses kernel functions, which change less often. Therefore, the created executables normally work on various Linux distributions and do not need to be recompiled for each new glibc version. With Lazarus, you can write and debug the biggest part under Linux. But eventually, you'll need to test it on the other targets. However, you do not need to install Lazarus and all the development tools on all your target platforms. Cross compiling can be used to develop under Linux and target another operating system or processor. For example, you could develop under Linux and create Windows executables, and then test them with Wine or in a virtual machine running Windows, or on an actual Windows system. Cross compiling is a big time-saver, because it allows you to test on several platforms quickly and to use your favorite programs while developing. Note, however, that cross compiling does require you to install the cross-compile tools and libraries, which can be tricky. Precompiled versions do not yet exist for all possible hosts and targets. Easy directions are provided for Linux to Windows, because of Wine, and for Windows to Windows CE, because there are installers with all needed tools. First, you need to cross compile and install the GNU binutils. This is well documented on several sites, including the Lazarus Wiki (see Resources). For many targets, this is as simple as downloading a single tar.gz and running a script with some parameters. The next step is to cross compile the Free Pascal libraries. If you want to cross compile to another processor type, you need to cross compile the compiler too. Again, for many targets, complete scripts are available. If your program requires third-party libraries, these must be cross compiled too. If they are written completely in Object Pascal, normally you can just compile them. Lazarus will do that automatically for you. If they use system libraries, it can become difficult. The problems are then the same as for C/C++ compilers. Once you've installed the cross compiler and libraries, cross compiling becomes easy in Lazarus. Simply pass the -T option to the compiler. For example, pass -Twin32 to compile a 32-bit Windows executable instead of a Linux binary. The -P option defines the target processor. Normally, you don't even need to pass special search paths, because of the path scheme used. For instance, the Pascal units for the fpc 2.3.1 compiler, for the processor type i386, and for target operating system Linux are installed under /usr/lib/fpc/2.3.1/units/i386-linux/. All filenames and search paths of the compiler and the IDE support macros, which greatly reduces the amount of command-line parameters and configuration settings. Lazarus reduces the amount of platform-specific settings even further. The IDE allows you to combine several source directories into a Lazarus package. A Lazarus package can be a library or just a logical module of a big project. A package has its own search paths, its own compiler settings and its own macros. All filenames and search paths are stored relative to the configuration file (.lpk file). A package can use other packages and inherit search paths and compiler settings. You can store a package anywhere on the disk. All search paths are adapted automatically on the fly. And, because every source has its own namespace, there is seldom a name conflict. You can switch to another version simply by opening the .lpk file. Each package also has its own output directories, normally one for each platform, which are created automatically. When a package's source file is changed, the IDE automatically compiles the package and all packages in the current project that depend on it. You can fine-tune this automation for each package. When you switch the target platform in the IDE, all packages' output directories are switched. The compiler options dialog is shown.
http://www.linuxjournal.com/magazine/lazarus-cross-platform-development?page=0,1
CC-MAIN-2015-18
refinedweb
776
66.13
This blog post is the first of a series of tutorials provided as part of the SAP TechEd session Tapping into Open Source with SAP NetWeaver Cloud created by Lars Karg from SAP Research and myself. It was our goal to provide something more sustainable than just a slide deck talking about the benefits of Open Source and hence we decided to create a session supplements: The session consists of six individual chapters building on top of each other and together they comprise a step-by-step tutorial demonstrating how-to use popular Open Source frameworks with SAP NetWeaver Cloud. We provide you with all the source code and detailed documentation about how we developed the supplements application itself, so that you can try it yourself! This very first chapter talks about – who would have guessed so – getting started! Enough of the small talk, let’s tackle it! As stated in the introduction of chapter 1 in the supplements web application we’ll clone a github repo(sitory) and then add some Maven dependencies to finally expose a simple service according to REST principles. For that matter, you need a few additional Eclipse plugins to work with Git and Maven respectively. I have described all you need to know in another blog post: Essentials – Working with Git & Maven in Eclipse Once you have installed and configured these plug-ins we are ready to go… 1. Cloning the ‘basecamp’ repo First thing we do is to clone the ‘basecamp‘ github repo to our local workspace. I explained this in detail in the above mentioned blog, so no need to re-write it here. 2. Importing the project Once, we have successfully cloned the repository, we have to import it into our Eclipse workspace. So let’s switch to the “Java EE” perspective and use the “File > Import…” menu and then the “Existing Maven projects” option. Provide the link to the root directory of our cloned repo and click on Finish. Now, the project sources should be imported into your workspace. You should now see the project structure in the ‘Project Explorer’ view. 3. Updating the pom.xml The most important file in a Maven-based project is the pom.xml file, which contains the so called “Project Object Model”. In simple terms think of it as a “recipe” listing all the required “ingredients” (referenced Open Source projects) as well as the “cooking instructions” (build process). Please take a moment to look at the content of this file before we continue… We’ll reference a couple of Open Source projects such as Apache CXF and the famous Spring framework. In order to easily update these dependencies when new versions will be released we’ll start by defining some version constants, so that we can update them with ease in a central place. This is done in the <properties /> section of the POM. So, let’s add these two properties now: <org.apache.cxf.version>2.6.1</org.apache.cxf.version> <org.springframework.version>3.1.2.RELEASE</org.springframework.version> As stated before, the POM is like a “ingredients” list. Sticking to this metaphor, we would need to specify the “stores” where one can get these ingredients. This is done in the <repositories> section of the POM. The standard “store” is called Maven Central and it is already contained in the POM we downloaded. We’ll get most of the commonly used projects here, but the Spring framework has it’s own repository, which we’ll now add: <repository> <id>springsource-repo</id> <name>SpringSource Repository</name> <url></url> </repository> The last remaining step to make our ingerdients list complete is to specify all the components(dependencies) we need. Please find the complete list to add below: <!--> <!-- Jettison --> <dependency> <groupId>org.codehaus.jettison</groupId> <artifactId>jettison</artifactId> <version>1.3.2</version> <scope>runtime</scope> <exclusions> <exclusion> <groupId>stax</groupId> <artifactId>stax-api</artifactId> </exclusion> </exclusions> </dependency> Once you save the POM file you’ll notice that Maven will now get all the stated dependencies and download them into your local Maven repository (so that you don’t have to download them over and over again!) If all went fine, your POM file should now look like this file (well, except for the artifactID!) 4. Let’s code Now that the project setup is completed let’s create a simple class – UserService: package com.sap.netweaver.cloud.samples.springrest.srv; import javax.ws.rs.Path; import javax.ws.rs.Produces; import org.springframework.stereotype.Service; @Service("userService") @Path("/users") @Produces({ "application/json" }) public class UserService { @Path("/user") @Produces("text/plain") @GET /** * Returns the name of the currently logged-on user. * * @param request The {@link HttpServletRequest} that is processed * @return the name of the currently logged-on user */ public String getUserName(@Context HttpServletRequest request) { String retVal = null; retVal = (request.getUserPrincipal() != null) ? request.getUserPrincipal().getName() : "Guest"; return retVal; } } As you can see it’s pretty much straight-forward: we have a simple Java class (aka POJO) that contains one method, which returns the currently logged on username as a String. We see a few JAX-RS annotations. In principal we define the URL path pointing to this service via the @Papth annoations, while the annotation at method-level is added to the one on class level, hence making the complete path to access this service: “/users/user”. The @GET annotation indicates that this RESTful service will be mapped to a HTTP GET operation. Please also note, that we did override the @Produces annotation at method-level, to switch from “application/json” to “text/plain” for that particular service. There are two more things to point out here: a) we also use a Spring annotation called @Service to indicate that this is a Spring-baked Service. By giving ot a name we can make use of of a feature called component-scanning, which frees us from declaring all used beans explicitly in the Spring configuration but instead just use the stated bean name instead. (That will get more clear in just a few minutes – hang on!) Last thing to note is that we inject the HttpServletRequest as a method parameter. This is automatically done via Spring and JAX-RS and hence we can retrieve the currently logged on user via the standard servlet API. 5. Updating the web.xml Now, with the coding in place let’s have a look at the web.xml. <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns: <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> <context-param> <param-name>contextConfigLocation</param-name> <param-value>WEB-INF/springrest>/api/*</url-pattern> </servlet-mapping> <login-config> <auth-method>FORM</auth-method> </login-config> <security-constraint> <web-resource-collection> <web-resource-name>Protected Area</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>Everyone</role-name> </auth-constraint> </security-constraint> <security-role> <description>All SAP NetWeaver Cloud users</description> <role-name>Everyone</role-name> </security-role> </web-app> Let’s quickly go through this, shall we? So lines 8-16 simply make Spring to automatically start once the web application is started via the ContextLoaderListener based on the spring configuration declared at line no 10. Lines 17-27 define the CFX Servlet and map it to every incoming request via the “*” asterisk (catch-all) url-pattern. Lines 29-44 comprise the security configuration, which enforces that all users need to authenticate prior to being able to access any resource of this web application (we protected the whole app via the “*” asterisk in line 35.) All of this is well explained in the corresponding chapter (User Authentication) of our online help. 6. Spring Configuration The last missing piece is the spring configuration file we talked about when we created the UserService class and which we referenced in the web.xml. So, let’s check it out. [springrest-context.xml] <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="" xmlns: <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> <context:component-scan <jaxrs:server <jaxrs:serviceBeans> <ref bean="userService" /> </jaxrs:serviceBeans> <jaxrs:providers> <ref bean="jsonProvider"/> </jaxrs:providers> </jaxrs:server> <bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.json.JSONProvider"> <property name="ignoreNamespaces" value="true"/> <property name="serializeAsArray" value="true"/> </bean> </beans> Line 13 shows the context component scan we briefly touched upon in step 4. Simply put, Spring scans all defined packages here and searches for a variety of annotations such as the @Service annotation we used in our UserService class. As we provided a simple name “userService” as a value to this annotation we can now reference this service (bean) within the configuration w/o explicitly defining it. Lines 15-22 define a logical JAX-RS based server. Please note that we specify the address here: “/api/v1”. This is the base url path this logical server is bound to. Hence, the url path to access the getUserName() would be “/<application-context>/api/v1/users/user”. Line 16-18 define the services exposed via this logical server; which in our examples is only the UserService. Line 19-21 define the so-called providers. For this example we only specify a standard JSONProvider, which is responsible for converting the output of a particular operation to the specified MIME type of the method. In line 24-27 this JSONProvider is defined and a few properties are set, which influence the rendering of JSON content. For further info please consult the excellent documentation. 7. Run the application With that our project is ready to be deployed. Well, almost! There’s one last step to be done, we need to activate the ‘Project Facets’ in order to be able to treat this Maven-based project just like any other ‘Dynamic Web Module’ in Eclipse (WTP). For that purpose, please open up the project properties by using the context-menu of the project in the “Project Explorer” view. Select ‘Properties’ and then “Project Facets”. Here, you need to convert the project to faceted form (This is an Eclipse-specific setting and hence – by design – not part of the Maven project nor the project repo.) Once this is done you should see a “Dynamic Web Module” Facet being active. Select it. On the right hand side you should see a “Details/Runtimes” toggle. Switch to the “Runtimes” option and select “SAP NetWeaver Cloud” as the designated runtime. Now, you can build your project by selecting “Run as > Maven install” from the context menu of the project. Once the build is complete you can just add the web project to either the local server or a cloud server. Publish the project and start the server (if applicable.) Note: If you use a local server, make sure you have defined at least one user by following this documentation. If you deploy to the cloud you have to use your SCN credentials to log on. Once you’re logged on, you should be able to access the ‘service’ via the following URL: http://<server>:<port>/<application-context>/api/v1/users/user Wrap-up So, that’s it! Let’s recap… so, in this tutorial we learned how-to clone a repo(sitory) from Github and import it into our Eclipse IDE. We learned the very basics about Maven and how to use Spring + Apache CXF to expose business functionality as RESTful services. We also touched upon the basics of securing a web application… not bad for a day, isn’t it? So, whether or not you liked this tutorial, you may want to check out chapter 2, where Lars Karg explains how to build a responsive UI with Twitter Bootstrap, Backbone.JS, Handlebars.JS and some other great open source frameworks… PS: The result of this tutorial can be downloaded here. Here’s a codetalk video we recorded the other day that walks you through this process: [embed width="425" height="350"][/embed] Hi Matthias, just as hint: The basecamp repo to clone (step 1), moved to but you still link to the old location. These links are also broken: – step 4 UserService – step 5 web.xml … I think the pattern is clear 😉 Regards Matthias Thanks for the info. Yeah, the links are obsolete… I should update them these days…
https://blogs.sap.com/2012/12/04/teched-2012-cd208-chapter-16-getting-started/
CC-MAIN-2020-45
refinedweb
2,049
52.7
Serge E. Hallyn wrote:> Quoting Daniel Lezcano (dlezcano@fr.ibm.com):>> Oren Laadan wrote:>>> Daniel Lezcano wrote:>>>> Louis Rilling wrote:>>>>> On Fri, Oct 17, 2008 at 04:33:03PM -0700,?>>>>>.> > Right, Oren, iiuc you are insisting that 'external checkpoint' and> 'multiple task checkpoint' are the same thing. But they aren't.> Rather, I think that what we say is 'multiple tasks c/r' is what you say> should be done from user-space :)Then I don't explain myself clearly :)The only thing I consider doing in user space is the creation ofthe container, the namespaces and the processes.I argue that "external checkpoint of a single process" is very fewlines of code away from "self checkpoint" that is in v7.I'm not sure how you define "external restart" ? eventually, theprocesses restart themselves. It is a question of how the processesare created to begin with.> > So particularly given that your patchset seems to be in good shape,> I'd like to see external checkpoint explicitly supported. Please> just call me a dunce if v7 already works for that.> It seems like you want a single process to checkpoint a single (other)process, and then a single process to start a single (other) process.I tried to explicitly avoid dealing with the container (user space ?kernel space ?) and with creating new processes (user space ? kernelspace ?).Nevertheless, it's the _same_ code. All that is needed is to make thecheckpoint syscall refer to the other task instead of self, and therestart should create a container and fork there, then call sys_restart.I guess instead of repeating this argument over, I will go ahead andpost a patch on top of v7 to demonstrate this (without a container,therefore without preserving the original pid).Oren.
https://lkml.org/lkml/2008/10/20/442
CC-MAIN-2016-26
refinedweb
292
63.59
I would like to import rice as a private business I would like to import rice as a private business. If possible, and what customs and import laws I’m curious, if you have any other requirements, please tell me Thank you. import rice Ministry of Agriculture, Food and Rural Affairs If rice is recommended by the recommendation agency (Ministry of Agriculture, Food and Rural Affairs), tariff 5% Otherwise, 513% tariff will apply. For customs clearance, you must pass Food Inspection and Plant Quarantine for customs clearance. It is difficult to import because it is difficult for individuals to receive recommendations due to high tax rate items. Korea joined the World Trade Organization (WTO) in 1995 to tariff all agricultural products, but deferred tariffs for rice from 1995 to 2004 and from 2005 to 2014, and instead reduced tariffs on low tariff quotas (TRQ) ( 5%). The amount of TRQ of imported rice increased from 5,1307 tons in 1995 to 20,5229 tons by extending the tariff deferral in 2004 for 10 years, and finally reached 40,8700 tons. As the grace period for tariffs in 2014 ended, the government decided that tariff tariffs would not be appropriate due to the additional increase in TRQ, and determined tariff rate to 513% according to domestic and foreign price differences between 1986 and 1988, 2014 The WTO was notified on September 30th. The Ministry of Food and Agriculture announced that as a result of the rice verification agreement, some imports of rice will continue, along with existing systems such as a tariff rate of 513%, a total of 40,8700 tons of TRQ, and a state-run trade method of rice TRQ. The government has cut rice imports by half from 120,000 to 60,000 tons after tariffization, and has continued to decrease since then. With the tariff of rice, the obligation to import rice, which was prescribed for the past 10 years, has been removed. However, normal imports are expected to continue due to the persistent problem raised by rice exporters that there is a possibility of violating the WTO regulations. Currently, the quota for each country is 15,195,95 tons in China, 13,304 tons in the United States, 5,5112 tons in Vietnam, 2,8494 tons in Thailand, and Australia 1 out of 40,8700 tons of compulsory imports. It distributed to 5595 tons and 20,000 tons in the global quarter. The national quota will take effect on January 1, 2020, and the five countries must notify the WTO of the withdrawal within 14 days at the latest. 1. Deputy Minister of Agriculture, Food and Rural Affairs Lee Jae-wook said, “When considering rice imports for rice and rice, we consider the WTO norms and domestic demands in consideration of the persistent problems of the interested countries and the WTO norms (Korean treatment). Said. On the other hand, the rice tariff rate is to implement the results of the Uruguay Round negotiations in 1995 regardless of the abandonment of status in developing countries, so the tariff rate of 513% will remain the same until the results of the next negotiation. The Ministry of Agriculture and Food added that it is currently uncertain when the next negotiations will commence, and even if the next negotiations begin, the government will make every effort to protect sensitive items such as rice. “The tariff rate of 513% is a level that can reliably protect the domestic rice market, and the possibility of importing rice for additional commercial uses other than TRQ is very low,” said Lee Jae-wook. I will continue my efforts.” [Source] Imported rice tariff rate confirmed 513%… Rice seems to continue importing rice | Recommended tourist spots in Korea
http://exchrome01.com/archives/2597/i-would-like-to-import-rice-as/
CC-MAIN-2021-49
refinedweb
621
50.7
Java String array FAQ: Can you share an example of how to determine the largest String in a Java String array? Sure, in this tutorial I'll share the source code for a complete Java class with a method that demonstrates how to find the longest String in a Java string array. Finding the longest string in a Java string array Here's the source code that shows how to find the longest string in a Java String array: public class JavaLongestStringInStringArray { public static String getLongestString(String[] array) { int maxLength = 0; String longestString = null; for (String s : array) { if (s.length() > maxLength) { maxLength = s.length(); longestString = s; } } return longestString; } public static void main(String[] args) { String[] toppings = {"Cheese", "Pepperoni", "Black Olives"}; String longestString = getLongestString(toppings); System.out.format("longest string: '%s'\n", longestString); } } I recently created this method for use with setting the prototype value for a JList, i.e., using the setPrototypeCellValuemethod. (If you haven't used it before, when using a JList, it can be very helpful to know the length of the longest String in your Java String array.) Other Java String array and for loop examples For other examples on how to iterate over a Java array, check out this tutorial on How to loop through a Java String array with the Java 5 for loop syntax. If you have any comments or suggestions, please feel free to leave a message in the comment section below. Add new comment
http://alvinalexander.com/blog/post/java/method-return-longest-string-in-given-array-of-strings/
CC-MAIN-2017-17
refinedweb
243
58.72
In Shotgun, you can create Action Menu Items (AMIs) to allow for customized actions in your site. AMIs can be sitewide or used per entity. To secure your AMIs, use the Secret Token field. Setting your secret token Secret tokens add a layer of security to your AMIs. You can set a secret token to each AMI. Note: Secret tokens can only be set once, and after they are set, they cannot be viewed via the web or API. Validating payloads from Shotgun When your secret token is set, Shotgun uses it to create a hash signature with each request sent to the Action server. This hash signature is added to the payload of the request before it is sent. Note: If your AMI is secure, then the hash signature will match in Shotgun and the Action server. Here is an example Action server written in Python that validates received requests: from BaseHTTPServer import BaseHTTPRequestHandler import cgi import hashlib import hmac import datetime key = 'test_key' class PostHandler(BaseHTTPRequestHandler): def do_POST(self): # Parse the form data posted form = cgi.FieldStorage( fp=self.rfile, headers=self.headers, environ={'REQUEST_METHOD':'POST', 'CONTENT_TYPE':self.headers['Content-Type'], }) # Validate the signature if not 'signature' in form.keys(): print "==> Request not signed." return sorted_params = [] # Echo back information about what was posted in the form for field in form.keys(): if field != "signature": sorted_params.append("%s=%s\r\n" % (field, form[field].value)) sorted_params.sort() string_to_verify = ''.join(sorted_params) signature = hmac.new(key, string_to_verify, hashlib.sha1).hexdigest() print "signature: %s" % form['signature'].value print "signature: %s" % signature if form['signature'].value == signature: print "==> Signatures match. This request was not tampered with!" now = datetime.datetime.utcnow(); request_time = datetime.datetime.strptime(form['timestamp'].value, "%Y-%m-%dT%H:%M:%SZ") delta = (now - request_time).total_seconds() if delta > 10: print "==> This request is getting old (%d seconds). Is it a replay attack?" % delta return if __name__ == '__main__': from BaseHTTPServer import HTTPServer server = HTTPServer(('localhost', 8009), PostHandler) print 'Starting server, use to stop' server.serve_forever() 1 Comments I think that code needs updating to ignore fields with empty values: My signatures fail if I don't do that when "selected_ids" is empty.
https://support.shotgunsoftware.com/hc/en-us/articles/115000025494-Securing-your-Action-Menu-Items
CC-MAIN-2019-22
refinedweb
359
51.75
Investors in Barrick Gold Corp. (Symbol: GOLD) saw new options become available today, for the August 2nd expiration. At Stock Options Channel, our YieldBoost formula has looked up and down the GOLD options chain for the new August 2 GOLD, that could represent an attractive alternative to paying $13.79.85% return on the cash commitment, or 13.48% annualized — at Stock Options Channel we call this the YieldBoost. Below is a chart showing the trailing twelve month trading history for Barrick Gold Corp., and highlighting in green where the $13.00 strike is located relative to that history: Turning to the calls side of the option chain, the call contract at the $14.00 strike price has a current bid of 51 cents. If an investor was to purchase shares of GOLD stock at the current price level of $13.79/share, and then sell-to-open that call contract as a "covered call," they are committing to sell the stock at $14.00. Considering the call seller will also collect the premium, that would drive a total return (excluding dividends, if any) of 5.22% if the stock gets called away at the August 2nd expiration (before broker commissions). Of course, a lot of upside could potentially be left on the table if GOLD shares really soar, which is why looking at the trailing twelve month trading history for Barrick Gold Corp., as well as studying the business fundamentals becomes important. Below is a chart showing GOLD's trailing twelve month trading history, with the $14.00 strike highlighted in red: Considering the fact that the .70% boost of extra return to the investor, or 27.00% annualized, which we refer to as the YieldBoost. The implied volatility in the put contract example is 35%, while the implied volatility in the call contract example is 33%. Meanwhile, we calculate the actual trailing twelve month volatility (considering the last 251 trading day closing values as well as today's price of $13.79) to be 33%..
https://www.nasdaq.com/articles/interesting-gold-put-and-call-options-august-2nd-2019-06-13
CC-MAIN-2020-45
refinedweb
337
65.12
Filter Positions in a List Filter Positions in a List koskinasnapoleon + 3 comments In Scala: def f(arr:List[Int]):List[Int] = arr.zipWithIndex.filter(_._2 %2 == 1).map(_._1) So, zipWithIndex produces pairs like (28,0) (32,1) (5,2) ... ,where the second element is the index and the first the value in the list. Hold only those pairs for which the index is odd(filter), and return the first element of the pair which is the value(map) by applying the function which just describes holding only the first element of the pair. Vel0city + 3 comments Yup, very close to my solution which is a bit faster: def f(arr:List[Int]):List[Int] = arr.view.zipWithIndex.filter { _._2 % 2 != 0 }.map { _._1}.force.toList stsatlantis + 1 comment You can use collect instead of filter and map. .collect{case (a,b) if b % 2 == 1 => a} bennetryan + 1 comment Hi, I'm new to Scala, could you please explain the meaning of _._2 and _._1 in your code. I don't see mto follow. Vel0city + 0 comments The _ at the start is just a quick way to express the argument in the function you're making. _._2 % 2 != 0 could be done like so: tp => tp._2 % 2 != 0 Now, we are working with tuples here, that's what zipWithIndex gives you. The values themselves, each paired up with their index. So, _ in this case is a tuple (read up on them, they're basically batched variables like I described above), which is why I use the accessors _1 and _2 to refer to its first and second elements (that's just a Scala thing). For this, the second element is the index and the first its associated value in arr. kishoreraja240 + 0 comments It can be done like this too : Range(1,arr.length,2).map(x=>arr(x)).toList asatna13 + 2 comments I ended up with the following haskell solution: f (x:xs) = (head xs) : f (tail xs) Obviously, I am a beginner at haskell. Any comments? ddevine1 + 1 comment I had the same answer. Though it throws an error on stderr because it doesn't explicity match the the case where (x:xs) = []. To fix it, add this to the line before it: f [] = [] roman_balzer + 0 comments This also fails for me with list with an odd amount of numbers. so i used f [] = [] f [x] = [] f (x:xs) = (head xs) : f (tail xs) daniel_florez + 0 comments this is my answer.. :3 f [] = [] f lst = head (tail lst):f (tail (tail lst)) byronhambly + 0 comments Easy peezy in Elixir using Enum.drop_every IO.stream(:stdio, :line) |> Enum.map(&String.trim/1) |> Enum.map(&String.to_integer/1) |> Enum.drop_every(2) |> Enum.each(&IO.puts(&1)) pinto_jennyfer + 0 comments I don't understand why my code doesn't work when there are duplicates in the list def f ( arr: List[Int] ) : List [Int] = { arr.filter (arr.indexOf ( _ : Int) % 2 != 0) } f ( List(1,2,3,4,4,5) ) scala List[Int] = List(2, 4, 4, 5)--> this is the result Sort 103 Discussions, By: Please Login in order to post a comment
https://www.hackerrank.com/challenges/fp-filter-positions-in-a-list/forum
CC-MAIN-2019-18
refinedweb
535
72.05
You now know something about bits, and about how our familiar digital computers work. All the complex variables, objects and data structures used in modern software are basically all just big piles of bits. Those of us who work on quantum computing call these classical variables. The computers that use them, like the one you are using to read this article, we call classical computers. In quantum computers, our basic variable is the qubit: a quantum variant of the bit. These have exactly the same restrictions as normal bits do: they can store only a single binary piece of information, and can only ever give us an output of 0 or 1. However, they can also be manipulated in ways that can only be described by quantum mechanics. This gives us new gates to play with, allowing us to find new ways to design algorithms. To fully understand these new gates, we first need to understand how to write down qubit states. For this we will use the mathematics of vectors, matrices, and complex numbers. Though we will introduce these concepts as we go, it would be best if you are comfortable with them already. If you need a more in-depth explanation or a refresher, you can find the guide here. Contents 1. Classical vs Quantum Bits 1.1 Statevectors In quantum physics we use statevectors to describe the state of our system. Say we wanted to describe the position of a car along a track, this is a classical system so we could use a number $x$: $$ x=4 $$ Alternatively, we could instead use a collection of numbers in a vector called a statevector. Each element in the statevector contains the probability of finding the car in a certain place: $$ |x\rangle = \begin{bmatrix} 0\\ \vdots \\ 0 \\ 1 \\ 0 \\ \vdots \\ 0 \end{bmatrix} \begin{matrix} \\ \\ \\ \leftarrow \\ \\ \\ \\ \end{matrix} \begin{matrix} \\ \\ \text{Probability of} \\ \text{car being at} \\ \text{position 4} \\ \\ \\ \end{matrix} $$ This isn’t limited to position, we could also keep a statevector of all the possible speeds the car could have, and all the possible colours the car could be. With classical systems (like the car example above), this is a silly thing to do as it requires keeping huge vectors when we only really need one number. But as we will see in this chapter, statevectors happen to be a very good way of keeping track of quantum systems, including quantum computers. 1.2 Qubit Notation Classical bits always have a completely well-defined state: they are either 0 or 1 at every point during a computation. There is no more detail we can add to the state of a bit than this. So to write down the state of a of classical bit ( c), we can just use these two binary values. For example: c = 0 This restriction is lifted for quantum bits. Whether we get a 0 or a 1 from a qubit only needs to be well-defined when a measurement is made to extract an output. At that point, it must commit to one of these two options. At all other times, its state will be something more complex than can be captured by a simple binary value. To see how to describe these, we can first focus on the two simplest cases. As we saw in the last section, it is possible to prepare a qubit in a state for which it definitely gives the outcome 0 when measured. We need a name for this state. Let's be unimaginative and call it $0$ . Similarly, there exists a qubit state that is certain to output a 1. We'll call this $1$. These two states are completely mutually exclusive. Either the qubit definitely outputs a 0, or it definitely outputs a 1. There is no overlap. One way to represent this with mathematics is to use two orthogonal vectors. This is a lot of notation to take in all at once. First, let's unpack the weird $|$ and $\rangle$. Their job is essentially just to remind us that we are talking about the vectors that represent qubit states labelled $0$ and $1$. This helps us distinguish them from things like the bit values 0 and 1 or the numbers 0 and 1. It is part of the bra-ket notation, introduced by Dirac. If you are not familiar with vectors, you can essentially just think of them as lists of numbers which we manipulate using certain rules. If you are familiar with vectors from your high school physics classes, you'll know that these rules make vectors well-suited for describing quantities with a magnitude and a direction. For example, the velocity of an object is described perfectly with a vector. However, the way we use vectors for quantum states is slightly different to this, so don't hold on too hard to your previous intuition. It's time to do something new! With vectors we can describe more complex states than just $|0\rangle$ and $|1\rangle$. For example, consider the vector$$ |q_0\rangle = \begin{bmatrix} \tfrac{1}{\sqrt{2}} \\ \tfrac{i}{\sqrt{2}} \end{bmatrix} . $$ To understand what this state means, we'll need to use the mathematical rules for manipulating vectors. Specifically, we'll need to understand how to add vectors together and how to multiply them by scalars.} $$ Reminder: Matrix Addition and Multiplication by Scalars (Click here to expand). Reminder: Orthonormal Bases (Click here to expand). Since the states $|0\rangle$ and $|1\rangle$ form an orthonormal basis, we can represent any 2D vector with a combination of these two states. This allows us to write the state of our qubit in the alternative form:$$ |q_0\rangle = \tfrac{1}{\sqrt{2}}|0\rangle + \tfrac{i}{\sqrt{2}}|1\rangle $$ This vector, $|q_0\rangle$ is called the qubit's statevector, it tells us everything we could possibly know about this qubit. For now, we are only able to draw a few simple conclusions about this particular example of a statevector: it is not entirely $|0\rangle$ and not entirely $|1\rangle$. Instead, it is described by a linear combination of the two. In quantum mechanics, we typically describe linear combinations such as this using the word 'superposition'. Though our example state $|q_0\rangle$ can be expressed as a superposition of $|0\rangle$ and $|1\rangle$, it is no less a definite and well-defined qubit state than they are. To see this, we can begin to explore how a qubit can be manipulated. 1.3 Exploring Qubits with Qiskit First, we need to import all the tools we will need: from qiskit import QuantumCircuit, execute, Aer from qiskit.visualization import plot_histogram, plot_bloch_vector from math import sqrt, pi In Qiskit, we use the QuantumCircuit object to store our circuits, this is essentially a list of the quantum gates in our circuit and the qubits they are applied to. qc = QuantumCircuit(1) # Create a quantum circuit with one qubit In our quantum circuits, our qubits always start out in the state $|0\rangle$. We can use the initialize() method to transform this into any state. We give initialize() the vector we want in the form of a list, and tell it which qubit(s) we want to initialise in this state: qc = QuantumCircuit(1) # Create a quantum circuit with one qubit initial_state = [0,1] # Define initial_state as |1> qc.initialize(initial_state, 0) # Apply initialisation operation to the 0th qubit qc.draw('text') # Let's view our circuit (text drawing is required for the 'Initialize' gate due to a known bug in qiskit) ┌─────────────────┐ q_0: ┤ initialize(0,1) ├ └─────────────────┘ We can then use one of Qiskit’s simulators to view the resulting state of our qubit. To begin with we will use the statevector simulator, but we will explain the different simulators and their uses later. backend = Aer.get_backend('statevector_simulator') # Tell Qiskit how to simulate our circuit To get the results from our circuit, we use execute to run our circuit, giving the circuit and the backend as arguments. We then use .result() to get the result of this: from result, we can then get the final statevector using .get_statevector(): out_state = result.get_statevector() print(out_state) # Display the output state vector [0.+0.j 1.+0.j] Note: Python uses j to represent $i$ in complex numbers. We see a vector with two complex elements: 0.+0.j = 0, and 1.+0.j = 1. Let’s now measure our qubit as we would in a real quantum computer and see the result: qc.measure_all() qc.draw() This time, instead of the statevector we will get the counts for the 0 and 1 results using .get_counts(): result = execute(qc,backend).result() counts = result.get_counts() plot_histogram(counts) We can see that we (unsurprisingly) have a 100% chance of measuring $|1\rangle$. This time, let’s instead put our qubit into a superposition and see what happens. We will use the state $|q_0\rangle$ from earlier in this section:$$ |q_0\rangle = \tfrac{1}{\sqrt{2}}|0\rangle + \tfrac{i}{\sqrt{2}}|1\rangle $$ We need to add these amplitudes to a python list. To add a complex amplitude we use complex, giving the real and imaginary parts as arguments: initial_state = [1/sqrt(2), 1j/sqrt(2)] # Define state |q> And we then repeat the steps for initialising the qubit as before: qc = QuantumCircuit(1) # Must redefine qc qc.initialize(initial_state, 0) # Initialise the 0th qubit in the state `initial_state` state = execute(qc,backend).result().get_statevector() # Execute the circuit print(state) # Print the result [0.70710678+0.j 0. +0.70710678j] results = execute(qc,backend).result().get_counts() plot_histogram(results) We can see we have equal probability of measuring either $|0\rangle$ or $|1\rangle$. To explain this, we need to talk about measurement. 2. The Rules of Measurement 2.1 A Very Important Rule There is a simple rule for measurement. To find the probability of measuring a state $|\psi \rangle$ in the state $|x\rangle$ we do:$$p(|x\rangle) = | \langle x| \psi \rangle|^2$$ The symbols $\langle$ and $|$ tell us $\langle x |$ is a row vector. In quantum mechanics we call the column vectors kets and the row vectors bras. Together they make up bra-ket notation. Any ket $|a\rangle$ has a corresponding bra $\langle a|$, and we convert between them using the conjugate transpose. Reminder: The Inner Product (Click here to expand) There are different ways to multiply vectors, here we use the inner product. The inner product is a generalisation of the dot product which you may already be familiar with. In this guide, we use the inner product between a bra (row vector) and a ket (column vector), and it follows this rule: $$\langle a| = \begin{bmatrix}a_0^*, & a_1^*, & \dots & a_n^* \end{bmatrix}, \quad |b\rangle = \begin{bmatrix}b_0 \\ b_1 \\ \vdots \\ b_n \end{bmatrix}$$ $$\langle a|b\rangle = a_0^* b_0 + a_1^* b_1 \dots a_n^* b_n$$ We can see that the inner product of two vectors always gives us a scalar. A useful thing to remember is that the inner product of two orthogonal vectors is 0, for example if we have the orthogonal vectors $|0\rangle$ and $|1\rangle$: $$\langle1|0\rangle = \begin{bmatrix} 0 , & 1\end{bmatrix}\begin{bmatrix}1 \\ 0\end{bmatrix} = 0$$ Additionally, remember that the vectors $|0\rangle$ and $|1\rangle$ are also normalised (magnitudes are equal to 1): $$ \begin{aligned} \langle0|0\rangle & = \begin{bmatrix} 1 , & 0\end{bmatrix}\begin{bmatrix}1 \\ 0\end{bmatrix} = 1 \\ \langle1|1\rangle & = \begin{bmatrix} 0 , & 1\end{bmatrix}\begin{bmatrix}0 \\ 1\end{bmatrix} = 1 \end{aligned} $$ In the equation above, $|x\rangle$ can be any qubit state. To find the probability of measuring $|x\rangle$, we take the inner product of $|x\rangle$ and the state we are measuring (in this case $|\psi\rangle$), then square the magnitude. This may seem a little convoluted, but it will soon become second nature. If we look at the state $|q_0\rangle$ from before, we can see the probability of measuring $|0\rangle$ is indeed $0.5$:$$ \begin{aligned} |q_0\rangle & = \tfrac{1}{\sqrt{2}}|0\rangle + \tfrac{i}{\sqrt{2}}|1\rangle \\ \langle 0| q_0 \rangle & = \tfrac{1}{\sqrt{2}}\langle 0|0\rangle + \tfrac{i}{\sqrt{2}}\langle 0|1\rangle \\ & = \tfrac{1}{\sqrt{2}}\cdot 1 + \tfrac{i}{\sqrt{2}} \cdot 0\\ & = \tfrac{1}{\sqrt{2}}\\ |\langle 0| q_0 \rangle|^2 & = \tfrac{1}{2} \end{aligned} $$ You should verify the probability of measuring $|1\rangle$ as an exercise. This rule governs how we get information out of quantum states. It is therefore very important for everything we do in quantum computation. It also immediately implies several important facts. 2.2 The Implications of this Rule #1 Normalisation The rule shows us that amplitudes are related to probabilities. If we want the probabilities to add up to 1 (which they should!), we need to ensure that the statevector is properly normalized. Specifically, we need the magnitude of the state vector to be 1.$$ \langle\psi|\psi\rangle = 1 \\ $$ Thus if:$$ |\psi\rangle = \alpha|0\rangle + \beta|1\rangle $$ Then:$$ \sqrt{|\alpha|^2 + |\beta|^2} = 1 $$ This explains the factors of $\sqrt{2}$ you have seen throughout this chapter. In fact, if we try to give initialize() a vector that isn’t normalised, it will give us an error: vector = [1,1] qc.initialize(vector, 0) --------------------------------------------------------------------------- QiskitError Traceback (most recent call last) <ipython-input-12-ddc73828b990> in <module> 1 vector = [1,1] ----> 2 qc.initialize(vector, 0) /usr/local/anaconda3/lib/python3.7/site-packages/qiskit/extensions/quantum_initializer/initializer.py in initialize(self, params, qubits) 263 if not isinstance(qubits, list): 264 qubits = [qubits] --> 265 return self.append(Initialize(params), qubits) 266 267 /usr/local/anaconda3/lib/python3.7/site-packages/qiskit/extensions/quantum_initializer/initializer.py in __init__(self, params) 56 if not math.isclose(sum(np.absolute(params) ** 2), 1.0, 57 abs_tol=_EPS): ---> 58 raise QiskitError("Sum of amplitudes-squared does not equal one.") 59 60 num_qubits = int(num_qubits) QiskitError: 'Sum of amplitudes-squared does not equal one.' You can check your answer in the widget below (accepts answers ±1% accuracy, you can use numpy terms such as ' pi' and ' sqrt()' in the vector): # Run the code in this cell to interact with the widget from qiskit_textbook.widgets import state_vector_exercise state_vector_exercise(target=1/3) #2 Alternative measurement The measurement rule gives us the probability $p(|x\rangle)$ that a state $|\psi\rangle$ is measured as $|x\rangle$. Nowhere does it tell us that $|x\rangle$ can only be either $|0\rangle$ or $|1\rangle$. The measurements we have considered so far are in fact only one of an infinite number of possible ways to measure a qubit. For any orthogonal pair of states, we can define a measurement that would cause a qubit to choose between the two. This possibility will be explored more in the next section. For now, just bear in mind that $|x\rangle$ is not limited to being simply $|0\rangle$ or $|1\rangle$. #3 Global Phase We know that measuring the state $|1\rangle$ will give us the output 1 with certainty. But we are also able to write down states such as To see how this behaves, we apply the measurement rule.$$ |\langle x| (i|1\rangle) |^2 = | i \langle x|1\rangle|^2 = |\langle x|1\rangle|^2 $$ Here we find that the factor of $i$ disappears once we take the magnitude of the complex number. This effect is completely independent of the measured state $|x\rangle$. It does not matter what measurement we are considering, the probabilities for the state $i|1\rangle$ are identical to those for $|1\rangle$. Since measurements are the only way we can extract any information from a qubit, this implies that these two states are equivalent in all ways that are physically relevant. More generally, we refer to any overall factor $\gamma$ on a state for which $|\gamma|=1$ as a 'global phase'. States that differ only by a global phase are physically indistinguishable.$$ |\langle x| ( \gamma |a\rangle) |^2 = | \gamma \langle x|a\rangle|^2 = |\langle x|a\rangle|^2 $$ Note that this is distinct from the phase difference between terms in a superposition, which is known as the 'relative phase'. This becomes relevant once we consider different types of measurement and multiple qubits. #4 The Observer Effect We know that the amplitudes contain information about the probability of us finding the qubit in a specific state, but once we have measured the qubit, we know with certainty what the state of the qubit is. For example, if we measure a qubit in the state:$$ |q\rangle = \alpha|0\rangle + \beta|1\rangle$$ And find it in the state $|0\rangle$, if we measure again, there is a 100% chance of finding the qubit in the state $|0\rangle$. This means the act of measuring changes the state of our qubits.$$ |q\rangle = \begin{bmatrix} \alpha \\ \beta \end{bmatrix} \xrightarrow{\text{Measure }|0\rangle} |q\rangle = |0\rangle = \begin{bmatrix} 1 \\ 0 \end{bmatrix}$$ We sometimes refer to this as collapsing the state of the qubit. It is a potent effect, and so one that must be used wisely. For example, were we to constantly measure each of our qubits to keep track of their value at each point in a computation, they would always simply be in a well-defined state of either $|0\rangle$ or $|1\rangle$. As such, they would be no different from classical bits and our computation could be easily replaced by a classical computation. To acheive truly quantum computation we must allow the qubits to explore more complex states. Measurements are therefore only used when we need to extract an output. This means that we often place all the measurements at the end of our quantum circuit. We can demonstrate this using Qiskit’s statevector simulator. Let's initialise a qubit in superposition: qc = QuantumCircuit(1) # Redefine qc initial_state = [0.+1.j/sqrt(2),1/sqrt(2)+0.j] qc.initialize(initial_state, 0) qc.draw('text') ┌──────────────────────────────┐ q_0: ┤ initialize(0.70711j,0.70711) ├ └──────────────────────────────┘ This should initialise our qubit in the state:$$ |q\rangle = \tfrac{i}{\sqrt{2}}|0\rangle + \tfrac{1}{\sqrt{2}}|1\rangle $$ We can verify this using the simulator: state = execute(qc, backend).result().get_statevector() print("Qubit State = " + str(state)) Qubit State = [0. +0.70710678j 0.70710678+0.j ] We can see here the qubit is initialised in the state [0.+0.70710678j 0.70710678+0.j], which is the state we expected. Let’s now measure this qubit: qc.measure_all() qc.draw('text') ┌──────────────────────────────┐ ░ ┌─┐ q_0: ┤ initialize(0.70711j,0.70711) ├─░─┤M├ └──────────────────────────────┘ ░ └╥┘ meas: 1/════════════════════════════════════╩═ 0 When we simulate this entire circuit, we can see that one of the amplitudes is always 0: state = execute(qc, backend).result().get_statevector() print("State of Measured Qubit = " + str(state)) State of Measured Qubit = [0.+0.j 1.+0.j] You can re-run this cell a few times to reinitialise the qubit and measure it again. You will notice that either outcome is equally probable, but that the state of the qubit is never a superposition of $|0\rangle$ and $|1\rangle$. Somewhat interestingly, the global phase on the state $|0\rangle$ survives, but since this is global phase, we can never measure it on a real quantum computer. A Note about Quantum Simulators We can see that writing down a qubit’s state requires keeping track of two complex numbers, but when using a real quantum computer we will only ever receive a yes-or-no ( 0 or 1) answer for each qubit. The output of a 10-qubit quantum computer will look like this: 0110111110 Just 10 bits, no superposition or complex amplitudes. When using a real quantum computer, we cannot see the states of our qubits mid-computation, as this would destroy them! This behaviour is not ideal for learning, so Qiskit provides different quantum simulators: The qasm_simulator behaves as if you are interacting with a real quantum computer, and will not allow you to use .get_statevector(). Alternatively, statevector_simulator, (which we have been using in this chapter) does allow peeking at the quantum states before measurement, as we have seen. 3. The Bloch Sphere 3.1 Describing the Restricted Qubit State We saw earlier in this chapter that the general state of a qubit ($|q\rangle$) is:$$ |q\rangle = \alpha|0\rangle + \beta|1\rangle $$$$ \alpha, \beta \in \mathbb{C} $$ (The second line tells us $\alpha$ and $\beta$ are complex numbers). The first two implications in section 2 tell us that we cannot differentiate between some of these states. This means we can be more specific in our description of the qubit. Firstly, since we cannot measure global phase, we can only measure the difference in phase between the states $|0\rangle$ and $|1\rangle$. Instead of having $\alpha$ and $\beta$ be complex, we can confine them to the real numbers and add a term to tell us the relative phase between them:$$ |q\rangle = \alpha|0\rangle + e^{i\phi}\beta|1\rangle $$$$ \alpha, \beta, \phi \in \mathbb{R} $$ Finally, since the qubit state must be normalised, i.e.$$ \sqrt{\alpha^2 + \beta^2} = 1 $$ we can use the trigonometric identity:$$ \sqrt{\sin^2{x} + \cos^2{x}} = 1 $$ to describe the real $\alpha$ and $\beta$ in terms of one variable, $\theta$:$$ \alpha = \cos{\tfrac{\theta}{2}}, \quad \beta=\sin{\tfrac{\theta}{2}} $$ From this we can describe the state of any qubit using the two variables $\phi$ and $\theta$:$$ |q\rangle = \cos{\tfrac{\theta}{2}}|0\rangle + e^{i\phi}\sin{\tfrac{\theta}{2}}|1\rangle $$$$ \theta, \phi \in \mathbb{R} $$ 3.2 Visually Representing a Qubit State We want to plot our general qubit state:$$ |q\rangle = \cos{\tfrac{\theta}{2}}|0\rangle + e^{i\phi}\sin{\tfrac{\theta}{2}}|1\rangle $$ If we interpret $\theta$ and $\phi$ as spherical co-ordinates ($r = 1$, since the magnitude of the qubit state is $1$), we can plot any qubit state on the surface of a sphere, known as the Bloch sphere. Below we have plotted a qubit in the state $|{+}\rangle$. In this case, $\theta = \pi/2$ and $\phi = 0$. (Qiskit has a function to plot a bloch sphere, plot_bloch_vector(), but at the time of writing it only takes cartesian coordinates. We have included a function that does the conversion automatically). from qiskit_textbook.widgets import plot_bloch_vector_spherical coords = [pi/2,0,1] # [Theta, Phi, Radius] plot_bloch_vector_spherical(coords) # Bloch Vector with spherical coordinates Warning! When first learning about qubit states, it's easy to confuse the qubits statevector with its Bloch vector. Remember the statevector is the vector disucssed in 1.1, that holds the amplitudes for the two states our qubit can be in. The Bloch vector is a visualisation tool that maps the 2D, complex statevector onto real, 3D space. We have also included below a widget that converts from spherical co-ordinates to cartesian, for use with plot_bloch_vector(): from qiskit_textbook.widgets import bloch_calc bloch_calc()'}
https://qiskit.org/textbook/ch-states/representing-qubit-states.html
CC-MAIN-2020-50
refinedweb
3,830
61.56
I have a problem using a very complicated C function in a C++ class (rewriting the C function is not an option). C function: typedef void (*integrand) (unsigned ndim, const double* x, void* fdata, unsigned fdim, double* fval); // This one: int adapt_integrate(unsigned fdim, integrand f, void* fdata, unsigned dim, const double* xmin, const double* xmax, unsigned maxEval, double reqAbsError, double reqRelError, double* val, double* err); I need to supply a void function of type integrand myself, and adapt_integrate will calculate the n-dimensional integral. The code in calcTripleIntegral (below) works as a standalone function if func is a standalone function). I want to pass a (non-static!) class member function as the integrand, as this can be easily overloaded etc... class myIntegrator { public: double calcTripleIntegral( double x, double Q2, std::tr1::function<integrand> &func ) const { //...declare val, err, xMin, xMax and input(x,Q2) ...// adapt_integrate( 1, func, input, 3, xMin, xMax, 0, 0, 1e-4, &val, &err); return val; } double integrandF2( unsigned ndim, const double *x, void *, // no matter what's inside unsigned fdim, double *fval) const; // this qualifies as an integrand if it were not a class member double getValue( double x, double Q2 ) const { std::tr1::function<integrand> func(std::tr1::bind(&myIntegrator::integrandF2, *this); return calcTripleIntegral(x,Q2,func); } } On GCC 4.4.5 (prerelease), this gives me: error: variable 'std::tr1::function func' has initializer but incomplete type EDIT:What is the error in my code? I have now tried compiling with GCC 4.4, 4.5 and 4.6, all resulting in the same error. Either no work has been done on this, or I did something wrong /EDIT Thanks very much! If I'm not clear enough, I'll gladly elaborate. PS: Could I work around this without tr1 stuff by using a function pointer to a function defined somewhere in myIntegrator.cpp? FINAL UPDATE: ok, I was mistaken in thinking TR1 provided a one/two-line solution for this. Bummer. I'm "converting" my classes to namespaces and copypasting the function declarations. I only need one base class and one subclass which reimplemented the interface. C function pointer + C++ class = bad news for me. Thanks anyways for all the answers, you've shown me some dark corners of C++ ;)
http://ansaurus.com/question/3259686-stdtr1function-and-stdtr1bind
CC-MAIN-2017-34
refinedweb
377
54.12
I know how to serialize a case class in Scala with the simple implicit val caseClassFormat = Json.format[CaseClass] Json.toJson(class) The Json.format[X] call runs a macro in play that creates the Format[X] code for you. If you look at the implementation of the Macro, it requires that an unapply and apply function exist within the companion object of the class that is provided. With a case class, both of these things are true. If you want to be able to use the shorthand for formatters, then you can do the following: import play.api.libs.json.Json class Foo(val s: String) object Foo{ def apply(s: String) = new Foo(s) def unapply(f: Foo) = Some(f.s) } val format = Json.format[Foo] This will allow you to serialize, deserialize the JSON accordingly. val asString = Json.toJson(Foo("hello"))(format).toString val js = Json.parse(asString).as[Foo](format)
https://codedump.io/share/hfc2Sf5tWmPs/1/readswritesformats-for-non-case-class-in-scala
CC-MAIN-2016-44
refinedweb
154
59.9
Lua (programming language) Lua (/ˈluːə/ LOO-ə; from Portuguese: lua [ˈlu.(w)ɐ] meaning moon)[lower-alpha 1] is a lightweight, multi-paradigm programming language designed primarily for embedded use in applications.[2] Lua is cross-platform, since the interpreter is written in ANSI C,[3] and has a relatively simple C API.[4]..[5] Lua's predecessors were the data-description/configuration languages SOL (Simple Object Language) and DEL (data-entry language). for "Moon")."[5]),.[7] Lua semantics have been increasingly influenced by Scheme over time,[3] and 64-bit integers. Syntax The classic "Hello, World!" program can be written as follows:[8] print("Hello World!") or like so: print 'Hello World!' A comment in Lua starts with a double-hyphen and runs to the end of the line, similar to that of Ada, Eiffel, Haskell, SQL and VHDL. Multi-line strings & comments are adorned with double square brackets. The factorial function is implemented as a function in this example: function factorial(n) local x = 1 for i = 2, n do x = x * i end return x end Control flow Functions, as demonstrated below:. Tables.".).[10] normally is slower than using an actual array; however, Lua tables are optimized for use as arrays to help avoid this issue.[11] Metatables Extensible semantics is a key feature of Lua, and the metatable concept allows Lua's tables to be customized in powerful ways. achieved using two language features: first-class functions and tables. By placing functions and related data into a table, an object is formed. Inheritance (both single and multiple) can be implemented using the metatable mechanism, telling the object to look up nonexistent methods and fields in parent object(s). There is no such concept as "class" with these techniques; rather, prototypes are used, similar) Implementation. Lua version 5.3.4 is implemented in approximately 24,000 lines of C code.[2][3].[12] Perl's Parrot and Android's Dalvik are two other well-known register-based VMs. This example is the bytecode listing of the factorial function defined above (as shown by the luac 5.1 compiler):[13].[14]. top (most recently pushed value), while positive indices indicate offsets from the bottom (oldest value).[15]. From the Lua side, such a module appears as a namespace table holding its functions and variables. Lua scripts may load extension modules using require,[14] just like modules written in Lua itself. A growing collection of modules known as rocks are available through a package management system called LuaRocks,[16] in the spirit of CPAN, RubyGems and Python eggs. Prewritten Lua bindings exist for most popular programming languages, including other scripting languages.[17] For C++, there are a number of template-based approaches and some automatic binding generators. Applications In video game development, Lua is widely used as a scripting language by game programmers, perhaps due to its perceived easiness to embed, fast execution, and short learning curve.[18] In 2003, a poll conducted by GameDev.net showed Lua as the most popular scripting language for game programming.[19] On 12 January 2012, Lua was announced as a winner of the Front Line Award 2011 from the magazine Game Developer in the category Programming Tools.[20] A large number of non-game applications also use Lua for extensibility, such as LuaTeX, an implementation of TeX type-setting language. See also Notes References - ↑ Ring Team (5 December 2017). "The Ring programming language and other languages". ring-lang.net. ring-lang. - 1. - 1 2 3 "About Lua". Lua.org. Retrieved 2011-08-11. - ↑ Yuri Takhteyev (21 April 2013). "From Brazil to Wikipedia". Foreign Affairs. Retrieved 25 April 2013. - 1 2 3 4. - ↑ "The evolution of an extension language: a history of Lua". 2001. Retrieved 2008-12-18. - ↑ Figueiredo, L. H.; Ierusalimschy, R.; Celes, W. (December 1996). "Lua: an Extensible Embedded Language. A few metamechanisms replace a host of features". Dr. Dobb's Journal. 21 (12). pp. 26–33. - ↑ - ↑ "Lua 5.1 Reference Manual". 2014. Retrieved 2014-02-27. - ↑ "Lua 5.1 Reference Manual". 2012. Retrieved 2012-10-16. - ↑ "Lua 5.1 Source Code". 2006. Retrieved 2011-03-24. - ↑ Ierusalimschy, R.; Figueiredo, L. H.; Celes, W. (2005). "The implementation of Lua 5.0". J. Of Universal Comp. Sci. 11 (7): 1159–1176. - ↑ Kein-Hong Man (2006). "A No-Frills Introduction to Lua 5.1 VM Instructions" (PDF). Archived from the original (PDF) on 19 June 2010. Retrieved 20 December 2008. - 1 2 "Lua 5.2 Reference Manual". Lua.org. Retrieved 2012-10-23. - ↑ "Changes in the API". Lua 5.2 Reference Manual. Lua.org. Retrieved 2014-05-09. - ↑ "LuaRocks". LuaRocks wiki. Retrieved 2009-05-24. - ↑ "Binding Code To Lua". Lua-users wiki. Retrieved 2009-05-24. - ↑ "Why is Lua considered a game language?". Archived from the original on 20 August 2013. Retrieved 2017-04-22. - ↑ "Poll Results". Archived from the original on 7 December 2003. Retrieved 2017-04-22. - ↑ "Front Line Award Winners Announced". Archived from the original on 15 June 2013. Retrieved 2017-04-22. Further reading - Ierusalimschy, R. (2013). Programming in Lua (3rd ed.). Lua.org. ISBN 85-903798-5-X. (The 1st ed. is available online.) - Gutschmidt, T. (2003). Game Programming with Python, Lua, and Ruby. Course Technology PTR. ISBN 1-59200-077-0. - Schuytema, P.; Manyen, M. (2005). Game Development with Lua. Charles River Media. ISBN 1-58450-404-8. - Jung, K.; Brown, A. (2007). Beginning Lua Programming. Wrox Press. ISBN 0-470-06917 0-262-01807-1. Archived from the original on 2012-11-02. Chapters 6 and 7 are dedicated to Lua, while others look at software in Brazil more broadly. - Varma, Jayant (2012). Learn Lua for iOS Game Development. Apress. ISBN 1-4302-4662-6. - Matheson, Ash (29 April 2003). "An Introduction to Lua". GameDev.net.. - Quigley, Joseph (1 June 2007). "A Look at Lua". Linux Journal. - Hamilton, Naomi (11 September 2008). "The A-Z of Programming Languages: Lua". Computerworld. IDG. Interview with Roberto Ierusalimschy. - Ierusalimschy, Roberto; de Figueiredo, Luiz Henrique; Celes, Waldemar (12 May 2011). "Passing a Language through the Eye of a Needle". ACM Queue. ACM. How the embeddability of Lua impacted its design. - Lua papers and theses External links - Official website - Lua Users, Community - Projects in Lua
http://library.kiwix.org/wikipedia_en_computer_novid_2018-10/A/Lua_(programming_language).html
CC-MAIN-2019-22
refinedweb
1,034
60.92
CodeGuru Forums > Visual C++ & C++ Programming > C++ (Non Visual C++ Issues) > Quiet not a number??? Help please! PDA Click to See Complete Forum and Search --> : Quiet not a number??? Help please! Jpsarapuu February 12th, 2008, 02:42 PM I have no idea why this bug comes. Look at the code: #include <iostream> using namespace std; int main() { double yearsum[3]; double sum; int nob[3][12]; // number of books double price; char * months[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; cout << "Enter the price of the book: "; cin >> price; cout << "Enter a year's worth of monthly sales (in number of books)\n"; for (int i = 0; i < 3; i++) { for (int j = 0; j < 12; j++) { cout << "Year " << i + 1 << "#, " << months[j] << ": "; cin >> nob[i][j]; yearsum[i] += price * nob[i][j]; sum += price * nob[i][j]; } } cout << "\nYear 1# worth of monthly sales is $" << yearsum[0] << ".\n"; cout << "Year 2# worth of monthly sales is $" << yearsum[1] << ".\n"; cout << "Year 3# worth of monthly sales is $" << yearsum[2] << ".\n"; cout << "\nTotal worth of monthly sales is $" << sum << ".\n"; cin.get(); cin.get(); return 0; } Everything is ok but yearsum[1]. I can't understand why, because yearsum[0] & [1] are working fine. Sample run: Enter the price of the book: 29.95 Enter a year's worth of monthly sales (in number of books) Year 1#, January: 4 Year 1#, February: 6 Year 1#, March: 2 Year 1#, April: 7 Year 1#, May: 4 Year 1#, June: 7 Year 1#, July: 5 Year 1#, August: 9 Year 1#, September: 3 Year 1#, October: 7 Year 1#, November: 4 Year 1#, December: 1 Year 2#, January: 8 Year 2#, February: 5 Year 2#, March: 9 Year 2#, April: 3 Year 2#, May: 6 Year 2#, June: 3 Year 2#, July: 8 Year 2#, August: 5 Year 2#, September: 3 Year 2#, October: 7 Year 2#, November: 3 Year 2#, December: 2 Year 3#, January: 9 Year 3#, February: 2 Year 3#, March: 1 Year 3#, April: 7 Year 3#, May: 4 Year 3#, June: 8 Year 3#, July: 3 Year 3#, August: 9 Year 3#, September: 5 Year 3#, October: 0 Year 3#, November: 7 Year 3#, December: 2 Year 1# worth of monthly sales is $1767.05. Year 2# worth of monthly sales is $-1.#QNAN. // what the **** is this doing here? Year 3# worth of monthly sales is $1707.15. Total worth of monthly sales is $5331.1. Help please. Lindley February 12th, 2008, 02:49 PM I don't see you initializing yearsum to 0 anywhere. Jpsarapuu February 12th, 2008, 03:25 PM I wanted to say that yearsum[0] and yearsum[2] display a correct value, but yearsum[1] doesn't. I don't see any logic here. Jpsarapuu February 12th, 2008, 03:28 PM Ok, i found one solution, but it doesn't satisfy me. The solution would be to use char months[12][12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; instead of char * months[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; But I don't understand why this affects the value of yearsum[1]. Ideas, anyone? potatoCode February 12th, 2008, 04:03 PM Hello Jpsarapuu, I believe the problem lies with the following compound statement yearsum[i] += price * nob[i][j]; because, double yearsum[3]; // uninitialized, can lead to error if not careful does not define the array. the left hand operand of the assignment of yearsum in your compound statement yearsum[i]/*this operand is OK defined*/ = yearsum[i] /* this yearsume is NOT ok */ + price * nob[i][j];" is just fine. It's the right operand of the yearsum[i] that's causing the problem because you are using an undefined element as part of the equation. (please, correct me if I'm wrong. thanks) like Lindley said, had you defined your array in the first place, to something you thought the compiler think what you thought, double yearsum[3] = {0}; your code would have worked just fine. your first design of the program was fine, so the only thing that needs to be changed is the code above. I think this should solve the problem. Thanks *edit: I had the left and the right hand operand backwards. sorry. :) Jpsarapuu February 13th, 2008, 02:19 PM Thank you very much potatoCode, it helped!:D codeguru.com
http://forums.codeguru.com/archive/index.php/t-445929.html
crawl-003
refinedweb
742
64.64
creator switching between debug and release modes Once in awhile I run into the problem that some code is obviously not compiled. Unfortnautely it typically takes too long until one recognizes. I have a project based on subdirs template and there is an application compiled with a serious of dlls. In order to have a consistent solution I had rerun qmake and a rebuild. The application had been compiled and generated in release mode. This application is started in parallel a couple of times and a special configuration had problems and needed debugging. I led the other applications continue to run in release and simply change the settings while clicking on the left lower corner project button and changed to debug. Most likely neither the application nor its dlls had been compiled, which was ok since all was in the right state. I had started the application a couple of times in debug mode while pressing F5 and narrowed down the actual problem and fixed it. I started the build which not be finished because the dll with the fix could not be written, because it was used by a process. I stopped all those processes still running in release mode and started the build again. This time it completed successfully. Starting all my processes in release mode was successful. Also the application with the special settings. I have checked and the dll has been compiled in release mode. However, the setting in creator still says debug. I can't believe that this is possible. I would expect that creator is switched and the proper make files, in my case the version with debug settings is used. However, it obviously is not. Is this a known issue? - SGaist Lifetime Qt Champion Hi, I'm not aware of such a case but I wouldn't be surprised that you found out something. Can you reliably reproduce this ? I have not tried to reproduce it in small sample case, yet. I seem to have this issue already quite some time and it is not limited to creator v4.1.0 and dates back to at least v3s. Anyway in past I used self-compiled versions and I was not sure if my .pro, .pri are setup in wrong way and causing my issues. On the other we all were getting used to rerun qmake and rebuild. Some time ago I have my naming convention of targets. I do it as Qt libs and add a 'D' for debug. This allows debug and release of the same application running at the same time. Also you change some dlls for debugging while those are used by other apps. Anyway I noticed that some times apparently the dlls are produced in the wrong mode. BTW this is on win 10 64 bit. Did some simple tests and unfortunately cannot reproduce with small sample. I have created a default application with QT += core QT -= gui CONFIG += c++11 TARGET = ModeTest CONFIG += console CONFIG -= app_bundle TEMPLATE = app CONFIG(debug, debug|release):TARGET = $$join(TARGET,,,"DebugMode") message("TARGET " $$TARGET) DESTDIR = c:/Source/Utilities SOURCES += main.cpp and #include <QCoreApplication> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); return a.exec(); } When changing on the left side in creator from debug to release forward and back the name of the exe is always correctly displayed based on chosen on chosen mode. Also the exe can be produced and file sizes are as to be expected. As next I have added a subdirs project which is using the project above. TEMPLATE = subdirs SUBDIRS = ModeTest ModeTest.subdir = ../ModeTest The same. My problem cannot be reproduced easily. Possibly the problem is triggered by other actions in between, but no clue at the moment.
https://forum.qt.io/topic/73233/creator-switching-between-debug-and-release-modes
CC-MAIN-2018-30
refinedweb
623
66.03
Collection Objects The System.Collections namespace contains a number of useful variable length array objects you can use to add and obtain items in several ways. ArrayLists The ArrayList object is essentially a variable length array that you can add items to as needed. The basic ArrayList methods allow you to add elements to the array and fetch and change individual elements: float[] z = {1.0f, 2.9f, 5.6f}; ArrayList arl = new ArrayList (); for (int j = 0; j< z.Length ; j++) { arl.Add (z[j]); } The ArrayList has a Count property you can use to find out how many elements it contains. You can then move from 0 to that count minus one to access these elements, treating the ArrayList just as if it were an array: for (j = 0; j < arl.Count ; j++) { Console.WriteLine (arl[j]); You can also access the members of ArrayList object sequentially using the foreach looping construct without needing to create an index variable or know the length of the ArrayList: foreach (float a in arl) { Console.WriteLine (a); You can also use the methods of the ArrayList shown in Table 1. Clear Clears the contents of the ArrayList Contains(object) Returns true if the ArrayList contains that value CopyTo(array) Copies entire ArrayList into a one-dimensional array. IndexOf(object) Returns the first index of the value Insert(index, object) Insert the element at the specified index. Remove(object) Remove element from list. RemoveAt(index) Remove element from specified position Sort Sort ArrayList Table 1- ArrayList methods An object fetched from an ArrayList is always of type object. This means you usually need to cast the object to the correct type before using it: float x = (float) arl[j]; Hashtables: A Hashtable is a variable length array where every entry can be referred to by a key value. Typically, keys are strings of some sort, but they can be any sort of object. Each element must have a unique key, although the elements themselves need not be unique. Hashtables are used to allow rapid access to one of a large and unsorted set of entries, and can also be used by reversing the key and the entry values to create a list where each entry is guaranteed to be unique. Hashtable hash = new Hashtable (); float shashiray = 12.3f; hash.Add ("shashi", shashiray); //add to table //get this one back out float temp = (float)hash["shashi"]; Note that like the ArrayList, we must cast the values we obtain from a Hashtable to the correct type. Hashtables also have a count property and you can obtain an enumeration of the keys or of the values. SortedLists: The SortedList class maintains two internal arrays, so you can obtain the elements either by zero-based index or by alphabetic key. float satyamray = 44.55f; SortedList slist = new SortedList (); slist.Add ("shashi", shashiray); slist.Add ("satyam", sammyray); //get by index float newShashi = (float)slist.GetByIndex (0); //get by key float newSatyam = (float)slist["Satyam"]; You will also find the Stack and Queue objects in this namespace. They behave much as you'd expect, and you can find their methods in the system help documentation. Hall of Fame Twitter Terms of Service Privacy Policy Contact Us Archives Tell A Friend
http://www.dotnetspark.com/kb/418-collection-objects.aspx
CC-MAIN-2017-26
refinedweb
542
62.68
The Q3CanvasView class provides an on-screen view of a Q3Canvas. More... #include <Q3CanvasView> This class is part of the Qt 3 support library. It is provided to keep old source code working. We strongly advise against using it in new code. See Porting to Qt 4 for more information. This class is not part of the Qt GUI Framework Edition. Inherits Q3ScrollView. The Q3CanvasView class provides an on-screen view of a Q3Canvas. A Q3CanvasView is widget which provides a view of a Q3Canvas. If you want users to be able to interact with a canvas view, subclass Q3CanvasView. You might then reimplement Q3ScrollView::contentsMousePressEvent(). For example: void MyCanvasView::contentsMousePressEvent(QMouseEvent* e) { Q3CanvasItemList l = canvas()->collisions(e->pos()); for (Q3CanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { if ((*it)->rtti() == Q3CanvasRectangle::RTTI) qDebug("A Q3Matrix, QPainter::setWorldMatrix(), QtCanvas, and Porting to Graphics View. Constructs a Q3CanvasView with parent parent, and name name, using the widget flags f. The canvas view is not associated with a canvas, so you must to call setCanvas() to view a canvas. This is an overloaded function. Constructs a Q3CanvasView which views canvas canvas, with parent parent, and name name, using the widget flags f. Destroys the canvas view. The associated canvas is not deleted. Returns a pointer to the canvas which the Q3CanvasView is currently showing. See also setCanvas(). Reimplemented from Q3ScrollView::drawContents(). Repaints part of the Q3Canvas that the canvas view is showing starting at cx by cy, with a width of cw and a height of ch using the painter p. Returns a reference to the inverse of the canvas view's current transformation matrix. See also setWorldMatrix() and worldMatrix(). Sets the canvas that the Q3CanvasView is showing to the canvas canvas. See also canvas(). Sets the transformation matrix of the Q3CanvasView to wm. The matrix must be invertible (i.e. if you create a world matrix that zooms out by 2 times, then the inverse of this matrix is one that will zoom in by 2 times). When you use this, you should note that the performance of the Q3CanvasView will decrease considerably. Returns false if wm is not invertable; otherwise returns true. See also worldMatrix(), inverseWorldMatrix(), and QMatrix::isInvertible(). Reimplemented from QWidget::sizeHint(). Suggests a size sufficient to view the entire canvas. Returns a reference to the canvas view's current transformation matrix. See also setWorldMatrix() and inverseWorldMatrix().
http://doc.qt.nokia.com/4.6-snapshot/q3canvasview.html
crawl-003
refinedweb
399
52.46
UFDC Home | Search all Groups | Florida Digital Newspaper Library | Florida Newspapers | Daily Commercial Permanent Link: Material Information Title: Daily Commercial Physical Description: Newspaper Language: Creator: Halifax Media Group Publisher: Rod Dixon Place of Publication: Leesburg, Floirda Publication Date: 10-25-2014 Subjects Genre: newspaper ( sobekcm ) Record Information Source Institution: University of Florida Holding Location: University of Florida Rights Management: System ID: AA00019282:00381 This item is only available as the following downloads: ( PDF ) Full Text PAGE 1 MILLARD K. IVES | Staff Writer millardives@dailycommercial.com The number of domestic violence arrests have been on a downward trend in Lake County for 10 years. In 2004, there were 1,201 arrests for domestic violence roughly 200 more than the 977 reported in 2013, accord ing to statistics provided by the State Attorneys Ofce. There were 743 such ar rests as of Sept. 22 this year. Walter Forgie, supervisor for the State Attorneys Ofce in Lake County, said he believes there could be a number of factors causing the drop in arrests. Those could include the improvement of domestic violence prevention and outreach measures, the pos sible decrease in incidents of domestic violence, decrease in law enforcement budgets and more effective prosecu tion combined with enhanced criminal penalties, he said. The arrest numbers did increase in Lake County be tween 2004 and 2006 as well as between 2012 and 2013. Domestic violence arrest totals include cases between spouses, former spouses, people related by blood or marriage, co-habitats as a family or who have resided together in the past as if a family and persons who are parents of a child in com mon regardless of whether they have been married. Rebecca Teston, assistant director with the Haven of Lake & Sumter Counties a shelter for abused victims was quick to point out that a decline in the arrests doesnt necessarily mean there is less domestic violence. She said last year, the Ha ven provided shelter for 300 women and children and counseling to between 3,000 to 5,000 individuals. She said sometimes the cases can be under-reported. Just because the numbers are down doesnt mean the perpetration of domestic FOOD WITH LARGE POR TIONS! Best Breakfast In To wn! Open Ever y Day 6:30am to 10:30pm Best Home Cooking & Prices on 441352-508-5494www .HWY441DINER.com381 E. Burleigh Blvd., Ta va re s (ne xt to JoAnn Fabrics) OR $595 rrf $595 rn rn t tnn b r nt n b n b MOUNT DORA UPSETS UNDEFEATED SOUTH LAKE, SPORTS C1 LEESBURG, FLORIDA Saturday, October 25, 2014 Vol. 138 No. 298 5 sections INDEX CLASSIFIED D2 COMICS E4 CROSSWORDS D3 DIVERSIONS D5 LEGALS C7 BUSINESS B4 NATION A5 OBITUARIES A4 SPORTS C1 VOICES A7 WORLD A6 TODAYS WEATHER Detailed forecast on page A8. 80 / 55 Mostly sunny 50 EAST RIDGE ........................................... 0 WINTER SPRINGS ............................. 48 EUSTIS ................................................ 21 TAVARES .......................................... 42 FIRST ACADEMY ............................... 51 OVIEDO MASTERS ............................... 13 LAKE MINNEOLA .................................... 0 OCALA TRINITY CATHOLIC ................. 37 MONTVERDE ......................................... 6 TAMPA BERKELEY PREP ................... 28 MOUNT DORA .................................. 49 SOUTH LAKE ........................................ 34 SOUTH SUMTER ............................... 42 WEEKI WACHEE ................................... 10 THE VILLAGES .................................. 43 WILDWOOD ........................................... 6 UMATILLA ........................................ 28 STARKE BRADFORD ............................. 17 DOMESTIC VIOLENCE IN LAKE COUNTY 1,500 1,100 1,300 900 1,400 1,000 1,200 TOTAL ARRESTS Source: State Attorneys Ofce MARILYNN MARCHIONE and MIKE STOBBE Associated Press A larmed by the case of an Eb ola-infected New York doctor, the governors of New Jersey and New York on Friday ordered a mandatory, 21-day quarantine of all medical workers and other arriving airline passengers who have had contact with victims of the deadly disease in West Africa. Sick in the city? NY, NJ will quarantine doctors and others exposed to Ebola PHOTOS BY RICHARD DREW / AP Mott Hall High School student Brian Binion, right, and fellow students read iers about Ebola risk, near the apartment building of Ebola patient Dr. Craig Spencer in New York on Friday. Postal worker Keven Ngo, wearing a protective mask and gloves, prepares to deliver to the apartment building of Ebola patient Dr. Craig Spencer, in New York on Friday. SEE EBOLA | A2 Domestic violence arrests on decline in Lake County SEE ARRESTS | A2 DEB RIECHMANN and EMILY SWANSON Associated Press WASHINGTON Sixty-ve percent of Americans now say the threat from the Islamic State group is very or even extremely import ant, and nearly half think the U.S. military response in Iraq and Syria has not gone far enough, according to an Associated PressGfK poll. Most want to see Americas partners step up their contribu tion to the ght, Less than half, 43 percent, approve of the way President Barack Obama is handling the danger posed by the extremist militants. Greg Franke, 24, of Columbia, South Caro lina, was among the 55 percent of those who disapproved. Franke, a 24-year-old assistant Poll: 65 percent of Americans say IS threat is important AP FILE PHOTO President Barack Obama speaks during a meeting with foreign defense ministers on the ongoing operations against the Islamic State group at Andrews Air Force Base, Md. MILLARD K. IVES | Staff Writer millardives@dailycommercial.com Wildlife ofcials believe a black bear might have been in search of food when it was shot to death during an apparent break-in of a Lady Lake home Wednesday night. It just kept coming at me, I was scared to death, said homeowner Victor Peters, standing behind the giant hole in his lanai Friday. Lady Lake man kills bear breaking into his home SEE WILDLIFE | A2 SEE POLL | A2 PAGE 2 A2 DAILY COMMERCIAL Saturday, October 25, 2014 The 400to 500-pound bear ini tially ripped its way through metal windows in the screened-in lanai attached to the Bird Island Drive mobile home early Wednesday morning as Peters slept. However, 64-year-old Peters initially thought he had been burglarized, according to his 911 call made Wednesday morning. Then he discovered the only thing missing was dog food and that his computer was still there. Then he thought it was some type of animal. Apparently a Be ware Bad Dog sign attached to the lanai hadnt frightened the animal. Im surprised he didnt raise a fuss over the noise, Peters can be heard saying in the morning 911 call. Peters was then told to move the dog food inside the home. But the animal came back about 8:30 p.m. a black bear appar ently wanting to dine on the rest of a 35-pound dog food bag. The giant hole hadnt been patched up. The adult male bear was more than halfway back into the lanai when it encountered a ready Pe ters armed with a hunting rie. I cranked opened the window in the living room and yelled at it and it just kept coming at me showing teeth so I shot it, said Pe ters in the 911 call made Wednes day night. Ive seen a lot of black bears, I hunt and Ive never seen one this big, but when I yelled at him he just looked like Well I dont care who you are, and just kept coming on so , added Peters in a call recorded later Wednesday night to the Florida Fish & Wildlife Conser vation Commission. Peters said he shot the bear in the head in the room and apparently a lot of neighbors took pictures of the bleeding carcass. Greg Workman, a FWC spokes man, said it is illegal to kill black bears and the incident is under investigation. Peters has not been cited. Workman added FWC retrieved the bear for evidence purposes until the case is closed and will conduct a necropsy on the carcass before donating it for scientic research. Workman added determining why the bear came back is part of the investigation but at this time of the year black bears are trying to fatten up for the winter. They need to intake so much food, he said. two states need precau tions more rigorous than those of the U.S. Centers for Disease Control and Prevention, which recommends monitoring of exposed people for 21 days but doesnt require quarantine, in which they are kept away from others. Its too serious a situation to leave it to the honor system of compli ance, Cuomo said. Those who are forci bly quarantined will be conned either to their homes or, if they live in other states, to some other place, most likely a medical facility, the governors said. Those quarantined at home will receive house calls from health ofcials. Twenty-one days is the incubation period for the Ebola virus. Dr. Howard Zucker, acting New York state health commissioner, said any medical per sonnel who have treated Ebola patients in the three Ebola-ravaged West African countries Si erra Leone, Guinea and Liberia will be auto matically quarantined. Cuomo said anyone arriving from the three countries will be questioned at the airport about their contact with Ebola sufferers. The governors gave no estimate of how many travelers would be subject to quarantine, but Cuomo said were not talking about a tremendous volume of people coming in from these areas, and added that there are no plans to hire more screeners at airports. The two states are home to Kennedy Airport and Newark Liberty in New Jersey, both major international portals. Ofcials said they would track ight con nections and screen passengers upon dis embarking. However, they offered few details on how the quarantine would be enforced and what the consequences would be for people who violated the restrictions by going out in public. The White House did not have an immediate reaction to Cuomo and Christies directives. Ofcials said Friday the administration was regularly reviewing its policies but indicated they were satised with the measures it has put in place, including steps that call on recent arrivals from West Africa to monitor their health and notify state and local authorities of their presence in their communities. White House ofcials have said states are enti tled to impose additional requirements beyond those set by the CDC. The CDC said it sets baseline recommended standards, but state and local ofcials have the prerogative to tighten the regimen as they see t. The agency also said, When it comes to the federal standards set by the CDC, we will consid er any measures that we believe have the poten tial to make the Ameri can people safer. Spencer, a 33-year-old emergency room doc tor, returned to the U.S. on Oct. 17 and sought treatment Thursday after suffering diarrhea and a 100.3-degree fever. He was listed in stable condition at a special isolation unit at Bellevue Hospital Center, and a decontamination com pany was sent to his Har lem home. His ancee, who was not showing symptoms, was being watched in a quarantine ward at Bellevue. HOW TO REACH US OCT. 24 CASH 3 ............................................... 5-9-6 Afternoon .......................................... 1-9-1 PLAY 4 ............................................. 1-5-0-2 Afternoon ....................................... 3-9-4-4 FLORIDA LOTTERY OCT. 23 FANTASY 5 ........................... 9-13-22-24-27 calling. RICHARD DREW / AP Workers from BioRecoveryCorp unload barrels at the apartment building of Ebola patient Dr. Craig Spencer in New York on Friday. EBOLA FROM PAGE A1 ARRESTS FROM PAGE A1 violence has gone down, Teston said. Forgie added there are difculties his ofce often faces with during these cases. Domestic violence cases often involve a victim who, for a variety of reasons, changes their testimony or refuses to cooperate, and absent an independent witness we are unable to proceed without them, he said. Sumter County also is seeing a decrease in do mestic violence arrests. Melissa Merritt, a victim advocate for the Sumter County Sheriffs Ofce, said while the drop in numbers could be due to under report ing, she added it could be attributed to the econ omy improving over the past few years. A lack of money in the household can be a big contributor to domestic violence, she said. After almost 18 years of being involved in what she said was an abusive relationship with a man, and father of her three children, Lisa Melton nally decided to leave her husband in 2001 for the Haven. When you have chil dren, you have to think of them, too, said Melton, citing her reason for nally deciding to leave her husband. The rst night away from him was spent on a couch with her children, but she quickly pointed out it was the best sleep she had in years. I felt safe, said Melton, who would spend three months at Haven, getting therapy. Less than two years later, she got her divorce nalized at the Sumter County courthouse and said she hasnt seen her husband since. Melton, who now works as a receptionist at the State Attorneys Ofce in the Sumter courthouse, said she wasnt sure what to make out of the decreased numbers in domestic violence arrests, but agreed with Forgie that help for victims has gotten better over the years. There seems to be more help for domestic violence victims than there used to be, Melton said. The spotlight on domes tic violence has sharply increased throughout the media since late summer, when a video surfaced showing then NFL running back Ray Rice knocking out his anc in an elevator. Rice was cut from the team and sus pended by the NFL. However, Forgie said the incident did not have any new effect on the way his ofce treats domestic abuse cases citing they already treat all victims of domestic violence with dignity and respect. Each case that our ofce reviews is evaluat ed on a case by case by case basis to determine appropriate sanctions and an outcome that will provide justice for the victim in those instances when we are able to go forward with prosecu tion, Forgie said. People needing help can call the Haven of Lake & Sumter Counties at 352-787-5889, the Na tional Domestic Violence hotline at 1-800-799SAFE (7233), or 911. WILDLIFE FROM PAGE A1 POLL FROM PAGE A1 dont want U.S. troops involved. But I dont think we need to close doors. A majority, 66 percent, favor the airstrikes the United States has been launching against the militants, yet 65 percent of those surveyed say Obama has not clearly explained Americas goal in ghting the Islamic State group. The president met with his national security team on Friday to discuss the Islamic State and talk via video teleconference with U.S. ofcials at the American Embassy in Baghdad and consulates in Irbil and Basra. BRETT LE BLANC / DAILY COMMERCIAL Lisa Melton, a domestic violence victim who works at the Sumter County Courthouse, holds a photo of her children as she poses for a portrait in Bushnell on Oct. 2. PAGE 3 Saturday, October Wooton Park hosts Monster Splash Seaplane Fly-In The Tavares Seaplane Base is hosting its Monster Splash Seaplane Fly-In from 9 a.m. to 3 p.m. today at Wooton Park, 100 E. Ruby St., with events for the whole family. Kids can create faces on pumpkins for the Smashing Pumpkin Drop from 9:30 a.m. to 10:30 a.m. where they will be used in a seaplane competition. Other seaplane com petitions include the Franken-Spot Landing and Fastest S-Take Off. The Wooton Park boat launch downtown will be closed to the pub lic for this event, with other locations to launch at: Tavares Recreation Park, Hickory Point Recreation Park, Trimble Park or Gilbert Park. For information, call the Tavares Seaplane Base and Marina at 352-742-6267. MOUNT DORA Breast cancer screenings available today at the park Local Mount Dora residents have joined Libbys Legacy Breast Cancer Foundation and the Womens Center for Radiology to provide breast cancer screenings through a mobile mammogram service, from 9 a.m. to 6 p.m. today at Cauley Lott Park, 1717 N. Highland St. Robin Maynard, founder of Libbys Legacy Breast Cancer Foundation, founded in 2007, is one of the events guest speakers as well as Mount Dora civic and faith-based community leaders. For information or to sign-up for a screening, call Pauline Mabry at 352-551-3325 or Twyla Whiley at 352-602-0130. LEESBURG Free tech classes at the library Upcoming free classes to help the public with computers and e-readers are available and include informa tion on Windows 7 with Laptops for Seniors on Monday and Wednesday; Introduction to Microsoft Word 2014 on Nov. 5 and Dec. 3; and Windows 8 on Dec. 8 and Learn to download free library e-books to your device on Nov. 5 and Dec. 3. Jere Minich of the Lake-Sumter Computer Society is the guest and will help you increase security on your computer, with Personal Security for Computers on Nov. 10 and Dec. 16. And, get ready for Black Friday with Best Buys Geek Squad for a discussion on how to shop for com puters and devices on Nov. 19. Call the library, 100 E. Main St., at 352-728-9790 for registration. LEESBURG LSSC Foundation accepting applications for scholarships Applications for scholarships for the spring 2015 semester at LakeSumter State College are now being accepted with more than $120,000 available to qualied students. Applications are available at www. lssc.scholarships.ngwebsolutions.com. The deadline for submitting appli cations is Friday and classes begin Jan. 7, 2015. For information, call 352-365-3539. State & Region NEWS EDITOR SCOTT CALLAHAN scott.callahan@dailycommercial.com 352-365-8203 CINDY DIAN Special to the Daily Commercial More than 200 people attended the political hob nob in Eustis Thursday night to hear from candidates running for Eustis City Com missioner and Lake County School Board and to participate in a straw poll. The event was organized by Eustis High School students in conjunction with the Lake Eustis Area Chamber of Com merce to raise money for Eustis Heights Elementary School. The Eustis High School students were asked to pay it forward when the chamber donated $1,000 to the school in August, Lake Eustis Area Chamber of Commerce Execu tive Director Christie Bobbitt said. They chose to donate the nights proceeds to Eustis Heights, who will use the money to get new books for the classrooms. Attendees were able to meet the candi dates and discuss issues face-to-face. This was a great opportunity to meet the voters and hear their ideas and concerns, School Board candidate Marc Dodd said. I was especially impressed by the students who came through. We discussed some great in-depth topics of how to better our schools. At the end of the Pay it forward Eustis High students conduct political fundraiser CINDY DIAN / SPECIAL TO THE DAILY COMMERCIAL Lake County School Board District 5 candidate Nancy Muenzmay and Eustis Heights Elementary School Principal Rhonda Hunt discuss current issues in the education system at the political hob nob on Thursday evening. STRAW POLL RESULTS SCHOOL BOARD DISTRICT 3 MARC DODD: 41 votes, 63.08 percent TOD A. HOWARD: 24 votes, 36.92 percent SCHOOL BOARD DISTRICT 5 STEPHANIE A. LUKE: 45 votes, 65.22 percent NANCY MUENZMAY: 24 votes, 34.78 percent EUSTIS CITY COMMISSION SEAT 1 LINDA DURHAM BOB: 49 votes, 76.56 percent JAMES ROTELLA: 15 votes, 23.44 percent EUSTIS CITY COMMISSION SEAT 2 JASON BRASWELL: 3 votes, 4.62 percent BILL BRETT: 41 votes, 63.08 KRESS T. MUENZMAY: 21 votes, 32.31 percent DAVID A. SEELEY: 0 votes, 0 percent SEE HOB NOB | A4 STEVE FUSSELL Special to the Daily Commercial State Attorney Richard Ridgeway has declined to prosecute Fruitland Park Police Chief Terry Isaacs for making false state ments in sworn deposi tions as part of a federal lawsuit. In a memo dated Oct. 7 addressed to Florida Department of Law Enforcement Special Agent Bill Lee, Ridgeway wrote that his ofce will take no action in the matter. The investigation was launched last year after former City Commission er Jim Richardson led formal complaints with the Lake County Sheriffs Ofce. Sheriffs investi gators turned the matter over to the FDLE. Lees investigative sum mary concluded that Isaa cs made six statements during the depositions that were false and there is no evidence to indicate Chief Isaacs should have believed them to be true. In Ridgeways reply to Lee he wrote, I do not feel there is a reasonable likelihood that a jury FRUITLAND PARK Police chief wont face prosecution JOHN RAOUX / AP Police Chief Terry Isaacs stands in the hallway at the police station in Fruitland Park on July 16. SEE LAWSUIT | A4 LIVI STANFORD | Staff Writer livi.stanford@dailycommercial.com For the third year in a row, the Leesburg High School Swarm of Sound Band was named grand champion at the Ocala Marching Band Festival. The Leesburg band was one of 22 to compete at the festival on Oct. 18. The band has won numerous awards over the years, according to the bands director Gabriel Fielder. We are proudest of our State Superior Concert Band awards, Fielder said. In Lake County in the last 40 years, there have been ve of those awarded and four of them are from Leesburg High School band in the last six years. During football season, the band rehearses Tuesday through Thursdays from 5:30 to 8:30 p.m. in addition to regular classroom time, Fielder said. He said the band is not focused Leesburg High Schools band dominates festival SEE MUSIC | A4 MILLARD K. IVES | Staff Writer millardives@dailycommercial.com Lady Lake police are trying to identify the owners of a pit bull puppy found dumped on the side of a road that ofcials believe was used as bait for dog ghting. According to Police Chief Chris McKinstry, ofcers found the black male puppy in the Morning Side Drive area on Oct. 14 with his ears and tail cropped in a crude and inhumane manner that is consis tent with dogs used as a mark in dog ghting. In a press release issued Friday morning, McKinstry said such bait animals are used to test a dogs LADY LAKE Officials believe pit bull puppy injured in dog fighting SEE PUPPY | A4 Bring your hunger and be prepared to try something new at the annual Beast Feast fund raiser for the Leesburg Center for the Arts. Robert Sargent, spokesman for the city, said the special event from 5:30 to 7:30 p.m. on Thursday serves up great food mixed with unusual and exotic meats under the shady oaks of the Mote-Morris House, 1195 W. Magnolia St. in Leesburg. The all-you-can-eat meal is served with multiple side dishes and beverages. Rod Padgett will provide live entertainment. So what exactly is unusual meat? Try rein deer sliders, caribou meatballs, curried goat, buffalo goulash, frog legs and maybe gator tail, Sargent said in a press release. Want something a little less exotic? The Beast Feast menu also includes everything from fried green tomatoes, oysters and quail to casseroles and black-eyed peas. Snack on LEESBURG Beast Feast to offer all-you-can-eat meals DAILY COMMERCIAL FILE PHOTO Former Leesburg Mayor David Knowles grabs some samples of his smoked pork brisket at the Beast Feast festival last year. SEE FEAST | A4 PAGE 4 A4 DAILY COMMERCIAL Saturday, October 25, 2014 ghting instinct and they are often mauled or killed in the process. McKinstry said police had responded to reports of a stray dog and it appeared to be extremely frightened. He said none of the residents they asked knew who owns the dog. The puppy is recovering at Lake County Animal Services where it is under quarantine, said Capt. Todd Luce, who has taken over that sheriffs division as ofcials try to determine what to do with the recently vacated director spot. Luce said Friday the tail appears to have been bitten off during a dog ght and it is scheduled for surgery Wednes day to have whats left of the rot ting tail cropped. Luce said the dog will eventually be fostered by an employee before they attempt to put it up for adoption. Luce added the dog appears to be extremely friendly which makes for a prime target to cower when confronted by an aggressive dog. However, McKinstry added he is unaware of any other signs of dog ght ing in Lady Lake. Anyone who has any informa tion on the puppys owner can contact the Lady Lake Police Department Animal Control at 352-751-1530, the Lady Lake Police Department at 352-7511565 or Crimeline at 1-800-423TIPS (8477) or online at cfcrime line.com, where you can remain anonymous and may be eligible for a reward. would see the case in a light such that a con viction would result. Ridgeway was unavailable for further comment Thursday. Richardsons com plaint included sev eral allegations, but focused on actions by Isaacs during Richard sons 2012 re-election campaign. Isaacs was pictured in a television news report just days before the election waving a placard that accused Richardson of leaking the name of an alleged sex abuse victim. The sex abuse allegation led to the resignation of City Manager Ralph Bowers last year. The city later paid $160,000 to settle a civ il suit brought by the alleged abuse victim, and paid $150,000 last October to settle a civil suit Richardson led in February, 2013 over those same allegations. on awards. We rehearse for con stant improvement, and usually our goal is to do better than we have in previous years, he said. We dont think of it being competitive with other bands. We think of it as being competitive with ourselves. Anthony Russell, assistant principal at Leesburg High School, believes Fielder is one of the best band direc tors in the state. I have been out to the band practice, he said. He believes in discipline, dedication and determination. He pays attention to detail. Every little thing is going to be right. If the small things are done right, there will not be any big issues he will have to x. Russell also noted the dedication of Fielders students, who arrive at school to practice at 6 a.m. How many students do you know that go ear ly on Friday morning and come back to school and go to school all day and then travel to south Lake for the football game, and then come back the next day (for the band competition?) he said. That is dedication. night, a check was presented for $1,154 to Eustis Heights Elementary. In elementary, we always looked up to the high school students, Eustis High School senior Andrew Holland said. Its awesome to turn around as a high school student and be a positive inuence for the kids. Ro n Beck er Dir ector3523948228921 S. US Hwy 27 Minneola, FL Dir ect Cr emation$675Plus Container HOB NOB FROM PAGE A3 IN MEMORY OBITUARIES Mary E. McKee Mary E McKee, 94 of Altoona died Monday, October 20, 2014. Mrs. McKee was a music ma jor, and a medical sec retary. Born in Chicago, she moved to central Florida in 1979, and to Altoona in 1983. She was a Baptist. She was mar ried to Frank F. Hynes, attorney, 1950-1984. Af ter his death, she mar ried his long time best friend, Howard M. Hen sel, Chicago city re man, 1984-1998. Upon his death she married Warren McKee, 20002004. She is survived by brother: Daniel Evans, Richeld, MN; 2 nieces; 2 nephews; and 4 step sons. Funeral services will be held 3:00 Mon day, October 27, 2014 at Beyers Funeral Home in Umatilla. Interment will be 9:00 a.m. Tuesday at Hillcrest Memori al Gardens in Leesburg. The family will receive friends from 2:30 un til service time at the funeral home. Online condolences can be made at neralhome.com. Beyers Funeral Home, Umatil la. Charles Allen Tate Charles Charlie Al len Tate, 82, lived with daughter, Mary Lou, in Longwood, FL, passed away 10/22/2014 at South Seminole Hos pital in Longwood, FL. Charles were mar ried in Fayetteville, TN 08/29/1952. Char lie was employed with Martin Marietta for 33 years until he retired in Dec. 1993. Charles will be joining his wife of 58 years at Talley Cem etery in Petersburg, TN. Services Entrust ed to LOOMIS FAMILY FUNERAL HOME, 407880-1007, funeralhomes.com. DEATH NOTICES Christopher Dasher Christopher Dash er, 36, of Oxford, died Thursday, October 23, 2014. Banks, PageTheus Funeral Home, Wildwood. Jeffrey Jernigan Jeffrey Jernigan, 53, of Ocoee, died Thurs day, October 23, 2014. Banks, Page-Thues Fu neral Home, Wildwood. LAWSUIT FROM PAGE A3 MUSIC FROM PAGE A3 COURTESY OF THE LADY LAKE POLICE This injured black pit bull puppy is recovering at Lake County Animal Services after it was found on the side of a Lady Lake road Wednesday, with injuries ofcials said are consistent with it being used as bait for dog ghting. PUPPY FROM PAGE A3 How many students do you know that go early on Friday morning and come back to school and go to school all day and then travel to south Lake for the football game, and then come back the next day (for the band competition?). That is dedication. Anthony Russell Leesburg High School assistant principal COMPLETE MENU Chef Sammys Famous Cabbage, sponsored by Oakwood Smokehouse Lots of casseroles, sponsored by Main Street Antiques Fresh black-eyed peas, sponsored by Yalaha Farm Reindeer sliders and caribou meatballs, spon sored by Lake Preparatory School Pulled pork and smoked turkey, sponsored by Center State Bank Collard green egg rolls and Honey Poppers, sponsored by Pops Soul Food and Catering Venison chili, spon sored by Downtown Leesburg Business Association Fried green tomatoes and Fried Dill Pickles, sponsored by A Line Fire & Safety Curried goat and buf falo goulash, sponsored by Akers Media Frog legs, sponsored by Starlight Ballroom Grilled quail, sponsored by The Bone Law Firm Fried gator tail, sponsored by Century 21 Carlino Realty Low country boil, sponsored by Larry Dolan, Thrivent Financial Boiled peanuts, sponsored by Wiley, Wiley & Associates Oysters, sponsored by United Southern Bank Beer and wine, spon sored by Wayne Densch and Leesburg Sunset Rotary Iced tea and water, sponsored by Petes Diner Smores, sponsored by Miss Leesburg FEAST FROM PAGE A3 boiled peanuts or roast your own Smores. All proceeds benet programs at the Lees burg Center for the Arts such as the Big Blue Bus Mobile Art Studio and art lessons for the Boys & Girls Club, Sargent said. Rod Padgett will pro vide live entertainment. Admission is $25 in ad vance or $30 at the door. Tickets are available at 4arts.com, the Leesburg Center for the Arts at 429 W. Magnolia St., Two Old Hags Wine Shoppe at 410 W. Main St. or by calling 352-365-0232. BRENDAN FARRINGTON AP Political Writer JACKSONVILLE Charlie Crist walked into a Jacksonville senior center to encourage folks to vote early when 79-year-old Helen Dowdy walked up to him with a big smile. I want a picture with you! she said, clearly enamored with the former Republican gover nor who is now seeking his old job as a Democrat. I want one with you! Crist replied and put his arm around her. There may not be another Florida politician thats better at working a room than Crist. He makes eye contact, shakes voters hands with both of his and makes everyone he meets feel like they are the most im portant person in the room. But does Crist have specic, concrete plans for Floridas future if voters decide to return him to ofce? Republican Gov. Rick Scott says no. Crist says yes. The answer is probably somewhere in the middle. Crist publicly and in his TV ads has been more focused on tear ing down Scott as a mega-mil lionaire who is out of touch with everyday Floridians. But beyond the negative ads and the I know you are but what am I? mental ity of the race, Crist hasnt talked much about policies hed push if voters give him back his old job. Everything would be new from what it is now under Scott. People have asked me, What would you change if you win from what Gov. Scott is doing? Everything, Crist said before pausing and repeating the word. Everything. Scott said Crist is all talk and no action and hasnt laid out a vision for Florida. Theres nothing hes for, Scott said. Ive had people tell me that when they tried to come in and talk to him about policy, hed say, I dont do poli cy. He had no ideas. Crist said if voters want to know how he would govern in the future, they can look at his rst time in ofce: He vows to ght for education, the environment and restoring rights for nonviolent felons, among other things. Crists case: Im not Rick Scott LYNNE SLADKY / AP Florida Democratic gubernatorial candidate Charlie Crist waves after addressing senior citizens while campaigning at Century Village on Thursday in Deereld Beach. PAGE 5 Saturday, October 25, 2014 DAILY COMMERCIAL A5 D0075 Oct ober 27th at 5PM1585 Santa Barabara Blvd, Suite A, The Villages, FLReser ve your seat:(352) 430-2121www .DavisSpineInstitute.comDR. WILLIAM GAROFOLO JESSICA GRESKO Associated Press BETHESDA, Md. A nurse who caught Ebola while caring for a Dallas pa tient who died of the disease walked out of a Washing ton-area hospital virus-free Friday and into open arms. Nina Pham got a hug from President Barack Obama in the Oval Ofce ofcials in New York tried to calm fears after a doctor was diagnosed with Ebola in that city. Pham said she felt for tunate and blessed to be standing here today, as she left the National Institutes of Healths contain ing Ebola-ghting antibodies as part of her care. Although I no longer have Ebola, I know it may be a while before I have my strength back, Pham said at a news conference. Dr. Anthony Fauci, infec tious disease chief at the NIH and the doctor who hugged her, told reporters that ve consecutive tests showed no virus left in her blood. Five tests is way be yond the norm, he stressed, but his team did extra testing because the NIH is a re search hospital. She is cured of Ebola, lets get that clear, Fauci said. Pham stood throughout the approximately 20-min ute press conference and was joined by her mother and sister. She read from a prepared statement and took no questions, but she called her experience very stress ful and challenging for me and for my family. I ask for my privacy and for my familys privacy to be respected as I return to Texas and try to get back to a normal life and reunite with my dog Bentley, she said, drawing laughter with the mention of her 1-year-old King Charles spaniel. Bent ley has been in quarantine since Phams diagnosis but has tested negative for the virus. Pham is one of two nurs es in Dallas who became infected with Ebola while treating Thomas Eric Dun can, who traveled to the United States from Liberia and died of the virus Oct. 8. The second nurse, Amber Vinson, is being treated at Emory University Hospital in Atlanta, which on Friday issued a statement saying she is making good prog ress and that tests no longer detect virus in her blood. Dallas nurse receives thanks from Obama EVAN VUCCI / AP President Barack Obama meets with Ebola survivor Nina Pham in the Oval Ofce of the White House in Washington on Friday. DOUG ESSER and MARTHA BELLISLE Associated Press MARYSVILLE, Wash. A student recently crowned freshman class Homecoming prince walked into his Seattle-area high school cafeteria Friday and opened re, killing one person and shoot ing several others in the head before turning the gun on himself, ofcials and witnesses said. Students said the gunman was staring at students as he shot them inside the cafeteria at Marysville-Pilchuck High School. The shootings set off a chaotic scene as students ran from the cafeteria and building in a frantic dash to safety, while others were told to stay put inside class rooms at the school 30 miles north of Seattle. The gunman was identied as student Jaylen Fryberg, a gov ernment ofcial with direct knowledge of the shooting told The Asso ciated Press. The ofcial spoke on condition of anonymity because he was not authorized to speak to the media. Students and parents said Fryberg was a member of a promi nent family from the nearby Tulalip Indian tribe and a freshman who played on the high school football team. He was introduced at a football game as the schools 2014 Home coming court freshmen class prince, according to a video shot by par ent Jim McGauhey. Marysville Police Commander Robb Lamoureux said the gunman died of a self-inicted wound, but he could not pro vide more details. Shaylee Bass, 15, a sophomore at the school, said Fryberg had recently gotten into a ght with another boy over a girl. He was very upset about that, said Bass, who was stunned by the shooting. He was not a violent person, she said. His family is known all around town. He was very well known. Thats what makes it so bizarre. Three of the victims had head wounds and were in critical condition. Two young women were taken to Providence Ev erett Medical Center, and a 15-year-old boy was at Harborview Medical Center in Seattle, hospi tal ofcials said. Another victim, a 14-year-old boy, was listed in serious condition at Harborview as well, the hospital said. Witnesses described the shooter as methodi cal inside the cafeteria. Brian Patrick said his daughter, a freshman, was 10 feet from the gunman when the shooting occurred. She ran from the cafeteria and immediately called her mother. Patrick said his daughter told him, The guy walked into the caf eteria, pulled out a gun and started shooting. No arguing, no yelling. A crowd of parents lat er waited in a parking lot outside a nearby church where they were reunited with their children. Buses pulled up periodically to drop off students evac uated from the school. Some ran to hug their mothers and fathers. Washington school gunman was Homecoming prince, students say TED S. WARREN / AP People wait at a church where students were taken to be reunited with parents following a shooting at Marysville Pilchuck High School on Friday in Marysville, Wash. LARRY ODELL Associated Press RICHMOND, Va. Remains found nearly a week ago in a rural area of Virginia are those of a university sophomore who disappeared last month, au thorities said Friday, ending a search that left the campus and community on edge. Hannah Graham, 18, disap peared deleringtons killing, which in turn is linked by DNA to a 2005 sexual assault in northern Virginia. Matthew has been charged in the 2005 case. When we started this jour ney together we all hoped for a happier ending. Sadly that was not to be, Grahams parents, John and Sue Graham, said in a state ment provided by the Albemarle County Police Department. We are devastated by the loss of our beautiful daughter. ... Although we have lost our precious Hannah, the light she radiated can never be extinguished. DAVID ESPO AP Special Correspondent WASHINGTON Republicans in competitive races are treading ginger ly around climate change this campaign season, often saying they are not in a good position to make a judgment on the issue, then pivoting quickly to express concern for the environment, the economy or both. I am not a scien tist, Senate Republi can Leader Mitch Mc Connell of Kentucky has said numerous times, a response that other members of his party have employed when asked if human activity is causing the earth to warm. Former Rep. Frank Guinta of New Hamp shire, running to reclaim a House seat he once held, says, I think the science is not complete on this issue. Senate hopeful Joni Ernst of Iowa, said recently, I dont know the science behind climate change. ... I cant say one way or another what is the direct impact from whether its man-made or not. She prefaced her comments by saying she believes in protecting the environment, offering as evidence, I drive a hybrid car, and my family recycles everything. Polls routinely nd that climate change is far down the list of voter concerns, partic ularly in an era of slow economic growth. Yet the issue has come up persistently in the fall campaign, in cluding in debates and interviews as well as political commercials. Surveys suggest there may be political safety for Republicans in straddling the issue, since doing otherwise could anger conserva tive GOP voters who deny climate changes existence or offend the majority of the coun try that says it is an established fact. GOP candidates treading gingerly on climate change I dont know the science behind climate change. ... I cant say one way or another what is the direct impact from whether its man-made or not. ... I drive a hybrid car, and my family recycles everything. Joni Ernst Candidate for U.S. Senate in Iowa Remains belong to missing Virginia student ANDREW SHURTLEFF / AP A road closed sign blocks trafc as authorities search a rural area where human remains were discovered in Albermarle County, Va. on Sunday. PAGE 6 A6 DAILY COMMERCIAL Saturday, October 25, 2014 October 28that 3PM VLADIMIR ISACHENKOV Associated Press MOSCOW The United States is destabilizing the global order by trying to impose its will on other nations, Russian President Vladimir Putin declared Fri day, warning that the world will face new wars if Wash ington fails to respect the interests of other countries. In a speech to political experts in Russias Black Sea resort of Sochi, Putin point ed to wars in Iraq, Libya and Syria as examples of botched U.S. policies that have led to chaos. With visible emotion, he said Washington and its allies have been ghting against the results of its own policy in those countries. They are throwing their might to remove the risks they have created them selves, and they are paying an increasing price, Putin said. Turning to Ukraine, Putin accused the West of ignoring Russias legitimate interests in its neighbor and support ing the ouster of Ukraines former Russian-leaning president. He accused the West of breaking its promis es, citing a February phone conversation with President Barack Obama just hours before protesters in Kiev, the Ukrainian capital, drove President Viktor Yanukovych out of ofce. The crisis in Ukraine has brought relations between Russia and the West to their lowest point since the Cold War. The U.S. and the 28-na tion European Union have imposed several rounds of crippling sanctions against Moscow over its annexation of Crimea in March and its support for pro-Russian insurgents ghting gov ernment troops in eastern Ukraine. Putin denied allegations that Russia wants to split Ukraine. He spoke in sup port of a cease-re for east ern Ukraine that was signed last month and warned the Ukrainian government against trying to crush the pro-Russian rebellion by force. If, God forbid, anyone falls into the temptation to use force to settle the problem in the southeast, it will drive the situation into complete deadlock, Putin said, adding that the with drawal of Ukrainian forces should create conditions for rebuilding ties between the central authorities and the rebel regions. Putin has accused the U.S. of trying to cast Russia as a danger to the rest of the world and forcing its allies to impose sanctions against Moscow over the Ukrainian crisis. Saying the sanctions aimed to push Russia into isolation, he insisted they will not succeed. Such a country as Russia will certainly not bend under pressure, he said. The sanctions have cut the access of Russian banks and several leading state companies to foreign cap ital markets, encouraging investors to ee the Russian market and contributing to a sharp plunge in the national currency, the ruble. The Russian leader warned that the U.S. approach to global affairs has made the world a more dangerous place. The probability of a series of acute conicts with indi rect and even direct involve ment of major powers has sharply increased, he said. Ukraine is an example of such conicts that inuence a global balance of forces, and, I think, not the last one. Putin also insisted the interests of Russia and other nations need to be taken into account to stabilize the global situation. Russia is not demanding some special, exclusive place in the world, he said. While respecting interests of others, we simply want our interests to be taken into account too, and our posi tion to be respected. Evoking the archetypal image of Russian bear, Putin rejected allegations that Russia wants to rebuild the Soviet empire, but warned his nation would rmly stand its ground to defend its vital interests. The bear is the master of the taiga, its not going to move to other climate zones, he said. But its not going to give up its taiga to anyone. Putin accuses US of undermining global stability AP PHOTO Russian President Vladimir Putin speaks to political experts at a meeting of the Valdai International Discussion Club in Sochi, Russia on Friday. RACHEL LA CORTE Associated Press VANCOUVER, Brit ish Columbia The gunman who shot and killed a soldier in plain daylight then stormed Canadas Parliament once complained that a Vancouver mosque he attended was too lib eral and inclusive, and was kicked out after he repeatedly spent the night there even though ofcials told him to stop, Muslim leaders said Friday. Aasim Rashid, spokes man for the British Columbia Muslim As sociation, mosques openness and willingness to let non-Muslims visit. The mosque administration sat him down and explained to him that this is how they run the mosque and that they will keep the doors open to all Muslims and nonMuslims who want to visit, he said at a news conference held at the mosque Friday. Rashid said that Zehaf-Bibeau was told he should go pray at a different mosque if he disagreed. However, he stayed until he was ul timately asked to leave when ofcialsadas national war memorial Wednes day, and was eventually gunned down inside Parliament by the sergeant-at-arms. His motive remains unknown, but Prime Minister Stephen Harper has called the shooting a terror attack, and the bloodshed raised fears that Cana da lim. Gunman in Canada attack complained about mosque JUSTIN TANG / AP People gather around the Tomb of the Unknown Soldier at the National War Memorial in Ottawa on Friday. DESMOND BUTLER and RYAN LUCAS Associated Press ONCUPINAR, Turkey The Turkish border crossing of Oncupinar, an hours drive from the em battled Syrian city of Aleppo, is a chaotic buzz of people waiting to pass into one of the most violent regions in the world. Border guards stand by with machine guns to pre vent Islamic militants from joining the ow, but within their sight smugglers offer to take travelers across for a surprisingly small fee. One of the men, who claimed to be a former ofcer for Syrian intelli gence, said he charged just over $20 but was willing to bargain. Abdul-Rauf, who gave only his rst name for fear of prosecution for his illegal profession, said he could take clients within an hour and even help them carry their bags a few hundred meters into Syria. Abdul-Rauf, a thin man in his thirties with a close-cropped beard, asked whether the travelers were headed for terri tory controlled by pro-Western rebels or by the Islamic State group. When told the latter, he shook his head disapprovingly. Why would you want to go? he asked, drawing a nger across his throat. Interviews with a half dozen a smugglers at Oncupinar and other border crossings indi cate that foreign mili tants approach them regularly and that the border is porous, with areas near Oncupinar and the adjacent city of Kilis as the primary illegal crossing points. Smugglers offer $20 passage from Turkey to Syria BURHAN OZBILICI / AP Syrians walk toward the Turkish border crossing of Oncunipar, Kilis, Turkey on Sept. 28. ASHRAF SWEILAM and MAGGIE MICHAEL Associated Press EL-ARISH, Egypt. Ofcials described it as well-planned attack that began with a car bomb which may have been set off by a suicide attacker. Other militants then red rocket-propelled gre nades, striking a tank carrying ammunition and igniting a second ary explosion. Roadside bombs intended to target rescuers struck two army vehicles, seriously wounding a senior ofcer. State-run TV said clashes between troops and militants followed the attack, without pro viding further details. The attack took place some 9.3 miles from the northern Sinai city of el-Arish, in an area called Karm el-Qa wadees. There was no immediate claim of responsibility, but ofcials said the attack bore the hallmarks of the countrys most active militant group named Ansar Beit al-Maqdis, or Champions of Jerusalem which has claimed a string of past attacks on security forces. The ofcials said the death toll is expected to rise because 28 people were wounded and several were in critical condition. Attack on Egypt army post kills 30 PAGE 7 Saturday, October 25, T he Vaticans extraordinary synod of bishops concluded Sunday with the beatica tion of Pope Paul VI, an interim step on the road to sainthood. But those who were disap pointed that this wasnt the extraordinary ending to a momentous meeting misunder stand what the synod was meant to accomplish. When clergymen and laypeo ple gathered in Rome in early October to begin discussing the challenges of marriage and fam ily in modern times, hopes were high, particularly among pro gressive Catholics, that the synod would conclude with a dramatic shift in church doctrine. Headlines after the release of the gatherings interim report, the Relatio post disceptationem, further fueled such expectations. A bombshell document at the Vatican synod, heralded one article in the The New Yorker Other analysts said the docu ment signied an earthquake in church teaching. A substantial amount of ink was devoted to only one of the reports 58 sections, the one titled Wel coming homosexual persons, although this was but one of doz ens of delicate issues addressed during the two-week meeting. While signicant disagreement between conservative and liberal Catholics over the actual mean ing of the draft document quickly ensued, careful readers of the re port which, it should be noted, is not an authoritative document of the church but proposed re ections, the fruit of synodal dis cussion which took place in great freedom and a spirit of reciprocal listening stated correctly that most of its mainstream interpre tations were aspirational, if not wildly overblown. Much of what has been hailed as a great discovery in this doc ument is in fact not a discovery at all, but a truth so plain and old that it seems odd to call it revolutionary, Michael Brendan Dougherty wrote in The Week Despite the consternation it caused, the report largely reaf rms what have long been the teachings of a faith built on love and mercy that all individuals, no matter their state in life, are welcome to enter into a full life with Christ. After the initial media frenzy, it became abundantly clear that the report, even before its revision, in no way modied church doctrine. That doesnt mean it hasnt caused confusion. The Rev. Dwight Longenecker illustrated how much the mud dled reporting on the synod has puzzled some parishioners. One woman married outside the church and told me that she thought it was now OK for her to come to Communion because The pope has changed all those old rules. Another man has divorced his wife and is living with another woman. He also assured me very condently that it was now ne for him to come to Communion because Pope Francis has changed the rules. But rule-changing was never in the cards for this synod, as Hun garian Cardinal Peter Erdo, the synods relator, clearly stated at its outset. Indeed, the synod was always intended to be about tone a hallmark of Pope Francis papa cy. And in that regard, it did not disappoint. The church was right to engage these difcult issues with an openness and empathy that has sometimes evaded even the most well-intentioned clergy. But as Longenecker explains, accepting and applying Francis pastoral message is possible only if the timeless truths of the Catholic faith are rmly dened and defended. Compassion without content is mere senti mentality. Mercy without truth is an empty gesture. Kindness without correction is cowardly. How the church presents the faith is changeable, but the faith itself is immovable. Still, its important to note that the synod was only the beginning of the churchs deep exploration of the manifold chal lenges faced by Catholics caught between religious devotion and the temptations of an often more appealing secular world. As Francis said at the synods conclusion, We still have one year to mature, with true spiri tual discernment, the proposed ideas and to nd concrete solutions to so many difculties and innumerable challenges that families must confront. That task will warrant more reection but is certainly worthy of taking on. Cynthia M. Allen is a columnist for the Fort Worth Star-Telegram. Readers may send her email at cmallen@star-telegram.com. OTHER VOICES Cynthia Allen MCCLATCHY-TRIBUNE NEWS SERVICE Vaticans synod about family challenges only the beginning T he name Ben Bradlee elicited sharp emo tions Presidents Men character in real life. The icon of modern American newspaper leadership died Tuesday at age 93. Bradlees swagger, gravelly voice, boyishly disheveled silver hair, chiseled good looks and trademark Turnbull & Asser shirts gave him an air of royalty in a newsroom packed with outsize egos and personalities. His condence under heavy political re inspired all in his presence to perform at the top of their game, leading to 18 Pulitzer Prizes for the Post during his tenure. From his glass-walled ofce in the news papers building, just a few blocks from the White House, Bradlee guided a standard of aggressive reporting distinguished not just for the investigative work that uncovered the Watergate scandal in the early s but also for national and international reporting. The Washington Post brought down a pres ident, Richard M. Nixon. Journalism schools around the country saw a spike in enroll ment, as thousands of students launched journalism careers in the wake of Watergate. In Bradlees 1995 autobiography, A Good Life, he credited reporters Bob Woodward and Carl Bernstein with putting him and The Wash ington Post on the map, though few doubted that Bradlees swashbuckling command was a crucial ingredient in the Posts success. Without Bradlees courage to withstand the awesome White House pressure bearing down on The Post and proceed with the Watergate investigation, none of the Nixon administrations dirty-tricks shenanigans might have come to light. The newspapers reporting helped prompt 69 Watergate-relat ed indictments and 48 guilty verdicts. Inside the conference room where he presid ed over the daily meetings of editors to plan The Post s next-day pages, Bradlee hung a framed poster signed by President Gerald Ford depict ing ton, proved to be a fabrication. Bradlee returned the Pulitzer, red the reporter, and then offered his own resignation which publisher Katharine Graham re fused to accept. Bradlee then commissioned an investigation of his own newspaper and published it on the front page, detailing all the sordid mistakes, including those of man agement, that led to the debacle. Bradlee will be remembered like few others in journalism as a lion who exhibited and in spired bold condence in the pursuit of truth. Distributed by MCT Information Services. A VOICE Remembering Ben Bradlee Classic DOONESBURY 1978 When clergymen and laypeople gathered in Rome in early October to begin discussing the challenges of marriage and family in modern times, hopes were high, particularly among progressive Catholics, that the synod would conclude with a dramatic shift in church doctrine. PAGE 8 A8 DAILY COMMERCIAL Saturday, October 25, 2014 Special FREE Seminar .Monday October 27th at 5PM SCIA TICA ( Back & Leg Pain)Tu esday October 28th at 3PM NEURO ( Neuropathy)Tu esday November 4th at 3PM DRS ( Neck & Back Pain)Call to reser ve your seat today! Dr .Jason E. Davis Davis Clinic of Chiropractic 1585 Santa Barbara Blvd., Suite A The Villages VISSPINEINSTITUTE.COM352-430-2121 PAGE 9 M y college buddy Space and I shared a similar problem. We had hair that was uncontrollable. I used to wear a headband to help tame mine, especial ly while playing sports. Space had a different approach when training his hair. After he showered, Space would head to bed and atten his hair on his pillow. I cant remember if he also put a pillow on top or just turned over. But I can still see in his bed waiting for his hair to straighten, albeit only temporarily. Training my body and spirit was that simple. I have been a Christian more than 35 years but my walk with Christ remains erratic. Ive had my victories. Twice in my life Ive dropped 40 pounds. I even walked a Disney Marathon. Those times seem like dis tant memories as my weight has progressively increased before topping out at, well, if you really want to know send me an email. Ill just say Im going to need to drop 40 pounds a couple of times. To say discipline is not my strong point is an under statement. I have too many urges and hungers and little willpower to overcome them. And therein lies the problem. Something I read from Oswald Chambers this week really challenged me. But it also encouraged me. My problem has been me. Ive been relying on my willpower and that just wont cut it because this is more than a physical battle its spiritual. Chambers began, There was nothing of the nature of impulsive or thoughtless action about our Lord, but only a calm strength that never got into a panic. Isnt that the life most Christians want? Chambers diagnosed the problem. Most of us develop our Christianity along the lines of our own nature, not along the lines of Gods nature, he said. Impulsiveness is a trait of the natural life, and our Lord always ignores it, because it hinders the development of the life of a disciple. Watch how the Spirit of God gives a sense of restraint to impulsive ness, suddenly bringing us a feeling of self-conscious foolishness, which makes us instantly want to vindicate ourselves. Were told anyone in Christ is a new creation but I still live my old life far too often. Chambers added that impulsiveness is all right in a child, but not for adults and all impulsive grownups were spoiled people. Impulsiveness needs to be trained into intuition through discipline, Cham bers added. Theres that training word again. My problem is Ive been my own personal trainer. Whats the answer? Faith for Life 352-365-8203 features@dailycommercial.com B1 DAILY COMMERCIAL Saturday, October 25, 2014 TODAY Free stained glass window tours will be given to the public today from 9 a.m. to 4:30 p.m.; and on Sunday from 12:30 to 4:30 p.m., at First United Methodist Church, 439 E. Fifth Ave., in Mount Dora. Members of the church will give the tour of the 27 stained glass windows in the church. For information, call 352-383-2005 or go to. Free chili dinner and concert by the October Mountain Band today at Berean Baptist Church, 5640 County Road 48 in Okahumpka. Dinner will be served at 5 p.m. and the concert is at 6 p.m. Call the church at 352-728-0900 for details. All About Fairway class to learn more about the church, from 9 a.m. to 2 p.m., Fairway Christian Church, 251 Avenida Los Angelos, The Villages. Call 352-259-9305. Sign-up required and lunch is provided. Today is the last day of the fall rummage sale event offering items such as tools, furniture and books at the Lady Lake United Methodist Church, from 8 a.m. to noon, 109 W. McClendon St. in Lady Lake. SUNDAY Faith Lutheran Church and school will host a Trunk-Or-Treat event for the community today from 4 to 6 p.m., at the church, 2727 S. Grove St. in Eustis. Kids can dress in their favorite costume and enjoy the games in the gym. For information, call 352-589-5683. MONDAY Grief Share support group meeting today from 2 to 4 p.m., at Fairway Christian Church, 251 Avenida Los Angelos, The Villages. Call 352259-9305. Singles Bible study, at 6 p.m., at Fairway Christian Church, 251 Avenida Los Angelos, The Villages. Call 352-259-9305, or go to www. fairwaycc.org. TUESDAY Oxford Assembly of God Church will host the Cuba National Choir from Global University at 7 p.m. today. This group of 12 singers range in age from 22 to 30 and are representing the Cuban National Assemblies of God. The public is invited, and admission is free. The church is at 12114 N. U.S. Highway 301, in Oxford. For information, call 352-748-6124. WEDNESDAY Bible studies today at Fairway Christian Church, 251 Avenida Los Angelos, The Villages include a mens study at 8 a.m., at the church and the regular evening Bible study at 6:30 p.m. Call 352-259-9305, or go to for information. FRIDAY Covenant Life Church of God, 706 Urick St., in Fruitland Park will host a Hallowed King family festival today, from 6 to 8 p.m. with games, bounce houses, pony rides, candy and food for the public. For information about the free event, call 352-787-7962. St. Thomas Episcopal Church will have hot dogs and candy for the community at their Parking Lot Grill-Out today at 6:30 p.m., 317 S. Mary St., in Eustis. For information about the free event, call the church at 352-357-4358. Fall Festival at the First Baptist Church of Rutland takes place today from 5:30 to 7 p.m. with trunk-or-treat, bounce house, sh pond and free hot dogs at the church 6674 County Road 249 in Lake Panasoffkee. Family Fest at Oxford Assembly of God is open to the public today from 6 to 8 p.m., at Oxford Assembly of God in Oxford, 12114 N. U.S. Highway 301. Family Fest is for children grades 6 and younger that are accompanied by an adult, offering free games, hayrides, bounce houses and candy. Trunk-R-Treat at the First Baptist Church, at 6 p.m., 402 Oxford St., in Wildwood. Decorated vehicles, treats and fun costumes for the public. For information, call the church at 352-748-1822. NOV. 1 St. Thomas Episcopal will host their 2014 church bazaar today, opening at 9 a.m., offering bargains on crafts, baked goods and collect ibles, at the church, 317 S. Mary St., in Eustis and also at the St. Thomas Thrift Shop, 211 S. Mary St. A salad lunch at 11 a.m. will be avail able for $6. Call the church at 352-357-4358, or go to for details. CHURCH CALENDAR RICK REED REFLECTIONS RICK REED Special to the Daily Commercial I t might throw a preacher off to hear neighing while giving a sermon. But Bert Allen wasnt alarmed during a recent church service in Ohio. His new congregation at Commu nity Chapel First Church of God in Mount Dora shouldnt be anxious either. Those strange noises are expected. I got to preach the rst time in a cowboy church while up in Ohio, Allen said. While the service was going in the barn, there were horses in the corral. The experience revealed Allens heart. A lot of people who come to that setting wouldnt come to a church house, he said. Allen, 70, could relate. He didnt become a Christian until he was 50. His rst experience as a minster, years before preaching in the cow boy church, also revealed Allens heart. It was at an assisted living facility where he worked. After more than 32 years as a maintenance supervisor in an Ohio plant, he was without a job after the factory closed. Rather than become depressed about being laid off, he decided to see what God had in store for him. He took a similar position at a nursing home. He also found another way to serve the residents. I felt called to the ministry at that time, to the elderly, he said. I started holding the services there, Allen said. He worked there ve years but he also believed God had other plans for him. Allen and JoAnna, his wife of 49 years, moved to Florida about 10 years ago. I got tired of shoveling snow, he said. He started a lawn maintenance company after moving to Lake County and became a member at Silver Lake Community Church for about ve years before moving to Midway Baptist Church. Allen also returned to his ministe rial roots. I started another ministry at a nursing home when I moved down here, he said. The call to do more continued to smolder but Allen fought it. I always felt God needed to use me in a greater way, he said. The Lord would wake me up at 2 or 3 oclock in the morning with messages in my head, You need to spread the word. I went talk to my pastor at Midway Baptist and went talk to three or four other pastors. They conrmed the calling and Allen decided it was time to go forward. After I accepted the call to the ministry it seemed like a burden was lifted from my shoulders, he said. Afterward, my pastor an nounced on a Sunday night I would be preaching and Ive been preach ing ever since. He served as his pastors backup and was invited to preach at other area churches. Once again, at the age of 70, he felt he should be doing more. I kept pretty busy with the lawn business but sold it after the Lord laid it all out, Allen said. Gods timing was perfect. Allen had already preached a couple of times at Community Chapel Church. At that time they started looking for a new pastor and asked me, Allen said. He replied he would take the job on an interim basis for six months. I had basically retired, he said. But God had other plans and continues to use him. Allen is excited to be at Com munity Chapel, his rst full-time pastoring position. Everything is going wonderfully, he said. The people have beautiful hearts. And the church has already started growing. Weve had eight or nine new members already. Allen wants his church to focus on growth church growth and personal and spiritual growth. Community Chapel has been serving its community for about 50 years. It actively supports the Lake Cares Food Pantry and Operation Christian Child, a project of Samari tans Purse, an international Chris tian relief organization headed by Franklin Graham, which distributes thousands of shoeboxes lled with gifts to children around the world. The church of about 50 supports a missionary in Honduras. Community Chapel First Church of God is at 3601 Old Highway 441 in Mount Dora near Bettys Green house Restaurant. Sunday school begins at 9:30 a.m. and the worship service at 10:30 a.m. For more infor mation, call the church ofce at 383-3905. Im thrilled to be down here, said Allen. Its a great congregation of loving people. Its just working out great. MOUNT DORA Finally full-time New pastor at Community Chapel took the long way around RICK REED / SPECIAL TO THE DAILY COMMERCIAL Bert Allen found his rst full-time pastoral position at Community Chapel First Church of God in Mount Dora. After I accepted the call to the ministry it seemed like a burden was lifted from my shoulders. Afterward, my pastor announced on a Sunday night I would be preaching and Ive been preaching ever since. Bert Allen Pastor at Community Chapel First Church of God We must train for our relationship with Jesus SEE REED | B3 PAGE 10 B2 DAILY COMMERCIAL Saturday, October 25,pmBethany Lutheran Church1334 Grifn Road, Leesbur g352-787-7275Sunday Ser vice 8:00am & 10:30am We dnesday Bible Stud y 10:00am Sunday Bible Stud y 9:15 Wo G Zion Lutheran Church (ELCA)547 S. Main Av e. Gro veland352-429-2960 Pa stor Ken StoyerSunday Wo rship Ser vice 11:00am Adult Sunday Sc hool 9:30amD006972 PAGE 11 Saturday, October 25, 2014 DAILY COMMERCIAL B3 REED FROM PAGE B1 Discipleship is built entirely on the supernatural grace of God, said Chambers. Walking on water is easy to someone with impulsive boldness, but walking on dry land as a disciple of Jesus Christ is something al together different. Peter walked on the water to go to Jesus, but he followed at a distance on dry land. My friend Joe used to say he was ready to pick up a sword and ght for Jesus but living for each day was the hard part. So true. We do not need the grace of God to with stand crises human nature and pride are sufcient for us to face the stress and strain magnicently, said Chambers. But it does require the supernatu ral grace of God to live 24 hours of every day as a saint, going through drudgery, and living an ordinary, unnoticed, and ignored existence as a disciple of Jesus. He added, It is ingrained in us that we have to do exceptional things for God but we do not. I know this to be true. But the call to do ex traordinary things isnt from God. As Cham bers said, He wants us to be exceptional in the ordinary things of life, and holy on the ordinary streets, among ordinary people and this is not learned in ve minutes. God wants us to have an extraordinary relationship. The rest will follow. Let us not look to for the next big thing but for a lifetime of living for Jesus. Let us come to Jesus. Let us be our own personal trainers. Let us heed His call in Matthew 11:28-30: Come to Me, all who labor and are heavy laden, and I will give you rest. Take My yoke upon you, and learn from Me, for I am gentle and lowly in heart, and you will nd rest for your souls. For My yoke is easy, and My burden is light. Rick Reed is a columnist who lives in Mount Dora. To reach him, call 383-1458 or email ricoh007@aol.com. TRAVIS LOLLER Associated Press MEMPHIS, Tenn. A Methodist pastor who was disciplined for of ciating at his sons samesex wedding will soon nd out whether he can remain an ordained minister in the nations second-largest Protes tant denomination. The Rev. Frank Schaefer was suspend ed and then defrocked last year after refusing to promise to refrain from conducting same-sex marriages in the future. The action against Schaefer who ofciated at his sons 2007 wedding in Mas sachusetts was taken after a church trial in Pennsylvania. An appeals panel restored Schaefers pastoral credentials in June, but that decision is being challenged. The United Methodist Churchs Judicial Coun cil, the denominations highest judicial body, heard arguments in the case Wednesday in Memphis. The Rev. Scott Camp bell, who represents Schaefer, told the council that Schaefers defrock ing was wrongly imposed as a punishment for a possible future action, something church rules do not allow. The Rev. Christopher Fisher, representing the Eastern Pennsylvania Annual Conference, said the punishment was appropriately directed at Schaef-prole. His case has galvanized opposition to ofcial church doctrine. The United Methodist Church accepts gay and lesbian members but rejects homosexuality as incompatible with Christian teaching, and clergy who perform same-sex unions risk punishment ranging from a reprimand to sus pension to defrocking. Just before the Wednesday hearing, a group of about 50 of Schaefers supporters, some coming from as far away as Oklahoma and Maryland, met in a downtown Memphis park to worship togeth er. The group, wearing short rainbow-colored stoles, then walked together to the hearing and sat in the audience. Methodist panel hears appeal over gay wedding BRADY MCCOMBS Associated Press SALT LAKE CITY The Mormon church is addressing the mystery that has long surround ed undergarments worn by its faithful with a new video explaining the practice in-depth while admonishing ridicule from outsiders about what it considers a symbol of Latter-day Saints devotion to God. The four-minute video on The Church of Jesus Christ of Lat ter-day Saints website compares the white, two-piece cotton tem ple garments to holy vestments worn in other religious faiths such as a Catholic nuns habit or a Muslim skullcap. The footage is part of a recent effort by the Salt Lake City-based religion to explain, expand or clarify on some of the faiths more sensitive be liefs. Articles posted on the churchs website in the past two years have addressed the faiths past ban on black men in the lay clergy; its early history of polygamy; and the misconception that members are taught theyll get their own planet in the afterlife. The latest video dispels the notion that Latter-day Saints be lieve temple garments have special protective powers, a stereotype perpetuated on the Internet and in pop ular culture by those who refer to the sacred clothing as magical Mormon underwear. These words are not only inaccurate but also offensive to mem bers, the video says. There is nothing mag ical ll a void on the Internet, which has little, if any, accurate information about the undergar ments, church spokes man Eric Hawkins said in a statement. The video, also available on YouTube, explains that the un dergarments are worn daily by devout adult Latter-day Saints as a reminder of their com mitment signicance. The video comes two years after jabs about the undergarments were lobbed at Mitt Romney in 2012 with the intent to damage his candida cy as the rst Mormon presidential nominee of a major political party. Mormons address mystery surrounding undergarments AP PHOTO This photo provided by The Church of Jesus Christ of Latter-day Saints shows the temple garment, a white, two-piece cotton ensemble worn by church members. Members are taught not to hang the garments in public places to dry or display them in view of people who do not understand their significance. NICOLE WINFIELD Associated Press VATICAN CITY Pope Francis on Sunday beatied Pope Paul VI, concluding the remarkable meeting of bishops debating family issues that drew parallels to the tumultuous reforms of the Second Vatican Council which Paul oversaw and implemented. Emeritus Pope Benedict XVI was on hand for the Mass, which took place just hours after Catholic bish ops approved a document charting a more pastoral approach to ministering to Catholic families. They failed to reach consensus on the two most divisive issues at the synod: on welcoming gays and divorced and civilly remar ried couples. But the issues remain up for discussion ahead of another meeting of bishops next year. While the synod scrapped its ground-breaking wel come and showed deep divi sions on hot-button issues, the fact that the questions are on the table is signicant respon sibles relations with people of other faiths. He is perhaps best known, though, for the divisive 1968 encyclical Humanae Vitae, which enshrined the churchs opposition to arti cial contraception. More than 50 years later, Humanae Vitae still elicits criticism for being unrealistic given the vast majority of Catholics ignore its teaching on birth control. In their nal synod document, bishops restated doctrine, but they also said the church must respect couples in their moral evaluation of contraception methods. The bishops also signaled a muted opening toward gays, saying they should be wel comed with respect and sen sitivity. That language was far less welcoming than initially proposed, and it failed to get the necessary two-thirds majority vote to pass. I have the impression many would have preferred a more open, positive language, Canadian Arch bishop Paul-Andre Durocher wrote on his blog in explain ing the apparent protest vote on the gay paragraph. Not nding it in this paragraph, they might have chosen to indicate their disapproval of it. However, it has also been published, and the reection will have to continue. The beatication marked the third 20th century pope Francis has elevated this year: In April, he canonized Sts. John Paul II and John XXIII. That historic event marked the rst time a reigning and retired pope Francis and Benedict had celebrated Mass together in public in the 2,000-year history of the church. Benedict returned to the steps of St. Peters Basilica for Pauls outdoor beatica tion Mass in a potent symbol of the continuity of the church, despite differences in style and priorities that were so evident in the synod meetings this week. Paul was beatied, the rst step toward possible sainthood, after the Vatican certied a miracle attributed to his intercession concern ing a California boy whom doctors had said would be born with serious birth de fects. The boy, whose iden tity has been kept secret at his parents request, is now a healthy teen. Pope beatifies Paul VI at family synods end GREGORIO BORGIA / AP A nun carries a relic of late Pontiff Paul VI during the beatication ceremony and a mass for the closing of a two-week synod on family issues celebrated by Pope Francis in Saint Peters Square at the Vatican on Sunday. PAGE 12 KEN SWEET Associated Press NEW YORK The stock market closed out its best week in nearly two years on a positive note Friday, helped by strong quarterly earnings from Microsoft and other big U.S. companies. After weeks of speculation over the fate of Europes econ omy, Ebola fears and plunging oil prices, investors were able to get back to basics. Wall Street is in the midst of one of the busiest times of the year, when companies report their quarterly results. Ultimate ly what drives stock prices higher is the potential for a company to earn more, so higher prots generally mean higher stock prices. What matters most to the market are earnings expec tations and corporate fun damentals, and so far theyre looking pretty good, said Michael Arone, chief invest ment strategist at State Street Global Advisors. Prots for S&P 500 compa nies are up 5.6 percent from a year ago this earnings season, according to FactSet. That growth is better than the 4.6 percent increase the market was expecting. CURRENCIES Dollar vs. Exchange Pvs Rate Day Yen 108.07 108.19 Euro $1.2666 $1.2653 Pound $1.6078 $1.6031 Swiss franc 0.9523 0.9536 Canadian dollar 1.1229 1.1234 Mexican peso 13.5507 13.5424 Business austin.fuller@dailycommercial.com 352-365-8263 DOW JONES 16,805.41 +127.51 NASDAQ 4,483.72 + 30.93 S&P 500 1,964.58 + 13.76 GOLD 1,231.80 + 2.70 SILVER 17.18 + 0.024 CRUDE OIL 81.01 1.08 T-NOTE 10-year 2.27 0.01 MAE ANDERSON AP Technology Writer NEW YORK Am azon has long acted like an ideal customer on its own website: a freewheeling big spender with no wor ries about balancing a checkbook. Investors condent in founder and CEO Jeff Bezos invest-and-expand strategy ooded into the stock as the com pany revolutionized shopping, upended the book industry and took on the cloud even though its vast range of initiatives ate up all the companys prots. After all, when Am azon.com led for its IPO 17 years ago, it was very clear: the compa ny would post losses for the foreseeable future while it invest ed in the business to drive bigger and bigger sales. Stockholders seemed to like playing Bezos long game: shares more than quadrupled between 2010 and 2014 to over $400 apiece. Lately, theyve lost a little patience. After the Seattle company on Thurs day reported a huge third-quarter loss and issued a disappointing holiday forecast, the stock sold off by nearly 10 percent. Its dont really want to hear a long-term story. What they want are answers. Particularly when theres now another e-commerce powerhouse to invest in: Chinese e-com merce player Alibaba, which went public in September in a $25 billion initial public of fering, the largest ever. Frankly, we believe its impossible to predict Amazons protability during this prolonged investment cycle, but prot metrics are clearly moving in the wrong direction and its a fair question to ask, does Amazon have too many balls in the air? said Wells Fargo analyst Matt Nemer. Ive been wonder ing, and I think a lot of investors have this question as well, in terms of when things dont go as anticipated in some of the bigger projects where theres not a revenue stream... whats the process for determining whether to plow ahead or turn back capital and rede ploy it in other areas? analyst Scott Devitt pressed on Amazons earnings call. CFO Tom Szkutak de fended the companys strategy but admitted Amazon needs to pickand-choose its projects. We certainly have been in several years now of what I will call in investment mode, he said on the call. Theres still lots of opportunity in front of us but we know that we have to be very selective about which opportunities we pursue. STEVE ROTHWELL AP Markets Writer NEW YORK Some times a little fear is healthy for stock investors. A violent lurch lower nine days ago knocked the Standard & Poors 500 index down as much as 7.4 percent from its September peak as fears of a global economic slowdown intensied. Stocks have revived this week, thanks to strong cor porate earnings, and on Friday the S&P 500 was marching toward its best performance in nearly two years. How should inves tors view this intense ip-op? As an overdue reminder that stocks arent a one-way ride up. While last weeks slump doesnt tech nically count as a correction dened as a 10-percent drop from a peak thats how many professional investors view it. Its important to have these periods of scare and fear, says Joe Quinlan, chief market strategist for U.S. Trust. It keeps investors hon est and it keeps them on their toes. In fact, such sell-offs often provide a base for another move higher in stocks, market observer say. Thats: Di versify. After a big drop, though, they think about putting mon ey into other things besides stocks. It has been more than three years since the last correction and that was making some investors hesitant to buy stocks. The aver age amount of time between slumps is 18 months, according to data from S&P Capital IQ. Many investors reasoned that, statisti cally speaking, at least, the market was due for a sell-off. John Manley, chief equity strategist at Wells Fargo Funds Management says that the recent plunge was, inves tors need to become complacent, or wildly enthusiastic, he says. So far, he sees little evidence of that on Wall Street. Manley expects the stock market to con tinue to stabilize as the U.S. economy strength ens and company earnings improve. Staff and Wire Reports The U.S. government this week issued an urgent plea to more than 4.7 million people to get the air bags in their cars xed, amid concern that a defect in the devices can pos sibly kill or injure the driver or passengers. The inator mechanisms in the air bags can rupture, caus ing metal fragments to y out when the bags are deployed in crashes. Safety advocates say at least four people have died from the problem, there have been multiple injuries and several lawsuits, including one from a Eustis man. Multiple automakers have recalled vehicles in the U.S. over the past two years to repair air bag inators made by Takata Corp., a Tokyo-based supplier of seat belts, air bags, steering wheels and other auto parts. In a statement this week, the Nation al Highway Trafc and Safety Administration warned owners of those cars to act right away. The warning this week covers cars made by Toyota, Honda, Mazda, BMW, Nissan, General Motors and Ford. The Reuters news service is re porting that two recent lawsuits over defective Takata air bags have come out of Florida, with one led by 26-year-old Corey Burdick of Eustis, who was in jured in a May 29 accident while driving his 2001 Honda Civic in Eustis. The lawsuit, which is seeking damages above $15,000, said shards of metal were propelled through the air bags fabric and struck Corey Burdick in the eye, resulting in disgurement, im paired vision and other severe permanent injuries, Reuters is reporting. The Orlando-based personnel injury rm of Newsome Melton is representing Burdick. Our rm recently led a lawsuit in Florida on behalf of a 26-year-old father of three, who was blinded in one eye when a Takata airbag exploded and shot shrapnel into his face, the rms website states. As alleged in the complaint, our rm led for him and his family, even though his car had one of the recalled airbags, neither he nor his family ever received a recall notice until weeks after he was injured. Associated Press writer Tom Krisher contributed material to this report. Eustis man files lawsuit over air bag injury Market jolt is reality check RICHARD DREW / AP Specialist David Vadala, right, works at his post on the oor of the New York Stock Exchange before the close Wednesday. Out-of-patience investors sell off Amazon AP FILE PHOTO Katherine Braun sorts packages toward the right shipping area at an Amazon.com fulllment center in Goodyear, Ariz. Stock market has best week in nearly 2 years Analysts: Rough week on Wall Street may serve as nasty correction PAGE 13 The Market In Review A-B-CABB Ltd.78e21.43+.04 ACE Ltd2.56e106.90+1.50 ADT Corp.8034.50+.38 AES Corp.2013.73+.14 AFLAC1.4858.54+.46 AGCO.4445.30+.30 AGL Res1.9653.82-.32 AK Steel...7.12-.07 AOL...41.77-.09 Aarons.08d23.27-1.43 AbbottLab.8842.46+.03 AbbVie1.96fu60.29+.77 AberFitc.80d31.69-1.92 AbdAsPac.425.91+.02 Accenture1.95e78.35+.27 AccoBrds...7.20... Actavis...240.33+3.12 AMD...2.68-.01 AdvSemi.22e5.90-.02 AecomTch...32.60+.63 Aegon.30e7.92+.08 AerCap...40.74+.31 Aeropostl...2.90-.14 Aetna.9078.69-.06 AffilMgrs...191.58+1.30 Agilent.53b54.05+.34 Agnico g.3229.20-.04 Agrium g3.0092.82+6.44 AirLease.1235.12+.53 AirProd3.08131.50+1.98 Airgas2.20110.02+.96 AlaskaAir s.5050.20+.25 Albemarle1.1057.20+.40 AlcatelLuc.18e2.51-.06 Alcoa.1216.55+.31 AlexREE2.88u82.21-.31 Alibaba n...95.76+1.31 AllegTch.7233.02+.54 Allegion n.3249.12+.67 Allergan.20184.21+.84 Allete1.9650.18+.21 AlliBInco.41a7.57+.05 AlliantTch1.28129.31-1.53 AlldNevG...2.30-.10 AlldWldA s.9037.36+.39 AllisonTrn.4829.65+.14 Allstate1.12u62.57+.57 AllyFin n...21.69+.03 AllyFn pfB2.13d26.76-.05 AlonUSA.40f14.90-.05 AlphaNRs...2.16+.01 AlphaPro...4.76+.16 AlpAlerMLP1.12e18.76+.07 AltisResid1.73e21.95-.68 Altria2.08f47.49+.36 Ambev n.33e6.38+.30 Ameren1.64f41.24+.23 AMovilL.35e23.53-.22 AmApparel....73... AmAxle...17.71-.12 AmCampus1.5238.56-.25 AmEagE rs...d1.98-.13 AEagleOut.5012.92-.88 AEP2.00u56.47+1.19 AEqInvLf.18f24.38+.14 AHm4Rent.2016.97-.14 AmIntlGrp.5052.16+.54 AmTower1.44f96.17+.30 AmWtrWks1.24u51.91+.48 Ameriprise2.32117.65+1.14 AmeriBrgn.9478.28+.84 Ametek.3651.33+.50 Amphenol s.50f48.83+.82 AmpioPhm...3.92+.13 Anadarko1.0890.98-1.19 AnglogldA...9.54-.12 ABInBev2.82e108.75+1.00 Ann Inc...39.35-.62 Annaly1.2011.36+.07 AnteroRes...48.91+.47 Anworth.50e5.18... Aon plc1.0082.38+.80 Apache1.0075.81-.27 AptInv1.0434.39-.20 ApolloGM2.82e23.44+.42 ApolloRM1.76f16.28-.10 AquaAm.6625.36+.19 ArcelorMit.2012.94+.13 ArchCoal.01m1.84... ArchDan.9645.58+.04 ArmourRsd.604.03+.01 ArmstrWld...48.80-.07 AsburyA...66.56+1.58 Ashland1.36107.31+1.58 AspenIns.8043.30+.41 AsdEstat.80fu19.38+.01 AssuredG.4422.64-.05 AstraZen2.80e70.12+.77 AthlonEn...58.09+.01 AtlPwr g.12m2.30-.01 AtlasEngy1.96f39.20+.52 AtlasPpln2.52f36.05-.49 ATMOS1.4851.62-.30 AtwoodOcn1.0041.43-.91 AuRico g.02m3.72+.04 Autohme n...49.94+1.17 Autoliv2.1690.33-.25 AvalonBay4.64151.23-.36 AveryD1.4046.37+2.19 Avnet.64f41.78+.63 Avon.2411.48-.02 Axiall.6438.87-.05 AXIS Cap1.0847.38+.58 B&G Foods1.3627.74-.20 B2gold g...2.05-.02 BB&T Cp.9636.66+.42 BCE g2.4743.28+.30 BHP BillLt2.42e59.14+.39 BHPBil plc2.42e52.86-.43 BP PLC2.34f42.17... BP Pru10.60e85.21-1.60 BPZ Res...d1.32-.06 BRF SA.19e23.35+.52 BakrHu.6853.49-.63 BallCorp.5266.75+.17 BalticTrdg.07e3.79+.02 BanColum1.20e54.78-.69 BcBilVArg.45e11.74+.24 BcoBrad pf.44e13.74+.50 BcoSantSA.81e8.93+.16 BcoSBrasil.87e6.33+.10 BcSanChile1.02e21.33+.05 BcpSouth.3021.69+.27 BkofAm.20f16.72+.12 BkAm pfW1.6625.11-.05 BkNYMel.6837.12+.81 BkNova g2.64f60.57+.38 BankUtd.8428.79-.36 Barclay.43e14.71+.20 BarVixMdT...13.39-.17 B iPVix rs...33.17-.31 Bard.88u156.97+2.74 BarnesNob...20.63+.27 Barnes.48f34.97+1.90 BarrickG.2013.52+.07 BasicEnSv...13.91-.94 Baxter2.0869.83+.73 BectDck2.18125.73+.73 Bellatrix g...4.88-.21 Bemis1.0838.96+.17 BenchElec...22.40-.10 Berkley.44u50.94+1.27 BerkH B...139.40+.72 BestBuy.7633.11-.01 BigLots.6845.58-.22 BBarrett...14.85-.48 BioMedR1.0021.69-.16 BitautoH...80.00+3.25 BlkDebtStr.29a3.84+.03 Blackstone1.92e30.66+.77 BlockHR.8030.93+.13 BdwlkPpl.4017.00-.36 Boeing2.92122.24+.21 BoiseCasc...u33.50+1.11 BonanzaCE...42.28-.68 BorgWrn s.52f56.30-.22 BostProp2.60a121.85-.05 BostonSci...12.99+.28 BoydGm...10.27-.02 Brandyw.6015.17+.10 Braskem.55e14.23+.26 BrigStrat.5019.32-.10 Brinker1.12f51.28+1.27 BrMySq1.4453.63+1.13 Brookdale...32.99+.08 BrkfldAs g.6446.96+.39 BrkfldRP...23.16-.23 Brunswick.5045.00+.11 Buenavent.02e10.75-.21 BungeLt1.3684.67+.71 BurgerKng.32f31.65+1.07 C&J Engy...19.78-.90 CBL Asc.9818.63-.08 CBRE Grp...30.57+.09 CBS A.60f53.82-.20 CBS B.60f53.52-.23 CBS Outd n1.4829.83+.06 CF Inds6.00260.41+4.71 CIT Grp.6046.63+.46 CLECO1.6053.40+.13 CMS Eng1.0832.09+.16 CNH Indl...7.95+.08 CNO Fincl.2417.30+.03 CPFL Eng.91e14.68+.90 CRH.85e22.40+.12 CSX.6435.30+.48 CVR Engy3.00a45.26+.23 CVS Health1.1084.29+.69 CYS Invest1.20m8.94-.01 Cabelas...d49.37+.06 CblvsnNY.6018.59+.14 CabotO&G.0831.23-.21 CalDive....24-.06 CallGolf.047.95+.80 CallonPet...6.31+.04 Calpine...21.96+.10 CAMAC s....44-.03 Cameco g.4016.78+.20 Cameron...59.84-.51 CampSp1.2543.17+.20 CampusCC.666.56-.04 CdnNR gs1.0068.80+.56 CdnNRs gs.9034.66-.54 CP Rwy g1.40204.83+1.56 Canon...30.35-.10 CapOne1.2079.27+.88 CapsteadM1.3612.80-.02 CarboCer1.3252.61-.16 CardnlHlth1.3777.10+.65 CareFusion...56.96+.06 Carlisle1.00f85.68+.73 CarMax...53.58+.85 Carnival1.0038.52+.69 CarpTech.7248.49-1.31 Carters.7676.79+1.69 CastleBr...u1.85+.09 Caterpillar2.8099.44+.17 CedarF2.8046.98-.20 Cel-Sci....66-.03 Celanese1.0058.35+.50 Cemex.52t12.08+.17 Cemig pf s1.40e6.25+.49 CenovusE1.0624.45-.41 Centene...81.88-1.08 CenterPnt.9524.00+.18 CenElBras.18e2.51+.22 CFCda g.0112.38-.04 CntryLink2.1639.93-.01 Cenveo...2.34-.03 ChambStPr.507.98+.05 Cheetah n...16.68-1.27 Chegg n...6.15+.32 CheniereEn...72.90+1.10 ChesEng.3521.60-.19 Chevron4.28115.91-.28 ChicB&I.2853.68+2.40 Chicos.3015.20-.33 Chimera.36a3.09+.02 ChinaGreen.10e2.16-.05 ChinaMble2.04e58.36+1.37 ChinaUni.23e14.37+.12 Chipotle...615.78+5.78 Chiquita...14.16+.40 Chubb2.0096.43+2.17 ChurchDwt1.24u71.22+.79 CienaCorp...16.24-.35 Cigna.0492.83+.56 Cimarex.64109.16-2.07 CinciBell...3.49+.08 Citigroup.0451.80+.39 CitizFin n...23.18+.15 Civeo n.5212.35-.41 CliffsNRs.609.63+.84 Clorox2.96u99.47+1.04 CloudPeak...11.06+.19 ClubCorp.4819.05+.19 Coach1.3535.97+.03 CobaltIEn...11.16-.06 CocaCE1.0042.38+.18 Coeur...4.40+.06 Colfax...d52.59-1.44 ColgPalm1.4465.35+.30 ColonyFncl1.4421.34-.03 Comerica.8045.51+.58 CmclMtls.4816.59+.58 CmtyBkSy1.20f35.34+.12 CmtyHlt...56.59+.15 CBD-Pao.44e40.72+1.70 CompSci.9259.55+.43 ComstkRs.50d11.42-.44 Con-Way.6043.91+.75 ConAgra1.0034.20+.18 ConchoRes...108.99-1.93 ConocoPhil2.9270.07+.07 ConsolEngy.2534.68-.10 ConEd2.52u62.50+.49 ConstellA...88.28+1.08 Constellm...20.58-.55 ContlRes s...56.73-1.15 Cnvrgys.2818.97+.01 CopaHold3.84104.94+2.42 Copel.95e12.95+.45 CoreLabs2.00128.97+.35 CoreLogic...30.46+.18 Corning.4018.80+.12 CorpOffP1.1027.40+.10 Cosan Ltd.30e10.04+.27 Coty.2016.32-.08 CousPrp.3012.68-.01 CovantaH1.00f21.36+.07 Covidien1.44f89.64+1.19 Crane1.32f61.30-.44 CSVInvNG...5.15+.12 CSVLgNGs...d10.72-.28 CredSuiss.79e26.03+.27 CrestwdEq.56f9.19-.39 CrwnCstle1.40u84.75+.46 CubeSmart.52u19.95-.14 Cummins3.12137.25+.89 Cytec s.5046.32+.33 D-E-FDCT Indl.288.29-.04 DDR Corp.6217.80+.03 DNP Selct.7810.48+.07 DR Horton.25f22.96+.02 DSW Inc s.7530.64-.22 DTE2.76fu80.20+.20 DanaHldg.2020.00-.56 Danaher.4077.96+.60 DarlingIng...17.39-.06 DaVitaHlt...u76.73+.48 DeVryEd.3445.81-.11 DeanFoods.2814.59+.03 DeckrsOut...81.56-6.54 Deere2.4085.43+.26 DejourE g....26-.00 Delek.60a32.00+.26 DelphiAuto1.0066.78+1.08 DeltaAir.3639.44+1.52 DenburyR.2512.41-.16 DenisnM g....96-.04 DeutschBk1.02e31.94+.19 DeuEafeEq.37e26.82+.06 DevonE.9659.91-.10 DiaOffs.50a39.07-.53 DiamRk.4113.69-.02 DianaShip...8.66-.12 DiceHldg...8.46+.06 DicksSptg.5044.56+.17 Diebold1.1536.64+.20 DigitalRlt3.3266.30... DirSPBear...24.51-.54 DxGldBull...19.31-.26 DrxFnBear...16.25-.39 DxEnBear...18.65+.21 DxEMBear...35.58-.74 DrxSCBear...15.80-.07 DrxBrzBull...13.70+1.53 DirGMBear...19.54+1.29 DirGMnBull...8.48-.64 DxRssaBull...9.85+.57 Dx30TBear...38.53-.11 DrxEMBull...25.61+.45 DrxFnBull...102.71+2.34 DirDGldBr...29.33+.33 DrxSCBull1.19e65.65+.27 DrxSPBull...76.14+1.59 DirxEnBull...79.22-1.03 Discover.9662.34+.45 DolbyLab.4040.32-.10 DollarGen...62.25-.01 DomRescs2.4070.72+.62 DomRes 17.7551.38+1.13 Dominos1.00u87.68+.38 Domtar g s1.5040.60+.41 DEmmett.8027.73-.12 Dover1.60f79.09+.73 DowChm1.4848.21+.53 DrPepSnap1.6466.80-.15 DresserR...81.27-.11 DuPont1.8869.00+.41 DuPFabros1.4029.23-.02 DukeEngy3.18fu80.30+.23 DukeRlty.6818.39+.09 Dynegy...29.75-.07 E-CDang...12.20-.03 E-House.20e9.79-.17 EMC Cp.4628.17+.47 EOG Res s.67f92.10-1.30 EP Engy n...14.84+.24 EPAM Sys...44.36-.74 EQT Corp.1288.90+1.25 EagleMat.4092.55+.45 EastChem1.4077.56-.44 Eaton1.9663.06+.32 EatnVan1.00f36.41+.30 EVTxMGlo.989.85+.06 EclipseR n...d12.52-.33 Ecolab1.10112.72+.16 Ecopetrol2.65e28.37-.24 EdisonInt1.4260.65+.80 EducRlty.4811.12+.03 EdwLfSci...u116.76+11.57 ElPasoPpl2.6041.21+.22 EldorGld g.06e6.97+.04 Embraer.52e36.89+.92 EmeraldO...3.31-.11 EmergeES5.52f95.00+1.06 EmersonEl1.7262.39+.34 EmpIca...6.82+.05 Emulex...5.40+.06 EnbrdgEPt2.22f37.06+.52 Enbridge1.4046.82+.27 EnCana g.2818.35-.14 EndvSilv g...3.79-.05 Energen.08m61.68-.62 EngyTEq s1.66f57.29-.42 EngyTsfr3.90f64.81+.56 Enerpls g1.0815.06-.35 Enersis.61e15.73+.20 ENSCO3.0038.88-.68 Entergy3.3282.14+.85 EntPrdPt s1.46f38.50+.27 EnvisnHlth...35.01+.06 Equifax1.0073.89+1.11 EqtyLfPrp1.30u47.18-.16 EqtyRsd2.0067.74-.33 EsteeLdr.8074.35+.12 Evercore1.12f50.32+1.28 ExcoRes.202.79-.01 Exelis.4116.78+.02 Exelon1.2435.73+.85 Express...14.09-.43 ExtStay n.6022.59+.03 ExterranH.6037.91-.14 ExtraSpce1.8856.20-.41 ExxonMbl2.7694.49+.38 FMC Corp.6058.12-.06 FMC Tech...54.51+.10 FMSA n...14.45+.03 FNBCp PA.4811.87+.07 FS Invest n.89a10.55-.04 FXCM.2414.53-.45 FamilyDlr1.2477.95+.27 FedExCp.80163.88+1.38 FedInvst1.0030.23+1.21 FelCor.0810.15+.06 Ferrellgs2.0026.63-.05 Ferro...12.90-.22 FiatChry n...9.50-.13 FibriaCelu...11.19+.16 FidlNatF n.72u29.31+.33 FNFV Gp n...13.40-.34 FidNatInfo.9655.77+.53 58.com n...38.05-.10 FstAFin n.96u29.68+.77 FstBcpPR...4.71-.09 FstHorizon.2012.04... FMajSilv g...6.76+.11 FstRepBk.5647.58+.50 FT Fincl.64e21.99+.13 FT IndPrd.22e29.07+.19 FT RNG.09e14.97-.31 FirstEngy1.4436.27+.87 Fleetcor...139.10+.63 Flotek...23.11-.57 FlowrsFds.4818.85-.20 Flowserve.6464.31-2.05 Fluor.8464.95+.34 FootLockr.8854.70-.44 FordM.5013.78-.62 ForestCA...20.34-.12 ForestOil...1.06-.09 Fortress.32a6.90+.04 FBHmSec.4841.85+.29 ForumEn...27.38+1.26 FrancoN g.8053.57+.62 FrankRes.4853.41+.52 FranksIntl.60f17.21-.26 FrptMcM1.2530.80-.16 Freescale...18.59+.53 Frontline...1.61-.05 G-H-IGATX1.3261.96+1.33 GNC.6439.47-.42 GabelliET.65e6.41+.02 Gafisa SA.07e2.17+.10 Gallaghr1.4445.80+.43 GamGldNR1.088.98+.12 GameStop1.3242.03+.77 Gannett.8031.43+.19 Gap.8836.89-.25 GasLog.4820.98+.34 GastarExp...3.87-.16 Generac...44.54-.11 GnCable.7213.94-.01 GenDynam2.48u132.50+2.16 GenGrPrp.64f24.65-.13 GenMotors1.2030.04-.89 Genpact...16.98+.22 GenuPrt2.3093.19+.39 Genworth...13.38+.10 Gerdau.14e4.71+.12 Gigamon...13.25+1.66 GlaxoSKln2.46e45.79+.43 GlimchRt.4013.56-.03 GlobalCash...6.90-.07 GlobPay.08u78.58+1.22 Globalstar...2.26-.08 GlobusMed...20.63+.12 GolLinhas...4.71+.30 GoldFLtd.04e3.63+.02 Goldcrp g.6022.25-.08 GoldStr g...d.32-.01 GoldmanS2.40f183.35+3.29 GoodrPet...9.44-.08 GovPrpIT1.7222.84... vjGrace...90.95+1.47 GrafTech...4.68-.04 GramrcyP.145.97-.08 GranTrra g...4.80-.10 GraphPkg...11.40-.10 GtPlainEn.9226.21-.03 GreenbCos.6062.30-.68 Group1.6883.29+.47 GrubHub n...36.00-1.19 GpFnSnMx.96e13.09+.37 GpTelevisa.14e32.84-1.47 Guess.9021.11-.29 GugSPEW1.08e75.92+.54 GulfMrkA1.0028.01-.55 HCA Hldg...72.07+.71 HCP Inc2.1842.87+.06 HSBC2.45e50.66+.21 HalconRes...3.05-.05 Hallibrtn.72f55.78-.07 Hanesbrds1.20109.53+.59 HarleyD1.1063.35+.34 Harman1.32f97.50+1.55 HarmonyG...d1.87-.07 HartfdFn.7237.55+.44 HatterasF2.0018.91+.01 HltCrREIT3.18u68.86+.04 HlthcrRlty1.2025.60-.19 HlthcreTr.58f12.68... HealthNet...45.76-2.39 HeclaM.01e2.36-.01 HelixEn...25.40-.18 HelmPayne2.75f86.98-1.63 Hemisphrx....28-.02 Herbalife...51.60+.37 Hersha.28f6.94+.03 Hershey2.1494.13+.28 Hertz...21.29-.03 Hess1.0082.35+.13 HewlettP.6434.93-.01 Hexcel...40.01-.10 Hi-Crush2.50f51.07-.16 HighwdPrp1.7041.97+.04 Hilton n...24.24+.20 HollyFront1.28a44.68+.20 Honda.82e31.07-.55 HonwllIntl1.8094.70+1.12 Hormel.8052.54+.04 Hornbeck...28.08-.13 Hospira...52.25+.80 HospPT1.9628.88-.07 HostHotls.80f22.69+.14 HovnanE...3.86+.06 HubbelB2.24f108.25+.80 Humana1.12133.11+.48 Huntsmn.5024.50+.03 IAMGld g...2.35+.01 ICICI Bk.77e54.51+.06 IGI Labs...9.39-.01 IMS Hlth n...24.50-1.72 ING...14.32+.13 ION Geoph...2.61-.06 iShGold...11.92-.02 iSAstla.99e24.90+.25 iShBrazil1.55e41.57+1.73 iShCanada.62e29.82+.18 iShEMU.94e36.85+.16 iSFrance.74e25.27+.10 iShGerm.63e26.55... iSh HK.72e21.25... iShItaly.34e14.85+.22 iShJapan.17e11.26+.04 iSh SKor.90e57.58-.05 iSMalasia.52e15.28+.12 iShMexico1.09e66.29-.04 iShSing.45e13.17... iShSoAfr1.54e65.97+.44 iShSpain1.16e37.84+.41 iSTaiwn.26e15.22-.11 iShSilver...16.50... iShS&P1001.66e87.47+.56 iShSPTotUS1.25e89.52+.62 iShSelDiv2.34e75.96+.61 iShTIPS1.80e113.29-.06 iShChinaLC.71e38.64+.14 iShTransp1.14e153.44+1.51 iSCorSP5003.65e197.68+1.40 iShUSAgBd2.40e110.27+.04 iShEMkts.71e41.02+.29 iShiBoxIG4.08e119.75+.05 iShEMBd5.00e114.09+.05 iShIndones.36e27.67-.19 iSSP500Gr1.74e106.74+.80 iShGblHcre1.38e97.79+1.22 iShLatAm.99e35.48+.92 iSSP500Val1.92e89.46+.63 iSh20 yrT3.46e119.72+.12 iSh7-10yTB2.44e105.58+.09 iShIntSelDv1.76e35.43+.27 iSh1-3yTB.27e84.82+.02 iS Eafe2.23e62.23+.34 iSRusMCV1.28e70.55+.32 iSRusMCG1.05e88.36+.68 iSCorSPMid1.48e137.48+.47 iSh10yCBd2.69e60.96+.08 iShiBxHYB5.73e92.79+.26 iShMtgRE1.69e12.24+.02 iShMBS1.83e109.19+.09 iSR1KVal2.01e99.70+.77 iSR1KGr1.23e91.51+.59 iSRus1K1.86e109.63+.78 iSR2KVal1.90e95.61+.16 iShIntCrBd2.76e110.10... iSh1-3CrBd1.37e105.54+.03 iSR2KGr.97e130.95+.31 iShFltRtB.19e50.71-.01 iShR2K1.50e111.07+.19 iShUSPfd2.68e39.65+.05 iSUSAMinV.77eu38.41+.31 iShREst2.59e73.66+.03 iShHmCnst.07e24.10+.11 iShUSEngy.88e48.67-.11 iShCrSPSm1.28e106.04+.23 iShCorEafe1.71e56.55+.24 iShEurope1.54e43.35+.20 ITC Hold s.65f38.26+.53 ITT Corp.4441.45-.75 ITT Ed...8.81-.10 iBio...1.50-.13 Idacorp1.88u59.93+.36 IDEX1.1272.91-.36 ITW1.94f87.98+.64 Imax Corp...28.76+.21 Infoblox...15.25+.41 Infosys1.04e62.18+.69 InfuSystem...u3.99+.36 IngerRd1.0060.26+.25 IngrmM...26.46+1.60 Ingredion1.6875.97+.97 InlandRE.5710.39-.06 IntegrysE2.7270.05+.38 IntcntlExch2.60206.59+3.45 IntlGame.4416.33+.03 IntPap1.60f49.92+.34 IntlRectif...39.48+.20 Interpublic.3818.66+.04 IntPotash...14.32+.52 Invacare.0515.04+1.90 InvenSense...20.48-.94 Invesco1.0038.06+.26 InvMtgCap2.0016.42+.01 IronMtn1.90fu35.60+.82 iSh UK1.26e18.71+.10 iShCorEM.91e49.37+.30 IsoRay...1.89+.45 IsraelCh n...7.04+.11 ItauUnibH.54e13.49+.53 J-K-LJPMorgCh1.6058.74+.68 JPMAlerian2.3351.20+.23 Jabil.3219.43+.12 JacobsEng...47.36+.05 JanusCap.3214.40-.07 Jarden...63.11+.85 JinkoSolar...23.23-.12 JohnJn2.80103.13+.50 JohnsnCtl.8843.57+.81 JonesEngy...11.96-.61 JournalCm...8.94-.02 JoyGlbl.8053.25+.55 Jumei n...22.01-.37 JnprNtwk.4019.00-1.32 KAR Auct1.0029.30+.11 KB Home.1016.43+.16 KBR Inc.3218.93-.10 KKR2.03e22.50+.74 KC Southn1.12120.26+.54 KapStone s...28.30+.23 KateSpade...26.32+.02 Kellogg1.9661.94+.20 Kennamtl.7240.80+.36 KeyEngy...d3.59-.16 Keycorp.2612.79+.09 Keysight wi...29.75+.50 KilroyR1.40u65.40-.10 KimbClk3.36113.10+1.09 Kimco.90u24.07+.18 KindME5.60f95.36+.38 KindMorg1.76f39.03+.35 KindMM5.60t96.16+.76 KindredHlt.4820.59-.07 KingDEn n.46e11.35-.10 Kinross g...2.71-.01 KirbyCp...111.89+1.60 KiteRlty rs1.0425.35+.06 KnightTr.2427.36-.82 Knowles n...19.11-.18 KodiakO g...10.78-.32 Kohls1.5659.09-.11 KoreaElc...22.08+.49 KosmosEn...9.20-.09 Kroger.74f54.19-.10 L Brands1.36a70.01-.83 L-3 Com2.40114.56+.13 LaQuinta n...19.86-.04 LabCp...103.73+1.05 Lannett...49.32+.02 LaredoPet...18.92-.14 LVSands2.0062.75-.48 LaSalleH1.5037.62-.08 Lazard1.2049.25+.32 LeapFrog...d5.72-.16 LearCorp.8090.26+4.70 LeggMason.6450.83+.25 LeggPlat1.24fu37.91+.88 LennarA.1643.76+.45 Lennox1.2087.90... LeucNatl.2523.11+.09 Level3...42.22+.04 LexRltyTr.6810.49-.02 Lexmark1.4440.60-.63 LbtyASE.39e5.74+.02 LibtProp1.9034.22+.18 LifeTFit...52.51+1.61 LifeLock...15.87-.04 LillyEli1.9666.05+1.70 LincNat.6450.60+.86 LinkedIn...202.10-.52 LionsGt g.28f33.00+1.65 LiveNatn...23.54+.04 LloydBkg...4.94+.07 LockhdM6.00f181.33+.66 Loews.2542.50+.31 Lorillard2.4660.67+.21 LaPac...14.84+.15 LumberLiq...d48.94-.21 LyonBas A2.8092.39-1.94 M-N-0M&T Bk2.80116.37+.81 MBIA...9.61+.01 MDC1.0026.33-.03 MDU Res.7127.72+.24 MFA Fncl.808.32+.01 MGIC Inv...8.44+.29 MGM Rsts...22.58+.22 MRC Glbl...21.17-.10 MSC Ind1.60f84.80-.22 MSCI Inc.7246.00+.37 Macerich2.4868.30+.02 MackCali.60d18.98+.06 Macquarie3.80f66.38-.91 Macys1.2558.98+.59 MagellMid2.67f80.63-.63 MagnaInt g1.5296.54+1.96 MagHRes...4.50-.18 Mallinckdt...90.97+1.72 Manitowoc.0819.09-.24 ManngNap.64a16.08+.33 ManpwrGp.98f64.40+.36 Manulife g.62f18.27+.14 MarathnO.84f34.50-.23 MarathPet2.00f85.79+1.26 MVJrGold...30.95-.65 MktVGold.19e20.47-.09 MV OilSvc.54e45.14-.32 MV Semi.66e49.27+.41 MktVRus.74e21.43+.46 MarkWest3.56f72.26+.75 MarshM1.1251.63+.46 MartMM1.60122.93+1.45 Masco.3623.08+.15 Mastec...26.86+.06 MasterCd s.4474.00-.09 MatadorRs...23.13-.18 McCorm1.4869.02+.79 McDrmInt...4.07-.07 McDnlds3.40f91.67+.65 McGrwH1.2084.05+1.15 McKesson.96u200.83+2.08 McEwenM...1.59-.01 MeadJohn1.50103.39+2.73 MeadWvco1.00a42.87+.87 MedProp.8413.11-.10 MedleyCap1.4811.58... Medtrnic1.2266.56+.95 MensW.7245.29+.09 Merck1.7657.61+.98 Meritor...10.95+.21 MerL pfD1.7525.64+.06 MerL pfE1.7825.71+.03 MerL pfF1.8225.79+.07 Metalico...d.56-.10 MetLife1.4050.79+.38 MKors...75.74-.04 MidAApt2.9269.69-.38 MidstsPet...2.93-.28 MindrayM.50e29.31+.03 MinTech.20u69.93+5.85 MitsuUFJ...5.43+.02 MobileTele1.37e13.46-.07 Mobileye n...49.69-.61 Mohawk...134.92-.40 MolinaHlth...44.99-.48 MolsCoorB1.4873.23+1.89 Molycorp...1.26-.01 Monsanto1.96f113.28+.47 MonstrWw...3.85-.11 Moodys1.12u96.94+2.39 MorgStan.4034.32+.36 Mosaic1.0043.36+.92 MotrlaSolu1.36f62.57+.32 MuellerWat.079.21+.01 MurphO1.4052.15-.89 NCR Corp...26.39+1.28 NQ Mobile...8.94+.33 NRG Egy.5629.72+.38 Nabors.24f18.73-.26 NBGreece...2.91+.11 NatFuGas1.5468.91-.53 NatGrid3.48e72.29+.40 NOilVarco1.8473.52-.13 NatRetPrp1.6837.34-.12 Nationstar...33.40+.81 Navios.245.55-.08 NaviosMar1.7716.45-.41 Navistar...34.80+.10 NetSuite...103.61+10.60 NeuStar...25.19-.58 NwGold g...4.28-.05 NwMtnFin1.36a14.45+.10 NewOriEd...22.35+.95 NwResd rs1.40a12.11+.02 NY CmtyB1.0015.55+.16 NY REIT n.4611.29+.04 Newcstl rs...24.09+.35 NewellRub.6834.89+.40 NewfldExp...29.54+.13 NewmtM.1021.95-.05 NewpkRes...10.73-.15 NiSource1.0441.76+.48 NielsenNV1.0042.30+.48 NikeB.9690.90+.53 NobleCorp1.5020.58-.20 NobleEngy.7257.43-1.05 NokiaCp.51e8.34-.06 Nomura...5.60-.01 NordicAm.61r7.80... Nordstrm1.3271.20-.57 NorflkSo2.28109.39+1.52 NA Pall g....15-.00 NAtlDrll n.71e5.85-.13 NoestUt1.57u48.59+.18 NthnO&G...10.73-.42 NorthropG2.80130.79+1.59 NStarRlt2.0017.73... NovaGld g...2.84-.03 Novartis2.72e90.15+.91 NovoNord s.84e45.77+.05 NOW Inc n...28.97-.12 NuSkin1.3849.21+.57 Nucor1.4852.79+1.67 NustarEn4.3865.53+.51 NvCredStr.528.80+.04 NvPfdInco.769.33+.10 OFG Bncp.3214.64-.54 OGE Engy1.00f36.82-.07 OasisPet...30.44-.49 OcciPet2.8889.52-1.49 Oceaneerg1.0865.44-.06 Och-Ziff1.77e11.12+.15 OcwenFn...19.27-.24 Oi SA C....46+.02 Oi SA....45+.04 OilStates...60.18+.14 OldRepub.7314.42-.13 Olin.8023.28-1.62 OmegaHlt2.08f38.75-.25 Omncre.80u66.45+2.37 Omnicom2.0070.19+.80 ONEOK2.36f61.01+.55 OneokPtrs3.10f53.17+.42 OpkoHlth...8.40+.04 Oracle.4838.73+.50 Orange.96e14.77+.35 OrbitalSci...29.03-.25 Orbitz...8.26-.03 Organovo...5.91+.05 OwensMin1.0033.74+.16 OwensCorn.6431.96+.30 OwensIll...25.76+.09 P-Q-RPBF Engy1.2024.16+.11 PG&E Cp1.8247.17+.98 PNC1.9282.52+.96 PPG2.68195.85+.95 PPL Cap 731.4824.74+.12 PPL Corp1.4934.53+.18 PVH Corp.15117.00+3.01 PacDrillng...7.40-.23 PackAmer1.6069.68+.21 PallCorp1.22f87.84+1.15 PaloAltNet...u108.06+.61 PampaEng...10.51+.06 Pandora...d20.00-3.12 ParagOff n...4.99-.02 ParkDrl...4.54-.31 ParkerHan2.52f116.57+.18 ParsleyE n...17.31-.18 PeabdyE.3410.40-.03 Pearson.82e18.43-.28 Pebblebrk.92u40.72-.02 Pengrth g.484.09-.03 PennVa...7.91-.10 PennWst g.564.74-.16 Penney...7.59-.14 PennyMac2.44f21.29+.02 Pentair1.2066.93+.58 PepcoHold1.0827.10+.10 PerkElm.2841.72+.59 Perrigo.42155.15+1.24 PetChina5.25e123.57-.46 PetrbrsA.85e13.46+1.10 Petrobras.46e12.93+.82 PtroqstE...4.27-.20 Pfizer1.0429.11+.51 PhilipMor4.00f88.06+.44 PhilipsNV1.10e27.00+.29 Phillips662.0076.49+.37 PhysRltTr.9014.87+.11 PiedmOfc.8018.98+.11 Pier 1.2412.46... Pike Corp...11.97... PimDyCrd1.8822.26+.07 PimcoHiI1.4612.33+.07 PinnclEnt...24.46+.48 PinWst2.38f59.17+.07 PionEnSvc...11.06-.55 PioNtrl.08181.11-2.83 PitnyBw.7524.55+.05 PlainsAAP2.64f56.11-.02 PlainsGP.76f27.96-.14 PlatfmSp n...25.87-.21 PlumCrk1.7641.25-.05 Polaris1.92146.18-1.16 PolyOne.40f36.24-.37 PortGE1.12u35.54-.08 PortglTel.14e1.34-.01 PostPrp1.6054.39-.80 Potash1.4033.96+1.42 PwshDB...22.16-.14 PS Engy...24.28-.18 PS PrcMet...38.61-.07 PS Agri...25.71-.21 PS USDBull...22.78-.04 PwSIntlDv.68e18.13+.11 PS SrLoan1.00e24.30+.01 PS SP LwV.83eu35.76+.27 PwShPfd.90e14.54+.01 PShEMSov1.29e28.94-.02 PSIndia.18e21.98+.19 Praxair2.60127.72+1.14 PrecCastpt.12223.47-.59 PrecDrill.248.85-.18 PremGlbSv...10.48-1.30 PrinFncl1.36f50.35-.25 ProLogis1.3240.73+.28 ProShtDow...24.91-.20 ProShtQQQ...15.70-.12 ProShtS&P...23.03-.17 ProUltQQQ.18e124.54+1.87 ProUltSP.26e116.53+1.67 ProUShD30...25.30-.57 ProShtR2K...16.83-.04 ProSht20Tr...26.82-.02 PUltSP500.14e115.07+2.38 PUVixST rs...30.22-.73 ProVixSTF...22.06-.24 PrShtVix s...63.43+.67 PrUltCrude...24.39-.27 PrUShCrde...37.33+.41 ProUShEuro...19.80-.05 ProctGam2.57u85.16+1.93 ProgsvCp1.00e25.87+.44 ProUShSP...24.62-.36 PrUShDow...24.93-.40 PUShQQQ rs...44.07-.67 ProUShL20...52.59-.10 PUSR2K rs...47.16-.20 PUShSPX rs...45.09-1.00 PUltShOG...48.15+.22 ProtLife.9669.55+.10 ProtoLabs...61.43-1.49 Provectus....95+.01 Prudentl2.1284.58+1.33 PSEG1.4839.57+.70 PubStrg5.60175.97-.75 PulteGrp.32f19.54+.03 QEP Res.0824.32-.21 QR Energy1.9516.41-.16 Qihoo360...68.19-.01 QuantaSvc...32.82+.35 QntmDSS...1.13+.02 QstDiag1.3263.76+.88 Questar.7623.33-.01 QksilvRes....56-.06 Quiksilvr...1.75+.03 QuintTrn...57.56+.57 RAIT Fin.727.24-.17 RLJ LodgT1.20f31.20+.19 RPC.4216.87-.30 RPM1.04f44.31+.47 RSP Per n...24.33-.18 Rackspace...36.10+.35 RadianGrp.0115.33+.15 RadioShk....97-.07 RLauren1.80160.25-.93 RamcoG.80f16.88-.02 RangeRs.1666.62-1.99 RJamesFn.6453.20+.33 RayAdvM n.2829.10+.27 Rayonier1.20a32.76-.15 Raytheon2.4298.12-.76 Realogy...39.69+.18 RltyInco2.2044.97+.02 RedHat...56.02+.51 RegalEnt.8820.20+.31 RgcyCtrs1.88u58.74+.02 RegncyEn1.96f31.41-.11 RegionsFn.209.44+.03 RelStlAl1.4065.10+1.56 ReneSola...2.44-.04 Renren...3.41+.06 RepubSvc1.12f39.24+.05 ResMed1.1252.02+4.32 ResoluteEn...3.75+.01 ResrceCap.805.15-.02 RestorHdw...77.45+.68 RetailProp.6615.57+.02 RexAmRes...67.60-1.47 RexahnPh....76-.00 ReynAmer2.6861.55+.56 RhinoRes.20md4.07+.19 RiceEngy n...24.71-.49 RingCentrl...11.25-.25 RioTinto2.05e49.04-.12 RiteAid...4.76-.10 RobtHalf.7250.84-.09 RockTen s.75f50.49+.52 RockwlAut2.32109.31+1.64 RockColl1.2079.12+.93 Roper.80151.18+.65 Roundys...3.12-.07 Rowan.4023.70-.14 RoyalBk g3.00f70.62+.23 RBScotlnd...11.81+.07 RylCarb1.20f64.55+2.26 RoyDShllB3.7674.09+.14 RoyDShllA3.7670.90+.07 Rubicon g...1.08-.01 RubiconP n...10.96+.77 RubyTues...7.47+.08 RuckusW...12.17-.04 Ryder1.4884.84+.54 Ryland.1235.97+.19 S-T-USAP SE1.38e65.68-.48 SCANA2.1053.33+.28 SLGreen2.00u112.17-.56 SM Energy.1060.34-.93 SpdrDJIA3.58e167.74+1.29 SpdrGold...118.35-.17 SpdrEuro501.27e37.76+.18 SpdrIntRE1.96e41.78+.10 SP Mid2.23e250.76+.96 S&P500ETF3.68e196.43+1.50 SpdrBiot1.55e167.23+1.92 Spdr Div2.97e76.52+.53 SpdrHome.16e30.76+.07 SpdrS&PBk.45e31.32+.09 SpdrWilRE2.55e85.69-.08 SpdrBarcCv1.62e49.01+.36 SpdrShTHiY1.54e29.92+.04 SpdrLehHY2.87e40.44+.16 SpdrSTCpBd.34e30.74-.04 SpdrLe1-3bll...45.74... SpdrS&P RB.62e37.67-.01 SpdrRetl.69e85.94-.17 SpdrOGEx.55e58.95-.74 SpdrMetM.54e34.77+.28 STMicro.407.03+.06 SABESP.31e7.38+.15 SafeBulk.245.47-.50 Safeway.9234.12+.01 StJoe...19.68-.42 StJude1.0860.47+.45 Salesforce...59.57+1.69 SallyBty...29.07-.01 SanchezEn...17.79-1.07 SandRdge...3.95-.13 SandstG g...3.81-.21 Sanofi1.91e54.02+.49 SantCUSA n.15p17.99-.01 Schlmbrg1.6097.24-1.02 SchwUSMkt.86e47.50+.34 SchwUSLgC.86e46.89+.34 SchwUSDiv1.01e38.31+.35 SchwIntEq.70e30.12+.15 Schwab.2426.69+.16 ScorpioB n...4.72... ScorpioTk.40f8.21+.26 ScrippsNet.8076.18+.70 SeabGld g...7.69-.13 SeadrillLtd4.0023.69-.45 SealAir.5233.50+.50 SeaWorld.8418.60+.05 SelMedHld.4012.74-.08 SemGroup1.08f76.99+.24 SempraEn2.64107.86+1.22 SenHous1.5622.11-.08 SensataT...46.33+.51 ServiceCp.36f21.86+.03 ServcNow...65.45+.91 SevSevE n...15.26-.33 Sherwin2.20228.91+3.10 SibanyeG.47e8.55+.16 SiderurNac.27e3.61+.21 SignetJwlrs.72115.83+2.79 SilvWhtn g.29e19.74+.03 SilvrcpM g.021.53-.01 SimonProp5.20172.86+.42 SixFlags2.08f39.41+.35 Skechers...50.39-.51 Smucker2.56102.34+.59 SolarWinds...42.93+1.03 Solera.78f52.46-.14 SonocoP1.2840.78+.21 SonyCp...17.72-.15 Sothebys.40a37.68+.08 SouFun s1.00e10.01-.24 SouthnCo2.1047.41+.20 SthnCopper.46e29.26-.03 SwstAirl.2433.87+.62 SwstnEngy...d31.64-1.61 Spansion...17.66+.27 SpectraEn1.3438.90+.10 SpiritAero...38.03+.30 SpiritRltC.6611.63-.01 Sprint...6.08-.01 STAG Indl1.3223.61+.02 SP Matls.95e48.28+.36 SP HlthC.87e65.21+.90 SP CnSt1.14e45.91+.38 SP Consum.91e66.35-.06 SP Engy1.77e85.60-.30 SPDR Fncl.37e23.10+.22 SP Inds.98e53.71+.47 SP Tech.68e39.25+.34 SP Util1.48eu44.53+.43 StdPac...7.96+.05 StanBlkDk2.0890.12+1.14 StarwdHtl1.40a80.02+1.12 StarwdPT1.9222.27-.09 StateStr1.2071.88+2.94 Statoil ASA1.66e23.71+.03 Steris.92f59.60-.75 StillwtrM...13.82-.02 StoneEngy...24.04-1.20 StratHotels...12.36+.05 Stryker1.2284.22+.69 SumitMitsu...7.54+.08 SunCokeE.06p22.19+1.05 Suncor g.9234.61-.05 SunEdison...18.87+.18 SunstnHtl.2014.90-.01 SupEnrgy.3225.58-.13 Supvalu...8.08-.03 SusserPet2.08f46.00+.69 SwERCmTR...7.34-.03 SwftEng...d6.55-.31 SwiftTrans...23.88+1.48 Synchrny n...u26.11+.30 SynergyRs...10.88-.01 Synovus rs.2824.41+.51 SynthBiol...1.58-.19 Sysco1.1638.04+.11 T-MobileUS...28.12+.35 TAL Educ...32.83+.51 TCF Fncl.2014.68-.53 TCW Strat.265.42-.03 TD Ameritr.48a31.31+.05 TE Connect1.1656.27+.97 TIM Part.39e22.77+.36 TJX.7062.08-.26 TRWAuto...100.75-.30 TableauA...77.90+2.84 TaiwSemi.50e21.18-.12 TalismE g.276.52-.19 Taminco...25.75+.02 TangerFac.9635.29-.10 TargaRsLP3.19f63.66-.09 Target2.08f61.57-.46 TataMotors.17e45.59+.15 TaylorMH...17.83-.27 TeckRes g.9015.87-.02 TelItaliaA.38e8.35+.09 Teledyne...99.42+3.45 TelefBrasil1.21e18.92+.29 TelefEsp1.03e14.49+.05 TempurSly...56.89-.31 Tenaris.86e39.02... TenetHlth...58.22+.13 Tenneco...54.56+.85 Teradata...40.69+.82 Teradyn.2418.11+.29 Terex.2029.55+.10 Tesoro1.20f65.68+.39 TesoroLog2.57f58.35+.40 TevaPhrm1.37e53.62+.02 Textron.0838.76+.60 TherapMD...4.25+.02 ThermoFis.60117.90+1.67 ThirdPtRe...14.69+.16 ThomCrk g...1.90-.07 ThomsonR1.3236.95+.82 3D Sys...37.07-.30 3M Co3.42u148.59+3.54 Tidwtr1.0035.54-.58 Tiffany1.5294.44+.04 THorton g1.2879.37+.74 Time n...20.94+.56 TW Cable3.00142.98+2.05 TimeWarn1.27b78.77+.58 Timken1.0041.57+.15 Titan Intl.029.82+.09 TollBros...32.47+.05 Torchmrk s.5151.25+.68 TorDBk gs1.8848.36+.04 Total SA3.25e57.21-.49 TotalSys.4030.92+.18 TrCda g1.9248.40+.47 Transocn3.0030.21-.26 Travelers2.20u97.73+.96 Trex s...36.78+1.38 TriPointe...13.78-.03 TriangPet...8.10-.14 TrinaSolar...10.18... TriNet n...28.25+.07 Trinity s.4035.54-.92 Trulia...44.93-1.16 Tsakos.206.52+.20 Tuppwre2.7264.10+.56 TurqHillRs...3.12-.06 Twitter n...49.95+.28 TwoHrbInv1.0410.10-.01 TycoIntl.7241.59+.56 TylerTech...u106.57+2.31 Tyson.3038.74+.42 UBS AG.28e16.45+.11 UDR1.0429.33-.27 UGI Cp s.87f36.77+.15 US Silica.5050.59-.05 USG...26.91+.40 UltraPt g...22.41-.64 Ultrapar.61e20.12+.91 UndArmr s...64.25-.09 UnilevNV1.50e37.21+.01 Unilever1.50e38.97-.17 UnionPac s2.00fu114.58+2.35 Unisys...23.69+.09 UtdContl...49.62+.20 UtdMicro.08e2.01... UPS B2.68100.59+.11 UtdRentals...107.96+.55 US Bancrp.9840.91+.50 US NGas...19.36-.16 US OilFd...30.88-.18 USSteel.2036.92+.16 UtdTech2.36103.82+.64 UtdhlthGp1.50u91.64+.98 UnivHlthS.40f108.59+2.01 UnumGrp.6633.92+.27 UraniumEn...1.11-.07 V-W-X-Y-ZVF Corp s1.28f66.50+.26 VaalcoE...7.54-.77 Vale SA.84e11.16+.33 Vale SA pf.72e9.61+.25 ValeantPh...129.13+1.11 ValeroE1.1048.62+.61 VlyNBcp.449.67+.03 Valmont1.50d132.06-6.29 VangIntBd3.08e85.34-.02 VangSTBd1.13e80.43-.05 VangTotBd2.17e82.66+.07 VanHiDvY1.87e66.39+.54 VangGrth1.20e99.86+.57 VangMidC1.30e117.95+.96 VangTSM1.92e101.15+.70 VangValu1.85e80.61+.71 VanSP500 rs3.40e180.08+1.34 VangREIT2.78e77.05-.06 VangDivAp1.52e77.06+.48 VangTotW1.57e59.35+.31 VangAllW1.67e48.05+.32 VangEmg1.21e41.47+.39 VangPacif1.68e58.40+.29 VangEur2.37e53.24+.22 VangFTSE1.38e38.59+.16 VantageDrl....99+.02 Vantiv...32.08+.48 VarianMed...80.74+1.05 Ventas2.9066.97-.87 VeriFone...34.41+.36 VerizonCm2.20f48.77+.55 Versar...3.43+.15 ViolinMem...4.46+.08 Vipshop...213.59+3.23 VirnetX...5.60+.14 Visa1.92f213.48-.80 VishayInt.2413.88... Visteon...93.22+.08 VMware...83.84+1.31 VoceraCm...9.03+.28 Vonage...3.37-.01 Vornado2.92107.42-.14 VoyaFincl.0437.87+.26 VoyaPrRTr.345.41+.02 VulcanM.2461.25+1.01 W&T Off.40a9.10-.18 WPX Engy...18.94-.22 Wabash...12.47+.20 WABCO...97.94+2.76 Wabtec.2479.29+.21 WaddellR1.3647.35+.07 Walgrn1.3562.65+.58 WalterEn.042.19-.06 WashPrm n1.0017.33+.23 WREIT1.2027.58+.40 WsteMInc1.5047.96+.07 Waters...108.21+.87 Wayfair n...25.16-.85 WeathfIntl...17.16+.29 WtWatch...28.39-.11 WeinRlt1.30u34.72+.16 WellPoint1.75120.21+.44 WellsFargo1.4051.20+.60 Wesco Intl...77.14-.79 WestarEn1.4036.79+.24 WstAstMtg4.39e14.80+.05 WAstInfOpp.4011.47-.08 WstnRefin1.20f43.50-.44 WstnUnion.5016.47+.06 WestlkCh s.66f74.28-1.40 Weyerhsr1.1633.89+.15 Whrlpl3.00158.62+.92 WhiteWave...36.15+.56 WhitingPet...61.66-1.74 Willbros...5.55+.36 WmsCos2.24f53.24+.14 WmsPtrs3.71f50.00-.47 WmsSon1.3264.38-.81 WillisGp1.2040.58+.08 Wipro.13e11.56+.04 WiscEngy1.5648.62+.25 WT EurHdg.96e55.23+.08 WTJpHedg1.54e49.16+.10 WT EmEq2.14e46.73+.34 WT India.16e22.52+.20 WolvWW s.2426.49-.03 Workday...89.51+3.78 WldW Ent.4813.27-.07 WuXi...36.75+.36 Wyndham1.4076.32-2.08 XL Grp.6432.75+.27 XPO Logis...38.46+.28 XcelEngy1.20u32.90+.20 Xylem.5135.34+.29 YPF Soc.15e32.15+.03 Yamana g.155.62+.04 Yelp...59.42+2.25 YingliGrn...2.92-.03 YoukuTud...18.79-.18 YumBrnds1.64f69.88+.63 ZayoGrp n...u22.87+.12 Zimmer.88105.29+.72 Zoetis.2936.58+.47 Beyond coffeeStarbucks delivers its latest quarterly report card on Thursday. Financial analysts anticipate that the coffee chain will report that earnings and revenue improved from a year earlier. Starbucks sales at its U.S. cafes have grown this year, aided by a retooled slate of food offerings. The focus on food comes as the company aims to convince more customers to get something to eat when they come in for a drink.Mobile appealStrong, steady growth in mobile advertising revenue has lifted Facebooks earnings this year. The trend illustrates how the company is succeeding in steering advertisers to its mobile platform at a time when most of its users are using mobile devices to access the social network. Facebook also has benefited from a pickup in users. The company reports third-quarter financial results on Tuesday.The Fed speaksThe latest Federal Reserve meeting could provide insight into the central banks plans for its interest rate policy. The Fed is also scheduled to issue an updated economic forecast on Wednesday following a two-day meeting of its policymaking committee. Wall Street will be listening for any new clues as to when the Fed plans to start raising its benchmark short-term interest rate, which has been near zero since December 2008. Source: FactSetPrice-earnings ratio: 88based on past 12 months results 40 50 60 70 $80 3Q Operating EPS 3Q est.$0.25 $0.40 FB $80.67 $51.90Source: FactSetPrice-earnings ratio: 253based on past 12 months resultsDividend: $1.04 Div. Yield: 1.4% 65 70 75 80 $85 4Q Operating EPS 4Q est.$0.60 $0.74 SBUX$75.81 $40.41 Today 1,840 1,880 1,920 1,960 2,000 2,040 O MJJAS 1,800 1,900 2,000 S&P 500Close: 1,964.58 Change: 13.76 (0.7%) 10 DAYS 16,000 16,400 16,800 17,200 17,600 O MJJAS 15,840 16,340 16,840 Dow Jones industrialsClose: 16,805.41 Change: 127.51 (0.8%) 10 DAYS Advanced1948 Declined1181 New Highs89 New Lows25 Vol. (in mil.)2,999 Pvs. Volume3,691 1,697 1,893 1496 1140 51 47NYSE NASDDOW16811.7116649.7216805.41+127.51+0.76%+1.38% DOW Trans.8570.168471.618568.98+82.62+0.97%+15.79% DOW Util.585.08577.47583.70+6.67+1.16%+18.98% NYSE Comp.10586.6110496.8110582.61+63.33+0.60%+1.75% NASDAQ4486.264445.854483.72+30.93+0.69%+7.35% S&P 5001965.271946.271964.58+13.76+0.71%+6.29% S&P 4001377.721367.311377.33+5.04+0.37%+2.59% Wilshire 500020696.5320511.4620690.13+126.14+0.61%+4.99% Russell 20001119.131113.051118.82+2.33+0.21%-3.85%HIGH LOW CLOSE CHG. %CHG. YTD StocksRecap AT&T Inc T31.74437.48 33.87+.21 +0.6ttt-3.7+0.6101.84 Advance Auto Parts AAP96.580143.61 142.04+1.26 +0.9sss+28.3+41.3210.24 Amer Express AXP78.41596.24 86.40+.79 +0.9stt-4.8+7.4161.04 AutoNation Inc AN46.16561.29 52.56+.45 +0.9sss+5.8+7.317... Brown & Brown BRO27.76733.69 31.48+.22 +0.7ttt+0.3-4.4200.44f CocaCola Co KO36.89644.87 41.03+.17 +0.4ttt-0.7+7.6221.22 Comcast Corp A CMCSA46.58857.49 54.26+1.04 +2.0sss+4.4+15.2170.90 Darden Rest DRI43.56754.89 51.05+.75 +1.5stt-6.1+2.9342.20 Disney DIS66.72991.20 88.61+.62 +0.7stt+16.0+30.4210.86f Gen Electric GE23.69528.09 25.64+.20 +0.8srs-8.5+2.4180.88 General Mills GIS46.70555.64 51.03+.52 +1.0sss+2.2+4.2171.64 Harris Corp HRS58.83579.32 67.33+.56 +0.8sts-3.6+12.4141.88 Home Depot HD73.96095.52 94.99+.19 +0.2sss+15.4+28.7231.88 IBM IBM161.101199.21 162.08-.10 -0.1ttt-13.6-5.4134.40 Lowes Cos LOW44.13055.19 55.33+.37 +0.7sss+11.7+13.3230.92 NY Times NYT11.22317.37 12.91-.21 -1.6sss-18.7-3.0350.16 NextEra Energy NEE81.529102.51 98.36+.56 +0.6sss+14.9+18.3212.90 PepsiCo PEP77.01096.22 94.60+.84 +0.9sss+14.1+15.5212.62 Suntrust Bks STI33.09641.26 37.41+.32 +0.9stt+1.6+11.8120.80 TECO Energy TE16.12019.33 19.27+.06 +0.3sss+11.8+16.6190.88 WalMart Strs WMT72.27581.37 76.38+.13 +0.2stt-2.9+3.0161.92 Xerox Corp XRX9.55714.15 12.55-.23 -1.8ttt+3.1+21.4130.2552-WK RANGE CLOSEYTD 1YR NAME TICKER LO HI CLOSE CHG %CHG WK MO QTR %CHG %RTN P/E DIVStocks of Local Interest Saturday, October 25, 2014 DAILY COMMERCIAL B5 PAGE 14 B6 DAILY COMMERCIAL Saturday, October 25, 2014 StIncInvA m 10.24+.01+3.9 StrIncIns 10.24+.01+4.2Brown AdvisoryGrEqInv d 19.07+.14+5.8Brown Cap MgmtSmCo Is b 70.12-.11-2.4BuffaloFlexibInc d 14.62+.08+6.2 SmallCap d 32.74+.19-9.5CG Capital MarketsLgCapGro 21.83+.16+11.4 LgCapVal 12.95+.08+10.1CRMMdCpVlIns 34.63+.26+8.5CalamosGrowA m 48.53+.25+9.1 MktNeuI 12.89+.02+2.6CalvertEquityA m 50.21+.27+13.3CausewayIntlVlIns d 15.29...-2.9Center Coast CapitalMLPFcsI 11.82...+11.7Cohen & SteersCSPSI 13.65+.02+11.4 Realty 74.72-.11+14.3 RealtyIns 48.69-.07+14.4ColumbiaAMTFrImMuBdZ 10.84+.01+6.8 AcornA m 33.96+.15+1.1 AcornIntZ 44.62+.06-1.1 AcornZ 35.54+.16+1.4 CAModA m 11.83+.03+5.4 CAModAgrA m 12.95+.05+5.8 CntrnCoreA m 21.93+.15+14.0 CntrnCoreZ 22.08+.15+14.3 ComInfoA m 56.73+.06+23.2 DivIncA m 19.32+.16+12.5 DivIncZ 19.34+.16+12.9 DivOppA m 10.63+.08+10.6 DivrEqInA m 14.36+.10+12.6 IncOppA m 10.13+.01+5.5 LgCpGrowA m 35.56+.24+12.6 LgCrQuantA m 9.22+.07+15.5 MdCapIdxZ 15.33+.06+8.0 MdCpValZ 17.83+.09+15.4 SIIncZ 9.97...+1.1 ShrTrmMuniBdZ 10.47...+1.0 SmCapIdxZ 22.33+.04+2.5 StLgCpGrZ 18.65+.18+12.1 TaxExmptA m 14.06+.01+10.0 ValRestrZ 52.24+.36+13.9ConstellationSndsSelGrI 18.46+.06+7.8 SndsSelGrII 18.01+.07+7.6Credit SuisseComStrInstl 6.70-.04-8.5CullenHiDivEqI d 17.32+.13+11.9DFA1YrFixInI 10.33...+0.4 2YrGlbFII 10.02...+0.5 5YearGovI 10.72...+1.2 5YrGlbFII 11.10+.01+2.4 EmMkCrEqI 19.59+.04-0.8 EmMktValI 27.39+.09-2.7 EmMtSmCpI 21.13-.03+3.2 EmgMktI 25.90+.07-1.5 GlAl6040I 15.65+.05+4.3 GlEqInst 18.01+.08+5.7 GlblRlEstSecsI 10.37...+10.4 InfPrtScI 11.79...+1.6 IntCorEqI 11.92+.03-3.4 IntGovFII 12.66+.01+3.5 IntRlEstI 5.51+.01+4.6 IntSmCapI 19.29+.04-2.4 IntlSCoI 18.04+.04-3.2 IntlValu3 15.92+.06-4.0 IntlValuI 18.08+.07-4.2 ItmTExtQI 10.85+.01+6.3 LgCapIntI 21.11+.07-2.7 RelEstScI 31.39-.03+14.5 STEtdQltI 10.89+.01+1.8 STMuniBdI 10.24...+1.1 TAUSCrE2I 13.76+.08+10.2 TAWexUSCE 9.74+.02-3.1 TMIntlVal 14.83+.06-4.6 TMMkWVal 24.61+.17+11.6 TMMkWVal2 23.72+.16+11.7 TMUSEq 21.27+.14+12.7 TMUSTarVal 31.99+.09+5.9 TMUSmCp 35.21+.06+2.2 USCorEq1I 17.19+.10+11.3 USCorEq2I 16.80+.09+10.1 USLgCo 15.51+.11+14.3 USLgVal3 24.66+.17+12.7 USLgValI 32.90+.24+12.7 USMicroI 19.06+.02+1.0 USSmValI 34.22+.03+3.6 USSmallI 29.86+.05+2.3 USTgtValInst 22.26+.06+4.7 USVecEqI 16.43+.06+7.6DWS-ScudderSP500IRew 27.88...+13.8DavisNYVentA m 38.80+.15+8.1 NYVentC m 36.85+.14+7.3 NYVentY 39.34+.15+8.4Delaware InvestDiverIncA m 9.10...+5.4 OpFixIncI 9.72...+3.8 USGrowIs 26.39+.18+12.3 ValueI 17.42+.11+14.2DeutscheCoreEqS 24.54+.13+12.9 GNMAS x 14.55-.04+5.0ManagedMnplBdA m 9.41+.01+10.1ManagedMnplBdS 9.42+.01+10.3Diamond HillLngShortI 23.24+.07+6.5 LrgCapI 22.40+.15+9.0Dodge & CoxBal 101.56+.57+10.8 GlbStock 12.09+.09+10.3 Income 13.91+.01+5.6 IntlStk 43.70+.26+4.3 Stock 175.62+1.45+13.1DoubleLineCrFxdIncI 11.04...+5.8 TotRetBdN b 11.02...+4.7DreyfusAppreciaInv 54.47+.31+10.0 BasSP500 40.46+.28+14.2 FdInc 12.31+.10+11.7 IntlStkI 14.99+.02-4.5 MidCapIdx 37.99+.14+7.8 MuniBd 11.84+.02+9.2 SP500Idx 52.56+.37+13.9 SmCapIdx 28.94+.06+2.4DriehausActiveInc 10.51-.01+0.1 EmMktGr d 31.83+.01-3.1Eaton VanceACSmCpI 24.56+.16+4.7 FloatRateA m 9.29+.01+1.6 FltRtAdvA m 10.90...+2.1 FltgRtI 8.99+.01+1.9 GlbMacroI 9.32...+3.0 IncBosA m 6.02...+5.3 IncBosI 6.02...+5.6 LrgCpValA m 25.45+.15+12.6 LrgCpValI 25.51+.14+12.8 NatlMuniA m 9.92+.01+13.1FMILgCap 22.03+.22+10.8FPACres d 33.75+.14+7.6 NewInc d 10.20...+1.5Fairholme FundsFairhome d 37.36+.45-2.7FederatedEqIncB m 24.10+.16+8.2 InstHiYIn d 10.17...+5.7 KaufmanA m 6.39+.04+10.9 KaufmanR m 6.40+.04+10.9 MuniUShIS 10.05...+1.0 StrValA f 6.13+.03+12.5 StrValI 6.16+.04+12.9 ToRetIs 11.11+.01+4.9 UltraIs 9.16...+1.3FidelityAstMgr20 13.61+.02+4.0 AstMgr50 17.99+.05+5.8 AstMgr85 17.65+.08+7.0 Bal 22.56+.12+11.0 Bal K 22.56+.12+11.1 BlChGrow 65.47+.39+15.4 BlChGrowK 65.54+.39+15.5 CAMuInc d 13.08+.01+9.6 Canada d 60.83+.19+6.6 CapApr 38.76+.40+14.9 CapInc d 10.04+.02+9.2 Contra 100.21+.55+10.7 ContraK 100.22+.54+10.8 ConvSec 32.04-.01+9.7 CpApprctK 38.84+.40+15.1 DivGrow 32.92+.23+12.6 DivGrowK 32.90+.23+12.7 DivrIntl d 35.21+.07-1.1 DivrIntlK d 35.19+.08-1.0 EmgMkt d 24.53+.090.0 EqInc 60.70+.46+9.7 EqInc II 25.63+.20+11.6 EqIncK 60.69+.47+9.8 ExpMulNat d 20.55+.16+9.7 FF2015 12.71+.04+5.4 FF2035 13.27+.07+6.3 FF2040 9.35+.05+6.3 Fidelity 42.34+.37+12.7 FltRtHiIn d 9.81+.01+2.1 FocStk 20.02+.17+6.8 FourInOne 36.83+.16+7.2 Fr2045 10.52+.05+6.3 Fr2050 10.56+.05+6.3 FrdmK2010 13.43+.03+5.0 FrdmK2015 13.74+.05+5.5 FrdmK2020 14.36+.05+5.7 FrdmK2025 14.91+.06+6.1 FrdmK2030 15.19+.07+6.4 FrdmK2035 15.60+.07+6.3 FrdmK2040 15.65+.08+6.4 FrdmK2045 16.05+.08+6.4 FrdmK2050 16.15+.08+6.5 FrdmKInc 11.91+.02+3.9 Free2010 15.54+.04+4.9 Free2020 15.47+.06+5.6 Free2025 13.20+.05+6.0 Free2030 16.16+.07+6.3 FreeInc 11.65+.02+3.8 GNMA 11.64+.01+4.3 GexUSIdx 11.88+.04-2.6 GovtInc 10.49...+3.7 GrStr d 30.29+.27+13.7 GrowCo 128.75+1.00+12.7 GrowInc 29.15+.20+11.3 GrthCmpK 128.69+1.00+12.9 HiInc d 9.27...+4.7 Indepndnc 39.43+.22+15.6 InfProtBd 12.34...+1.6 IntBond 10.99...+2.9 IntMuniInc d 10.57+.01+6.2 IntlDisc d 37.81+.04-3.8 IntlSmCpF 15.01+.05-2.1 InvGrdBd 7.93...+4.7 LargeCap 27.99+.20+13.7 LevCoSt d 44.24+.19+7.2 LowPrStkK d 48.78+.18+8.0 LowPriStk d 48.81+.18+7.9 MAMuInc d 12.50+.01+8.9 Magellan 94.19+.66+15.0 MagellanK 94.12+.66+15.1 MdCpVal d 24.14+.20+16.1 MeCpSto 16.05+.11+13.1 MidCap d 37.93+.25+8.3 MidCapK d 37.95+.24+8.4 MuniInc d 13.51+.01+9.7 NYMuInc d 13.61+.01+9.1 NewMille 40.57+.31+9.9 NewMktIn d 16.21...+5.9 OTC 77.80+.15+14.9 OTCK 78.53+.15+15.1 Overseas d 38.05+.06-1.9 Puritan 21.10+.11+11.2 PuritanK 21.09+.11+11.3 RealInv d 38.78-.05+14.3 RelEstInc d 11.76...+9.1 SASEqF 14.88+.11+14.0 SCOppF 12.29...-0.2 SEMF 17.41+.05-0.2 SInvGrBdF 11.47...+4.7 STMIdxF d 57.62+.37+12.7 Series100Idx 13.00+.09+14.6 SersEmgMkts 17.35+.05-0.4 SesAl-SctrEqt 14.87+.10+13.8 SesInmGrdBd 11.46...+4.5 ShTmBond 8.62+.01+1.3 SmCapDisc d 29.34+.13+1.9 SmCapStk d 19.06+.09+5.3 SmCpOpp 12.22...-0.4 SmCpVal d 17.58+.08+1.9 StkSelec 37.91+.24+12.2 StrDivInc 14.95+.06+11.4 StratInc 11.06...+4.7 TaxFrB d 11.69+.01+9.9 TotalBd 10.74...+4.8 Trend 91.03+.52+14.3 USBdIdx 11.73+.01+4.3 USBdIdx 11.73+.01+4.2 USBdIdxF 11.73+.01+4.3 USBdIdxInv 11.73...+4.1 ValK 109.96+.61+11.3 Value 109.79+.61+11.2 Worldwid d 24.12+.13+2.2Fidelity AdvisorAstMgr70 21.19+.08+6.4 CapDevO 16.42+.12+11.5 DivStk 24.54+.19+13.7 EmMktIncI d 13.88-.01+5.7 FltRateI d 9.80...+2.1 Fr2020A m 13.53+.04+5.3 Fr2025A m 13.32+.05+5.8 Fr2030A m 14.18+.06+6.0 GrowOppT m 59.73+.50+9.3 HlthCrC m 31.39+.43+34.0 LeverA m 54.72+.22+7.3 NewInsA m 27.66+.22+9.5 NewInsC m 25.54+.21+8.7 NewInsI 28.18+.22+9.7 NewInsT m 27.11+.22+9.2 StratIncA m 12.34...+4.5 StratIncC m 12.31+.01+3.7 StratIncI 12.51+.01+4.7Fidelity SelectBiotech d 227.22+3.81+29.9 Chemical d 148.02+.33+9.7 ConsStpl d 94.97+.67+11.2 Electron d 76.01+.81+31.2 Energy d 51.78-.23-3.7 HealtCar d 222.31+3.02+35.5 MedEqSys d 39.23+.60+22.4 Pharm d 21.62+.23+28.7 SoftwCom d 115.43+.65+11.7 Tech d 119.93+.63+13.2Fidelity Spartan500IdxAdvtg 69.75+.48+14.4 500IdxAdvtgInst 69.76+.49+14.4 500IdxInstl 69.76+.49+14.4 500IdxInv 69.75+.49+14.3 ExtMktIdAg d 53.50+.24+6.2 ExtMktIdI d 53.49+.24+6.1 IntlIdxAdg d 38.56+.08-3.4 IntlIdxAdvtgIns d 38.57+.08-3.3 IntlIdxIn d 38.55+.09-3.4 IntlIdxInst d 38.57+.08-3.3 TotMktIdAg d 57.61+.37+12.7 TotMktIdI d 57.60+.38+12.7FidelityLtdTermMuniInc d 10.75...+2.5 SerBlueChipGr 11.49+.07NA SerBlueChipGrF 11.50+.07NA Series100IdxF 13.00+.09NA SeriesGrowthCo 11.41+.09NA SeriesGrowthCoF 11.43+.09NAFirst EagleGlbA m 54.18+.18+3.1 OverseasA m 22.86-.01-0.6First InvestorsGrowIncA m 22.55+.16+10.0ForumAbStratI 11.22-.02+1.4FrankTemp-FrankFed TF A m 12.52+.01+10.0 FedIntA m 12.44+.01+6.2 FedTxFrIA 12.53+.01+10.1FrankTemp-FranklinBalA m 11.75+.06+7.7 CA TF A m 7.51+.01+12.3 CAInTF A m 13.05+.02+11.7 DynaTechA m 46.29+.45+9.5 EqInA m 23.46+.16+9.1 FLRtDAAdv 9.04+.01+2.3 FlRtDAccA m 9.03...+1.9 FlxCpGr A m 56.55+.25+7.9 GrowthA m 70.93+.42+15.4 HY TF A m 10.60+.01+11.9 HighIncA m 2.08...+5.2 HighIncAd 2.09...+5.4 Income C m 2.47...+7.1 IncomeA m 2.45+.01+7.7 IncomeAdv 2.43+.01+7.9 IncomeR6 2.43...+8.0 InsTF A m 12.46+.01+10.2 LoDurTReA m 10.11...+1.3 NY TF A m 11.74...+8.4 RisDivAdv 49.75+.34+8.0 RisDv C m 48.98+.33+6.9 RisDvA m 49.78+.34+7.7 SmMdCpGrA m 41.95+.28+8.5 StrIncA m 10.49...+3.9 Strinc C m 10.49+.01+3.5 TotalRetA m 10.16...+4.6 USGovA m 6.53...+3.0 Utils A m 17.36+.13+18.2FrankTemp-MutualDiscov C m 33.06+.11+4.1 Discov Z 34.13+.12+5.2 DiscovA m 33.56+.12+4.9 QuestZ 18.20+.04+3.8 Shares Z 29.28+.12+8.2 SharesA m 28.98+.12+7.8 SharesR6 29.29+.12+8.2FrankTemp-TempletonFgn A m 7.72-.01-6.2 Frgn Adv 7.64-.01-5.9 GlBond C m 13.24+.03+3.3 GlBondA m 13.21+.03+3.7 GlBondAdv 13.17+.03+4.0 GlBondR6 13.17+.03+4.1 GrowthA m 24.23+.06-0.4 GrowthR6 24.27+.05-0.1 WorldA m 18.75+.06-1.1Franklin TempletonFdrInm-TT/FIcAd 12.47+.02+6.4 FndAllA m 13.52+.03+4.9 FndAllC m 13.30+.03+4.1 HYldTFInA 10.64+.01+11.9 ModAllcA m 15.87+.04+4.8Franklin Templeton IGlTlRtA m 13.33+.02+3.1 GlTlRtAdv 13.35+.02+3.5 GEElfunTr 59.98...+14.2 ElfunTxE 11.97...+9.1 IsIntlEq d 12.29...-5.1 S&SInc 11.68...+4.5 S&SUSEq 58.58...+13.3GMOAABdIV 25.55...+3.2 EmgDbtIV d 10.17...+8.2 EmgMktsVI d 10.39+.06-7.0 IntItVlIV 23.77+.02-4.2 QuIII 23.85+.18+12.5 QuIV 23.88+.18+12.6 QuVI 23.87+.18+12.6 USEqAllcVI 17.53+.05+11.0 USTrsy 25.00...+0.1GabelliAssetAAA m 65.34+.26+5.0 EqIncomeAAA m 28.24+.17+7.1 SmCpGrAAA m 47.42+.12+2.8GatewayGatewayA m 29.23+.04+3.9Goldman SachsGrOppIs 32.17+.15+10.7 HiYdMunIs d 9.36+.01+13.8 HiYieldIs d 7.09...+5.8 MidCapVaA m 46.57+.25+10.8 MidCpVaIs 47.09+.25+11.2 ShDuTFIs 10.61+.01+2.3 SmCpValIs 56.86+.14+6.4HarborBond 12.27+.01+3.3 CapApInst 60.21+.30+13.0 CapAprInv b 59.03+.29+12.6 HiYBdInst d 10.85+.01+5.3 IntlInstl 66.65+.22-5.8 IntlInv b 65.81+.22-6.2Harding LoevnerEmgMkts d 49.37...+0.3 IntlEq d 17.67...-1.0HartfordBalHLSIA 26.48+.15+10.0 BalIncA m 13.55+.05+8.1 BalIncC m 13.39+.05+7.3 CapApr C m 41.84+.29+8.0 CapAprA m 47.96+.34+8.8 CapAprI 48.10+.33+9.2 CpApHLSIA 53.07+.34+8.9 DivGrowA m 26.34+.22+13.1 DivGrowI 26.24+.21+13.4 DvGrHLSIA 25.73+.22+13.8 EqIncA m 18.49+.15+9.3 FloatRtA m 8.85+.01+2.1 FloatRtC m 8.84+.01+1.4 FloatRtI 8.86+.01+2.4 GrOppA m 42.31+.23+12.9 GrOppI 43.34+.24+13.2 MdCpHLSIA 35.92+.18+13.4 MidCapA m 26.60+.12+12.6 StkHLSIA 61.08+.43+11.5 TRBdHLSIA 11.59+.01+5.3 WrldBdI 10.80...+3.4HeartlandValuePlus m 33.64+.12-0.7HendersonIntlOppA m 25.65+.06-1.5HennessyGsUtlIdxInv 30.66+.19+20.3Hotchkis & WileyMidCpValI 42.56+.25+10.0INVESCOBalAlocA m 12.24-.01+2.4 BalAlocC m 11.80...+1.6 BalAlocY 12.38-.01+2.6 CharterA m 22.89+.12+9.0 ComstockA m 24.66+.20+11.6 DivDivA m 17.75+.13+10.9 DivDivInv b 17.75+.13+11.0 EqIncomeA m 11.06+.05+8.8 EqIncomeC m 10.89+.05+8.0 EqWSP500A m 47.38+.32+13.4 GrowIncA m 28.10+.20+10.0 HiYldMuA m 9.92+.01+14.5 IntlGrA m 33.09+.07-0.4 IntlGrI 33.62+.07-0.1 MidCapGrA m 38.43+.26+8.0 MuniIncA m 13.71+.02+10.0 SmCapValA m 21.25-.08+5.6 Summit b 18.20+.14+12.8IVAIntlI d 17.47-.01+2.0 WorldwideA m 18.20...+2.9 WorldwideC m 17.98...+2.2 WorldwideI d 18.24+.01+3.2IvyAssetStrA m 30.32+.02-0.6 AssetStrC m 29.32+.02-1.4 AsstStrgI 30.62+.02-0.4 HiIncA m 8.52...+5.3 HiIncC m 8.52...+4.6 HighIncI 8.52...+5.6 LtdTmBdA m 10.89...+1.1 MdCpGrthI 24.58+.09+6.0 ScTechA m 51.92+.26+9.1 SciTechI 56.12+.29+9.4JPMorganCoreBdUlt 11.80...+4.1 CoreBondA m 11.79...+3.7 CoreBondSelect 11.78...+3.9 DiscEqUlt 24.06+.19+16.7 EqIncA m 13.58+.12+12.2 EqIncSelect 13.77+.12+12.5 FIntlVaIs 13.97+.07-7.6 HighYldSel 8.01+.01+5.6 HighYldUl 8.00...+5.6 IntmdTFIs 11.18+.02+5.3 IntrAmerR 37.84+.26+15.8 IntrAmerS 37.89+.26+15.6 InvBalA m 15.13+.05+6.6 InvConGrA m 12.93+.03+5.2 InvConGrC m 12.86+.02+4.5 InvGrInA m 16.92+.07+7.4 InvGrowA m 19.39+.11+9.4 LgCapGrA m 33.76+.27+12.1 LgCapGrSelect 33.82+.27+12.3 MdCpGrSel 37.09+.21+12.2 MidCapVal m 36.71+.20+11.9 MidCpValI 37.49+.21+12.5 SelMidCap 44.30+.23+12.5 ShDurBndSel 10.93+.01+1.0 ShtDurBdU 10.93...+1.3 SmRt2020I 18.46+.06+6.3 SmRt2030I 19.12+.09+6.9 SmRt2040I 19.59+.09+7.2 TxAwRRetI 10.05+.01+2.7 USEquit 15.06+.11+14.7 USEquityI 15.08+.11+15.0 USLCpCrPS 30.00+.24+15.4 ValAdvA m 28.92+.22+13.0 ValAdvI 29.13+.21+13.5 ValAdvSel 29.06+.21+13.3James AdvantageGoldRainA b 25.04+.04+8.1JanusBalT 31.19+.11+8.6 Gr&IncT 46.83+.31+11.3 Janus T 43.49+.38+11.0 PerkinsMCVT 24.47+.13+8.5 ResearchT 46.73+.27+14.4 ShTmBdT 3.07...+1.4 TwentyT 65.06+.45+9.0JensenQualtyGrI 39.00+.36+11.4 QualtyGrJ b 38.99+.37+11.2John HancockBondA m 16.23+.01+6.1 ClasValI 25.15+.18+9.9DisValMdCpA m 18.49+.14+12.8DisValMdCpI 19.12+.16+13.2 DiscValA m 19.31+.18+11.9 DiscValI 18.84+.18+12.2 EmMkVlNAV 10.37+.02-1.5 GAbRSI 11.41+.02+5.5 IICpApNAV 17.97+.09+12.9 IIInVaNAV 16.23+.01-6.9 IIToRtNAV 13.81+.01+3.1 LgCpEqA m 38.48+.07+11.4 LifAg1 b 16.23+.06+6.0 LifBa1 b 15.60+.04+5.4 LifBaA m 15.68+.04+5.0 LifCo1 b 13.93+.02+4.3 LifGr1 b 16.48+.06+6.1 LifGrA m 16.49+.05+5.6 LifMo1 b 14.54+.03+4.8 StcIncI 10.85+.01+4.0KeeleySmCapVal m 36.34+.15-2.5LaudusInMktMstS d 22.44+.04-4.8 USLCGr d 19.25+.18+11.6LazardEmgMkEqInst d 18.84+.10-2.1EmgMktEqOpen m 19.29+.11-2.3IntlStEqInst d 14.21+.09+0.5 IntlStEqOpen m 14.29+.08+0.3Legg MasonCBAggressGrthA m 199.82+1.83+15.7CBAggressGrthI 216.17+1.99+16.1 CBAllCapValueA m 16.96+.14+7.9 CBAppreciatA m 20.37+.15+11.6CBEquityInc1 19.44+.15+13.0CBEquityIncA m 19.42+.14+12.6CBSmallCapGrI 27.99+.14-1.5 ValueC m 62.60+.36+14.6WACorePlusBdA m 11.63...+5.9WACorePlusBdFI b 11.64...+6.0 WACorePlusBdI 11.64...+6.3 WACorePlusBdIS 11.63...+6.3WAManagedMuniA m 16.90+.01+10.1Longleaf PartnersIntl 15.96+.06-9.1 LongPart 34.02+.12+4.9 SmCap 35.21+.03+14.4Loomis SaylesBdInstl x 15.47-.03+5.8 BdR x 15.40-.03+5.5 GlbBdInstl x 16.21-.02+0.6Lord AbbettAffiliatA m 16.22+.12+11.7 BndDbtrF b 8.15+.01+5.9 BondDebA m 8.17+.01+5.8 BondDebC m 8.19+.01+5.1 CalibrdDivA m 16.05+.11+10.1 DevGrowI 27.45+.11-0.4 FdmtlEqtyA m 15.64+.13+9.1 FltRateF b 9.27+.01+2.5 FltgRateA m 9.28+.01+2.4 FltgRateC m 9.28...+1.7 HiYldI 7.87+.01+7.3 MABalOppA m 12.60+.06+6.3 NatlTaxFA m 11.36+.01+11.3 ShDurIncA m 4.51...+2.5 ShDurIncC m 4.54...+1.8 ShDurIncF b 4.51...+2.6 ShDurIncI 4.51...+2.7 TaxFreeA m 10.90+.01+7.7MFSBondA m 14.07...+5.5 GrAllocA m 18.21+.07+4.3 GrowA m 67.56+.44+10.2 GrowI 70.70+.47+10.5 IntDivA m 15.76+.01-3.8 IntlNDisA m 27.13+.01-3.3 IntlNDisI 27.93+.02-3.0 IntlValA m 33.27+.04+0.4 IsIntlEq 21.34-.03-3.1 MAInvA m 28.54+.16+10.0 MAInvGrA m 23.52+.12+8.6 MAInvI 27.96+.16+10.2 ModAllocA m 16.61+.05+4.4 MuHiIncA f 8.10...+13.2 ResIntlI 17.45+.01-4.9 ResearchA m 38.47+.27+11.2 TotRetA m 18.15+.09+8.4 UtilA m 22.84+.15+11.9 ValueA m 33.89+.28+10.4 ValueI 34.06+.28+10.7MainStayHiYldCorA m 5.96...+4.4 IntlI 33.95-.02-3.6 MAPI 46.43+.34+8.6 Mktfield 16.56+.05-9.8 MktfldA m 16.49+.05-10.0 S&PIdxI 46.09+.32+14.1 SelEqI 50.04+.46+8.2Mairs & PowerGrthInv 113.21+.63+7.8Manning & NapierWrldOppA 8.07+.02-9.2Matthews AsianDivInv d 15.55...-0.1 GrInc d 19.24+.05+0.8 PacTiger d 28.25-.09+12.0MergerInvCl b 15.96+.01+0.6MeridianMeridnGr d 37.56+.22+6.3Metropolitan WestLowDurBd b 8.82...+1.6 LowDurBdI 8.82...+1.8 TotRetBdI 10.90...+4.9 TotRtBd b 10.90...+4.6Morgan StanleyGrA m 39.48+.03+12.7 IntlEqA m 15.78+.03-3.1 IntlEqI d 16.02+.03-2.8 MdCpGrA m 43.48+.37+6.6 MdCpGrI 45.55+.39+6.9Munder FundsMdCpCrGrY 44.70+.30+9.5Mutual SeriesBeacon Z 17.19+.11+6.6NationsLgCpIxZ 38.37+.27+14.2NationwideIntlIdxI 7.98+.02-3.5 S&P500Is 15.14+.11+14.3NatixisLSInvBdA m 12.12+.01+4.4 LSInvBdC m 12.01+.01+3.5 LSInvBdY 12.13+.01+4.6 LSStratIncA x 16.68-.01+5.8 LSStratIncC x 16.79...+5.0Neuberger BermanGenesisInstl 58.89+.14-0.2 GenesisInv 39.65+.10-0.3 GenesisR6 58.93+.15-0.1 GenesisTr 61.28+.15-0.4 HIncBdInst 9.30-.01+4.6 LgShrtIn 12.88+.03+3.7 NBIncI 12.84+.08+9.2NicholasNichol 66.27+.65+13.7NorthernBdIndx 10.73...+4.3 EmMktsEq d 11.26+.03-2.2 FixedIn 10.42...+5.2 GlbREIdx d 9.82+.01+4.6 HYFixInc d 7.47+.01+6.0 IntTaxE 10.70+.01+6.0 IntlIndex d 11.75+.03-3.5 MMIntlEq d 10.39+.04-3.8Mlt-Mngr Emrg M d 18.90+.05-2.5SmCapVal 20.64+.02+4.2 StkIdx 24.35+.17+14.3NuveenHiYldMunA m 17.14+.02+17.4 HiYldMunI 17.15+.03+17.7 IntMunBdI 9.30+.01+7.2 LtdTmMunI 11.12...+3.5 RlEstSecI 23.82-.01+15.3Oak AssociatesPinOakEq 47.85+.24+11.3 RedOakTec 15.59+.14+14.6 WhiteOak 57.76+.32+8.1OakmarkEqIncI 33.67+.14+7.6 GlSelI 16.22-.03+1.6 Global I 29.48+.05-0.1 Intl I 24.07...-8.6 IntlSmCpI d 15.83-.06-8.0 Oakmark I 67.52+.33+13.6 Select I 43.84+.07+16.1Old WestburyGlbOppo 8.07+.02+4.1 GlbSmMdCp 16.67+.04+2.7 LgCpStr 12.78+.06+5.8OppenheimerActAllocA m 12.06+.05+4.6 CapApA m 65.16+.54+15.6 CapIncA m 9.82+.01+6.8 DevMktA m 38.18+.25-0.2 DevMktY 37.81+.26+0.1 DevMktsC m 36.17+.24-0.9 EqIncA m 32.89+.15+11.5 EquityA m 13.18+.10+12.7 GlobA m 78.26+.42+3.2 GlobOpprA m 37.86-.07-1.5 GlobY 78.47+.42+3.4 IntlBondA m 6.03...0.0 IntlBondY 6.03+.01+0.3 IntlDivA m 13.92+.03-3.9 IntlGrY 34.81+.06-5.9 IntlGrowA m 34.91+.06-6.2 MainStrA m 51.50+.33+13.3 MnStrMdCpA m 32.94+.10+11.9 RisDivA m 20.39+.15+9.9 RisDivY 20.92+.16+10.1 SrFltRatA m 8.24+.01+2.7 SrFltRatC m 8.25+.01+1.9 StrIncA m 4.14...+3.6Oppenheimer RochesteFdMuniA m 15.26+.01+9.6 LmtTmMunA m 14.31+.01+5.5 LtdTmNY m 3.14...+4.3 RochHYMA m 7.11...+12.9OsterweisOsterStrInc 11.76+.01+3.7PIMCOAAstAAutP 9.89...-0.7 AllAssetA m 12.25...+1.8 AllAssetC m 12.20...+1.1 AllAssetI 12.24...+2.3 AllAuthA m 9.89...-1.1 AllAuthC m 9.88...-1.8 AllAuthIn 9.89...-0.6 CmPlsStrI 9.71...-7.5 CmPlsStrP 9.66...-7.6 ComRlRStI 5.17...-8.1 DivIncInst 11.56...+4.5 EMFdIdPLARSTIns 9.94+.04-0.1 EMktCurI 9.90...-2.7 EmMktsIns 10.92...+4.1 EmgLclBdI 9.12...-4.2 FdmtlAdvAbsRtI 3.74...-0.4 ForBdInstl 11.11+.01+8.6 ForBondI 10.16...+1.0 GlbAdvInst 11.05...0.0 HgYdSpIns 10.79...+5.3 HiYldIs 9.60...+5.7 IFdIdPlARStI 11.38...-3.0 Income P 12.67+.02+7.9 IncomeA m 12.67+.02+7.6 IncomeC m 12.67+.02+6.9 IncomeD b 12.67+.02+7.7 IncomeInl 12.67+.02+8.0 InvGrdIns 10.76+.01+7.5 LgDrTRtnI 11.76...+12.8 LgTmCrdIn 12.90...+13.8 LgTmGovIs 10.65...+12.5 LowDrA m 10.32+.01+1.0 LowDrIs 10.32+.01+1.3 LowDurD b 10.32+.01+1.0 LowDurP 10.32+.01+1.2 ModDurIs 10.70...+2.8 RealRet 11.41...+2.5 RealRtnA m 11.41...+2.1 RlEstStRetI 4.83...+17.0 ShTermAdm b 9.91...+1.2 ShtTermIs 9.91...+1.5 SnrFltRtInstl d 10.09...+2.5 StkPlARShStrIn 2.54...-11.6 ToRtIIIIs 9.63+.01+3.2 ToRtIIIs 10.45+.01+3.2 TotRetA m 10.94+.01+2.8 TotRetAdm b 10.94+.01+2.9 TotRetC m 10.94+.01+2.0 TotRetIs 10.94+.01+3.2 TotRetR b 10.94+.01+2.5 TotRetrnD b 10.94+.01+2.9 TotlRetnP 10.94+.01+3.1 TtlRtIVInst 10.70...+2.5 UnconstrBdIns 11.26+.01+1.8 UnconstrBdP 11.26+.01+1.7 WwdFdAdvARStrIn 9.81...-0.8PRIMECAP OdysseyAggGr 31.76+.09+13.1 Growth 25.18+.15+11.1 Stock 22.97+.15+13.4ParametricEmgMktInstl 15.22+.04+0.1 TxMgEMInstl d 50.11+.13+0.6ParnassusCoreEqInv 39.41+.28+14.0Pax WorldBal b 25.16+.14+7.6PermanentPortfolio 43.64+.08-0.9PioneerCoreEqA m 16.51+.11+11.4 PioneerA m 41.09+.33+11.7 StratIncA m 11.02...+5.1 StratIncY 11.01...+5.4PrincipalBdMtgInst 10.98...+4.6 DivIntI 11.62+.04-0.2 HiYldII 10.49-.01+5.2 L/T2020I 14.68+.05+5.7 L/T2030I 14.91+.06+6.2 L/T2040I 15.36+.07+6.5 L/T2050I 14.88+.07+6.6 LCGrIInst 13.19+.08+9.8 LCIIIInst 15.33+.12+12.4 LgCGrInst 11.64+.11+11.5 LgCSP500I 13.97+.10+14.2 LgCValI 13.48+.11+9.9 MidCapA m 21.42+.18+9.9 PrSecInst 10.46+.02+10.7 SAMBalA m 16.10+.07+6.2 SAMConGrA m 18.41+.10+6.9 SCGrIInst 13.44+.04-0.7 SCValIII 13.49+.04+3.8PrudentialGblRealEstZ 24.05-.01+5.5 JenMCGrA m 39.98+.29+6.9Prudential InvestmenGovtIncA m 9.68+.01+3.4 HiYieldA m 5.69...+5.5 JenMidCapGrZ 41.77+.30+7.2 JennGrZ 30.75+.16+13.0 MuniHIncA m 10.23+.01+12.9 NaturResA m 46.16-.42-10.6 ShTmCoBdA m 11.29...+2.0 SmallCoZ 29.36+.05+6.3 TotRetBdZ 14.44...+5.4 UtilityA m 16.83+.12+22.4PutnamCpSpctrmA m 37.39+.29+12.9 CpSpctrmC m 36.59+.28+12.0 CpSpctrmY 37.59+.30+13.2 DivrInA m 7.68+.01+3.3 EqIncomeA m 21.68+.18+13.1 EqIncomeY 21.68+.18+13.4 EqSpctrmA m 42.24+.32+9.0 EqSpctrmY 42.58+.32+9.2 GrowIncA m 20.88+.14+11.7 InvestorA m 21.05+.16+15.4 MultiCapGrA m 81.62+.52+15.0 VoyagerA m 32.95+.15+12.4RidgeWorthLgCpVaEqI 17.56+.14+11.2 MdCpVlEqI 14.26+.08+8.5 USGovBndI 10.14...+1.0RoycePAMutInv d 13.99+.02+0.2 PremierInv d 21.59...+3.4 SpecEqInv d 23.82+.13-1.4 TotRetInv d 15.94+.02+1.5RussellEmgMktsS 18.08+.01-1.9 GlRelEstS 39.42-.07+4.9 GlbEqtyS 11.39+.04+4.6 ItlDvMktS 35.05-.01-2.5 StratBdS 11.32...+4.6RydexBiotechIv 81.08+1.08+31.6 InvOTC2xH b 23.06-.35-36.9SEIIdxSP500E d 52.91+.37+14.2 IntlEq A d 9.59+.04-3.8 IsCrFxIA d 11.57...+5.2 IsHiYdBdA d 7.73...+5.5 IsItlEmMA d 10.60+.05-3.0 IsLrgGrA d 33.93+.26+10.2 IsLrgValA d 25.34+.21+12.5 IsMgTxMgA d 19.48+.14+12.1SSGAS&P500Idx b 31.54+.22+14.3Schwab1000Inv d 52.21+.36+13.4 CoreEq d 24.77+.16+14.8 DivEqSel d 18.62+.11+11.0 FUSLgCInl d 15.17+.11+13.3 IntlIndex d 18.95+.06-3.4 S&P500Sel d 31.14+.22+14.4 SmCapIdx d 26.82+.06+1.4 TotStkMSl d 35.93+.24+12.7ScoutInterntl 34.60+.05-5.4 MidCap 17.92+.10+5.3 UnconBd 11.45+.01-2.1SelectedAmerShS b 46.89+.14+6.9 American D 46.91+.14+7.3SentinelCmnStkA m 44.71+.40+10.6SequoiaSequoia 220.82+1.27+4.6Sound ShoreInv 51.05+.48+12.9SpectraSpectra A m 18.73+.15+14.2State FarmBalanced 66.04+.27+10.7 Growth 73.19+.42+13.8SteelPathMLPAlpA m 13.24...+15.3 MLPAlpY 13.43+.01+15.7 MLPIncA m 11.41+.01+10.8 MLPIncC m 11.14+.01+10.0 MLPSel40Y 13.23+.01+14.3SunAmericaFocDvStrC m 17.57+.15+7.2T Rowe PriceBalanced 23.70+.09+6.7 BlChpGAdv b 67.36+.31+11.9 BlChpGr 67.83+.32+12.2 CapApprec 27.71+.15+12.0 DivGrow 35.19+.28+11.6 EmMktBd d 12.70+.02+4.0 EmMktStk d 33.42+.20+0.5 EqIndex d 52.98+.37+14.1 EqtyInc 33.36+.21+7.8 EqtyIncAd b 33.28+.20+7.5 EurStock d 19.71+.07-5.3 GNMA 9.67+.01+3.9 GlbTech 15.17+.02+29.9 GrStkAdv b 54.30+.21+11.1 GrowInc 31.12+.20+12.1 GrowStk 55.10+.21+11.4 HealthSci 70.90+.87+30.3 HiYield d 7.10...+5.6 InLgCpCoG 24.25+.11+12.2 InSmCpStk 20.17+.03+4.0 InsLgCpGr 28.49+.15+11.3 InstlFlRt d 10.11...+2.7 InstlHiYl d 9.63-.01+5.8 InstlLgCV 20.13+.19+12.8 IntlBnd d 9.38+.01-2.1 IntlDisc d 54.87+.19+1.3 IntlGrInc d 15.04+.08-1.0 IntlStk d 16.20+.06+0.1 MDTaxFBd 10.94...+8.4 MediaTele 71.60+.28+8.5 MidCapE 43.16+.27+11.8 MidCapVa 31.86+.11+10.7 MidCpGr 77.00+.46+11.3 NewAmGro 46.38+.23+11.3 NewAsia d 17.30-.02+7.4 NewEra 44.37-.06+1.2 NewHoriz 46.16+.13+5.3 NewIncome 9.59...+4.7 OrseaStk d 9.70+.03-2.6 PerStrBal 23.51+.08+6.3 PerStrGr 31.48+.14+6.9 R2015 14.88+.05+6.1 R2025 15.96+.06+6.8 R2035 16.86+.08+7.1 Real d 25.33-.01+15.3 Ret2020R b 20.81+.07+5.9 Ret2050 13.52+.07+7.3 RetInc 15.11+.03+4.5 Rtmt2010 18.53+.05+5.7 Rtmt2020 21.18+.08+6.4 Rtmt2030 23.44+.10+7.1 Rtmt2040 24.23+.11+7.2 Rtmt2045 16.15+.07+7.3 SciTech 42.00-.03+19.5 ShTmBond 4.79...+1.5 SmCpStk 44.24+.07+3.5 SmCpVal d 47.82-.04-0.6 SpecGrow 24.67+.12+7.0 SpecInc 12.96+.01+4.3 SumMuInt 12.00+.02+6.6 TRPRet2025Ad b 15.87+.07+6.6 TaxFHiYld d 11.92+.02+13.3 TaxFInc 10.45+.01+10.0 TaxFShInt 5.68+.01+2.1 TrRt2020Ad b 21.01+.08+6.2 TrRt2030Ad b 23.24+.10+6.8 TrRt2030R b 23.04+.10+6.5 TrRt2040Ad b 24.01+.11+7.0 TrRt2040R b 23.84+.11+6.7 Value 36.13+.33+13.5T.RoweReaAsset d 11.33+.01+1.6TCWEmgIncI 8.51...+4.2 SelEqI 25.79+.18+6.3 TotRetBdI 10.35...+4.6 TotRetBdN b 10.67...+4.3TIAA-CREFBdIdxInst 10.90...+4.2 BdPIns 10.77...+5.1 BondIn 10.59...+4.8 ELCGrIxI 11.85+.08+11.8 ELCVlIxI 10.87+.08+11.2 EqIx 15.08+.10+12.8 Gr&IncIn 12.61+.11+12.4 HYlIns d 10.24+.01+5.8 InfL 11.49-.02+1.8 IntlE d 18.36+.06-3.1 IntlEqIn d 10.62+.01-7.6 LCVal 18.12+.13+8.5 LgCGIdx 20.46+.13+14.1 LgCVIdx 17.51+.13+13.4 LgGrIns 16.08+.14+13.7 Life2040I 10.96+.06+5.5 MidValIn 24.23+.16+11.3 SCEq d 18.77+.02+2.4 SPIndxIn 22.31+.16+14.4TargetSmCapVal 26.71+.08+4.0TempletonInFEqSeS 21.17-.01-5.1Third AvenueFCrtInst d 10.74+.01+4.4 RealEsVal d 31.43+.06+8.3 Value d 58.47+.20+3.8ThompsonBond 11.72...+3.1ThornburgIncBldA m 20.99+.07+5.1 IncBldC m 20.98+.06+4.3 IntlA m 29.03+.08-5.0 IntlI 29.61+.08-4.7 LtdTMuA m 14.61+.01+3.1 LtdTMul 14.62+.01+3.5 LtdTmIncI 13.56+.01+4.0ThriventLgCapStkA m 27.15+.20+8.6 MuniBdA m 11.70+.01+8.8TocquevilleDlfld m 35.38+.23-1.8TouchstoneSdCapInGr 23.13+.09+8.1TransamericaAstAlMdGrC m 14.83+.05+5.0Tweedy, BrowneGlobVal d 26.66-.05+2.3U.S. Global InvestorGld&Prec m 6.05-.07-15.5 GlobRes m 8.41-.04-12.9 WrldPrcMnr m 5.45-.04-18.3USAACorstnModAgrsv 25.85+.10+5.1 GrowInc 22.88+.16+13.1 HYOpp d 8.82...+7.1 Income 13.36...+5.4 IncomeStk 17.87+.14+11.8 IntermBd 10.95...+6.1 Intl 28.86+.06-3.7 S&P500M 27.88...+13.7 ShTmBond 9.23...+2.0 TaxEInt 13.62+.01+6.9 TaxELgTm 13.80+.02+9.7 TaxEShTm 10.72...+1.8 Value 20.07+.13+9.6VALIC Co IMdCpIdx 27.34+.10+7.8 StockIdx 35.61+.25+14.0Vanguard500Adml 181.45+1.27+14.4 500Inv 181.44+1.27+14.3 500Sgnl 149.89+1.05+14.4 A-WexUSIdxAdm 29.78+.10-2.1 BalIdx 28.84+.11+9.2 BalIdxAdm 28.85+.12+9.4 BalIdxIns 28.85+.12+9.4 BdMktInstPls 10.89...+4.4 CAITAdml 11.82+.01+7.6 CALTAdml 12.11+.02+11.1 CapOp 51.18+.51+16.3 CapOpAdml 118.24+1.18+16.4 CapVal 14.66+.03+7.8 Convrt 13.70+.06+2.7 DevMktIdxAdm 12.38+.04-3.5 DevMktIdxInstl 12.40+.04-3.4 DivAppIdxInv 30.82+.18+8.7 DivEqInv 32.20+.23+11.7 DivGr 22.41+.15+12.1 EmMkInsId 26.12+.10+0.8 EmMktIAdm 34.35+.13+0.8 EmMktStkIdxIP 86.90+.33+0.8 EmerMktIdInv 26.15+.09+0.6 EnergyAdm 120.40-.43-2.7 EnergyInv 64.12-.23-2.8 EqInc 31.01+.26+11.8 EqIncAdml 65.01+.55+12.0 EurIdxAdm 66.50+.14-3.5 ExplAdml 93.98+.53+3.0 Explr 100.94+.57+2.8 ExtdIdAdm 63.81+.28+6.2 ExtdIdIst 63.82+.29+6.2 ExtdMktIdxIP 157.51+.70+6.2 ExtndIdx 63.76+.29+6.0 FAWeUSIns 94.40+.32-2.1 GNMA 10.81+.01+4.5 GNMAAdml 10.81+.01+4.6 GlbEq 23.77+.11+5.9 GrIncAdml 69.37+.55+15.2 GroInc 42.48+.34+15.0 GrowthIdx 51.41+.29+14.5 GrthIdAdm 51.40+.28+14.7 GrthIstId 51.40+.28+14.7 GrthIstSg 47.60+.26+14.7 HYCor 6.08+.01+6.4 HYCorAdml 6.08+.01+6.5 HYT/E 11.25+.01+10.4 HltCrAdml 91.86+1.05+30.0 HlthCare 217.71+2.51+30.0 ITBond 11.56+.01+4.8 ITBondAdm 11.56+.01+4.9 ITGradeAd 9.96...+5.3 ITIGrade 9.96...+5.2 ITrsyAdml 11.41...+2.6 InfPrtAdm 26.46...+1.9 InfPrtI 10.78...+1.9 InflaPro 13.48...+1.9 InstIdxI 180.27+1.26+14.4 InstPlus 180.28+1.26+14.4 InstTStId 44.64+.29+12.8 InstTStPl 44.65+.29+12.9 IntlExpIn 17.94+.05+0.4 IntlGr 22.14+.05-2.7 IntlGrAdm 70.48+.17-2.6 IntlStkIdxAdm 26.62+.08-2.1 IntlStkIdxI 106.45+.33-2.1 IntlStkIdxIPls 106.46+.32-2.1 IntlStkIdxISgn 31.93+.09-2.1 IntlVal 35.72+.16-2.5 ItBdIdxIn 11.56+.01+5.0 L/TBdIdxInstlPl 13.94...+13.3 LTBond 13.94...+13.1 LTGradeAd 10.66...+13.7 LTInvGr 10.66...+13.6 LTsryAdml 12.64+.01+13.1 LgBdIdxIs 13.94...+13.3 LgCpIdxAdm 45.54+.32+14.0 LifeCon 18.66+.04+6.1 LifeGro 28.50+.13+7.5 LifeInc 14.86+.02+5.5 LifeMod 23.94+.08+6.8 MdCpGrIdxAdm 41.61+.38+11.1MdCpValIdxAdm 44.30+.32+13.6MdPDisGr 18.75+.05+6.1 MidCapGr 25.65+.19+10.0 MidCapIdxIP 159.13+1.30+12.4 MidCp 32.15+.26+12.3 MidCpAdml 146.04+1.19+12.4 MidCpIst 32.26+.26+12.4 MidCpSgl 46.08+.37+12.4 Morg 27.07+.23+12.5 MorgAdml 83.97+.71+12.7 MuHYAdml 11.25+.01+10.5 MuInt 14.28+.01+6.8 MuIntAdml 14.28+.01+6.9 MuLTAdml 11.75+.01+10.2 MuLtd 11.09+.01+2.1 MuLtdAdml 11.09+.01+2.2 MuSht 15.87...+0.8 MuShtAdml 15.87...+0.9 NJLTAdml 12.28+.01+9.1 NYLTAdml 11.80+.01+9.9 PALTAdml 11.72+.01+10.0 PacIdxAdm 72.11+.33-3.6 PrecMtls 9.67-.03-11.4 Prmcp 103.44+.89+18.7 PrmcpAdml 107.33+.92+18.8 PrmcpCorI 21.72+.16+16.9 R1000GrIdxI 180.48+1.15+14.2 REITIdx 25.60-.02+14.1 REITIdxAd 109.22-.11+14.2 REITIdxInst 16.90-.02+14.2 REITIdxSg 29.16-.03+14.2 S/TBdIdxInstl 10.55...+1.5 S/TBdIdxInstlPl 10.55...+1.5 STBond 10.55...+1.3 STBondAdm 10.55...+1.4 STBondSgl 10.55...+1.4 STCor 10.75...+2.2 STFedAdml 10.78...+1.2 STGradeAd 10.75...+2.3 STIGradeI 10.75...+2.4 STsryAdml 10.73...+0.8 SelValu 28.84+.17+9.3 ShTmInfPtScIxAd 24.79...-0.1 ShTmInfPtScIxIn 24.80...-0.1 ShTmInfPtScIxIv 24.75...-0.2 SmCapIdx 53.30+.13+5.7 SmCapIdxIP 154.13+.39+5.8 SmCpGrIdxAdm 42.31+.08+1.9 SmCpIdAdm 53.39+.14+5.8 SmCpIdIst 53.39+.14+5.8 SmCpIndxSgnl 48.10+.12+5.8 SmCpValIdxAdm 43.36+.13+9.1 SmGthIdx 33.80+.06+1.8 SmGthIst 33.89+.07+2.0 SmValIdx 24.16+.07+9.0 SmVlIdIst 24.24+.08+9.2 Star 24.82+.10+7.5 StratgcEq 31.98+.17+13.2 TgtRe2010 26.72+.06+5.6 TgtRe2015 15.44+.05+6.4 TgtRe2020 28.37+.10+6.9 TgtRe2030 28.84+.12+7.4 TgtRe2035 17.70+.09+7.6 TgtRe2040 29.46+.15+7.7 TgtRe2045 18.48+.09+7.7 TgtRe2050 29.33+.15+7.8 TgtRe2055 31.58+.15+7.7 TgtRetInc 12.87+.02+4.9 Tgtet2025 16.46+.06+7.1 TlIntlBdIdxAdm 20.86+.01+6.2 TlIntlBdIdxInst 31.30+.01+6.2 TlIntlBdIdxInv 10.43...+6.1 TotBdAdml 10.89...+4.4 TotBdInst 10.89...+4.4 TotBdMkInv 10.89...+4.2 TotBdMkSig 10.89...+4.4 TotIntl 15.92+.05-2.2 TotStIAdm 49.22+.31+12.8 TotStIIns 49.23+.32+12.8 TotStISig 47.51+.31+12.8 TotStIdx 49.21+.32+12.7 TxMBalAdm 26.26+.09+10.1 TxMCapAdm 100.40+.64+13.7 TxMSCAdm 42.77+.09+2.9 USGro 30.75+.22+14.1 USGroAdml 79.68+.58+14.3 ValIdxAdm 31.44+.27+13.5 ValIdxIns 31.44+.27+13.5 ValIdxSig 32.72+.28+13.5 ValueIdx 31.44+.26+13.3 VdHiDivIx 26.29+.21+14.2 WellsI 25.72+.09+7.8 WellsIAdm 62.31+.21+7.9 Welltn 39.63+.21+10.1 WelltnAdm 68.44+.36+10.1 WndsIIAdm 68.50+.48+12.1 Wndsr 21.32+.14+11.1 WndsrAdml 71.93+.45+11.2 WndsrII 38.60+.28+12.0 ex-USIdxIP 99.96+.33-2.1VictorySmCmpOpI 40.68+.11+6.7VirtusEmgMktsIs 10.16+.06+3.4 MulSStA m 4.84...+2.4 MulSStC b 4.90...+2.1Waddell & Reed AdvAssetStrA m 11.09+.01-1.0 CoreInv A m 7.60+.05+10.9 HiIncA m 7.54...+6.1 NewCncptA m 11.73+.04+5.7 SciTechA m 15.70+.08+8.0WasatchIntlGr d 26.60-.02-7.5 L/SInv d 15.91-.01-0.2 SmCapGr d 50.38...+0.4Wells FargoAstAlllcA f 13.99...+0.9 AstAlllcC m 13.45...+0.3 EmgMktEqA f 20.75+.13-4.9 GrI 55.34+.23+2.0 GrowInv 50.49+.21+1.5 GrowthAdm 53.54+.22+1.8 PrmLrgCoGrA f 14.83+.09+7.6 STMuBdInv 10.02...+1.7 ShTmBdInv 8.83+.01+1.6 UlSTMInA f 4.82...+0.3 UlSTMInI 4.82...+0.6WestwoodIncOppI 14.71+.05+9.4William BlairInslIntlG 16.76+.03-1.5 IntlGrI 25.86+.04-1.7World FundsEpGloEqShYI 19.86+.09+6.4AMGMgrsBondSvc 28.26+.02+5.5 TmSqMCGrI 18.84+.11+9.7 YacktmanSvc d 24.74+.19+8.4 YkmFcsInst d 26.38+.20+8.0 YkmFcsSvc d 26.34+.20+7.8AQRDivArbtI 10.51...-3.6 MaFtStrI 10.39+.02+3.8AcadianEmgMkts d 18.66+.08-1.8Advisors Inner CrclEGrthIns 20.51+.04+18.3AkreAkrFocRet m 21.70+.08+10.1Alger GroupCapApInsI 28.68+.23+15.2Alliance BernsteinGlblBdAdv 8.53...+5.5 HighIncA m 9.40+.01+5.8 HighIncAdv 9.41+.01+6.0 HighIncC m 9.50...+4.9 IntDivA m 14.60+.01+3.7AllianzGINFJAllCpVaA m 16.54+.09+10.6 NFJAllCpValIns 16.62+.09+10.9 NFJSmCVIs 35.26-.08+4.3 NFJSmCVlA m 33.13-.08+3.9AmanaGrowth b 34.29+.31+13.5 Income b 45.18+.40+9.0American BeaconLgCpVlInv 28.73+.20+11.6 LgCpVlIs 30.38+.21+12.0 SmCapInst 26.70+.03+4.0American CenturyDivBdInstl 10.87+.01+4.7 DivBdInv 10.87+.01+4.4 EqGrowInv 32.69+.23+13.9 EqIncA m 9.07+.06+10.1 EqIncInstl 9.08+.06+10.7 EqIncInv 9.07+.06+10.4 HeritInv 26.03+.19+4.6 InTTxFBIns 11.48+.01+5.3 InTTxFBInv 11.48+.01+5.1 IncGrInv 38.33+.26+13.7 InfAdjI 11.84-.01+1.1 IntlGrInv d 12.81...-3.1 InvGrInstl 34.76+.27+10.7 InvGrInv 34.34+.27+10.5 MdCpValInv 17.07+.09+13.6 NTDvsfBdInstl 10.92+.01+4.4 OneChMod 14.93+.05+6.4 SelectInv 59.54+.30+13.2 UltraInv 36.09+.22+11.9 ValueInv 8.76+.05+13.2American FundsAMCAPA m 28.62+.21+14.2 AmBalA m 25.37+.12+9.7 BondA m 12.82+.01+4.1 CapIncBuA m 59.67+.23+6.8 CapWldBdA m 20.60+.02+1.8 CpWldGrIA m 45.94+.19+6.3 EurPacGrA m 47.68+.12-0.3 FnInvA m 53.30+.30+10.1 GlbBalA m 31.07+.11+6.3 GrthAmA m 45.36+.21+10.9 HiIncA m 11.11...+3.2 HiIncMuA m 15.50+.01+12.6 IncAmerA m 21.40+.14+8.8 IntBdAmA m 13.59...+1.7 IntlGrInA m 33.63+.09+0.3 InvCoAmA m 39.58+.25+15.5 LtdTmTxEA m 16.16+.01+3.6 MutualA m 36.78+.34+12.3 NewEconA m 38.84+.21+7.7 NewPerspA m 37.56+.15+4.3 NwWrldA m 58.04+.14-1.2 STBdFdA m 10.02...+0.7 SmCpWldA m 48.25+.11+0.7 TaxEBdAmA m 13.10+.01+8.9 USGovSecA m 14.04...+3.2 WAMutInvA m 41.43+.35+12.5ArbitrageArbitragI d 12.78+.01-0.1ArielApprecInv b 56.78+.39+9.1 ArielInv b 76.68+.51+11.8Artio GlobalGlobHiYldI 9.88...+5.1 TotRtBdI 13.46...+4.2ArtisanIntl d 29.54+.090.0 IntlI d 29.77+.09+0.3 IntlVal d 35.51+.12-0.3 IntlValI d 35.66+.12-0.1 MdCpVal 26.57+.14+2.7 MidCap 48.51+.37+5.3 MidCapI 50.88+.40+5.6Aston FundsMidCapI 46.22+.25+9.6 MidCapN b 45.40+.25+9.3 MtgClGrI 29.13+.19+9.6 MtgClGrN b 28.93+.19+9.3BBHBrdMktFxI 10.32...+1.3 CoreSelN d 22.07+.11+6.7BNY MellonEmgMkts 9.95+.04-1.8 MidCpMuStrM 15.00+.10+9.5 NtlIntM 13.78+.02+5.7BairdAggrInst 10.82...+5.3 CrPlBInst 11.17...+5.4 ShTmBdIns 9.74...+1.9BaronAsset b 64.39+.48+10.2 GrInstl 71.97+.37+2.3 Growth b 71.08+.36+2.1 SmCap b 33.75+.21+2.3 SmCpInstl 34.25+.22+2.6BernsteinDiversMui 14.59+.01+3.9 IntDur 13.83-.01+4.9 IntlPort 15.43+.05-5.4 NYMuni 14.23+.01+3.9 TxMIntl 15.50+.05-5.4BerwynIncome d 14.04+.06+4.1BlackRockBasicValA m 31.97+.20+11.1 BasicValI 32.27+.20+11.4 CapAppInA m 28.25+.27+11.3 EqDivA m 24.92+.21+10.1 EqDivI 24.98+.22+10.4 EquitDivC m 24.35+.21+9.3 FltRtlIncI 10.30...+2.5 GlLSCrI 10.87+.01+2.4 GlobAlcA m 21.31+.07+3.2 GlobAlcC m 19.69+.07+2.4 GlobAlcI 21.43+.07+3.5 HiYldBdIs 8.21...+6.3 HiYldInvA m 8.21...+6.0 HthScOpA m 49.79+.70+27.4 LowDurIvA m 9.75...+2.0 NatMuniA m 11.01+.01+9.4 NatMuniI 11.00+.01+9.6 A-B-CACI Ww s...18.45+.05 AMC Net...59.12+.68 ASML Hld.83e95.06+1.09 Abaxis.4049.07-1.43 AcaciaTc.5016.90+1.47 AcadiaPh...26.92+.67 Accuray...7.09-.04 Achillion...11.71+.49 AcordaTh...34.25-.78 ActivsBliz.20f19.17+.11 AdobeSy...67.01+1.09 Adtran.3620.52-.14 Aegerion...30.66-2.58 Affymetrix...7.69-.17 AgiosPhm...u80.61+4.33 AirMethod...45.06-.51 AkamaiT...55.28+.75 Akorn...44.38+1.61 Alcobra...d3.63-.57 Alexion...u190.29+4.37 AlignTech...51.50+2.46 AlimeraSci...6.02+.56 Alkermes...45.91+.63 AllscriptH...13.62+.04 AlnylamP...93.84+2.03 AlteraCp lf.7233.16-.59 Altisrce n...73.33+1.59 AltraIndlM.4830.08+.61 AmTrstFin.8049.37-.83 Amarin....94-.11 Amazon...d287.06-26.12 Ambarella...41.20-.18 Amdocs.6246.23+.33 AmAirl n.4039.82+1.34 ACapAgy2.64f23.02+.12 AmCapLtd...14.34+.02 ACapMtg2.6019.84... ARCapH n.6811.18-.07 ARltCapPr1.0012.35+.03 AmSupr...1.19-.01 Amgen2.44147.26+.01 AmicusTh...5.94+.13 AmkorTch...7.56+.01 AnalogDev1.4846.85+.43 AngiesList...d6.52-.29 Ansys...75.37+.37 ApolloEdu...25.91+.24 ApolloInv.808.04+.04 Apple Inc s1.88u105.22+.39 ApldMatl.4020.99+.10 AMCC...6.80-.10 Approach...d9.75-.48 ArenaPhm...4.17+.07 AresCap1.52a15.99+.06 AriadP...5.83+.12 ArmHld.31e39.61+.08 ArrayBio...3.60+.10 Arris...27.45+.58 ArrowRsh...7.16+.24 ArubaNet...20.14+.09 AscenaRtl...12.12-.10 AspenTech...38.50+.49 AsscdBanc.3617.64+.25 athenahlth...117.97+1.93 Atmel...7.13+.12 Autodesk...54.45+.90 AutoData1.92bu76.20+.76 Auxilium...31.34+.12 AvagoTch1.28f81.85+.47 AvanirPhm...11.85-.05 AvisBudg...53.64+1.19 BBCN Bcp.40d13.27-.15 B/E Aero...75.44+1.69 BGC Ptrs.487.83+.10 BJsRest...u42.15+8.95 Baidu...222.55+5.52 BallardPw...2.83-.04 BncFstOK1.36f64.72-.23 BkOzarks s.50f33.40+.44 BaxanoS h....13+.01 BeacnRfg...26.68+.12 BedBath...65.24-.47 Biocryst...11.83-.36 BiogenIdc...321.67+5.61 BioMarin...81.03+6.02 BioScrip...5.99+.15 BlackBerry...10.26-.06 BloominBr...18.47+.39 BluebBio...u41.00+1.67 BoulderBr...d8.47-.52 BreitBurn2.0116.91-.10 Broadcom.4839.70+.33 BrcdeCm.149.95+.12 BuffaloWW...135.40+6.40 BldrFstSrc...5.74+.11 CA Inc1.0028.43+.68 CDK Glbl n...29.37+.28 CDW Corp.1729.96+.08 CH Robins1.40u71.15+.54 CIM CTr rs.8817.99-.55 CME Grp1.8882.31+1.11 CTC Media.706.06-.14 Cache h...d.65-.05 Cadence...17.20+.49 Caesars...12.07+.34 CafePress...d2.90+.02 CalAmp...18.36-.22 CdnSolar...29.54-.31 CapProd.939.42+.20 CpstnTurb....89+.02 Carrizo...48.30-.23 Catamaran...42.80+1.06 Cavium...45.21-.30 Celgene s...u103.24+2.84 CelldexTh...15.50+.09 CentAl...28.10+1.64 Cepheid...50.08+.90 Cerner...61.12+1.42 CerusCp...4.14+.02 ChartInds...48.01+.10 CharterCm...157.81+1.77 ChkPoint...72.70+1.70 Cheesecake.6644.04+.84 Chimerix...32.90+.84 ChiFnOnl...5.29-.09 ChiMobGm...22.91+.31 ChiCache...11.81-.69 CinnFin1.7648.74+.44 Cintas.85f71.22+.18 Cirrus...21.57+.48 Cisco.7623.78+.22 CitrixSys...63.59+1.75 CleanEngy...6.54-.14 ClovisOnc...55.58+1.53 Cognex.2238.47-.36 CognizTc s...45.10+.58 Comc spcl.9054.16+.99 CommScp n...22.82-.21 CommVlt...44.98-1.72 Compuwre.5010.04+.07 ConcurTch...128.22+.18 Conns...31.31+.52 ConsolCom1.5527.96+.60 ConstantC...32.01+2.85 Conversant...34.81+.03 Copart...32.83-.05 CorinC hlf....14-.10 CorOnDem...33.63+.53 Costco1.42130.44-.15 CowenGp...3.83+.01 Cree Inc...29.67+.27 Crocs...12.03+.06 Ctrip.com...57.12+.11 CubistPh...70.93-1.49 CumMed...3.85+.06 CyberArk n...30.24+1.03 CypSemi.449.49-.01 Cytori....51-.02 D-E-FdELIAs h....13+.01 Dndreon...1.03-.01 Dentsply.2746.14+.20 Depomed...15.10-.12 DexCom...43.31-.77 DiambkEn...67.24+.02 DigRiver...u25.65+8.27 DirecTV...84.15-.28 DiscCmA s...36.61+.64 DiscCmC s...36.19+.50 DishNetw h...62.20+1.20 DollarTree...58.94+.43 DonlleyRR1.0416.73+.17 DrmWksA...22.90-.84 DryShips.761.52-.48 Dunkin.9245.11+1.11 DurataTh...23.98-.04 DyaxCp...10.81+.07 E-Trade...21.17+.22 eBay...51.12+.33 EarthLink.203.42+.12 EstWstBcp.7234.74-.03 EchoGLog...23.87-1.57 EducMgmt...d.62-.53 8x8 Inc...7.28-.42 ElPLoco n...34.63-.07 ElectSci.326.61-.18 ElectArts...36.35+.11 EFII ...42.49-.19 ElizArden...15.76-1.27 Emcore...5.22+.06 EncorW.0840.07+2.63 Endo Intl...65.04+.38 Endocyte...5.81+.20 EngyXXI.487.57-.41 Enphase...13.40-.20 Entegris...11.96+.12 Equinix7.57e194.87-2.86 Ericsson.46e11.47-.34 Esperion...24.68+.92 Euronet...51.16-.42 Exelixis...1.69+.05 Expedia.72f81.53+1.69 ExpdIntl.64f40.92-.01 ExpScripts...73.65+.59 ExtrmNet...3.14+.02 Ezcorp...10.47+.58 F5 Netwks...114.90+.33 FEI Co1.0079.22-.84 FLIR Sys.4032.04+1.93 Facebook...u80.67+.63 FairchldS...14.10+.14 Fastenal1.0042.67+.45 FifthStFin1.108.71+.01 FifthThird.5219.12+.14 Finisar...15.93-.25 FinLine.3225.36+.06 FireEye...31.51+.63 FstNiagara.32d7.30-1.14 FstSolar...56.44+.17 FT DWF5...20.70+.16 FstMerit.6417.28-.04 Fiserv s...u66.04+.95 FiveBelow...37.95-.45 Flextrn...9.33+.12 Fortinet...25.73+.29 ForwrdA.4845.66-2.69 Fossil Grp...100.76+1.31 FosterWhl.40e30.41+.06 Francesca...12.05-.18 FreshMkt...34.19-.06 FrontierCm.406.28... FuelCellE...1.78+.01 FultonFncl.3211.28+.04 G-H-IGam&Lsr n2.0831.98-.03 Garmin1.9255.26+1.03 Gentex.6431.65+.18 Gentherm...42.39+.16 GeronCp.15t2.23+.02 Gevo h....36+.01 GileadSci...u110.71+3.53 GluMobile...4.47-.02 Gogo...16.51+.12 GolLNGLtd1.8054.62+.96 Goodyear.2420.81-.16 Google A...548.90-4.75 Google C n...539.78-4.20 GoPro n...71.91-7.24 GreenPlns.32f31.42-.70 GrifolsSA.29e34.32+.78 Groupon...6.05-.14 GulfportE...48.73-.55 HD Supply...27.68+.46 Halozyme...9.15-.11 HancHld.9632.92+.05 Hasbro1.7257.61+.13 HawHold...16.23+.45 Healthwys...14.87+.32 HrtlndEx.0824.01-1.31 HercOffsh...1.53-.02 Hibbett...43.60-1.04 HimaxTch.27e7.62-.21 Hollysys...23.12-.11 Hologic...24.94+.17 HmeLnSvc2.1618.40-.82 HomeAway...33.76+.37 HorizPhm...12.34-.21 HorsehdH...15.81-.42 HubGroup...d34.37-4.64 HudsCity.169.14+.08 HuntJB.8077.34-.20 HuntBncsh.24f9.49+.06 IAC Inter1.36f62.26-.02 IdexxLabs...u135.20+8.85 IPC ...40.07+.76 iRobot...34.39-1.51 iShEurFn.70e23.13+.30 iShAsiaexJ1.04e61.49+.06 iSh ACWI1.29e58.08+.33 iShIndia50.20e30.43+.30 iShNsdqBio.39eu288.77+5.15 Icon PLC...56.71+.16 IconixBr...37.59-.43 Illumina...189.12+3.28 ImunoGn...8.75-.47 Imunmd...3.78+.02 Incyte...55.07+.12 Infinera...13.78-.11 InfinityPh...12.73-.50 Informat...34.43+1.60 InnerWkgs...8.69+.12 InovioPh rs...11.31+.11 Insmed...14.27-.06 IntgDv...14.00-.15 Intel.9033.18+.49 Nasdaq National Market Mutual FundsInteractB.4025.90+.15 InterceptP...237.65+8.16 Intersil.4813.55+.14 Intuit1.00f84.96+1.43 IntSurg...478.01-7.52 InvBncp s.1610.16+.06 IridiumCm...8.99-.03 IronwdPh...13.26-.04 Isis...45.00+2.63 J-K-LJA Solar...8.26+.03 JD.com n...24.02-.64 JDS Uniph...12.10-.31 JackInBox.80u71.27+1.30 JkksPac...6.52-.44 JazzPhrm...166.46+4.16 JetBlue...10.96+.10 JiveSoftw...d5.70+.02 KLA Tnc2.00f75.90+4.90 KandiTech...14.01+.37 KeurigGM1.00145.24+1.24 KnightShp.807.90+.15 KraftFGp2.20f56.83+.29 KratosDef...6.76+.36 Kulicke...13.85+.18 LKQ Corp...27.23+.08 LPL Fincl.9640.93-.37 LakeInd...13.09-2.17 LamResrch.7275.56-.08 LamarAdv3.3250.14+.10 Landstar.2873.40+.80 Lattice...6.49+.07 Layne...d6.31-1.85 LexiPhrm...1.40+.03 LibGlobA s...44.92+1.03 LibGlobC s...u43.51+.86 LibMda A s...46.46+.37 LibtyIntA...25.31+.11 LibVentA s...33.09+1.02 LibTripA n...31.60+.33 LifePtH...70.30-.43 LigandPh...53.97-.16 LinearTch1.0840.89-.03 LinnEngy2.9025.35-.16 LinnCo2.9023.74-.13 Logitech lf...13.69+.28 LogMeIn...44.96+.47 lululemn gs...41.40-.01 M-N-0MCG Cap.20md3.13-.05 MKS Inst.66u35.19+.23 MSG...64.76+.16 MagellnHlt...57.66+.19 ManhAsc s...37.35+.59 MannKd...5.73+.08 Marketo...29.83-.49 MarIntA.8069.29+.86 MarvellT.2413.03+.14 Mattel1.5230.31+.07 MattsonT...2.50+.07 MaximIntg1.1228.74+1.08 MaxwellT...10.64+.76 MediCo...21.94-.05 Medivation...101.87+2.47 MelcoCrwn.55e25.62... Mellanox...45.34+.14 MemorialP2.2021.50-.10 MemRsD n...26.04+.20 MercadoL.66112.16+4.76 MeritMed...14.89+2.01 MerrimkP...u9.37+.25 Methanx1.0057.08-.16 Micrel.2011.46-.31 Microchp1.42f41.04+.70 MicronT...31.06+.17 Microsoft1.24f46.13+1.11 MillerHer.5631.00+.14 MobileIrn n...9.08-.12 Mondelez.60f34.37+.26 MonPwSys.6040.47+.88 MonstrBev...97.89+.26 Move Inc...20.90+.01 Mylan...51.22+.79 MyriadG...36.96-1.04 NETgear...32.87+.89 NIC Inc.35e16.26-2.05 NPS Phm...26.93-2.15 NXP Semi...65.53+1.35 NasdOMX.6040.88-.42 NatPenn.44f9.62-.20 NatusMed...u33.07-.44 Navient n.6018.90+.19 NektarTh...13.15-.10 NetApp.6640.72+.42 Netflix...385.02+1.98 NtScout...35.23+.15 Neurcrine...17.51+.34 NewLink...38.48-.60 NYMtgTr1.087.68+.02 Newport...17.96-.31 NewsCpA...15.73+.22 NewsCpB...15.32+.22 Noodles...21.75+.29 NorTrst1.3263.64+.78 NorthfldBc.2813.91+.12 NwstBcsh.52a12.32... Novavax...5.13+.14 NuanceCm...14.86+.16 Nvidia.3418.48+.20 NxStageMd...14.79+.17 OReillyAu...u170.48+3.04 OfficeDpt...5.05-.06 OldDomFrt...70.26+.11 OldNBcp.4412.98+.31 OnSmcnd...7.95+.14 Oncothyr...1.80-.04 OraSure...8.35-.20 Orexigen...4.39+.01 Outerwall...55.42-1.58 Overstk...21.30+1.81 P-Q-RPDC Engy...43.61-.06 PDF Sol...12.48+.60 PDL Bio.608.33... PMC Sra...7.34+.06 PTC Inc...36.49+.24 PTC Thera...36.45-1.51 PacWstBc1.0040.04-.35 Paccar.8861.40+.82 PacBiosci...6.07+.41 PacSunwr...d1.55-.05 PanASlv.5010.54-.18 PaneraBrd...169.20+2.46 Parexel...63.74+.24 PatternEn1.31f28.25+.10 Patterson.8041.84+.28 PattUTI.4024.45-1.36 Paychex1.5245.49+.48 PnnNGm...12.41+.21 PennantPk1.1210.65+.03 PeopUtdF.6614.34+.15 PerfectWld.48e21.43+.22 PernixTh h...u9.87+.72 PetSmart.7869.45+.81 Pharmacyc...123.68+2.36 PilgrimsP...26.68+.18 Pixelwrks...5.68+.19 Plexus...38.54+.42 Polycom...12.39-.07 Popular...30.41+.18 PwShs QQQ1.34e98.62+.80 PriceTR1.7677.84+.52 Priceline...1138.43+7.45 PrivateB.0429.79-.02 PrUltBio s...u115.07+4.04 PrUPQQQ s.01e84.94+1.91 PrognicsPh...4.72+.11 ProgrsSoft...25.48+.38 Proofpoint...39.37+1.72 ProUShBio...d10.60-.41 PShtQQQ rs...35.33-.83 ProspctCap1.339.74+.10 QIAGEN...22.84-.07 QIWI plc1.39e27.08-3.21 QlikTech...26.46+1.84 Qlogic...11.32-.23 Qualcom1.6876.00+.86 QualitySys.7014.17-.45 RF MicD...10.62+.08 RadNet...8.83+.04 Rambus...10.44+.02 Randgold.5064.69-1.85 RaptorPhm...10.98+.09 RealPage...18.35+2.23 Receptos...u67.40+2.90 RedRobin...49.73+1.02 Regenrn...u402.50+8.54 RegulusTh...u17.33+2.79 RentACt.9229.29-.23 RetailMNot...19.25+.47 Revance n...19.47+.36 RexEnergy...8.31-.37 RigelPh...1.83-.08 RiverbedT...18.94+.32 RocketFuel...17.51+.14 RockwllM...9.36-.69 RosettaR...36.59-1.11 RossStrs.8080.50+.42 RoyGld.8466.26-.35 RubiconTc...4.29-.20 S-T-USBA Com...111.57+.97 SEI Inv.4437.06+.15 SFX Ent...5.32-.10 SLM Cp...9.04+.05 SVB FnGp...103.71-2.28 SabraHltc1.5226.98+.16 SabreCp n.3616.91+.12 SalixPhm...140.42+4.86 SanderFm.88f78.95-1.12 SanDisk1.2088.76+.30 SangBio...11.35+.10 Sanmina...19.47+.23 Sapient...14.42+.05 SareptaTh...23.56+.52 SciClone lf...7.90... SciGames...9.91+.19 SeagateT2.16f58.36+1.85 SearsHldgs...38.97+3.02 SearsHld rt...d.10-.08 SeattGen...35.95+.35 SelCmfrt...u25.49+.41 Sequenom...3.06-.12 SvcSource...3.00-.06 Shire.62e194.49+9.51 ShoreTel...7.91+.12 Shutterfly...42.60... SigmaAld.92135.07-.31 SilicnImg1.00e4.60... SilcnLab...43.99-.04 SilicnMotn.6024.54-.66 Slcnware.30e6.83+.22 SilvStd g...5.28-.10 Sina...39.84-.37 Sinclair.66f27.98+.06 SiriusXM...3.37... SkywksSol.4455.04-.30 SmithWes...10.26+.37 SodaStrm...24.45+3.26 SolarCity...54.25+.15 Solazyme...6.54+.10 SonicCorp.36u24.91+.61 Sonus...3.21+.01 Spectranet...31.00+3.67 SpectPh...7.70-.11 SpiritAir...64.38+.86 Splunk...63.24+3.41 Sprouts...28.95... Staples.4812.51-.01 StarBulkC...10.19-.14 Starbucks1.0475.81+.97 Starz A...30.48+.11 StlDynam.4622.31+.16 Stericycle...123.05-.75 SMadden...29.93+.15 Stratasys...117.53+.05 SunPower...31.26+.05 SuperMicro...u30.55-.20 SusqBnc.36d9.18-.22 Symantec.6023.98+.11 Synaptics...62.11-11.17 Synchron...46.13+.41 SynrgyPh...2.81+.03 Synopsys...39.93+.42 SyntaPhm...3.03+.01 SynthesEn....93-.09 TICC Cap1.168.61+.06 tw telecom...39.14+.04 TakeTwo...22.42-.14 Tangoe...13.51+.09 TASER...15.47+.21 TeslaMot...235.24-.05 Tetraphase...24.02+.09 TxCapBsh...57.04-.26 TexInst1.3647.57+.57 TexRdhse.6027.54+.66 Theravnce1.0017.08-.09 TibcoSft...23.29+.07 TiVo Inc...12.79-.04 TractSupp.6471.67+.67 TrimbleN...29.61-.05 TripAdvis...88.25+.62 TriQuint...17.62+.07 TrueCar n...18.00-.40 TubeMgl n...u15.90-.83 TuesMrn...u19.48-.51 21stCFoxA.2533.35-.19 21stCFoxB.2532.24-.14 21Vianet...18.99+.04 UTiWrldwd...10.72+.09 Ubiquiti.1734.47-.27 UltaSalon...117.35-.49 Ultratech...17.71-.22 Umpqua.6016.27+.10 Unilife...3.46+.08 UtdTherap...132.35+3.58 UnivDisp...29.95-1.08 UrbanOut...30.29-.41 V-W-X-Y-ZVCA Inc...u44.85+3.70 VandaPhm...11.11+.78 VanSTCpB1.62e80.31-.01 VanIntCpB3.31e86.76+.06 Verastem...9.59+.63 Verisign...58.55+2.21 VertxPh...109.91+1.82 ViacomA1.3271.99+.25 ViacomB1.3271.61+.14 Vimicro h...9.97+.29 VimpelCm.45e6.01... VitaePh n...u9.11+.46 Vivus...3.41+.01 Vodafone1.82e32.26+.83 Volcano...10.13-.25 WarrenRs...3.38-.10 Web.com...19.09-.25 Weibo n...18.27-.16 Wendys Co.208.41+.04 WernerEnt.2025.67-.23 WDigital1.6091.68+1.09 WstptInn g...5.92-.07 WetSeal h....40-.05 WholeFood.4837.71-.32 Windstrm1.0010.21+.01 WisdomTr...11.35-.04 WrightM...31.86+.37 Wynn5.00184.72+1.23 XOMA...4.30-.07 XenoPort...6.72+.32 Xilinx1.1643.20+.66 Xoom...19.44+.22 YRC Wwde...18.15+.18 YY Inc...81.94+3.19 Yahoo...43.50+.90 Yandex...27.78+.18 ZeltiqAes...23.71+.62 Zillow...106.07-2.38 ZionsBcp.1627.53+.09 Zix Corp...3.24-.04 Zogenix...1.27+.01 Zulily n...37.12+.11 Zynga...2.37... 2002HARLEY -DA VIDSON 100TH ANNIVERSAR Y XL 883R SPOR TSTER$3,2 00 2002HARLEY DA VIDSON HERIT AGE SOFT AIL$5,9 00 2005HARLEY DA VIDSON FA TBOY$8, 500 SPORTS EDITOR FRANK JOLLEY 352-365-8268 Sports sports@dailycommercial.com C1 DAILY COMMERCIAL Saturday, October 25, 2014 NCAA: Ole Miss heads to Death Valley / C4 MARK FISHER Special to the Daily Commercial The surging Tavares Bull dogs (6-2, 2-1) took a bite out of neighboring rival Eustis High School Friday night at Dr. Argin A. Boggus Stadium throttling the Panthers 42-21 in a key Class 5A District 11 matchup. The Bulldogs cashed in two second quarter interceptions from Dontae Perdue in route to a 35-7 halftime lead over the Panthers (3-5, 1-2) as Ezekiel Thomas broke the 1,000-yard rushing mark on the night. Thomas gained 88-yards on 21 carries and three touch downs rushing and collected three receptions for 84-yards including a 60-yard TD pass from Austin Tomson. Tavares never trailed in the contest taking the initial possession and jumping into the lead 7-0 just a minute into the game with Thomas scoring from 11-yards out and Joey Meany connecting for the point after. The Bull dogs must have sensed the approach of Halloween as on the rst play of the drive they resorted to a little trick ery as Bennett Tyrick picked up a toss on a reverse and hit a wide open Tomson for a 55-yard gainer. Two plays later Thomas had the rst of his four touchdowns. Eustis responded im mediately with their own 68-yard drive as Perdue hit Jordon Owens for 25-yard gainer and Jessy Morejon for a 22-yard pickup and then capped it with a 14-yard scoring toss to Simeon Gold en to knot the score 7-7 early PAUL RYAN / DAILY COMMERCIAL Tavares senior Ezekiel Thomas (20) carries the ball to just short of the goal line during a game between Tavares High School and Eustis High School in Tavares on Friday. TAVARES 42, EUSTIS 21 MOUNT DORA 49, SOUTH LAKE 34 PHOTOS BY JOE OTT / SPECIAL TO THE DAILY COMMERCIAL Mount Dora senior Willie Brown (8) makes a carry during a game against South Lake High School on Friday in Groveland. PAUL BARNEY | Staff Writer paul.barney@dailycommercial.com Mount Dora kept feeding the ball to Wil lie Brown. The senior running back took care of the rest. Brown rushed for 286 yards and four touch downs on 23 carries as the Hurricanes handed South Lake its rst loss of the season, 49-34, on Friday night. Brown added an other touchdown on a 75-yard kickoff return in the second quarter that gave Mount Dora (7-2) a 28-13 lead. I was hungry. It was time for me to eat, Brown said. And eat he did. Brown had six carries of 18 yards or more, including two of 55 yards or more. His rst carry went for a 36yard touchdown that gave the Hurricanes a 7-0 lead just 1 minute, 2 seconds into the game. Unbelievable, Mount Dora coach Ben Bullock said of Browns performance. Our offensive line did a great job opening up holes and then he took advantage of those holes and made them into touchdowns. Wide receivers did a great job blocking down eld and a lot of the credit goes to the kids. They just did a great job. Bullock has been tell ing his team all season that it needs to capital ize on opportunities. Tonight we did, he added. When we had an opening Willie hit it and made a touch down. He had a lot of them, too, and for big gains. On the Hurricanes second drive, Brown scored from 21 yards out to make it 14-0 with 7:59 left in the rst quarter. Mount Dora led 21-0 after the rst quarter on an Andrew Davis 9-yard touchdown pass from Zach Dickinson. The Eagles (7-1) cut into the decit in the second quarter when Nick Guidetti (21 of 42, 233 yards) threw con secutive touchdown passes to Brandon Walker and DJ Allen. A missed extra point attempt from Angel Puente made it 21-13 with 4:07 left in the rst half. The errors on special teams were just begin ning for South Lake. On the ensuing kickoff, Brown raced 75 yards to the end zone to extend Mount Doras lead to 28-13. I said, If they kick it to me Im going to take it to the house, and thats what I did, said Brown, who averaged nearly 10 yards a carry in the rst half. The Eagles defense held Brown in check in the third quarter and trailed just 28-20 going Undefeated Eagles fall as Hurricanes win ground game AP FILE PHOTO Tampa Bay Rays manager Joe Maddon tips his hat to the crowd before an opening day baseball game against the Baltimore Orioles in St. Petersburg. FRED GOODALL Associated Press ST. PETERSBURG Joe Maddons high ly successful run as manager of the Tampa Bay Rays is over. After discussions on a new deal bogged down with the Rays, Maddon is now free to listen to offers from any club a prospect the manager apparently found too difcult to resist. Tampa Bay an nounced Friday that Maddon had exercised an opt-out clause in his contract. The Rays had expected to have him in their dugout at least through 2015, when his contract was due expire. We are turning the page to begin a pro cess to look for a new manager, Rays presi dent of baseball oper ations Matt Silverman said. Its going to be a deliberate and compre hensive search, includ ing both internal and external candidates. Maddon managed the Rays for nine sea sons, compiling a 754705 record. Tampa Bay made the playoffs four times, won two AL East titles and appeared in the 2008 World Series. He did not immedi ately return a telephone message from The Associated Press. The 60-year-old did tell the Tampa Bay Times that leaving the Rays after nine seasons was a gut-wrenching decision. I have been doing this for a long time, Maddon told the news paper. I have never had this opportunity to research my em ployment on my terms. Never, never, never. And I think anybody South Lake senior Charles Hutchinson (24) makes a carry. Joe Maddon wont return to Tampa Bay SEE MADDON | C2 Tavares takes bite out of Eustis SEE TAVARES | C2 Mount Dora topples S. Lake SEE MDHS | C2 PAGE 16 C2 DAILY COMMERCIAL Saturday, October 25, 2014 BASEBALL MLB Postseason x-if necessary WILD CARD Tuesday, Sept. 30: Kansas City 9, Oakland 8, 12 innings Wednesday, Oct. 1: San Francisco 8, Pittsburgh 0 DIVISION SERIES (Best-of-5) American League Baltimore 3, Detroit 0 Thursday, Oct. 2: Baltimore 12, Detroit 3 Friday, Oct. 3: Baltimore 7, Detroit 6 Sunday, Oct. 5: Baltimore 2, Detroit 1 Kansas City 3, Washington 1 Friday, Oct. 3: San Francisco 3, Washington 2 Saturday, Oct. 4: San Francisco 2, Washington 1, 18 innings Monday, Oct. 6: Washington 4, San Francisco 1 Tuesday, Oct. 7: San Francisco 3, Washington 2 St. Louis 3, Los Angeles 1 Friday, Oct. 3: St. Louis 10, Los Angeles 9 Saturday, Oct. 4: Los Angeles 3, St. Louis 2 Monday, Oct. 6: St. Louis 3, Los Angeles 1 Tuesday, Oct. 7: St. Louis 3, Los Angeles 2 LEAGUE CHAMPIONSHIP SERIES (Best-of-7) American League Kansas City 4, Baltimore 0 Friday, Oct. 10: Kansas City 8, Baltimore 6, 10 in nings San Francisco 1, Kansas City 1 Tuesday, Oct. 21: San Francisco 7, Kansas City 1 Wednesday, Oct. 22: Kansas City 7, San Francisco 2 Friday, Oct. 24: Kansas City (Guthrie 13-11) at San Francisco (Hudson 9-13), late Today, Oct. 25: Kansas City (Vargas 11-10) at San Francisco (Vogelsong 8-13), 8:07 p.m. Glance EASTERN CONFERENCE Atlantic W L Pct GB Toronto 5 1 .833 Boston 5 3 .625 1 Brooklyn 3 2 .600 1 New York 3 3 .500 2 Philadelphia 2 6 .250 4 Southeast W L Pct GB Atlanta 4 3 .571 Orlando 3 3 .500 Miami 3 4 .429 1 Washington 3 4 .429 1 Charlotte 3 5 .375 1 Central W L Pct GB Detroit 5 2 .714 Cleveland 4 2 .667 Chicago 4 3 .571 1 Indiana 3 4 .429 2 Milwaukee 3 4 .429 2 WESTERN CONFERENCE Southwest W L Pct GB Houston 5 2 .714 New Orleans 5 2 .714 Dallas 3 4 .429 2 Memphis 2 4 .333 2 San Antonio 1 3 .250 2 Northwest W L Pct GB Utah 5 2 .714 Minnesota 4 2 .667 Portland 2 3 .400 2 Denver 2 5 .286 3 Oklahoma City 2 5 .286 3 Pacic W L Pct GB Golden State 5 2 .714 Phoenix 3 2 .600 1 L.A. Lakers 3 4 .429 2 L.A. Clippers 2 5 .286 3 Sacramento 1 4 .200 3 Thursdays Games Indiana 88, Charlotte 79 Detroit 109, Philadelphia 103 New Orleans 88, Dallas 85 Fridays Games Dallas at Orlando, late New York vs. Toronto at Montreal, Quebec, late Minnesota vs. Chicago at St. Louis, MO, late Miami at Memphis, late San Antonio at Houston, late Phoenix at Utah, late Sacramento vs. L.A. Lakers at Las Vegas, NV, late Denver at Golden State, late Portland at L.A. Clippers, late Todays Games No games scheduled FOOTBALL NFL AMERICAN CONFERENCE East W L T Pct PF PA New England 5 2 0 .714 187 154 Buffalo 4 3 0 .571 135 142 Miami 3 3 0 .500 147 138 N.Y. Jets 1 6 0 .143 121 185 South W L T Pct PF PA Indianapolis 5 2 0 .714 216 136 Houston 3 4 0 .429 155 150 Tennessee 2 5 0 .286 121 172 Jacksonville 1 6 0 .143 105 191 North W L T Pct PF PA Baltimore 5 2 0 .714 193 104 Cincinnati 3 2 1 .583 134 140 Pittsburgh 4 3 0 .571 154 162 Cleveland 3 3 0 .500 140 139 West W L T Pct PF PA Denver 6 1 0 .857 224 142 San Diego 5 3 0 .625 205 149 Kansas City 3 3 0 .500 142 121 Oakland 0 6 0 .000 92 158 NATIONAL CONFERENCE East W L T Pct PF PA Dallas 6 1 0 .857 196 147 Philadelphia 5 1 0 .833 183 132 N.Y. Giants 3 4 0 .429 154 169 Washington 2 5 0 .286 151 183 South W L T Pct PF PA Carolina 3 3 1 .500 158 195 New Orleans 2 4 0 .333 155 165 Atlanta 2 5 0 .286 171 199 Tampa Bay 1 5 0 .167 120 204 North W L T Pct PF PA Detroit 5 2 0 .714 140 105 Green Bay 5 2 0 .714 199 147 Chicago 3 4 0 .429 157 171 Minnesota 2 5 0 .286 120 160 West W L T Pct PF PA Arizona 5 1 0 .833 140 119 San Francisco 4 3 0 .571 158 165 Seattle 3 3 0 .500 159 141 St. Louis 2 4 0 .333 129 176 Thursdays Game Denver 35, San Diego 21 Sundays Gamesondays Game Washington at Dallas, 8:30 p.m. Thursday, Oct. 30, Nov. 3 Indianapolis at N.Y. Giants, 8:30 p.m. Late Thursday Broncos 35, Chargers 21 San Diego 0 7 7 7 21 Denver 0 14 14 7 35 Second Quarter DenSanders 2 pass from Manning (McManus kick), 13:35. SDAllen 2 pass from Rivers (Novak kick), 3:07. DenSanders 31 pass from Manning (McManus kick), :32. Third Quarter DenSanders 3 pass from Manning (McManus kick), 10:53. DenThompson 2 run (McManus kick), 7:34. SDGates 4 pass from Rivers (Novak kick), 2:39. Fourth Quarter DenThompson 1 run (McManus kick), 13:29. SDGates 10 pass from Rivers (Novak kick), 9:31. A,907. SD Den First downs 22 27 Total Net Yards 306 425 Rushes-yards 15-61 30-139 Passing 245 286 Punt Returns 1-6 2-18 Kickoff Returns 0-0 2-64 Interceptions Ret. 0-0 2-1 Comp-Att-Int 30-41-2 25-35-0 Sacked-Yards Lost 2-7 0-0 Punts 4-49.3 4-40.5 Fumbles-Lost 0-0 2-0 Penalties-Yards 7-77 9-71 Time of Possession 29:14 30:46 INDIVIDUAL STATISTICS RUSHINGSan Diego, Oliver 13-36, Rivers 1-17, R.Brown 1-8. Denver, Hillman 20-109, Thompson 7-24, Sanders 1-6, Anderson 1-0, Manning 1-0. PASSINGSan Diego, Rivers 30-41-2-252. Denver, Manning 25-35-0-286. RECEIVINGSan Diego, Allen 9-73, Oliver 7-27, Gates 5-54, Floyd 4-58, Royal 3-29, Green 1-9, R.Brown 1-2. Denver, Sanders 9-120, D.Thomas 8-105, Hill man 3-29, J.Thomas 2-23, Welker 2-5, Tamme 1-4. MISSED FIELD GOALSDenver, McManus 53 (WL). HOCKEY NHL EASTERN CONFERENCE Atlantic GP W L OT Pts GF GA Montreal 7 6 1 0 12 22 21 Detroit 7 4 1 2 10 16 13 Tampa Bay 7 4 2 1 9 21 14 Ottawa 5 4 1 0 8 14 10 Boston 9 4 5 0 8 22 23 Toronto 7 3 3 1 7 20 21 Florida 6 2 2 2 6 9 14 Buffalo 8 1 7 0 2 9 28 Metropolitan GP W L OT Pts GF GA N.Y. Islanders 7 5 2 0 10 25 22 Columbus 6 4 2 0 8 20 16 Washington 6 3 1 2 8 20 14 N.Y. Rangers 7 4 3 0 8 21 23 Pittsburgh 6 3 2 1 7 22 19 New Jersey 6 3 2 1 7 20 20 Philadelphia 7 2 3 2 6 22 28 Carolina 6 0 4 2 2 11 23 WESTERN CONFERENCE Central GP W L OT Pts GF GA Nashville 7 5 0 2 12 19 13 Chicago 6 4 1 1 9 18 10 Dallas 6 3 1 2 8 21 20 Minnesota 5 3 2 0 6 12 4 St. Louis 6 2 3 1 5 13 13 Winnipeg 6 2 4 0 4 11 16 Colorado 7 1 4 2 4 12 24 Pacic GP W L OT Pts GF GA Anaheim 7 6 1 0 12 25 14 Los Angeles 7 5 1 1 11 17 10 Calgary 9 5 3 1 11 25 19 San Jose 8 4 3 1 9 27 25 Vancouver 6 4 2 0 8 20 17 Arizona 6 2 3 1 5 16 24 Edmonton 7 2 4 1 5 17 29 NOTE: Two points for a win, one point for over time loss. Thursdays Gamesidays Games Dallas at New Jersey, late Tampa Bay at Winnipeg, late Vancouver at Colorado, late Carolina at Edmonton, late Columbus at Anaheim, late Todays Games. Sundays Games Colorado at Winnipeg, 3 p.m. Columbus at Los Angeles, 4 p.m. Ottawa at Chicago, 7 p.m. San Jose at Anaheim, 8 p.m. Washington at Vancouver, 9:30 p.m. NASCAR-Sprint Cup-Goodys Headache Relief Shot 500 Lineup After Friday qualifying; race Sunday At Martinsville Speedway, Ridgeway, Va. Lap length: .526 miles (Car number in parentheses)ife,. GOLF LPGA Tour At Jian Lake Blue Bay Golf Course Hainan Island, China Purse: $2 million Yardage: 6,760; Par: 72 (36-36) First Round (a-amateur) Note: Fridays second round was suspended due to rain and will be completed today. As a result of the rain, the tournament was reduced to 54 holes. Jessica Korda 31-35 66 Jodi Ewart Shadoff 32-35 67 Shanshan Feng 35-32 67 Brittany Lang 34-33 67 Caroline Masson 32-35 67 Lee-Anne Pace 35-32 67 Michelle Wie 33-34 67 Chella Choi 35-33 68 Caroline Hedwall 34-34 68 Danielle Kang 35-33 68 Cristie Kerr 33-35 68 I.K. Kim 32-36 68 Dewi Claire Schreefel 34-34 68 Moriya Jutanugarn 34-35 69 Lydia Ko 36-33 69 a-Wanyao Lu 35-34 69 Haru Nomura 35-34 69 Gerina Piller 33-36 69 Sarah Jane Smith 34-35 69 Mariajo Uribe 34-35 69 Amy Yang 36-33 69 Laura Diaz 35-35 70 Simin Feng 36-34 70 Sandra Gal 36-34 70 Julieta Granada 36-34 70 Jennifer Johnson 35-35 70 Dan Li 34-36 70 Brittany Lincicome 31-39 70 Morgan Pressel 37-33 70 Beatriz Recari 37-33 70 Thidapa Suwannapura 37-33 70 Ayako Uehara 37-33 70 Line Vedel 35-35 70 Sun Young Yoo 35-35 70 Dori Carter 38-33 71 Austin Ernst 35-36 71 Mi Jung Hur 36-35 71 Christina Kim 35-36 71 Mi Hyang Lee 35-36 71 Lizette Salas 38-33 71 Jenny Shin 36-35 71 Yani Tseng 36-35 71 Panpan Yan 35-36 71 Laura Davies 37-35 72 Karine Icher 38-34 72 Tiffany Joh 37-35 72 Haeji Kang 36-36 72 Katherine Kirk 38-34 72 Meena Lee 36-36 72 Amelia Lewis 36-36 72 Pernilla Lindberg 35-37 72 Yu Liu 36-36 72 Mo Martin 37-35 72 Belen Mozo 35-37 72 Anna Nordqvist 36-36 72 Hee Young Park 39-33 72 Yuting Shi 38-34 72 Hongmei Yang 35-37 72 Marina Alex 38-35 73 Carlota Ciganda 37-36 73 Eun-Hee Ji 37-36 73 P.K. Kongkraphan 35-38 73 Candie Kung 38-35 73 Ilhee Lee 36-37 73 Jiayun Li 36-37 73 a-Jing Yan 35-38 73 Yuyang Zhang 36-37 73 Liqing Chen 38-36 74 Mina Harigae 37-37 74 Mirim Lee 37-37 74 Giulia Sergas 33-41 74 Xiyu Lin 36-39 75 Azahara Munoz 37-38 75 Lexi Thompson 35-40 75 Hong Tian 37-39 76 a-Lei Ye 37-39 76 Liying Ye 39-37 76 a-Yunjie Zhang 40-36 76 Yanhong Pan 39-38 77 Ziqi Ye 35-42 77 a-Wan Ping Huang 39-40 79 PGA Tour McGladrey Classic Friday At Sea Island Resort, Seaside Course St. Simons Island, Ga. Purse: $5.6 million Yardage: 7,005; Par: 70 Russell Henley 68-63 131 Brendon de Jonge 68-64 132 Brian Harman 65-67 132 Andrew Svoboda 66-66 132 Will MacKenzie 65-68 133 Mark Wilson 67-66 133 Fabian Gomez 67-66 133 Kevin Chappell 67-67 134 Scott Piercy 67-67 134 Chris Kirk 68-67 135 Mark Hubbard 68-67 135 David Lingmerth 68-67 135 Carl Pettersson 68-67 135 William McGirt 68-67 135 Robert Streb 69-66 135 Bill Haas 69-66 135 Derek Ernst 68-67 135 Shawn Stefani 66-69 135 Erik Compton 65-70 135 Andrew Putnam 68-67 135 Cameron Tringale 68-68 136 Chad Campbell 68-68 136 Daniel Summerhays 68-68 136 Chesson Hadley 66-70 136 Michael Thompson 65-71 136 Ken Duke 67-69 136 Steven Alker 69-67 136 Eric Axley 67-70 137 Rory Sabbatini 67-70 137 Matt Kuchar 67-70 137 John Peterson 66-71 137 Sung Joon Park 66-71 137 John Rollins 70-67 137 Brendon Todd 67-70 137 Justin Leonard 72-65 137 Webb Simpson 67-70 137 Kevin Kisner 69-68 137 Hudson Swafford 70-67 137 Daniel Berger 68-69 137 Patton Kizzire 66-71 137 Jerry Kelly 70-68 138 Jason Kokrak 66-72 138 Stuart Appleby 71-67 138 Ben Martin 70-68 138 TV 2 DAY AUTO RACING 9 a.m. FS1 NASCAR, Sprint Cup, practice for Goodys Headache Relief Shot 500, at Martins ville, Va. 10 a.m. FS1 NASCAR, Truck Series, pole qualifying for Kroger 200, at Martinsville, Va. Noon FS1 NASCAR, Sprint Cup, Happy Hour Series, nal practice for Goodys Headache Relief Shot 500, at Martinsville, Va. 1:30 p.m. FS1 NASCAR, Truck Series, Kroger 200, at Martinsville, Va. COLLEGE FOOTBALL Noon ESPN Texas at Kansas St. ESPN2 Rutgers at Nebraska ESPNEWS Memphis at SMU ESPNU Minnesota at Illinois FSN North Texas at Rice SEC UAB at Arkansas 12:30 p.m. WRBW North Carolina at Virginia 1 p.m. CBSSN San Jose State at Navy 1:30 p.m. NBCSN Penn at Yale 3:30 p.m. ABC Michigan at Michigan St. CBS Mississippi St. at Kentucky ESPN West Virginia at Oklahoma St. ESPN2 Oregon St. at Stanford ESPNU Georgia Tech at Pittsburgh FOX Texas Tech at TCU FS1 FAU at Marshall FS-Florida Boston College at Wake Forest 4 p.m. ESPNEWS UNLV at Utah St. SEC Vanderbilt at Missouri 5 p.m. CBSSN Temple at UCF 7 p.m. ESPNU Syracuse at Clemson 7:15 p.m. ESPN Mississippi at LSU SEC South Carolina at Auburn 7:30 p.m. ESPN2 Alabama at Tennessee 8 p.m. ABC Ohio St. at Penn St. 10 p.m. ESPNU Alabama A&M vs. Alabama St., at Birmingham, Ala. FS1 Southern Cal at Utah 10:45 p.m. ESPN Arizona St. Washington GOLF 6:30 a.m. TGC European PGA Tour, Perth International, third round, at Perth, Western Australia 2 p.m. TGC PGA Tour, McGladrey Classic, third round, at St. Simons Island, Ga. 5 p.m. TGC Champions Tour, AT&T Championship, second round, at San Antonio 9 p.m. ESPNEWS Asia-Pacic Amateur Championship, nal round, at Melbourne, Australia 11:30 p.m. TGC Blue Bay LPGA, nal round, at Hainan Island, China MAJOR LEAGUE BASEBALL 8 p.m. FOX World Series, Game 4, Kansas City at S.F MENS COLLEGE HOCKEY 7 p.m. NBCSN Niagara at Notre Dame MOTORSPORTS 3:30 a.m. FS1 MotoGP World Championship, Grand Prix of Malaysia, at Sepang SOCCER 7:40 a.m. NBCSN Premier League, Manchester City at West Ham 9:55 a.m. NBCSN Premier League, Arsenal at Sunderland 12:30 p.m. NBC Premier League, Leicester at Swansea City 2:30 p.m. NBC MLS, Los Angeles at Seattle SCOREBOARD given the same set of circumstances would do the same thing. The departure is sec ond major loss for the team in less than two weeks. Executive vice president of baseball operations Andrew Friedman left for the Los Angeles Dodgers on Oct. 14. Friedman assem bled the teams that Maddon guided in transforming the Rays from perennial losers into a club that had six consecutive winning seasons before nish ing 77-85 this year. Theres a lot of work to be done this offsea son, and this certainly adds to all thats on our plate, Silverman said. The last time we went looking for a manager was nine years ago and we did a pretty good job nding Joe, Silverman added. Theres no timetable. It will take us as long as we need to get the right guy. Theres no shortcuts here. Silverman, who took over for Friedman after serving as team president for a de cade, said Maddons contract contained a clause that allowed to opt-out under certain conditions, including Friedman leaving the Rays. Friedmans exit raised immediate questions about whether he might try to lure Maddon to the Dodgers when the managers contract expired after next season. Friedman said last week that Don Mat tingly will remain in Los Angeles to manage the Dodgers in 2015. He reiterated that stance Friday after learning Maddon had become available ear lier than anticipated. As I said last week, Joe and I enjoyed a tremendous relation ship described himself as surprised and disappointed by Maddons decision, adding he and Stern berg were optimistic about the chances of retaining the manager when talks began. MADDON FROM PAGE C1 in the rst quarter. After that early exchange it was all Tavares as Thomas got untracked and Tomson was able to connect on key plays to keep the Bulldogs moving. On the next series of downs the Bulldogs turned to Thomas who pounded the Panther line. When Eustis keyed on Thom as, Tomson hit Tyrick Bennet for a 48-yard toss and catch that set the Bulldogs up at the Panther 15-yard line where Thomas drove the ball in on 3 consec utive runs, scoring from 8 yards out and a 14-7 lead. After exchanging turnovers Tavares ended a 12-play Pan ther drive when Peter Tsirnikas emerged from an interception and fumble with the pigskin and returned it to near mideld for the Bull dogs. After a heavy dose of Thomas to move them into the red zone Tomson connected with Tadarrius Patrick for a 5-yard touchdown and the 21-7 lead. After pushing the advantage to 28-7 on Thomas third score of the night, Tadarrius Patrick immediately picked off Perdue on the rst play of the ensuing drive and Tom son connected with Thomas for a 60-yard touchdown pass and entered the half leading 35-7. Midway through the third quarter and facing fourth and 15 Tomson connected with Rich ard Mays for a 31-yard touchdown for the Bull dogs nal score and triggering a running clock for the balance of the game 42-7. Eustis mounted two late scoring drives for the nal score of 42-21. Tavares travels to play arch rival Mount Dora Halloween night in a game that is es sential for both teams playoff hopes and they enter the game with identical 6-2 records overall and 2-1 in Class 5A District 11. TAVARES FROM PAGE C1 into the fourth, but they couldnt stop him in the fourth. On his rst three carries in the fourth, Brown scored on runs of 64 and 55 yards that gave Mount Dora a 4227 lead. A Brown fumble on the Hurricanes next drive, however, led to an 11-play, 59-yard drive that was capped off with a 4-yard touchdown reception from Allen. Mount Dora answered right back when Von Davis scored on a 17-yard run to make it 49-34 with 2:13 remaining. The score was set up by Brown, who had five carries for 45 yards on the drive. The win was the fourth straight for the Hurricanes, who im proved to 5-0 on the road none bigger than against an unde feated team. Its a great win, Brown said. I cant explain the feeling right now because that was a ranked team, undefeated and we just came in and beat them by 15. MDHS FROM PAGE C1 MD 21 7 0 21 49 SL 0 13 7 14 34 FIRST QUARTER MD Willie Brown 36 run (Jared Brown PAT) MD Brown 21 rub (Brown PAT) MD Andrew Davis 9 pass from Zach Dickinson (Brown PAT) SECOND QUARTER SL Brandon Walker 5 pass from Nick Guidetti (Angel Puente PAT) SL DJ Allen 25 pass from Guidetti (PAT no good) MD Brown 75 kick return (Brown PAT) THIRD QUARTER SL Kevin Evans 47 pass from Guidetti (Puente PAT) FOURTH QUARTER SL Trace McEwan 10 pass from Guidetti (Puente PAT) MD Brown 55 run (Brown PAT) SL Allen 4 pass from Guidetti (Puente PAT) MD Von Davis 17 run (Brown PAT) PAGE 17 Saturday, October 25, 2014 DAILY COMMERCIAL C3 FRANK JOLLEY | Staff Writer frank.jolley@dailycommercial.com Richard Pettus likely knew The Villages Charter School football team was going to handle Wildwood easily on Friday night when the rivals squared off in Wildwood. He had a superior roster, in terms of size and talent, and the Buffalo were playing to keep their edge for the postseason, while the Wildcats had little to play for except pride. Running back Jabari Jiles scored ve touch downs in the rst half and the Buffalo defense over whelmed the outmanned Wildcats in a 43-6 win. The win, coupled with Umatillas 28-17 victory against Starke Bradford, clinched second place in Class 4A-District 4 for the Buffalo and earned the team a playoff spot. The Villages will play a regional seminal game on the road, while Umatilla will host a playoff game as the district champions. We had a great week of preparation for Wildwood, Pettus said. This game is almost always competi tive and we expected the same thing again this year. Wildwood is a little under manned in terms of roster size, but they always have great athletes We learned a lesson in last weeks game (a 48-42 win against Keystone Heights) about the impor tance of playing hard for 48 minutes and I think it paid off for us tonight. Jiles got The Villages off to a quick start with a 37-yard run on the Buffa los rst play of the game. One play later, Jiles scored from 2-yards out to give The Villages a lead it would never relinquish. After a 3-and-out for the Wildcats, Jiles got the Buffalo on the scoreboard again on their next posses sion with a 24-yard run. Not even four minutes into the game and The Villages had all scoring it would need for the win. But, Jiles and company werent done. He scored three touch downs in the second quar ter on runs of 2, 8 and 18 yards to stake the Buffalo to a 36-0 lead at intermis sion. A combination of Jiles bruising running style and superior blocking by The Villages offensive line wore the Wildcats down. In the rst half, Jiles had 144 yards on 14 carries. He did not run the ball in the second half. Wildwood suffered through a tumultuous week, with rookie coach Beau Austin resigning due to family issues and the sus pension of several players, which depleted an already thin roster. Casey Strickland stepped in as interim head coach, was unable to direct the Wildcats to their rst win of the season. For most of the game, Wildwood played with fewer than 20 players, particularly after injuries took their toll. In the second half, which was played with a running clock, The Villages scored in the third quarter on a 14-yard run by Scott Lane. The Buffalo got an emo tional boost when Hannah Moody, a member of the schools girls soccer team, kicked the extra point. Wildwood got on the scoreboard on their nal play of the game when Brian Da vis tossed a 25-yard scoring pass to Anderson Georges. The Villages nished with 386 yards of offense 363 of which came on the ground. The Buffalo attempted only one pass in the game. Wildwood nished with 64 yards of offense. We wanted to come in and play with the mind-set and mental preparation of a champion and I think we did that for the most, Pettus said. We had a few too many penalties, but nobody got any stupid pen alties or let their emotions get them into trouble. Our last district game is next week and for our seniors, it will be the last chance to play at The Range (The Villages home eld. Its going to be an emo tional night. The Villages (6-2) will host Interlachen, while Wildwood (0-7) will play at Ocala West Port. Week 9 EAST RIDGE 0, WINTER SPRINGS 48 Penalty ags were ying last night in Clermont, so much so that it changed the whole momentum of the game for both teams. East Ridge came out strong against the Winter Springs Bears. However, the yellow ags created a deated East Ridge. The Knights battled through the momentum swings and fought hard throughout the entire game. Jalen Lozano was an intimi dating spark for the Knights at running back. East Ridge just couldnt put the ball in the end zone. After the half, the Knights defense only allowed one touchdown in the entire second half. Zach Honnold and Cory Rahman led the defensive game and played great individually. Head Coach Ashour Peera said, We came out with a lot more energy than them, we never stopped playing. I have a lot of respect for that. Winter Springs passing game was just too well matched for the Knights. This was a game that showed a lot of promise and the best progress for the Knights this season although, as per usual, the score didnt reect the play. The Knights (0-9) will be at home again next Friday against Ocoee. LAKE MINNEOLA 0, OCALA TRINITY CATHOLIC 37 Special teams and defensive scores were the kryptonite of the Lake Minneola Hawks in last nights matchup against the Ocala Trinity Catholic Celtics. It started off as a close game until the Celtics scored on a 90-yard punt return and a defensive touchdown from a fumble. From that point on, the Hawks couldnt rebound, especially after halftime. Defensively, the Hawks only gave up 23 points. With a lack of offensive support, they couldnt produce a win. Trinity Catholic came up with big plays all night including a defensive stop of a Hawks fourth and one. Lake Minneola has not won a game since upsetting Mount Dora in Week 5. The Hawks (2-6) look to bounce back next week at home to take on Leesburg. MONTVERDE ACADEMY 6, TAMPA BERKELEY PREP 28 The offense for the Montverde Eagles couldnt get anything going last night against the Berkley Prep Buccaneers. The only touchdown came from a big 70-yard pass from Austin Hunt to Jordan Pouncey. This connection has been lethal all season, but it seems as though the deadly duo were kept at bay last night. The Buccaneers defense is stellar; holding teams to an average of 13.4 points a game. Defensively, the Eagles didnt have a bad showing. They didnt allow for big plays and made the Buccaneers earn every yard. They even held them scoreless in the fourth quarter. The Buccaneers average 24 points a game, right on track for last nights score. The score reected the Berkeley Prep averages almost perfectly. The Buccaneers proved to be too good for the average year the Eagles are having. The Eagles (1-5) will take on South Daytona Warner Christian at home next Friday. SOUTH SUMTER 42, WEEKI WACHEE 10 On Twitter last night, there was a tweet that read, Why doesnt Weeki Wachee just forfeit and save themselves the embarrassment? Thats a pretty harsh thing to say about high school football. While the statement was indeed unsportsmanlike, South Sumter rolled over the Weeki Wachee Hornets much like they have done to every team this season. South Sumter put up big numbers on offense and played lights out defense as Bushnell has grown accustomed to. The Raiders are seeded No. 1 in the playoffs and for good reason. They have shown noth ing but dominance all season and they have one more game to tackle in two weeks before it becomes another undefeated season for South Sumter. The Raiders (9-0) will be off next week. They will be back on Nov. 7 on the road at Leesburg. UMATILLA 28, STARKE BRADFORD 17 There is a cliche that states, Defense wins championships. Last night for the Umatilla Bulldogs was no different. The victory means that the Bulldogs remain undefeated in their district making them district champions. Head Coach Steve Seward said that last nights win wasnt the product of offense. Umatillas defense was stellar; especially in the second half. Justin Lewis and Caleb Rob inson helped to produce the scores that aided in the victory. This win means that Umatilla will get to host a playoff game. (The opportunity) is big for our school, our community and our kids, said Seward. The Bulldogs (6-2) will be at home for a Thursday night game next week against Deltona Trinity Christian. Byes This Week: Leesburg Yellowjackets The Yellowjackets (3-5) will be on the road next Friday against Lake Minneola. Mount Dora Bible Bulldogs The Bulldogs (7-0) have nished their regular season and have their rst playoff game next Friday. For live updates during game time, go to cial.com/sports/ or follow us on Twitter @dailycsports. STEVE FUSSELL Special to the Daily Commercial Coach Robert East brought his Masters Academy Eagles to Sleepy Hollow eld in Leesburg with three trick plays, a spirited if smallish team and high hopes. First Academy brought Ojay Cummings. That was enough. Cummings took the opening kickoff on the 20 yard line, sprinted down the left side of the eld and didnt stop until he crossed the goal line. He didnt dodge, weave or break tackles. He just outran everyone. By the end of the rst half Cum mings had scored a two-point conversion, passed to Kyle Beers for a TD deep in the end zone, run 14 yards for another TD, 30 yards for a fourth score and his third touchdown, intercepted a Masters Academy pass in the end zone, run another score over the goal line from the 30-yard line and, just 22 seconds before the halftime whistle, a 50yard scoring romp. Thats 329 total yards, 246 on the ground, and that was just the rst half. No man is an island, John Donne famously wrote, and Cummings had help. Sandy Dude Edwards slipped past the defensive front line and then skirted 37 yards into the end zone to score at the 9:24 mark and scored again three minutes later with a two-yard power run off right tackle. And senior kicker Jacob Heins scored a memorable eld goal, but that came later. Masters Academy deserves credit for playing hard through the end. They scored just before the half when Brandon Dickens rolled off right tackle and powered his way past the defense from the 14 yard line. Wide receiver Jordan Richards set up that TD by outmaneuvering First Academys Cummings hes just as good in the defensive backeld as he is on offense to haul down a 60-yard pass before stepping out of bounds. Cummings quickly congratulated him. Thats the mark of a player who knows his center, and the sort of sportsmanship Eagles coach Shel don Walker inspires. Cummings sat out the second half as the Eagles talented second platoon continued to dominate. Masters Academy scored again with three minutes cleft on the clock when quarterback Evan Lowe snaked his way through First Acad emys defense with the keeper for a 45-yard score. Senior kicker Jacob Heins landed a 38-yard eld goal just before the game ended. It was Seniors Night, and Heins tied the school record for distance. East Ridge 0-9 after Winter Springs visits First Academy blows out Oviedo Masters PHOTOS BY BRETT LE BLANC / DAILY COMMERCIAL The Villages freshman Scott Lane (3) runs the football during Fridays game between Wildwood Middle High School and The Villages Charter School at Wildwood Middle High School in Wildwood on Friday. FIRST ACADEMY 51, OVIEDO MASTERS 13 THE VILLAGES 43, WILDWOOD 6 The Villages sophomore Jabari Jiles (21) runs the football. The Villages wallop Wildwood PAGE 18 C4 DAILY COMMERCIAL Saturday, October 25, 2014 Week 9 GARY B. GRAVES Associated Press LEXINGTON Mississip pi States recent domination of Kentucky has been strug gle. The Bulldogs have won ve straight against the Wild cats to draw within a game of tying the series entering todays 42nd meeting. But four of the past six games be tween the schools have been decided by a touchdown or less, including MSUs 28-22 win last year in Starkville with the Bulldogs having to make a late defensive stand. Both teams fortunes have surged dramatically since then, possibly setting the stage for another competi tive game. The Bulldogs (6-0, 3-0 Southeastern Conference) enter with the nations top ranking and a Heisman Tro phy hopeful in quarterback Dak Prescott. Kentucky (5-2, 2-2) meanwhile is a surpris ing East division contender after being picked to nish last. Another tight game might be looming. There are a lot of similar ities with both teams, MSU coach Dan Mullen said this week. In our game against them last year, it came right down to the nal play. They have a lot of star players back from last year, and we have a lot of guys back too. So I know they are going to have a lot of condence. Kentucky rallied from an 11-point halftime decit to get within 29 yards of possibly tying the game late before turning it over on downs. The Wildcats went on to a second straight 2-10 n ish, but that contest offered a bright spot that theyve turned into their best start in years. Mississippi State knows something about turn arounds as well. The Bull dogs followed their Kentucky victory with three straight losses against ranked SEC foes, a skid that seems like a distant memory with their nine-game winning streak. Highlighting MSUs run are three straight wins over LSU, Texas A&M and Auburn, all ranked eighth or better at the time. The Bulldogs are coming off a bye with their rst No. 1 ranking and sights set on winning the West title, impressive for a team projected to nish mid-pack in that tough division. If you look at their quar terback and their team its not a real big surprise, said Kentucky coach Mark Stoops, whose team seeks only its fourth win in 15 meetings against No. 1 teams. I noticed that a year ago. I noticed how big they were and how long and theyre developed. ... They put stress on you across the board. TRIPLE-THREAT PRESCOTT: While passing and running have thrust Prescott into the Heisman discussion, hes also a threat to catch the ball. He caught a TD pass last season against the Wildcats in Starkville and has two ca reer games with TDs passing, running and throwing. All three career TD receptions have come on passes from wide receiver Jameon Lewis. NO BAYOU HANGOVER: Ken tuckys worst performance this season at LSU resulted in an ugly end to its threegame winning streak. But the Wildcats mentality is more condent than their recent past, and quarterback Patrick Towles believes the Wildcats will be able to move on from that disappoint ment. It hurt for about a day, Towles said of the loss, and if it keeps hurting, youve got to play a different sport. DEFENSE: Kentucky has been solid defending the pass but will have its hands full stopping Prescott, who has thrown for 1,478 yards and 14 touchdowns. He has also run for 576 yards and 8 TDs, which could create another headache for the Wildcats run defense if they dont account for him there. On the ip side the Bulldogs secondary is allowing 308.3 yards per game, a weakness that Towles and his receivers aim to exploit after a disap pointing effort against LSU. INSIDE THE 20: Both of fenses have been effective inside the red zone at better than 80 percent efciency. But Kentucky must nd an opening against MSUs redzone defense that leads all Power 5 conference schools and is second nationally at 58 percent. Opponents have scored on 11 of 19 trips inside MSUs 20 but with only six touchdowns. Ranked teams have only gotten four TDs against MSU. WELL-RESTED: Mississippi State faces Kentucky for the fourth straight year coming off a bye, a break that has beneted the Bulldogs in Lexington. They earned back-to-back wins here in 2011 and 2012 by margins of 12 and 13 points respec tively, the most lopsided outcomes in recent meetings between the schools. Kentucky prepares to host No. 1 Mississippi State ROGELIO V. SOLIS / AP Mississippi State quarterback Dak Prescott throws a pass during the rst half against Auburn earlier this month in Starkville, Miss. ON TV TODAY No. 1 Mississippi State at Kentucky, Today, 3:30 p.m., CBS JAY LAPRETE / AP Ohio State running back Ezekiel Elliott, right, tries to get past Rutgers defensive back Lorenzo Waters during the rst quarter last week in Columbus. RUSTY MILLER Associated Press COLUMBUS In order for Penn State to pull an upset against No. 13 Ohio State tonight, coach James Franklin feels the Nittany Lions 12th man must get in the game. We would love to have a huge, home-eld advantage, he said of the annual whiteout game. I anticipate us hav ing 107,000 Penn State fans wearing white, screaming and going crazy, making it really difcult for (Ohio State) to communicate. Thing is, the Buckeyes dont seem all that intimidated in an unfriendly environment. Theyve won their last 18 Big Ten games, two off the confer ence record, with nine on the road. They havent lost on an opposing home eld since a 40-34 loss at rival Michigan on Nov. 26, 2011. Accustomed to the ear drum-piercing sounds of a medium-sized city at home games, the Buckeyes say they welcome the noise. (The coaches are) trying to talk to us about it so we dont get nervous, star defensive end Joey Bosa said. Ive been talking to everybody all year about, Oh, Penn State is sup posed to be the craziest envi ronment. We play in front of 108,000 people every weekend, so it kind of (stinks) when we go away and they dont have an environment like that.ve gained in condence since a home loss to Virginia Tech in Game Two and dont seem afraid of the Nittany Lions. We think were better than them and were just going to prove that, said tight end Nick Vannett. UP FRONT: Penn State is hurt ing on the O-line, where a col lection of untested youngsters and overlooked upperclassmen are holding down the fort while Franklin pieces together a team beset by scholarship restric tions and players who left the program. Were working with it, he said. One of the big challenges right now is youre trying to get guys condent (who have) little experience. No. 13 Ohio State say they relish large, loud crowd at Penn State ON TV TODAY No. 13 Ohio State at Penn State, Today, 8:07 p.m., ABC BRETT MARTEL Associated Press BATON ROUGE Third-ranked Mississippi is about to make its second appearance in LSUs Death Valley in the Hugh Freeze era and how things have changed since the rst visit two seasons ago. Freeze recalls how proud the Rebels were to play the favored Tigers close, only to be undone by Odell Beckham Jr.s punt return for a touch down that was eerily rem iniscent of Billy Cannons famous Halloween night runback against Ole Miss more than half a century earlier. It was, at that point, a moral victory. We go down there in Year 1 and compete. Obviously, we did not pull it off, but we had a lot of fun, Freeze recalled. We dont talk about going to play any body close right now. We want to get a plan togeth er and prepare like were going to win. All Ole Miss (7-0, 4-0 Southeastern Conference) has done this season is win while joining rival Mississippi State atop the most powerful division in college football. Four of the top ve teams in the AP Poll play in the SEC West, a division that also includes No. 24 LSU, the Rebels opponent on tonight. The Tigers (6-2, 2-2) are underdogs in this matchup for the rst time in 15 years, but are playing with rising condence and are moti vated by revenge. One year ago, LSU was in contention to win the SEC West before being tripped up by the Rebels in Oxford. Several key players from that 2013 LSU squad have left for the NFL, but those who remain arent shy about embracing the concept of payback. No. 3 Ole Miss travels to Death Valley, looks to beat No. 24 LSU ON TV TODAY No. 3 Mississippi State at No. 24 LSU, Today, 7:15 p.m., ESPN GERALD HERBERT / AP LSU running back Terrence Magee scores on a touchdown carry against New Mexico State defensive back Jacob Nwangwa in the rst half last month in Baton Rouge. STEVE MEGARGEE Associated Press KNOXVILLE The Lane Kifn factor has added intrigue to the increasingly lopsided Alabama-Tennessee rivalry. Kifn, who coached Tennessee in 2009 before leaving for Southern California, is back in the Southeastern Conference this season as Alabamas offensive coordi nator. Kifns presence has made todays matchup a much-anticipated moment for Tennessees fans, though both teams have downplayed the impact his return to Neyland Stadium will have on the game itself. Nobody on Tennessees current roster ever played for Kifn. Tennessee coach Butch Jones says he has never even met Kifn. The game means everything to our football program and our fans because it is the University of Alabama not because it is Lane Kifn, Jones said. Rather than using Kifns havent diminished the meaning of this rivalry. You ask, a lot of old people around here know thats the biggest game of the year, Alabama safety Nick Perry said. Kiffin returns to Neyland Stadium as Volunteers host No. 4 Alabama ON TV TODAY No. 4 Alabama at Tennessee, Today, 7:30 p.m., ESPN2 PAGE 19 Saturday, October 25, 2014 DAILY COMMERCIAL C5 r f fn ftbt n f r ff r fntb rtbr rf Week 9 KYLE HIGHTOWER Associated Press ORLANDO The memory of UCFs lategame comeback victory over Temple last season will probably never be forgotten. But the Knights coach George OLeary is more concerned with con sistency this week as his team prepares for a rematch against the Owls today. UCF (4-2, 2-0 Amer ican Athletic Confer ence) is coming off a narrow victory last week against Tulane in which it committed four turnovers. The offense is also averag ing just over 23 points per game. Temple coach Matt Rhule says his team is still learning to play with expectations and missed on an opportu nity last week in a hum bling loss to Houston. The Owls (4-2, 2-1) are also adjusting this week after being hit with injuries on both sides of the ball that could be signicant. Close nishes and nar row victories were UCFs best friend a year ago. None perhaps was more memorable than the Knights three-point win at Temple that featured a late-game, one-handed touch down grab by UCF receiver J.J. Worton that kept the Knights even tual BCS berth intact. The only thing I remember of the game is the catch, OLeary said this week. Temple is again the opponent on Saturday, though this time OLeary is more concerned about his team showing con sistency than heroics after wobbling through a turnover-laden win over Tulane last week. I think the biggest thing is that we go out and execute, thats what we have to get done in all three phases, OLeary said. Youre at the midpoint in the season. Are we playing like I think we probably should be playing right now? Probably not. I think in some phases we are, and others were not. You have to get bet ter if you want to reach that end of the year and do the things you want to do as a football team. And Ive addressed that to the players. They understand that. Temple coach Matt Rhule quickly dis missed the notion this week that last years late-game collapse against the Knights will be a factor this time around. But the Owls do come into Orlando trying to erase another humbling loss, via a 31-10 loss at Houston last week that ended a three-game win streak. Unlike the near upset against UCF last season, which was just a blip on a 2-10 nish, Rhule said that the matchup against the Cougars was the rst time in recent mem ory in which the Owls played with something on the line in a game in which both teams were playing with expectations. That was the chal lenge for us and we stumbled a little bit, we didnt handle that moment the way that we all thought we would, Rhule said. Theres nothing else to do, but to grow from it and keep building on that process of build ing the program, and taking advantage of the opportunity this week because we get the same challenge again. STINGY DEFENSE: Tem ple has the Americans stingiest defense, giving up just 17.2 points per game so far in 2014. The Owls also rank in the top half of league in scoring offense, scoring 33.5 points per game. CAUSING TURNOVERS: A big reason for Temples defensive success has been its ability to create turnovers. Temple is plus-4 in turnover margin, led by Tavon Young who has three interceptions. OFFENSIVE STRUGGLES: UCFs defense allow ing opponents just 20 points per game this sea son has saved UCF on more than one occasion this season. But OLeary said he is looking for overall improved pro duction from an offense that is producing just 291 yards of offense and 23.8 points per game. By comparison, the 2013 Knights averaged 441.5 yards and 34.6 points per game. KNIGHTS LOSE LINEMAN: The Knights offensive line has issues at times this season, and will play the rest of the year down a man. OLeary announced that sopho more RG Colby Watson is out for the season after having back surgery. Watson was injured Sept. 20 against Bethune-Cookman. He had made three starts. BANGED UP OWLS: Tem ple could be without as many as three key contributors on Satur day. LT Dion Dawkins, who has started all six games this season, didnt practice this week and is likely out with an ankle injury, Rhule said. LB Avery Williams has made ve starts in 2014 and may be out as many as six weeks, also with an ankle injury. Rhule also said LB Nate Smith is listed as questionable with an undisclosed injury. UCF, Temple meet after memorable 2013 matchup ON TV TODAY Temple at UCF, Today, 5 p.m., CBS Sports Network JOHN RAOUX / AP Central Florida quarterback Justin Holman looks for a receiver against Brigham Young earlier this month in Orlando. SAM RICHE / AP Michigan State quarterback Connor Cook throws in rst half against Indiana last week in Ind. NOAH TRISTER Associated Press EAST LANSING Michigan State coach Mark Dantonio refused to admit this week that his team has dominated its rivalry with Michigan lately. In fact, the Spartans leader wouldnt even acknowledge that Michigan State dominated last years meeting, when the Wolver ines nished with minus-48 yards rushing in a 29-6 loss. Dantonio chose his words care fully, but his message was clear: No matter how many times the Spartans batter their in-state rivals, it will never be enough. When stakes are at their highest you want to be as competitive as you can. I think thats human nature. Thats what we do, Danto nio said. Were not going to allow the opportunity to slip by and go through something nonchalant. The eighth-ranked Spartans host Michigan today, having won ves playoff still a possibility, the Spartans (6-1, 3-0 Big Ten) will be under a decent amount of pressure, knowing a slip-up against an apparently overmatched rival would be unusually painful. I mean, its a rivalry game, Michigan State defensive end Mar cus Rush said. The day after last years game, as soon as that game is over, youre already ready to play them again. So its a year-round thing, and everyones red up. The Wolverines (3-4, 1-2) will try to do a better job dealing with Michigan States physicality than in last seasons loss. Michigan was 6-1 heading into that game before los ing ve of six to nish the season. This year has not been any better. Meanwhile, the Spartans ended up going unbeaten in the Big Ten in 2013 and then won the Rose Bowl, leaving little doubt about their superiority within their home state. Thats a reality Michigan is hoping to change. MSU hoping for another win vs. Michigan ON TV TODAY Michigan at No. 8 Michigan State, Today, 3:30 p.m., ABC JOHN ZENOR Associated Press AUBURN The Auburn Tigers want everyone to know they havent faded from the scene. The last college football fans saw of the fth-ranked Tigers, they were limping away from No. 1 Mississippi State two weeks ago following a 15-point loss that left hopes for a repeat Southeastern Confer ence title and playoff berth diminished but still intact. Auburn (5-1, 2-1 SEC) returns from an open date tonight against South Caro lina (4-3, 2-3) hoping for a strong rebound against the 18-point underdogs. Safety Josh Holsey says the Tigers want to come back with a bang. This game right here is really just to show people that were still the Auburn Tigers, Holsey said. The bang is just knowing that were going to come out with a vengeance, were going to come out and do what we do best. That means run ning the ball with quarterback Nick Marshall and Cam eron Artis-Payne, throwing downeld to Dhaquille Williams and Sammie Coates and playing solid defense. Every game from here on is pretty much must-win. We just know if we win out, well still be in great shape to ac complish all our goals that we still have set, Holsey said. No. 5 Auburn hosts South Carolina ON TV TODAY South Carolina at No. 5 Auburn, Today, 7:30 p.m., SEC Network PAGE 20 C6 DAILY COMMERCIAL Saturday, October 25, 2014 DAY, MONTH XX, YEAR DAILY COMMERCIAL XX PAGE 21 Saturday, October 25, 2014 DAILY COMMERCIAL C7 DAY, MONTH XX, YEAR DAILY COMMERCIAL XX Untitled art#: order#: 6 X 11 Black 22 C8 DAILY COMMERCIAL Saturday, October 25, 2014 18311 U.S. HWY MOUNT DORA, FL866-235-6175See More Great Deals at: ALWAYS GO THE EXTRA MILE! AdvantageMt. Dora Visit us on: *PRICE INCLUDES $3,000 CA SH OR TRADE EQUITY PLUS TA X, TA G AND $698.50 DEALER FEE 2011 DODGE NITRO HEA TSTK#14X557ANOW$14,595* 2007 CHR YS LER SEBRINGSTK#13U290BNOW$6,787* 2006 PONTIAC VIBESTK#14X504BNOW$6,787* 2007 Dodge Ram 1500 Quad CabSTK#357290NOW$15,787* CHR YS LER TOWN AND COUNTR Y VA NSTK#14U447ANOW$15,787* 2012 JEEP PA TRIO T LA TITUDESTK#14U447ANOW$15,787* 2005 PONTIAC SUNFIRESTK#14K591BNOW$5,787* 2011 TO YO TA PRIUSSTK#14X419ANOW$16,782* 2008 CHR YS LER SEBRINGSTK#14X378BNOW$8,787* 2008 CHR YS LER SEBRING CONVER TIBLESTK#14E087BNOW$10,787* 2012 BUICK LACROSSESTK#14L366ANOW$16,782* 2012 CHEVROLET EQUINOXSTK#14T294BNOW$16,782* 2007 FORD MUSTA NG CONVER TIBLESTK#14I601BNOW$9,787* 2010 JEEP COMP ASS SPOR TSTK#14H450BNOW$11,787* 2007 JEEP COMP ASS LIMITEDSTK#14R649ANOW$10,787* 2010 CHEVROLET MALIBULT ZSTK#14T494BNOW$11,787* 2008 CHR YS LER 300 LXSTK#14S468BNOW$10,787* 2012 CHR YS LER 200 TOURINGSTK#14L109ANOW$12,782* 2012 CHEVROLET CR UZE LSSTK#357350NOW$12,787* 2014 DODGE JOURNEY SESTK#14K638ANOW$16,787* 2013 DODGE AV ENGER SXTSTK#14U587ANOW$13,787* 2005 DODGE RAM 1500 QUAD CA BSTK#357090NOW$12,787* 2011 BUICK LUCERNE CXSTK#357010NOW$14,787* 2013 CHR YS LER 200 LXSTK#15X019ANOW$13,787* 2014 DODGE AV ENGER SESTK#13U328ANOW$16,782* 2011 DODGEJOURNEY MAINSTREETSTK#14U575ANOW$15,782* 2013 DODGE DA RT SXTSTK#357370NOW$13,787* 2013 VOLKSW AGEN JETT A 2.5LSTK#13U328ANOW$16,782* 2011 DODGE JOURNEY CREWSTK#14U624ANOW$16,787* 2011 HYUND AI SONA TASTK#14R632ANOW$13,787* 2013 DODGE DA RT SESTK#14C347ANOW$15,787* 2011 CHR YS LER 200 TOURINGSTK#14W384ANOW$13,787* 2010 JEEP PATRI OT SPOR TSTK#14T445INOW$9,782* 2010 FORD ESC APE XL TSTK#14U439ANOW$12,787* 2011 FORD FUSION SESTK#14Q636ANOW$13,787* PAGE 23 Saturday, October 25, 2014 DAILY COMMERCIAL D1 2010 FORD EDGE LIMITEDWA S$20,500 NOW$18,930 2012 NISSAN ROUGUEWA S$21,600 NOW$19 460 2012 CHEVROLET SIL VERADO LT ZWA S $36,000 NOW$31,740 2009 HYUNDAI ELANTRA GLSWA S$12,300 NOW$10 860 2007 GMC CANYONWA S$13,600 NOW$9,720 2010 JEEP GRAND CHEROKEEWA S$17,800 NOW$14 790 2012 NISSAN SENTRA SLWA S$17,000 NOW$14 370 2012 FORD EXPLORERWA S$26,980 NOW$24 980 2013 DODGE RAM QUAD CABWA S$29,240 NOW$24 810 2007 FORDMUST ANG COUPE GTWA S$18,000 NOW$14,820$24,810 2004 CHEVROLET SIL VERADOWA S$16,900 NOW$14 810 2011 TOYOT A SIENNA XLEWA S$23,900 NOW$22 000 2012 NISSAN AL TIMA COUPEWA S$22,300 NOW$18 230 2014 FORD FLEX SELWA S $33,300 NOW$30,860 2012 FORD F-150 SUPERCREWWA S $28,700 NOW$24,910 2007 FORD EDGE SEL PLUSWA S$16,200 NOW$13,720 2009 TOYOT A COROLLAWA S$12,500 NOW$10,460 2009 CHEVROLET TRA VERSE LTWA S$20,300 NOW$17,210 2011 LINCOLN MKTWA S$27,000 NOW$23,740 2014 JEEP WRANGLER UNLIMITED FREEDOM EDITIONWA S$36,900 NOW$33 210 2012 HYUNDAI SANTE FEWA S$23,900 NOW$20 710 2011 KIA SORENTO LXWA S$17,900 NOW$13,870 2010 HYUNDAI SANT A FEWA S$19,100 NOW$14 960 2012 FORD ESCAPE XL TWA S$19,900 NOW$17 240 2014 FORD ESCAPE SEWA S$23,000 NOW$21 000 2014 FORD FUSIONWA S$23,500 NOW$21 180 2007 HONDA RIDGELINEWA S$17,800 NOW$16 400 2012 FORD EXPEDITIONWA S$37,800 NOW$35,557 2014 FORD FOCUS SEWA S$18,900 NOW$16,760 2013 FORD F-150 FX4WA S$43,500 NOW$41,730 FINANCING AV AILABLE 0% FOR 72 Months ON ALL REMAINING 2014 CARS, CROSSOVERS AND SUVS HELD OVER!!!2014 FORD MUST ANGWA S$25,900 NOW$22 560 2013 FORD F-150WA S$27,900 NOW$25 620 2008 FORD ESCAPE XL TWA S $14,900 NOW$13,600 2014 FORD F-150 XL TWA S $32,500 NOW$29,480 2008 FORD EDGEWA S$15,800 NOW$14 000 2010 CHEVROLET EQUINOXWA S$17,700 NOW$15 600 2010 FORD EXPEDITIONWA S$20,900 NOW$19 680 2012 FORD FUSIONWA S$21,000 NOW$18,860 CERTIFIED PRE-OWNED VEHICLES ALL NE W 2015 MUST ANGS HA VE ARRIVED!2014 FORD FLEXWA S$20,900 NOW$18 990 PAGE 24 D2 DAILY COMMERCIAL Saturday, October D006 Door & Lock Services Enclosure Screening rf nrt rfrb r r Garage Door Services Handyman Services Hauling Services r fn tb f Land Clearing Services r fnt b rt Cleaning ServicesRepair Sales Ser viceDont To ss It Fix it For LessWe com et oY ou .C all 352874 -1238 Landscaping Services 352-409-8994 LANDSCAPING &C LEANING Roong Services Bathroom Services RE-TILE 352-391-5553 b b f b b airs ulting 352.728.1857 352.259.R OOF rf n Carpet Cleaning Services Carpet Repairs &R e-stretching30 Years Ex p 352.406.975 9D005945 John Philibert, Inc rfnWe Also Offer r f ntb f (352) 308-0694n nD007362 tt t t t f t Handyman Services Flooring Services John Philibert, IncFor All Your Flooring Needs Pergo, Ceramic Tile, Travertine, Vinyl &M oreCall John @(352) 308-0694n n ntbD007363 DA LE FRENYE A&S ONS LA WN SERVICErt(352) 771-6312 (352) 638-7108 PAGE 25 Saturday, October 25, 2014 DAILY COMMERCIAL D3 D007364 Call Duane Goodwin(352) 787-9001 PREVENT DRIVEWAY DAMAGETree Root Pruning, Trenching Services Tile Service Tree Service r f n tb fn b n fr f nrr tb BAD TREE CALL ME !! All Phases of Tr ee Wo rk Tr ee Tr imming &R emoval TONY'S TREE SERVICE &L AW NC AREFREE Estimates Ser ving all of Lak eC ounty Window Services RE-TILE 352-391-5553 r f n t b rr r f Upholstery Services D005978 Tree Service Window Services Window Services Mike ZakSPECIALIZE IN TILE REMODEL PROJECTSTILE, PA INTING ,D RY WA LL &M ORE352989-63 41EMAIL: ZAKTILE@A OL.COM CPO POOL CERTIF I ED20 YEARS SER VING LAKE COUNTY To have your Professional Service listed here, please contact the Classied Department at (352) 314-3278. CROSSWORD PUZZLE DAY, MONTH XX, YEAR DAILY COMMERCIAL XX Untitled art#: order#: 6 X 10.75 Black Untitled art#: order#: 6 X 6.08 Black PAGE 26 D4 DAILY COMMERCIAL Saturday, October 25, 2014 2007 TO YO TA COROLLA CESTK#S15200A$8,992 2009 CHEVROLET IMP ALA LTSTK#S14205A$9,988 BREWSTERS SPECIALS 2006 HYUND AI SONA TA GLSSTK#150124A ......................................................$6,888 2006 FORD TA UR US SESTK#150461A .................................................................$7,882 2005 CHR YS LER TOWN & COUNTR YSTK#150335B ......................................$7,992 2005 ISUZU ASCENDER SSTK#S15170B ...........................................................$7,992 2009 CHEVROLET HHR LSSTK#150236A ...........................................................$8,882 2007 KIA RONDO EXSTK#150295A .......................................................................$8,992 2008 KIA OPTIMASTK#150349A ............................................................................$8,992 2010 KIA RIO LXSTK#141249B ...............................................................................$8,992 2008 SUZUKI XL-7 BASESTK#150059C ..............................................................$8,992 2006 KIA SPOR TA GESTK#KP2568 .........................................................................$8,992 2009 MITSUBISHI ECLIPSE GSSTK#150495A ..................................................$9,992 2009 KIA SPOR TA GE LXSTK#KP2564A ...............................................................$9,992 2006 MERCUR Y GRAND MARQUISSTK#150367A ..........................................$9,992 2008 KIA SODONA BASESTK#150566A ..............................................................$9,992 2012 KIA FOR TE EXSTK#150285A .....................................................................$10,000 2007 HYUND AI TUCSONSTK#141264A ............................................................$10,882 2008 KIA AMANTI BASESTK#150264A ...........................................................$10,894 2006 SUBAR U FORESTER 2.5XSTK#150546A .............................................$10,992 2010 NISSAN AL TIMASTK#150466A ................................................................$10,992 2008 FORD ESC APE XL TSTK#S15149B ...........................................................$10,992 2011 KIA FOR TE EXSTK#150312B .....................................................................$1O,993 2010 KIA FOR TE LXSTK#150253A .....................................................................$10,997 2008 GMC CA NY ON Z71STK#SP2506A ...........................................................$10,999 2009 HYUND AI AZERA LIMITEDSTK#150165A ...........................................$10,999 2008 SUBAR U LEGACY 2.5i LSTK#S15130A ................................................$11,296 2011 KIA FOR TE EXSTK#150378A .....................................................................$11,994 2010 NISSAN SENTRA 2.0STK#S15147A .......................................................$11,998 2007 HYUND AI SANT A FESTK#141073A ........................................................$12,482 2011 TO YO TA CA MR YSTK#S15066A ................................................................$12,906 2008 HYUND AI ENTOURAGESTK#150314A ...................................................$12,992 2008 CA DILLAC SRX V6STK#S15171A ...........................................................$12,996 2007 TO YO TA RA V4 LIMITEDSTK#S15191A .................................................$13,494 2012 KIA SEDONA LXSTK#150328A .................................................................$13,882 2009 KIA SPOR TA GE EXSTK#150424A ............................................................$13,894 2012 KIA SOUL PLUSSTK#150395A .................................................................$13,984 2010 KIA SOUL PLUSSTK#141299B .................................................................$13,992 2005 SUBAR U IMPREZA WRXSTK#S14527A ...............................................$13,992 2007 FORD F-150STK#150523A .........................................................................$13,992 2012 HYUND AI SONA TASTK#S15092A ............................................................$13,999 2012 KIA SEDONA LXSTK#141260A .................................................................$14,296 2013 KIA SOULSTK#150358A ..............................................................................$14,399 2008 MAZD A MIA TASTK#150187B ...................................................................$14,492 2009 NISSAN MURANOSTK#S15050A .............................................................$14,718 2010 KIA SOUL PLUSSTK#150231A .................................................................$14,992 2008 SUBAR U IMPREZA OUTBACK SPOR TSTK#S15226Z .....................$14,992 2012 MAZD A MAZD A5 SPOR TSTK#150526A ...............................................$14,992 2012 KIA RIO SXSTK#141051A ...........................................................................$14,992 2010 NISSAN AL TIMASTK#150341A ................................................................$14,992D008124 FREE OIL CHANGEwith an y quali ed test drive on an y new or used car on lot.Must pr esent coupon. Expir es 11/30/14. DAY, MONTH XX, YEAR DAILY COMMERCIAL XX 6865PETS rrfntttbn fb r nfffbtttb frf rnffb rtttrfr tr Thank you for reading the local newspaper! SEIZETHE DA Y SLOCAL AREANEWS.www .dailycommer cial.com PAGE 27 Saturday, October 25, 2014 DAILY COMMERCIAL D5 DAY, MONTH XX, YEAR DAILY COMMERCIAL XX Cash in on Clutter Supplement your budget with a Classified Ad!IN LAKE COUNTY CALL 314-FASTIN SUMTER COUNTY CALL 748-1955 POWER BUY$!!! PAGE 28 D6 DAILY COMMERCIAL Saturday, October 25, f tft nt bn bfbf f nt n nt fn t t nt n nt n nt n ff nt n nt fn nt n nt n nt n nt fn nt n ft n tfn nt n nt fn nt fn tft bn nt n fnt ft $ 189 29 Ask About Our Free In-Home Design Consultation! Ask About Our Free In-Home Design Consultation! SA VE ON THE BRAND NAMES YOU KNOW AND TR UST Monda y-Fr iday 96, Sa turd ay 1 0-6 r f nt b 10% OFF Custo m Order s! Homes & Garden Send your food news to features @dailycommercial.com 352-365-8203 E1 DAILY COMMERCIAL Saturday, October 25, 2014 HALLOWEEN: Great plants for the scary season / E3 DON MAGRUDER AROUND THE HOUSE D o you call them golf carts, golf cars or lowspeed vehicles? The answer is real simple, explains David Knowles from his insurance company ofce in Leesburg. A golf cart has a serial number while a street legal golf car, which is tech nically referred to in the state of Florida as a low-speed ve hicle, will have a VIN (vehicle identication number). According to Knowles, the real confusion begins with insurance coverage. He fears many homeowners are using their golf cart or golf car erro neously believing it is insured under their homeowners in surance policy. Lets talk about how Flor ex ceed 35 miles per hour. LSVs are equipped with many of the safety features of a car. By denition, golf carts are manufactured motor vehicles designed for operation on a golf course for sporting or recreational purposes. They are not to exceed a speed of 20 miles per hour. Golf carts can be permitted on roads in certain jurisdictions, howev er, only in specically desig nated and signed areas. Most golf carts do not have the safety features of a roll bar, seatbelt or safety windshield, so their areas of travel are more restrictive. According to Knowles, the problem is many homeown ers purchase an inexpen sive rider for their golf cart Insurance: The law on golf carts REBECCA TEAGARDEN MCT I wanted Ina Gartens farmhouse kitchen. I thought if it looked like that, then all the food that came out of it would be like hers. Yeah, wouldnt it? Carilyn Platt is not above this sort of magical thinking. In fact, she rather prefers this brand of creativity. Makes the life she shares with Josh, her serial-remodeler husband, and Ben, their ever-patient son, oh-so-much more inter esting. You wouldnt believe how many couches weve had, she says, laughing, nodding at Josh in blame. (Fact, not magic: three in 10 years.) This is the story of what happens when you buy a house you really dont like much, but its the only one you can get and youre real ly tired of looking and its in a great neighborhood (Seattles Magnolia) so you just do it. Then you spend the next 10 years remaking it. Thats where our money goes, Carilyn says. We dont travel. The Platts came to Seattle in 2004 for Joshs job at Mic ro dont Mag nolias eastern slope, was ga rage dominant. (Josh won ders, What in Gods name possesses somebody to make a house as ugly as possible on the outside?) Interiors were traced in a high-gloss, yel lowy r trim. The Platts dug right in. Better by the remodel The Platts serially renovate their home in Seattles Magnolia neighborhood PHOTOS BY BENJAMIN BENSCHNEIDER / MCT ABOVE: The Platts latest work has been in the kitchen: new cabinets, Caesarstone counters, Sub-Zero refrigerator and freezer drawers. BELOW: We traded the old kitchen cabinets to the oor guy, and he put in the stairs, says Carilyn Platt, thrilled with the barter. MIKE CREGER MCT Gina Socha gets her yard decorating ideas wherever she can nd them. Area garden shops, other peoples gardens or any mag azine I can get my hands on. You can nd inspi ration anywhere, she said from her Wood land, Minn., home ear lier this month. Come Sept. 1 each year, her summer cot tage garden is trans formed to one with ob vious autumn tones. Theres a riot of colors in her yard, which mix es ower arrangements with antiques. And Socha follows the trends as well. On the boulevard is her fairy or miniature gar den. Its the hottest trend right now, she said. Laurie Gaudino would agree. She owns the Gardening Junky store on Piedmont Av enue in Duluth, Minn. While she started out with repurposed, more kitschy items to place in decorative gar dens, she broke into the miniature market this year as customers clamored for tiny mail boxes, pathways and live plants to mix into the scenes. Gaudino said she saw a lot of families getting into the creation of the gardens. You can nd supplies at most garden stores and, a sign of miniature domination, even Tar get has the xings. So cha said her go-to local places are Lake Superi or Garden Center and Gordys Gift & Garden. She also likes Winter Greenhouse southeast of Hayward, Wis. Socha is a bit like Gaudino in taking ev ery day items and in corporating them into Cottage garden has a lot of fall color real and created CLINT AUSTIN / MCT Gina Socha stands near the arbor in her fall cottage garden in the Woodland neighborhood of Duluth, Minn. SEE MAGRUDER | E6 SEE COTTAGE | E2 SEE REMODEL | E6 PAGE 30 E2 DAILY COMMERCIAL Saturday, October 25, 2014 352.357.9964D00 2749Larges t inven to ry ofLandscape trees and plants in Lake County rr f n r tb rt f tr rr rr brf r tbr r n b r br r r rr r n n rr r b br t b 4200 Hwy 19A Mount Dor a 32757 r fn r! PICCIOLA ISLAND!3/2, double garage, large yard, side entr y garage. STONE FIREPLACE in a corner! Mid 100 s G4804218GARDEN VIEWS!Split 2/2, den, would make nice separate guest suite, split 2.5 garage, ENCLOSED LANAI!Low 200 s G4801461 SUBMITTED PHOTO This is a well-maintained three-bedroom home plus den. It features a private lanai overlooking a meticulously manicured garden and lawn, a brick paver driveway and walkway, newer exterior paint and newer AC (2012). The garage is extended 4 feet and has a nished oor and side entrance golf cart door with a brick paver cart path. The home has a 30-year architectural shingle roof. There is a spacious kitchen that includes an island, upgraded cabinets, wine rack, built-in microwave, smooth top range plus room for a table. The room opens to the family room with sliders to a very nice BBQ patio. Dental crown molding with 11-foot ceilings. Nice size master suite features an oversized walk-in closet. Master bath includes walk-in shower, garden tub and dual sinks. Low monthly HOA fees and irrigation system with timer and rain gauge make this a very nice package. Priced at $219,500. Stop by or call the sales ofce for your personal tour of this home and the facilities. PAL Realty, 25327 US Hwy 27, Suite 202, Leesburg, FL 34748, 352-326-3626. See more pictures of MLS# G4804114 on our website:. CURB APPEAL AT ITS BEST SUBMITTED PHOTO This two-bedroom, two-bath home has everything you need. Beautiful sunsets and golf course views. It has a large den, dining room and breakfast nook off the kitchen. Plenty of room to entertain. Screen porch and golf cart garage with attached two-car carport. New water heater in 2013 and new air conditioning in 2009. Home is located only minutes from The Villages, shopping, restaurants and entertainment. Call to view today. This one will not last long. LB7315. Offered at $59,900. If you are interested in a private viewing of this home, or would like more information, please contact Gretchen Davis with Four Star Homes at 352-360-7124. WATER OAK COUNTRY CLUB ESTATES, JUST MINUTES FROM THE VILLAGES SUBMITTED PHOTO This three-bedroom, two-and-a-half-bath home features a covered screen lanai and inground, gas heated spool hot tub/spa combination with jets and lots of screen patio area. It has a summer kitchen and built-in grill for entertaining and highly elevated views of Lake Eustis. Spectacular sunsets. Fish from your own backyard on dock and house your boat in the covered boat slip with hoist. Home features a foyer area leading to great room with gas replace and cathedral ceilings. Oversized kitchen is adorned with Corian counter tops, smooth top range, side/side refrigerator, built-in microwave, disposal, dishwasher and snack bar opening to breakfast nook. Separate formal dining area. Bonus family/game room with entry door for closed gatherings and 1/2 bath is large enough to t a pool table. Its great for a man cave. The master bedroom has French doors leading to the lanai and his/hers walk-in closets. The master bath boasts double sinks and a glass shower. Home has an inside laundry room with washer and dryer. Lawn irrigation from lake equals low water bills. Landscape recently redone by the famous Garden Rebel. Enjoy tasty, producing fruit trees including tangerine, grapefruit, nectarine, avocado and blueberries in the garden terrace. The home sits on almost half an acre. G4800668, $399,719. Call Theresa Morris at 352-360-3736. CHAIN OF LAKES WATERFRONT SUBMITTED PHOTO This lakefront home is located on 1.62 acres in the prestigious Wingspread neighborhood. The private, long drive shows off the picturesque landscaping that is meticulously maintained. Theres so much outdoor living space to enjoy those lake views too. A stunning front paver courtyard patio, bricked expansive patio in the back. As you enter the home, the open oor plan allows plenty of lakefront viewing from the two sets of French doors with sidelights. The great room awes with hardwood oors and vaulted wood ceiling. Gourmet kitchen sports solid oak cabinetry, solid surface counters with breakfast bar and new stove and refrigerator. A split oor plan, each bedroom has unique pickled oak wood ooring that gives this home a unique and classy feeling. Additional study has access to guest bathroom for privacy. Abundant master bedroom has lake and lush landscape views. Spacious master bathroom is accessed via a 12-foot dressing area with built-in cabinetry and luxurious 12x10 walk-in closet with organizers. The spa bath is highlighted by a garden tub, a separate tiled shower, two closets and unique corner dual vanity. Outstanding storage throughout includes walk-up attic stairs in the garage, which is extra deep and wide for large vehicles. The inside utility room houses the included washer/dryer behind louvered doors, but is so large it could be used for much more! Located on Lake Myrtle, convenient to local hospitals, with easy access to the turnpike. G4804072, $300,000. Ask for Marilyn Morris or Dana Brunetti at 352-396-3565. IN THE PRESTIGIOUS WINGSPREAD NEIGHBORHOOD her design. A table, and old can, inspirational signs. An antique wood en ladder serves as a type of hanging arbor near a swing. I make a lot of the stuff, she said. Her husband, Frank, fully supports her hobby, she said, and, while he may not have a green thumb, is good with the mechanics of the garden. He xed the picket fence that was a wreck when the family moved to Roslyn Street 15 years ago. Hes very support ive, she said. Socha and her fam ily have slowly trans formed the outdoor space off Woodland Av enue. It serves as a more traditional cottage gar den during spring and summer. Her hydran geas draw the eye on the border of the gar den as well has brightly colored grasses using spray paint that she and her daughter ar ranged around an arbor entry to a wooden path. It peaks in July, she said of the real plants around the home. Then comes plans for fall and winter displays. And, yes, most of what is seen in the yard re mains during the win ter, come whatever size the piles of snow are. Look for lights and few reindeer to greet the nal holiday season. Sochas garden is a yearround project. A snowfall socked us early last year, so this year shes going Christ mas just a few weeks into November. I learned my les son, Socha said of the decision to wait until Thanksgiving to switch out the decorations. COTTAGE FROM PAGE E1 CLINT AUSTIN / MCT This whimsical bicycle with fall plants and decorations is a part of Sochas fall cottage garden. PAGE 31 Saturday, October 25, 2014 DAILY COMMERCIAL E3 Expir es 10/31/14Serving all Leesburg and Orlando locations! NEW SHOW ROOM 4420 Highway 27 South Vista Shopping Center Clermont, FL 34711 352-505-8740 rfntb t bfbbtn n fn t r SUMMERIFELD bt t n fb tb rt fb t fn $92,900FRUITLAND PA RK tnftb nt t n t b t t b f b ntb $47,900EUSTIS t nf t tfb b tnftb tt br $27,900WILD WOOD bf bfbbtn rb nr n fnnt fb b n r rbf b n fb t rt $82,900LEESBURG nt t fn tffb nn ntfbt fn b t t t tf fb fbfb $33,900LEESBURG t b n bt n rr n n tfb rr t bffb fb b rbf $49,900 Always there for you and your family!Colleen Kramer (352) 478-4596 rf rf n rf rf n r f QUEEN SETSStarting at$19 9 MATTRESS MARKET OUTLET SELLIN G MA TTRESSES & FU RNITU RE 16129 State Rd. 50 West Ste 10 1-102 Cler mont, FL 34 711 407-877-6677 9900 Hwy 441 Leesburg, FL 34788 352-460-4816 PROUDLY FEATURING...Gel Memory FoamTHE RIGHT MATTRESS AT THE RIGHT PRICE r fntn b fnn n r r rr Twin$9900, Full$16900set, Queen$19900set, Firm King$29900setwww .mat tress marke tout let.com HAVING TROUBLE CONNECTING WITH YOUR MATTRESS? 40% TO 80 % OFFNAME BRAND MATTRESSES H alloween decora tions can be more than the plastic stuff you can buy in the stores. Some fantas tic plants can be used for spooky decorations too. The following plants all can be grown in Cen tral Florida, although you may have difcul ty nding them most are not the common, everyday landscape or house plant. The Ghost plant, Graptopetalum para guayense, is a succulent with pale, silvery-green leaves that look good at any time. Its sprawling stems make it great as a ground cover or spilling out of a spooky con tainer. The ghostly, sil very effect is caused by the powdery coating on the leaves that can be rubbed off when han dling, so be careful with the leaves. It can take tempera tures as low as 10F and needs well-drained soil. It also needs full to halfday sun, so it makes a great rock garden or pa tio plant. Just be careful not to overwater it or it really will look scary as the leaves fall off. The bat ower, Tac ca spp., has owers that look like a scary creature with winglike bracts and 10-inch long trailing bracteoles that look like whis kers or tentacles. There are white-, blackand purple-owered spe cies, although the leaves are all beauti ful, shiny green and tropical-looking. It re quires similar grow ing conditions as or chids humid air and low to moderate light with good air ow. It will start to ower after it has produced at least two leaves and will bloom from late sum mer through the fall in Florida, sometimes as many as eight times in one season. Another bat-themed plant is the bat-faced cuphae, Cuphea ilavea, in the more commonly known Mexican heath er genus. These ow ers look like a black bat face with large red ears and actually attract hummingbirds. It is less scary-looking than the Tacca bat ower, but will also grow well here. It is drought-tolerant, heat-loving and will grow to about 2 feet, blooming from late spring through fall. The eyeball plant, Acmella oleracea, looks like an eyeball on the end of a stem. The plant is in the As ter family and the ef fect of the eyeball is achieved by the two dif ferent-colored parts of the globular ower. The central disk owers are red, turning yellow as they mature, producing a bright yellow eyeball with a red pupil on the end of a reddish stem. It grows well in full to half-day sun in welldrained soil. Spanish moss, Til landsia usneoides, is a creepy plant at any time and can be very effective for Hallow een decorations. Just be careful of the chiggers, or red bugs that like to live in the plant and will give itchy bites. Span ish moss is actually a bromeliad that grows on anything that holds it, whether that is a tree branch or a power line. It gets its nutrients and water from the air and does not take nutri ents from the plants on which it grows. Juanita Popenoe is the di rector of the UF/IFAS Lake County Extension ofce and Environmental Horti culture Production Agent III. Email: jpopenoe@u.edu. Great plants for Halloween SUBMITTED PHOTO The bat ower has owers that look like a scary creature with wing-like bracts and 10-inch long trailing bracteoles. JUANITA POPENOE LAKE COUNTY EXTENSION PAGE 32 E4 DAILY COMMERCIAL Saturday, October 33 Saturday, October 25, 2014 DAILY COMMERCIAL E5 Sharkys Vac n Sew700 N. Main St. Wildwood, Fl 34785352-330-2483sharkyssewnvac1@gmail.com AlIF IT AINT BROKE...I have been in the sewing machine and vacuum cleaner business for some 48 years and I have people ask me about when I should change my belt on my vac uum cleaner. Well there is an old adage that says, If it aint broke, dont x it. While that may hold true for a lot of things, it surely doesnt for a vacuum cleaner! What so many people fail to realize is that a vacuum cleaner is made on the assembly line and placed in a carton or box. Then it is stored in a hot warehouse until it is sold, which may be months. Then it is loaded onto a hot tractortrailer and carried across country in extreme tem peratures where it is unloaded into a backroom or deep discount warehouse until it is sold. After all this time and h eat, the belt is melted onto the motor shaft and brush ro ll er and has stretched to that shape and size. Well, to say the least, you should change your belt as soon as you get it home and use it for the very rst time. And then there are those people that say, Well my belt aint broke but my vacuum clea ner is hard to push. If you turn the vacuum cleaner upside down and turn it on and the brush roller turns but then when it is put on the carpet it stops then your belt is stretched, although it aint broke it needs replacing. It is the brush rollers job to turn so it can pick-up debris and open the carpet bers to allow the suction of the vacuum cleaner to suck up the dirt. And lastly, be sure to purchase an extra belt so you can have a spare in case its the weekend and you have company coming over and the belt breaks with dirty car pet awaiting the guests! And Murphys Law of vacuum cleaners is...Guess what?? Yep. No Belt to be found. And be sure to put the extra belt around the handle of the vacuum cleaner so the Drawer Monster dont eat it!!!! Thats my story and Im sticking to it. Until next week, its a dirty job! Saturday, Oct. 25 the 298th day of 2014. There are 67 days left in the year. Todays Highlight in His tory: On Oct. 25, 1954, a meet ing of President Dwight D. Eisenhowers Cabinet was broadcast live on radio and television; during the ses sion, Secretary of State John Foster Dulles, just returned from Europe, reported on agreements signed in Par is on the future of West Ger many. (To date, its the only presidential Cabinet meet ing to be carried on radio and TV.) HAPPY BIRTHDAY for Saturday, Oct. 25, 2014 : This year you will discover that your rst judgment of ten is wrong. Your immedi ate circle seems to be more open, so if you give up ri gidity and decide to under stand those around you bet ter, your relationships will improve. If you are single, you could meet someone with ease through one of your friends or just in your daily travels. Give yourself time before deciding this is it. If you are attached, you nd that with more open ness, your relationship de velops more depth. SAGIT TARIUS can be an expensive friend. ARIES (March 21-April 19) Someone who has been difcult will want to make amends. You might go overboard, as youll feel so relieved. Try to avoid a se rious talk at the moment, and simply use this period to add to your interactions. TAURUS (April 20-May 20) Others seem far more relaxed and willing to be open. Seize the moment rather than question why. Overthinking could stop you from happily getting into the mood of the moment. A family member, even a be loved pet, will sense the up beat energy. GEMINI (May 21-June 20) A jovial interaction will set a positive tone to the day. You could nd that a problem that has been haunting you is cleared up. Avoid having a major dis cussion right now, and keep your interactions light. Much information will head your way shortly. CANCER (June 21-July 22) Your creativity will our ish when making plans with a loved one. A child that cant be ignored wont allow you to look the other way. Do not push to have your way right now. Be receptive to what others have to say. LEO (July 23-Aug. 22) You might want to stay home, yet you could be de lighted to be with friends. Give into that impulse and decide to combine the two. Opt for a spontaneous par ty. Not only will you be de lighted, others will be too. Be careful with a difcult friend. VIRGO (Aug. 23-Sept. 22) Be receptive in a con versation. Return calls, read your paper and enjoy what occurs spontaneously. A child or loved one might be changing right in front of you. Nevertheless, you could be surprised by this persons behavior. LIBRA (Sept. 23-Oct. 22) You have a tendency to go overboard and overindulge. You might be sitting on a grievance or a problem that you are not ready to air out. As a result, you could feel less in sync with a partner than you would like. Com munication will open up soon. SCORPIO (Oct. 23-Nov. 21) You are always a dom inant personality, but it will be even more evident today. You seem to attract many different people with many different opinions. Allow your creativity to emerge, and help resolve the differ ence. Being congenial and open will work. SAGITTARIUS (Nov. 22Dec. 21) You might feel an emotional undertow regard ing a money matter and your dealings with some one else. Your creativity and imagination will merge to gether to help you come up with a solution. Use your instincts. Refuse to be pushed. CAPRICORN (Dec. 22Jan. 19) Emphasize what is going on with others. You might be surprised by how good news could set off a celebration. Friends who of ten dont see you will want to catch up on news. Unex pected events might force you to refocus. AQUARIUS (Jan. 20-Feb. 18) Check in with an old er relative or friend. You might feel as if you need to handle certain responsibil ities rst; however, the day seems to be lled with obli gations. Recognize that this is your weekend as well. Try to schedule some free time. You deserve it. PISCES (Feb. 19-March 20) Take off for a day ad venture. Head out to a ea market with a friend. Dif culty with a close loved one will dissolve if you detach and let go of preconceived judgments when having a long-overdue conversation. HOROSCOPES TODAY IN HISTORY DEAR ABBY: I have known Justin for 10 years. Im very interest ed in him. Im sure he knows it, but we have never talked about it. Once in a blue moon we hook up, and Im usually the one to set the date up. Were friends on so cial media, but weeks even months can pass without our speaking to each oth er. Justin and I have no mutual friends, so I cant accidentally bump into him at gath erings or anything like that. I honestly dont mind hooking up with him because hes the only one I do that with. But it does hurt when I dont hear from him af terward. What should I do? Its obvious Im head over heels for him he cant be that blind! PLAIN JANE IN STOCKTON, CALIF. DEAR JANE: If Jus tin was interested in more than an occa sional hookup, hed be the one calling you, and it wouldnt be once in a blue moon. Ten years is long enough to chase an emotional ly unavailable man. If this was meant to be, it would have already happened, and youd be more than friends on social media. DEAR ABBY: Ill be 30 soon. My friends and I have drifted apart be cause were all in differ ent stages of our lives. Some of us still fre quent the bar scene, others have gotten married or dropped off the radar. My closest friend is so wrapped up in mommy blogs and all things baby that shes no longer able to discuss much else. I dont have children, and Im tired of going to bars. Im in a happy, committed relation ship, but neither of us wants to focus on mar riage for a few years. How do people con nect with others at this stage of the game? FRIENDLESS IN NEW JER SEY DEAR FRIENDLESS: One way is to expand your interests. You and your boyfriend should join groups and meet peo ple with whom youll have some things in common. If youre in terested in politics, the next two years should give you plenty of op portunity to meet new people. Volunteering is another way to expand your circle of acquain tances. While you wont make dear friends overnight friend ships usually take a while to grow the more people you meet, the greater your chanc es will be of developing meaningful relation ships. DEAR ABBY: I am a 20-year-old college student who is a virgin. I think this is the time to date people and get a better understanding of who I am and what I like in men. When I tell guys Im a virgin, they dont want to talk to me anymore. When is the best time to bring it up, and how do I do that in conversation? DIA MOND IN THE EAST DEAR DIAMOND: You may be jumping the gun and announcing your status premature ly. The subject of ones virginity or lack thereof is relevant at the time when theres a reason to anticipate there will be intimacy in a couples relation ship.. Occasional hookups keep flame alive for 10 years JEANNE PHILLIPS DEAR ABBY JACQUELINE BIGAR BIGARS STARS PAGE 34 E6 DAILY COMMERCIAL Saturday, October 25, 2014 & Ho me De co r Kitchen & Bath Remodeling! FREEAccent Tile or St one Cent er piece w/Pur ch ase*400 s/f minim um pur chase A $279 Va lue! Te l: (352) 432-3976HOURS: Mon -Sat 10am5pm*Sunda ys & Ev ening by AppointmentRigoTileHomeDecor@Gmail.com 307 Nor th Hwy 27 Suit e D Minneola FL 34715 Fr eeEstimat es10x10 Kitc hen Cabinets $1,799! UP TO $1,475 IN CARRIER REB ATES WITH SPECIAL FINANCING AVAILABLE.Offers are from August 1 No vember 15 UP TO $1,475 IN CARRIER UP TO $1,475 IN CARRIER REB ATES WITH SPECIAL Excep t for Gr eenS peed Unit Ca rr ier Rebat es up to $1, 47 5. Offe rs ar e fro m Au gust 1 Nov embe r 15 20 14. *As com par ed to a Car ri er 10 SEE R air con ditio ner an d fa n coil wi th PS C blo wer mo tor .(352)787-7741 The Innity system is among the most energy efcient air conditioners and can save you up to 56%* on your cooling costs. WILDWOOD-Continental Countr y Club (Golf course, gated Real Estate). Spacious 2BR/2BA w/outside utility screen rm, ov er sized carport. Backs to canal. G4803824.$89,900Call Colleen Kr amer (352) 478-4596 WILDWOODContinental Countr y Club (Golf Course, gated Real Estate). Over 2000 sq.ft. 3 bedrooms & 3 baths! Ideal mother -in la w arrangement. G4804195$94,900Call Sharon Bacon (352) 508-4272 WILDWOODLots of updates in 2012 (hydro tub, tile, counter tops, granite fa rmer sink, professionally painted). Great location. G4902976$149,000Call Connie Batista (352) 504-3290 EUSTISCountr y Club Manor (Resident Owned, Real Estate). Over 2000 sq.ft. 2 bdrm w/water views from most of the windows. Island kitchen. G4705156.$97,900Call Colleen Kr amer (352) 478-4596 LEESBURGGreat home in prestigious community Newer SS appliances, master suite w/2 walk-in cl osets. Enjoy the ambiance of the replace. G4804011.$189,900Call Garnet Ev ersole (352) 643-5001 rf n tb WILDWOODCabinets surround the kitchen, plus a pantr y & inside laundr y area. Views of the golf course. Large foyer & real wood oors. G4706097$78,900Call Connie Batista (352) 504-3290 LEESBURGGet settled before winter Enjoy the built-in buffet, eat-in kitchen, newer ooring, & visiting w/friends on your porch. New A/C in 2011. G4804034.$37,000Call Garnet Ev ersole (352) 643-5001 WILDWOODContinental Countr y Club (Golf course, gated Real Estate). Remodeled 2BR w/open oor plan & decorator appointments throughout. G4804275$68,900Call Sharon Bacon (352) 508-4272 FRUITLAND PA RK-Small quiet Real Estate community Enjoy Lake Grifn & the community marina, boat slips & shing pier 2BR/2BA w/updated appliances. G4803909$68,900Call Garnet Ev ersole (352) 643-5001 FRUITLAND PA RK-One of a kind! Wa terfront home in Harbor Oaks! New sea wall in 1999. Floor in kitchen is a rare, unique wood. All windows have wood blinds. G4705858$119,000Call Colleen Kr amer (352) 478-4596 REAL EST AT E DIVISIONIncluding Property Management Carilyn began by reaching out and straight up to celebrity interior de signer Nate Berkus: I knew people who knew people who knew Nate Berkus, so I wrote to him. I asked him what we should do about the yellow r trim, and he told us to do what looks good to us. And, by all means, make it white. But, in his mind, Im sure he was thinking, Oh, barf. Meanwhile, locally, the Platts hitched their remodel wagon to the folks at Savvy Cabinetry by Design, also of Magnolia. Despite the name, Savvy has worked to improve lighting, electrical, replacing the kitchen back splash (twice), replace tile, gener al carpentry, rebuilding the deck, re making the bathroom and more. Long story short, today we are gath ered in another new kitchen at the Platt home. (After the rst remodel, Josh says, I wanted to keep going. I wanted to strive for perfection.) Last year I started to loathe the farmhouse kitchen, he says. And Carilyn? I liked it, but I didnt love it. So now there is this: White Cae sarstone counters and soft gray cab inets from Bellmont Cabinet Co. in Sumner, Wash. (formerly Pacic Crest), and appliances from Sub-Ze ro, Wolf and Miele, including the built-in espresso-maker. The main living spaces living, dining and family rooms, all off the kitchen have gotten the same cohesive treatment: white, spare, bright and contemporary. The mas ter bathroom, upstairs, is awash in Carrara marble, inspired by a Lon don hotel the couple loves. REMODEL FROM PAGE E1 on their homeown ers insurance policy. In most cases, that pol icy does not protect them against accidents on the road. The poli cy home owner. He is quick to note a recent rash of lo cal golf cart accidents have probably put those people in nan cial jeopardy when they realized their home owners insurance poli cy did not cover an ac cident on the road. Knowles also point ed out that collision ac cidents arent the only risk. Accidents also in clude people falling out of your golf cart and getting severely hurt, explains Knowles. Knowles recom mends that owners of golf carts, LSVs and golf cars contact their insur ance agent to verify they have the proper cover age. Owners of these ve hicles should specically discuss their use to eval uate their risk. One un fortunate accident could lead to huge liabilities. Knowles believes that many owners of these types of vehicles are not properly covered, and they should seek an in surance review from a qualied agent. Don Magruder is the CEO of Ro-Mac Lumber & Supply, Inc., and he is also the host of the Around the House Radio Show heard every Monday at noon on My790AM WLBE in Leesburg. MAGRUDER FROM PAGE E1 Many homeowners purchase an inexpensive rider for their golf cart on their homeowners insurance policy. In most cases, that policy does not protect them against accidents on the road.
http://ufdc.ufl.edu/AA00019282/00381
CC-MAIN-2018-17
refinedweb
49,153
69.18
- Download quickstart-i18n.zip and extract. - Rename extracted directory `quickstart-i18n` to meet your project name, e.g. mysite and open terminal in that directory. make envInternationalization is built using gettext, thus you need extract gettext messages and compile `*.po` files that you can find in i18n directory. make poLet run test, look at coverage and finally benchmark tests: $ make test nose-cover benchmark .................................... .......... Name Stmts Miss Cover Missing -------------------------------------------------- public 3 0 100% public.web 0 0 100% public.web.profile 5 0 100% public.web.urls 10 0 100% public.web.views 26 0 100% -------------------------------------------------- TOTAL 44 0 100% ----------------------------------------------------- Ran 10 tests in 0.458s OK public: 5 x 1000 baseline throughput change target 100.0% 5303rps +0.0% test_root 94.4% 5005rps -5.6% test_home 98.2% 5206rps -1.8% test_error_400 99.2% 5258rps -0.8% test_error_403 97.9% 5191rps -2.1% test_error_404 static: 3 x 1000 baseline throughput change target 100.0% 5172rps +0.0% test_static_files 47.4% 2453rps -52.6% test_static_file_not_found 52.5% 2715rps -47.5% test_static_file_forbidden ----------------------------------------------------- Ran 2 tests in 2.286s OKThe tests are passed let run it in web browser: $ make run Visit you can run it using uwsgi env/bin/easy_install uwsgi make uwsgiEnjoy! I just completed the tutorial from docs (guestbook creation). Looks good to me. A few questions: - how to handle file uploads? - how to build modules/plugins (e.g. flask has blueprints) - does it work on appengine? 1. Look at files attribute. 2. All you need is a python package to structure your code. Look at here (there are two packages, one for public another one for membership): 3. Since it WSGI application it is capable to run at any WSGI application server, including mentioned one. thank you For questions not related to this post please email me (see blogger profile). and now a template question: why that is not possible? index.html @{ a = range(10) } @for i in a: @str(i) @end 1.py import os, sys current_folder = os.path.dirname(os.path.abspath(__file__)) from wheezy.html.factory import widget from wheezy.template.engine import Engine from wheezy.template.loader import FileLoader from wheezy.template.ext.core import CoreExtension from wheezy.template.ext.code import CodeExtension engine = Engine(loader=FileLoader([os.path.join(current_folder, "templates")]), extensions=[CoreExtension(), CodeExtension()]) print engine.get_template('index.html').render({}) Most likely of misprint in your template (notice parentheses for code extension): @( a = range(10) )
http://mindref.blogspot.com/2013/01/wheezy-web-quick-start-i18n-project.html
CC-MAIN-2016-07
refinedweb
402
64.67
How to: Use the Class Library for the .NET Compact Framework You can use different methods to obtain class library information that is specific to the .NET Compact Framework: Enable specific filters provided in the local Help viewers. Refer to platform and version information included with the documentation for individual types and members. The local Help viewer filters allow you to easily determine which namespaces, types, and members are supported by the .NET Compact Framework. Note that these filters are available only in the local Help viewer of the .NET Framework SDK or Visual Studio 2005 Combined Help Collection. In addition to the local Help viewer filters, several sections in the type and member topics provide information on device platforms supported, platform version support, and, in some cases, platform-specific behavior. The Platforms section lists Windows Mobile for Pocket PC, Windows Mobile for Smartphone, and Windows CE. Windows CE includes devices running Windows CE that are not Pocket PCs or Smartphones. The Version Information section indicates which version of the .NET Compact Framework supports a particular type or member. At the end of the Remarks section, you will find any platform notes that may apply, such as how a particular method operates on a mobile device platform. For a list of all device platforms and platform versions supported by the .NET Compact Framework, see Supported Devices and Platforms. .NET Compact Framework and Smart Device Development Filters The filter you can use to show which namespaces, types and members are supported by the .NET Compact Framework depends on the product you are using. In the .NET Framework SDK, use the .NET Compact Framework filter. In Visual Studio 2005, use the Smart Device Development filter. The .NET Compact Framework filter and the Smart Device Development filters do the following: Show only the .NET Compact Framework node of guide topics. Show only the namespaces that contain types supported by the .NET Compact Framework. Show only the types in a namespace that are supported by the .NET Compact Framework. Show only .NET Compact Framework supported method and constructor overloads. To use the .NET Compact Framework or Smart Device Development Filter Above the Contents or Index pane in Help, select .NET Compact Framework or Smart Device Development in the Filter by list. Filtering in Member Summary Topics In topics that list members for a type, you can view only those members supported by the .NET Compact Framework. Note that the mobile device icon indicates the member is supported by the .NET Compact Framework. To show only .NET Compact Framework members in member summary topics In a member summary topic, such as AppDomain Members, click Members Options in the nonscrolling region at the top of the topic. Select the .NET Compact Framework Members Only check box.
http://msdn.microsoft.com/en-US/library/ms172548(v=vs.80).aspx
CC-MAIN-2014-41
refinedweb
460
59.19
Working with risk and return for purchase of risky asset: beta coefficient of .85 This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here! If the required risk-free rate of return is estimated to be 4% and the expected rate of return on the market is 9%, what is the required rate of return on any risky asset held in a diversified portfolio when the asset's beta coefficient is 0.85?© BrainMass Inc. brainmass.com June 3, 2020, 4:50 pm ad1c9bdddf Solution Preview To answer this question you could use the capital asset pricing model (CAPM). The CAPM equation is as follows: ERi = Rf + (ERm - Rf)b This states that the required rate of return (or the expected rate of return) of a risky asset 'i', ... Solution Summary The solution explains and computes the steps necessary to arrive at required rate of return on any risky asset. $2.19
https://brainmass.com/business/capital-asset-pricing-model/risk-return-purchase-risky-asset-5622
CC-MAIN-2020-29
refinedweb
159
58.21
Canonical Voices Niemeyer: mgo r2014.10.122014-10-13T10:25:29Zniemeyernospam@nospam.com<p>A new release of the <a href="">mgo</a> MongoDB driver for Go is out, packed with contributions and features. But before jumping into the change list, there’s a note in the <a href="">release of MongoDB 2.7.7</a> a few days ago that is worth celebrating:</p> <blockquote><p> New Tools!<br /> – The MongoDB tools have been completely re-written in Go<br /> – Moved to a new repository: <a href=""></a><br /> – Have their own JIRA project: <a href=""></a> </p></blockquote> <p <a href="">MMS product</a>), and some of the features in release r2014.10.12 were made to support that work.</p> <p>The specific changes available in this release are presented below. These changes do not introduce compatibility issues, and most of them are new features.</p> <p><span id="more-2561"></span></p> <h2>Fix in txn package</h2> <p.</p> <p>Debug information contributed by the <a href="">juju</a> team at Canonical.</p> <h2>MONGODB-X509 auth support</h2> <p>The <a href="">MONGODB-X509</a> authentication mechanism, which allows authentication via SSL client certificates, is now supported.</p> <p>Feature contributed by <a href="">Gabriel Russel</a>.</p> <h2>SCRAM-SHA-1 auth support</h2> <p>The MongoDB server is changing the default authentication protocol to SCRAM-SHA-1. This release of mgo defaults to authenticating over SCRAM-SHA-1 if the server supports it (2.7.7 and later).</p> <p>Feature requested by <a href="">Cailin Nelson</a>.</p> <h2>GSSAPI auth on Windows too</h2> <p>The driver can now authenticate with the GSSAPI (Kerberos) mechanism on Windows using the standard operating system support (<a href="">SSPI</a>). The GSSAPI support on Linux remains via the cyrus-sasl library.</p> <p>Feature contributed by <a href="">Valeri Karpov</a>.</p> <h2>Struct document ids on txn package</h2> <p>The txn package can now handle documents that use struct value keys.</p> <p>Feature contributed by <a href="">Jesse Meek</a>.</p> <h2>Improved text index support</h2> <p>The <a href="">EnsureIndex</a> family of functions may now conveniently define text indexes via the usual shorthand syntax (<code>"$text:field"</code>), and <a href="">Sort</a> can use equivalent syntax (<code>"$textScore:field"</code>) to inject the text indexing score.</p> <p>Feature contributed by <a href="">Las Zenow</a>.</p> <h2>Support for BSON’s deprecated DBPointer</h2> <p>Although the BSON <a href="">specification</a> defines DBPointer as deprecated, some ancient applications still depend on it. To enable the migration of these applications to Go, the type is now <a href="">supported</a>.</p> <p>Feature contributed by <a href="">Mike O’Brien</a>.</p> <h2>Generic Getter/Setter document types</h2> <p>The Getter/Setter interfaces are now respected when unmarshaling documents on any type. Previously they would only be respected on maps and structs.</p> <p>Feature requested by <a href="">Thomas Bouldin</a>.</p> <h2>Improvements on aggregation pipelines</h2> <p>The <a href="">Pipe.Iter</a> method will now return aggregation results using cursors when possible (MongoDB 2.6+), and there are also new methods to tweak the aggregation behavior: <a href="">Pipe.AllowDiskUse</a>, <a href="">Pipe.Batch</a>, and <a href="">Pipe.Explain</a>.</p> <p>Features requested by <a href="">Roman Konz</a>.</p> <h2>Decoding into custom bson.D types</h2> <p>Unmarshaling will now work for types that are slices of bson.DocElem in an equivalent way to bson.D.</p> <p>Feature requested by <a href="">Daniel Gottlieb</a>.</p> <h2>Indexes and CommandNames via commands</h2> <p>The <a href="">Indexes</a> and <a href="">CollectionNames</a> methods will both attempt to use the new command-based protocol, and fallback to the old method if that doesn’t work.</p> <h2>GridFS default chunk size</h2> <p.</p> <h2>Performance of bson.Raw decoding</h2> <p>Unmarshaling data into a bson.Raw will now bypass the decoding process and record the provided data directly into the bson.Raw value. This significantly improves the performance of dumping raw data during iteration.</p> <p>Benchmarks contributed by <a href="">Kyle Erf</a>.</p> <h2>Performance of seeking to end of GridFile</h2> <p>Seeking to the end of a <a href="">GridFile</a> will now not read any data. This enables a client to find the size of the file using only the io.ReadSeeker interface with low overhead.</p> <p>Improvement contributed by <a href="">Roger Peppe</a>.</p> <h2>Added Query.SetMaxScan method</h2> <p>The <a href="">SetMaxScan</a> method constrains the server to only scan the specified number of documents when fulfilling the query.</p> <p>Improvement contributed by <a href="">Abhishek Kona</a>.</p> <h2>Added GridFile.SetUploadDate method</h2> <p>The <a href="">SetUploadDate</a> method allows changing the upload date at file writing time.</p>Gustavo Niemeyer: Packing resources into Go qml binaries2014-09-26T20:42:09Zniemeyernospam@nospam.com<p>The <a href="">qml package</a> is right now one of the best choices for creating <a href="">graphic applications</a> under the Go language. Part of the reason why this is true comes from the convenience of <a href="">QML</a>,.</p> <p>On the practical side, one of the implications of using such a language partnership is that every Go qml application will have some sort of resource content to deal with, carrying the QML logic. Such content may be loaded either <a href="">from files</a> on disk, or <a href="">from strings</a>).</p> <p><span id="more-2524"></span>There’s a well known trick to have both benefits at once, though, and the basic solution has already been made available in <a href="">multiple</a> <a href="">packages</a>:.</p> <p>To solve that problem, the qml package has been enhanced with functionality that leverages the existing Qt resource system to pack content into the binary itself. Rather than using the upstream C++ and XML-based <a href="">resource compiler</a>, though, a new resource packer was implemented inside the qml package and made available both under a <a href="">friendly Go API</a>, and as a tool that follows common Go idioms.</p> <p>The help text for the <a href="">genqrc tool</a> describes it in detail:</p> <pre><code. </code></pre> <p>The tool may be installed via <code>go get</code> as usual:</p> <pre><code>go get gopkg.in/qml.v1/cmd/genqrc </code></pre> <p>and once the qrc.go file has been generated, the main qml file may be<br /> loaded with logic equivalent to:</p> <pre><code>component, err := engine.LoadFile("qrc:///path/to/file.qml") </code></pre> <p>The loaded file can in turn reference any other content that was bundled<br /> into the Go binary.</p> <p>For a better picture, <a href="">this example</a> demonstrates the use of the tool.</p>Gustavo Niemeyer: Announcing yaml v2 for Go2014-09-22T22:35:40Zniemeyernospam@nospam.com<p>There were a few long standing issues in the <a href="">yaml.v1 package</a> which were being postponed so that they could be done at once in a single incompatible change, and the time has come: <a href="">yaml.v2 is now available.</a></p> <p>Besides these incompatible changes, other <em>compatible</em> fixes and improvements were performed in that push, and those were also applied to the existing yaml.v1 package so that dependent applications benefit immediately and without modifications.</p> <p>The subtopics below outline exactly what changed, and how to adapt existent code when necessary.</p> <p><span id="more-2485"></span></p> <ul> <li><a href="">Type errors</a></li> <li><a href="">New Marshaler and Unmarshaler interfaces</a></li> <li><a href="">Custom-ordered maps</a></li> <li><a href="">Binary values</a></li> <li><a href="">Multi-line strings</a></li> <li><a href="">Other improvements</a></li> </ul> <h2 id="typeerrors">Type errors</h2> <p.</p> <p>In yaml.v2, these problems will cause a <code>*yaml.TypeError</code> to be returned, containing helpful information about what happened. For example:</p> <pre><code>yaml: unmarshal errors: line 3: cannot unmarshal !!str `foo` into int </code></pre> <p>On such errors the decoding process still continues until the end of the YAML document, so ignoring the TypeError will produce logic equivalent to the old yaml.v1 behavior.</p> <h2 id="marshaler">New Marshaler and Unmarshaler interfaces</h2> <p>The way that yaml.v1 allowed custom types to implement marshaling and unmarshaling of YAML content was slightly confusing and troublesome. For example, considering a <code>CustomType</code> with a <code>keys</code> field:</p> <pre><code>type CustomType struct { keys map[string]int } </code></pre> <p>and supposing the goal is to unmarshal this YAML map into it:</p> <pre><code>custom: a: 1 b: 2 c: 3 </code></pre> <p>With yaml.v1, one would need to implement logic similar to the following for that:</p> <pre><code>func (v *CustomType) SetYAML(tag string, value interface{}) bool { if tag == "!!map" { m := value.(map[interface{}]interface{}) // ... iterate/validate/convert key/value pairs } return goodValue } </code></pre> <p>This is too much trouble when the package can easily do those conversions internally already. To fix that, in yaml.v2 the <a href="">Getter</a> and <a href="">Setter</a> interfaces are both gone and were replaced by the <a href="">Marshaler</a> and <a href="">Unmarshaler</a> interfaces.</p> <p>Using the new mechanism, the example above would be implemented as follows:</p> <pre><code>func (v *CustomType) UnmarshalYAML(unmarshal func(interface{}) error) error { return unmarshal(&v.keys) } </code></pre> <h2 id="mapslice">Custom-ordered maps</h2> <p <a href="">some applications require</a>.</p> <p>To fix that, there is a new pair of types that support preserving the order of map keys both when marshaling and unmarshaling: <a href="">MapSlice</a> and <a href="">MapItem</a>.</p> <p>Such an ordered map literal would look like:</p> <pre><code>m := yaml.MapSlice{{"c", 3}, {"b", 2}, {"a", 1}} </code></pre> <p>The <code>MapSlice</code> type may be used for variables going in and out of the yaml package, or in struct fields, map values, or anywhere else sensible.</p> <h2 id="binary">Binary values</h2> <p>Strings in YAML must be valid UTF-8 or UTF-16 (with a byte order mark for the latter), and for binary data the specification defines a standard <a href="">!!binary tag</a> which represents the raw data encoded (<a href="">encrypted?</a>):</p> <pre><code>one: !!binary gICA two: !!binary | gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI CAgICAgICAgICAgICAgICAgICAgICAgICAgICA </code></pre> <h2 id="multiline">Multi-line strings</h2> <p>Any string that contains new-line characters (‘\n’) will now be encoded using the literal style. For example, a value that would before be encoded as:</p> <pre><code>key: "line 1\nline 2\nline 3\n" </code></pre> <p>is now encoded by both yaml.v1 and yaml.v2 as:</p> <pre><code>key: | line 1 line 2 line 3 </code></pre> <h2 id="other">Other improvements</h2> <p>Besides these major changes, some assorted minor improvements were also performed:</p> <ul> <li>Better handling of top-level “null”s (issue <a href="">#35</a>)</li> <li>Marshal base 60 floats quoted for YAML 1.1 compatibility (issue <a href="">#34</a>)</li> <li>Better error on invalid map keys (issue <a href="">#25</a>)</li> <li>Allow non-ASCII characters in plain strings (issue <a href="">#11</a>).</li> <li>Do not catch unrelated panics by mistake (commit <a href="">a6dc653f</a>)</li> </ul> <p>For obtaining the <a href="">yaml.v1</a> improvements:</p> <blockquote><p> go get -u gopkg.in/yaml.v1 </p></blockquote> <p>For updating to <a href="">yaml.v2</a>, adapt the code as necessary given the points above, replace the import path, and run:</p> <blockquote><p> go get -u gopkg.in/yaml.v2 </p></blockquote>Gustavo Niemeyer: The new Go qml OpenGL API2014-08-29T15:17:33Zniemeyernospam@nospam.com<p>As detailed in the <a href="">preliminary release of qml.v1 for Go<.</p> <p>Before diving into the new, let’s first have a quick look at how a Go application using OpenGL might look like with qml.v0. This is an excerpt from the <a href="">old painting example</a>:</p> <p><span id="more-2451"></span><code> <pre> import ( "gopkg.in/qml.v0" "gopkg.in/qml.v0/gl" ) func (r *GoRect) Paint(p *qml.Painter) { width := gl.Float(r.Int("width")) height := gl.Float(r.Int("height")) gl.Enable(gl.BLEND) // ... } </pre> <p></code></p> <p>The example imports both the <i>qml</i> and the <i>gl</i> packages, and then defines a <i>Paint</i> method that makes use of the GL types, functions, and constants from the <i>gl</i> package. It looks quite reasonable, but there are a few relevant shortcomings.</p> <p>One major issue in the current API is that it offers no means to tell even at a basic level what version of the OpenGL API is being coded against, because the available functions and constants are the complete set extracted from the <i>gl.h</i> header. For example, OpenGL 2.0 has <i>GL_ALPHA</i> and <i>GL_ALPHA4/8/12/16</i> constants, but OpenGL ES 2.0 has only <i>GL_ALPHA</i>. This simplistic choice was a good start, but comes with a number of undesired side effects:</p> <ul> <li>Many trivial errors that should be compile errors fail at runtime instead <li>When the code does work, the developer is not sure about which API version it is targeting <li>Symbols for unsupported API versions may not be available for linking, even if unused </ul> <p.</p> <p>So this is the stage for the improvements that are happening. Before detailing the solution, let’s have a look at the new <a href="">painting example in qml.v1</a>, that makes use of the improved API:</p> <p><code> <pre> import ( "gopkg.in/qml.v1" "gopkg.in/qml.v1/gl/2.0" ) func (r *GoRect) Paint(p *qml.Painter) { gl := GL.API(p) width := float32(r.Int("width")) height := float32(r.Int("height")) gl.Enable(GL.BLEND) // ... } </pre> <p></code></p> <p>With the new API, rather than importing a generic <i>gl</i> package, a version-specific <i>gl/2.0</i> package is imported under the name <i>GL</i>. That choice of package name allows preserving familiar OpenGL terms for both the functions and the constants (<i>gl.Enable</i> and <i>GL.BLEND</i>, for example). Inside the new <i>Paint</i> method, the <i>gl</i> value obtained from <i>GL.API</i> holds only the functions that are defined for the specific OpenGL API version imported, and the constants in the <i>GL</i> package are also constrained to those available in the given version. Any improper references become build time errors.</p> <p>To support all the various OpenGL versions and profiles, there are <a href="">23 independent packages</a> right now. These packages are of course not being hand-built. Instead, they are generated all at once by <a href="">a tool</a> that gathers information from various sources. The process can be tersely described as:</p> <ol> <li>A <a href="">ragel-based</a> parser processes Qt’s <i>qopenglfunctions_*.h</i> header files to collect version-specific functions <li>The <a href="">Khronos OpenGL Registry XML</a> is parsed to collect version-specific constants <li>A number of <a href="">tweaks</a> defined in the tool’s code is applied to the state <li>Packages are generated by feeding the state to <a href="">text templates</a> </ol> <p <i>qml</i> package now leverages Qt for resolving all the GL function entry points and the linking against available libraries.</p> <p>Going back to the example, it also demonstrates another improvement that comes with the new API: plain types that do not carry further meaning such as <i>gl.Float</i> and <i>gl.Int</i> were replaced by their native counterparts, <i>float32</i> and <i>int32</i>. Richer types such as <i>Enum</i> were preserved, and as <a href="">suggested by David Crawshaw</a> some new types were also introduced to represent entities such as programs, shaders, and buffers. The custom types are all available under the common <i>gl/glbase</i> package that all version-specific packages make use of.</p> .</p> <p><b>Documentation importing</b></p> <p <a href="">MultMatrixd</a>, for example. For now the documentation is being imported manually, but the final process will likely consist of some automation and some manual polishing.</p> <p><b>Function polishing</b></p> <p>The standard C OpenGL API can often be translated automatically (see <a href="">BindBuffer</a> or <a href="">BlendColor</a>), but in other cases the function prototype has to be tweaked to become friendly to Go. The translation tool already has good support for defining most of these tweaks independently from the rest of the machinery. For example, the following logic changes the <i>ShaderSource</i> function from its <a href="">standard from</a> into something <a href="">convenient in Go</a>:</p> <p><code> <pre>)) } } `, </pre> <p></code></p> <p>Other cases may be much simpler. The <a href="">MultMatrixd</a> tweak, for instance, simply ensures that the parameter has the proper length, and injects the documentation:</p> <p><code> <pre> name: "MultMatrixd", before: ` if len(m) != 16 { panic("parameter m must have length 16 for the 4x4 matrix") } `, doc: ` multiplies the current matrix with the provided matrix. ... `, </pre> <p></code></p> <p>and as an even simpler example, <a href="">CreateProgram</a> is tweaked so that it returns a <i>glbase.Program</i> instead of the default <i>uint32</i>.</p> <p><code> <pre> name: "CreateProgram", result: "glbase.Program", </pre> <p></code></p> <p.</p> <p>If you’d like to help somehow, or just ask questions or report your experience with the new API, please join us in the <a href="">project mailing list</a>.</p>Gustavo Niemeyer: QML Contest results2014-04-26T00:50:16Zniemeyernospam@nospam.com<p>Yesterday at <a href="">GopherCon</a> I had the chance to sit together with <a href="">Dave Cheney</a> and <a href="">Jamu Kakar</a> to judge the entries received for the <a href="">Go QML Contest</a>. The result was already announced today, live at the second day of GopherCon, including a short demo on stage of the three most relevant entries received. This blog post provides more details for the winner and also for a few of these additional entries.</p> <p><span id="more-2356"></span><b>Winner</b></p> <p>The winner of the contest is Robert Nieren with the entry <a href="">gofusion</a>, a tight and polished clone of the game <a href="">2048</a>:</p> <p><a href=""><img src="" alt="gofusion" width="400" height="463" class="aligncenter size-full wp-image-2360" /></a></p> <p>The <a href="">game code</a> is worth looking into. It’s clean, has all the logic written in Go while making good use of the declarative features of QML, and leverages the OpenGL support of the qml package for drawing the tiles. It’s also fun to play!</p> <p><b>Runner ups</b></p> <p>Two other contest entries were demonstrated during GopherCon. The first one was Mark Saward’s multi-player game <a href="">King’s Epic</a>:</p> <p><a href=""><img src="" alt="King's Epic" width="399" height="310" class="aligncenter size-full wp-image-2357" /></a></p> <p><a href=""><img src="" alt="King's Epic" width="399" height="310" class="aligncenter size-full wp-image-2358" /></a></p> <p.</p> <p>The source code for the King’s Epic client is available at <a href="">GitHub</a>, and there’s <a href="">an introduction</a> that explains how to get started on it.</p> <p>The second runner up demonstrated during the conference was Maxim Kouprianov’s <a href="">teg-workshop</a>:</p> <p><a href=""><img src="" alt="maxim-kouprianov" width="400" height="360" class="aligncenter size-full wp-image-2359" /></a></p> <p>Maxim’s entry is a Timed Event Graphs editor, and is being developed as part of his bachelor’s thesis. Although the topic is unknown to us, the interactions with the tool looked very attractive, as demonstrated in the <a href="">video provided with the entry</a>. What weighted against it was mainly that the rendering of these interactions was implemented in Javascript, while they might have been easily implemented in Go instead.</p> <p><b>Honorable mention</b></p> <p>Although it was not demonstrated during GopherCon, Zev Goldstein’s submission not only deserves being mentioned, but we also hope to see it being improved and made into a complete application. Zev submitted a very early version of <a href="">Fallback Messenger</a>:</p> <p><a href=""><img src="" alt="zev-goldstein" width="300" height="355" class="aligncenter size-full wp-image-2373" /></a></p> <p.</p> <p><b>Closing</b></p> <p>It was a pleasure to interact with some of the participants over these two months in which the contest was run. It was also inspiring to see both the level of the entries, and how most of the entries were or became long term projects.</p> <p>In terms of Go QML, these entries provide a clear message: although Go was designed with server-side systems in mind, it is by no means limited to that.</p> <p>Thanks to everyone that submitted entries for the contest, and to Dave Cheney and Jamu Kakar for their time as judges during the tight schedule of GopherCon.</p>Gustavo Niemeyer: Arbitrary Qt extensions with Go QML2014-03-21T14:35:36Zniemeyernospam@nospam.com<p>As part of the on going work on Ubuntu Touch phones, I was invited to contribute a Go package to interface with <a href="">ubuntuoneauth</a>, a C++ and Qt library that authenticates against Ubuntu One using the system account made available by the phone owner. The details of that library and its use case are not interesting for most people right now, but the work to interface with it is a good example to talk about because, besides the result (<a href="">uoneauth</a>) being an external and independent Go package that extends the <a href="">qml</a> package, ubuntuoneauth is not a QML library, but rather a plain Qt library. Some of the callbacks use even traditional C++ types that do not inherit from QObject and have no Qt metadata, so offering that functionality from Go nicely takes a bit more work.</p> <p>What follows are some of the highlights of that integration logic, to serve as a reference for similar extensions in the future. Note that if your interest is in creating QML applications with Go, none of this is necessary and the <a href="">documentation</a> is a better place to start.</p> <p><span id="more-2281"></span>As an initial step, the following examples demonstrate how the original C++ library and the Go package being designed are meant to be used. The first snippet contains the relevant logic taken out of the <a href="">examples/signing-main.cpp</a> file, tweaked for clarity:</p> <p><code> <pre> int main(int argc, char *argv[]) { (...) UbuntuOne::SigningExample *example = new UbuntuOne::SigningExample(&a); QTimer::singleShot(0, example, SLOT(doExample())); (...) } SigningExample::SigningExample(QObject *parent) : QObject(parent) { QObject::connect(&service, SIGNAL(credentialsFound(const Token&)), this, SLOT(handleCredentialsFound(Token))); QObject::connect(&service, SIGNAL(credentialsNotFound()), this, SLOT(handleCredentialsNotFound())); (...) } void SigningExample::doExample() { service.getCredentials(); } void SigningExample::handleCredentialsFound(Token token) { QString authHeader = token.signUrl(url, QStringLiteral("GET")); (...) } void SigningExample::handleCredentialsNotFound() { qDebug() << "No credentials were found."; } </pre> <p></code></p> <p>The example hooks into various signals in the service, one for each possible outcome, and then calls the service’s <code>getCredentials</code> method to initiate the process. If successful, the <code>credentialsFound</code> signal is emitted with a <code>Token</code> value that is able to sign URLs, returning an HTTP header that can authenticate a request.</p> <p>That same process is more straightforward when using the library from Go:</p> <p><code> <pre> service := uoneauth.NewService(engine) token, err := service.Token() if err != nil { return err } signature := token.HeaderSignature("GET", url) </pre> <p></code></p> <p>Again, this gets a service, a token from it, and signs a URL, in a “forward” way.</p> <p>So the goal is turning the initial C++ workflow into this simpler Go API. A good next step is looking into how the <code>NewService</code> function is implemented:</p> <p><code> <pre> func NewService(engine *qml.Engine) *Service { s := &Service{reply: make(chan reply, 1)} qml.RunMain(func() { s.obj = *qml.CommonOf(C.newSSOService(), engine) }) runtime.SetFinalizer(s, (*Service).finalize) s.obj.On("credentialsFound", s.credentialsFound) s.obj.On("credentialsNotFound", s.credentialsNotFound) s.obj.On("twoFactorAuthRequired", s.twoFactorAuthRequired) s.obj.On("requestFailed", s.requestFailed) return s } </pre> <p></code></p> <p><code>NewService</code> creates the service instance, and then asks the <code>qml</code> package to run some logic in the main Qt thread via <a href="">RunMain</a>. This is necessary because a number of operations in Qt, including the creation of objects, are associated with the currently running thread. Using <code>RunMain</code> in this case ensures that the creation of the C++ object performed by <code>newSSOService</code> happens in the main Qt thread (the “GUI thread”).</p> <p>Then, the address of the C++ <a href="">UbuntuOne::SSOService</a> type is handed to <a href="">CommonOf</a> to obtain a <a href="">Common</a> value that implements all the common logic supported by C++ types that inherit from <code>QObject</code>. This is an unsafe operation as there’s no way for <code>CommonOf</code> to guarantee that the provided address indeed points to a C++ value with a type that inherits from <code>QObject</code>, so the call site must necessarily import the <code>unsafe</code> package to provide the <code>unsafe.Pointer</code> parameter. That’s not a problem in this context, though, since such extension packages are necessarily dealing with unsafe logic in either case.</p> <p>The obtained <code>Common</code> value is then assigned to the service’s obj field. In most cases, that value is instead assigned to an anonymous <code>Common</code> field, as done in <a href="">qml.Window</a> for example. Doing so means <code>qml.Window</code> values implement the <a href="">qml.Object</a> interface, and may be manipulated as a generic object. For the new <code>Service</code> type, though, the fact that this is a generic object won’t be disclosed for the moment, and instead a simpler API will be offered.</p> <p>Following the function logic further, a finalizer is then registered to ensure the C++ value gets deallocated if the developer forgets to <code>Close</code> the service explicitly. When doing that, it’s important to ensure the <code>Close</code> method drops the finalizer when called, not only to facilitate the garbage collection of the object, but also to avoid deallocating the same value twice.</p> <p>The next four lines in the function should be straightforward: they register methods of the service to be called when the relevant signals are emitted. Here is the implementation of two of these methods:</p> <p><code> <pre> func (s *Service) credentialsFound(token *Token) { s.sendReply(reply{token: token}) } func (s *Service) credentialsNotFound() { s.sendReply(reply{err: ErrNoCreds}) } func (s *Service) sendReply(r reply) { select { case s.reply <- r: default: panic("internal error: multiple results received") } } </pre> <p></code></p> <p>Handling the signals consists of just sending the reply over the channel to whoever initiated the request. The <code>select</code> statement in <code>sendReply</code> just ensures that the invariant of having a reply per request is not broken without being noticed, as that would require a slightly different design.</p> <p>There’s one more point worth observing in this logic: the <code>token</code> value received as a parameter in <code>credentialsFound</code> was already converted into the local <code>Token</code> type. In most cases, this is unnecessary as the parameter is directly useful as a <code>qml.Object</code> or as another native type (int, etc), but in this case <a href="">UbuntuOne::Token</a> is a plain C++ type that does not inherit from QObject, so the default signal parameter that would arrive in the Go method has only a type name and the value address.</p> <p>Instead of taking the plain value, it is turned into a more useful one by registering a converter with the <code>qml</code> package:</p> <p><code> <pre> func convertToken(engine *qml.Engine, obj qml.Object) interface{} { // Copy as the one held by obj is passed by reference. addr := unsafe.Pointer(obj.Property("plainAddr").(uintptr)) token := &Token{C.tokenCopy(addr)} runtime.SetFinalizer(token, (*Token).finalize) return token } func init() { qml.RegisterConverter("Token", convertToken) } </pre> <p></code></p> <p>Given that setup, the <code>Service.Token</code> method may simply call the <code>getCredentials</code> method from the underlying <code>UbuntuOne::SSOService</code> method to fire a request, and block waiting for a reply:</p> <p><code> <pre> func (s *Service) Token() (*Token, error) { s.mu.Lock() qml.RunMain(func() { C.ssoServiceGetCredentials(unsafe.Pointer(s.obj.Addr())) }) reply := <-s.reply s.mu.Unlock() return reply.token, reply.err } </pre> <p></code></p> <p>The lock ensures that a second request won’t take place before the first one is done, forcing the correct sequencing of replies. Given the current logic, this isn’t strictly necessary since all requests are equivalent, but this will remain correct even if other methods from <code>SSOService</code> are added to this interface.</p> <p>The returned <code>Token</code> value may then be used to sign URLs by simply calling the respective underlying method:</p> <p><code> <pre> func (t *Token) HeaderSignature(method, url string) string { cmethod, curl := C.CString(method), C.CString(url) cheader := C.tokenSignURL(t.addr, cmethod, curl, 0) defer freeCStrings(cmethod, curl, cheader) return C.GoString(cheader) } </pre> <p></code></p> <p>No care about using <code>qml.RunMain</code> has to be taken in this case, because <code>UbuntuOne::Token</code> is a simple C++ type that does not interact with the Qt machinery.</p> <p>This completes the journey of creating a package that provides access to the ubuntuoneauth library from Go code. In many cases it’s a better idea to simply rewrite the logic in Go, but there will be situations similar to this library, where either rewriting would take more time than reasonable, or perhaps delegating the maintenance and stabilization of the underlying logic to a different team is the best thing to do. In those cases, an approach such as the one exposed here can easily solve the problem.</p>Gustavo Niemeyer: Go QML Contest2014-03-13T20:08:55Zniemeyernospam@nospam.com<p><b>UPDATE:</b> The <a href="">contest result</a> is out.</p> <p>A couple of weeks ago a probe message was sent to a <a href="">few</a> <a href="">places</a> questioning whether there would be enough interest on a development contest involving Go QML applications. Since the result was quite positive, we’re moving the idea forward!</p> <p><img src="" alt="OpenGL Gopher" width="300" height="202" class="aligncenter size-medium wp-image-2259" /></p> <p>This blog post provides further information on how to participate. If you have any other questions not covered here, or want technical help with your application, please get in touch via the <a href="">mailing list</a> or <a href="">twitter</a>.</p> <p><span id="more-2258"></span><b>Eligible applications</b></p> <p>Participating applications must be developed in Go with a graphic interface that leverages the <a href="">qml</a> package, and must be made publicly available under an Open Source license <a href="">approved by the OSI</a>.</p> <p>The application may be developed on Linux, Mac OS, or Windows.</p> <p><b>Review criteria</b></p> <p>Applications will be judged under three lenses:</p> <ul> <li>Quality</li> <li>Features</li> <li>Innovation</li> </ul> <p>We realize the time is short, so please submit even if you haven’t managed to get everything you wanted in place.</p> <p><b>Deadline</b></p> <p>All submissions should be made before the daylight of the Monday on April 21st.</p> <p><b>Sending the application</b></p> <p>Applications must be submitted via <a href="mailto:gustavo.niemeyer@canonical.com">email</a> including:</p> <ul> <li>URL for the source code <li>Build instructions </ul> <p>If necessary for judging, a screencast may be explicitly requested, and must be provided before the daylight of Wednesday 23rd.</p> <p><b>Prizes</b></p> <p>There are two prizes for the winner:</p> <ul> <li>A Nexus 7 2013 tablet, running Ubuntu Touch (nice for Go QML)</li> <li>A rare and <a href="">much-desired vinyl Gopher</a> </ul> <p><b>Judging and announcement</b></p> <p>Judging will be done by well known developers from the Go community, and will take place during <a href="">GopherCon</a>. The result will be announced during the conference as well, but the winner doesn’t have to be in the conference to participate in the contest.</p> <p><b>Learning more about Go QML</b></p> <p>The best places to start are the <a href="">package documentation</a> and the <a href="">mailing list</a>.</p>Gustavo Niemeyer: Taking the Gopher for a spin2014-02-18T12:31:18Zniemeyernospam@nospam.com<p>As originally <a href="">shared</a> on Google+, and as a follow up of the previous post covering <a href="">OpenGL on Go QML</a>, a new screencast was published to demonstrate the latest features introduced around OpenGL support in Go QML:</p> <p><span class="embed-youtube"></span></p> <p>Refrences:</p> <ul> <li><a href="">Go QML project at GitHub</a> <li><a href="">Go QML forum and mailing list</a> <li><a href="">Source code for the example presented</a> <li><a href="">Blender 3D model for the gopher</a> </ul>Gustavo Niemeyer: QML components with Go and OpenGL2013-12-23T20:55:45Zniemeyernospam@nospam.com<p>As <a href="">recently announced</a>, my latest endeavor at Canonical is to enable graphical client-side development with the Go language via a new <a href="">qml</a> Go package that integrates the language with Qt’s <a href="">QML framework</a>.</p> <p:</p> <p><span id="more-2160"></span><code> <pre> import QtQuick 2.0 Rectangle { width: 640 height: 280 color: "black" Rectangle { width: 250; height: 250 anchors.centerIn: parent color: "red" MouseArea { anchors.fill: parent onClicked: console.log("Stop poking me!") } } } </pre> <p></code></p> <p>As expected, it would look similar to:</p> <p><img src="" alt="Centralized Rectangle" width="658" height="325" class="aligncenter size-full wp-image-2171" /></p> <p>The red rectangle will remain centered as the window is resized, and will print a message every time it is clicked. The <i>clicked</i> signal was hooked into logic implemented in JavaScript in this case, but it might as well have been hooked into custom Go logic with the same ease using the <i>qml</i> package. With very minor changes, it could also be something much more interesting than a red rectangle, such as a modern web browser:</p> <p><code> <pre> import QtQuick 2.0 import QtWebKit 3.0 Rectangle { width: 640 height: 280 color: "black" WebView { width: 250; height: 250 anchors.centerIn: parent url: "" } } </pre> <p></code></p> <p>The result would be:</p> <p><img src="" alt="Web Page Rectangle" width="659" height="326" class="aligncenter size-full wp-image-2181" /></p> <p>It’s worth noting that this wasn’t just a screenshot of a web page, but rather a tiny fully functional web browser accessing a web page, easily embedded into the QML application to satisfy whatever browsey needs the author might have.</p> <p>Being able to leverage all these existing building blocks so comfortably is what makes a graphics platform attractive to develop in, and is what inspired the on going effort to have that platform working under the Go language. As we can observe on <a href="">some of the work published</a>, that side of things seems to be going well.</p> <p>Now, the next level up is to enable people to <i>create</i> such building blocks without leaving the Go language. The initial step towards that is already committed to the code repository. It enables Go types to be created and seamlessly integrated into the QML language. For example, consider this simple Go type:</p> <p><code> <pre> type GoType struct { Text string } func (v *GoType) OnTextChanged() { fmt.Println("Text changed...") } </pre> <p></code></p> <p>If this type is made available to QML content via the <a href="">qml.RegisterTypes</a> function, it may then be used as any other native type. This would work as a QML file, for instance:</p> <p><code> <pre> import GoExtensions 1.0 GoType { text: "Have you signed up for GopherCon yet?" } </pre> <p></code></p> <p>There’s a relevant detail, though: this type has no visible content by itself. This means that displaying something must be done via interactions with other QML items, or via external systems (dbus, for example).</p> <p>Solving that problem has been one of my objectives in the last month, and although it’s not yet publicly available, the work is in a good-enough state that I feel comfortable talking about it.</p> :</p> <p><code> <pre>() } </pre> <p></code></p> <p>One interesting point to realize is that, again, this isn’t just rendering into a lonely OpenGL context. The rendered content goes into a framebuffer that lives within the overall QML scene graph, and has the same integration capabilities as every other QML item.</p> <p>In the following animated image, for example, the white square was generated with the above GL code, and was rendered next to other native items with <a href="">this QML source</a>:</p> <p><img src="" alt="Go + OpenGL Example" width="656" height="320" class="aligncenter size-full wp-image-2190" /></p> <p>Note the smooth blending and proper overlapping established in the scene graph based on the ordering of elements in the QML source. The animation was also driven by QML without special handling of the content rendered from Go.</p> .</p> <p><del datetime="2014-01-27T21:55:35+00:00">In terms of availability of these features, we’re about to enter a holiday season, so they should be polished enough for a first public review at some point in January. Looking forward to it.</del></p> <p><b>UPDATE (2014-01-27):</b> These features are now publicly available. The <a href="">painting example</a> demonstrates the exact scenario pictured above.</p> <p><b>UPDATE (2014-02-18):</b> New <a href="">screencast</a> demonstrates some of the OpenGL features of Go QML.</p>Gustavo Niemeyer: mgo r2013.09.04 released2013-09-05T01:30:29Zniemeyernospam@nospam.com<p>Another release of the <a href="">mgo</a> Go driver for MongoDB hits the repository.</p> <p>Here is the selection of fixes and improvements:</p> <p><span id="more-2119"></span><b>Improved timeouts</b></p> <p>The timeout support has been improved to include socket-level deadlines. This better manages cases when the TCP connection with the server is silently interrupted.</p> <p>The default socket deadline matches the <a href="">previously documented</a> timeout of 10 seconds for the connection establishment and one minute thereafter.</p> <p>If the <a href="">DialWithTimeout function</a> is used, or the <a href="">DialInfo.Timeout field</a> is provided to <a href="">DialWithInfo</a>, the provided timeout will be used as both the initial sync timeout and the initial socket timeout.</p> <p>Customizing the socket timeout independently is also possible via the <a href="">new Session.SetSocketTimeout method</a>.</p> <p><b>omitempty flag for struct values</b></p> <p>Marshalled structs (explicitly or via mgo) can now also use the <a href="">omitempty flag</a> in struct fields. A struct field is considered “empty” if the current value matches the zero value for the respective struct.</p> <p>Thanks to Alex S. for suggesting the feature.</p> <p><b>mgo/txn handling of multiple operations for the same document</b></p> <p>The mgo/txn multi-document transaction support package will now correctly handle multiple operations in the same document within a single transaction.</p> <p>Before the fix, only the first operation would work due to a miscalculation of the internal sequence of transaction ids for the following documents. This means that the change should not affect existent code, unless the code was already not functioning properly.</p> <p>Having this working means that doing an <i>Insert+Update</i> on a single document will insert the document if it doesn’t exist, and then always update the document (previously existent or newly inserted).</p> <p>On the other hand, doing it in the inverted order, as <i>Update+Insert</i>, is a nice to way to say “either update or insert”, as only a single one of them can possibly work depending on whether the document previously exited or not.</p> <p>Thanks to Jesse van den Kieboom for reporting the problem.</p> <p><b>New bson.RawD document type</b></p> <p>It’s easier to explain the new document type in comparison to the previously existent <code>bson.D</code> type, which allows marshalling a bson document with a slice of names and values, such as:</p> <p><code> <pre> bson.D{{"field1", 42}, {"field2", "forty two"}} </pre> <p></code></p> <p>Besides being a representation that is flexible and relatively compact (if compared to a map), it also allows the field ordering to be respected when being delivered to the server, which is required by some features of MongoDB.</p> <p>The new <a href="">bson.RawD</a> type is similar, but rather than using <code>interface{}</code> element values as observed with <code>bson.D</code>, all values have a <a href="">bson.Raw</a> type, containing the the raw bson <code>[]byte</code> data and kind for the respective field value. This offers a convenient and efficient way to lazily process whole documents or subdocuments (by using the type in a field).</p> <p>This feature was inspired by a need reported by Daniel Gottlieb. </p>Gustavo Niemeyer: An AVR assembly test suite2013-08-31T07:27:55Zniemeyernospam@nospam.com<p>About a year ago I ordered a pack of 10 atmega328p processors from China to play with. They <a href="">took a while</a> to get here, and it took even longer for me to get back to them, but a few days ago the motivation to start doing something finally appeared.</p> <p>I’ve never actually played with AVRs before, and felt a bit like I was jumping a step in my electronics enthusiast progress by not diving into its architecture a bit more deeply. Also, despite the obvious advantages of ARM-based chips these days, the platform is still interesting in some perspectives, such as its widespread availability, low price in small quantities, and the ability to plug them in a breadboard and do things without pretty much any circuitry.</p> <p>To get acquainted with the architecture and to depart from things I work on more frequently, the project is so far taking the shape of an assembly library of functionality relevant for developing small projects, built mainly around binutils for the AVR. I did end up cheating a bit and compiling the assembly code via <code>avr-gcc</code>, just to get the <code>__do_copy_data</code> initialization routine injected, so that I don’t have to pull up the <code>.data</code> section from program memory into RAM manually.</p> <p><span id="more-2090"></span>I started running the test programs with the chip itself, with the help of a <a href="">Pirate Bus</a>, to see if the whole setup was sound. Once it worked a few times, I moved on to use the <a href="">simulavr</a> simulator to make the process of running and debugging more comfortable. In addition to being able to attach gdb, and trace execution, one of the nice features of simulavr is being able to map a port from the emulated CPU and get bytes written into it sent to an arbitrary file in the outer world. That means we can easily implement a trivial <code>println</code>-like function in assembly:</p> <p><code> <pre> .set STDOUT, 0x20 loop: ld r17, Z+ cpi r17, 0 breq done sts STDOUT, r17 rjmp loop done: ldi r17, '\n sts STDOUT, r17 </pre> <p></code></p> <p>Printing strings is only helpful if we do have strings, though, and with such a skeleton system there are no interesting ones yet. What we do have are registers, lots of them (32 in total). A good candidate for the next function would then be an <code>itoa</code>-like function that would put the proper bytes in memory for printing.</p> <p>So, after going down that road for a bit longer, the lack of a proper way to run tests on the created code was an evident show stopper. There’s no way the created code will be sane without being able to exercise it, and write tests that can be rerun at will. Fortunately, it’s easy enough to apply traditional testing practices to such an environment, given the simulator features mentioned.</p> <p>To drive those tests, a small tool named <i>avrtest</i> was written in Go. It takes an <i>avrtest.list</i> file that looks like this:</p> <p><code> <pre> devices: atmega328 [div8u] main: ldi r24, 128 ; dividend ldi r22, 10 ; divisor call div8u prnt8u r24 ; result prnt8u r22 ; divisor prnt8u r20 ; remainder want: 12 10 8 [itoa8u] cycle-limit: 400 main: ldi r24, 128 call itoa8u prntz want: 128 </pre> <p></code></p> <p>and runs it, showing the typical test runner output:</p> <p><code> <pre> % ./avrtest div8u ok (784 cycles) itoa8u ok (356 cycles) </pre> <p></code></p> <p>or the typical failure, when appropriate:</p> <p><code> <pre> div8u failed: unexpected output want: 13 10 8 got: 12 10 8 </pre> <p></code></p> <p>If the failure feels a bit cryptic, all of the intermediary files are kept under the <code>./_avrtest</code> directory, including a detailed trace file. Here is a snippet of such a trace:</p> <p><code> <pre> div8u.elf 0x0194: itoa8u LDI R30, 0x0a div8u.elf 0x0196: itoa8u+0x1 LDI R31, 0x01 div8u.elf 0x0198: itoa8u+0x2 PUSH R17 SP=0x8f6 0x1 div8u.elf 0x0198: itoa8u+0x2 CPU-waitstate div8u.elf 0x019a: itoa8u+0x3 LDI R17, 0x30 div8u.elf 0x019c: itoa8u+0x4 LDI R22, 0x0a div8u.elf 0x019e: itoa8u_loop CALL 0x178 SP=0x8f5 0xd1 SP=0x8f4 0x0 </pre> <p></code></p> <p>Besides that, we should be able to attach gdb to any given test by running the command <code>avrtest gdb <name></code>. That’s not yet there, but should be pretty soon, after the next cryptic breakage. :-)</p> <p>That tooling is not organized for a proper release, but I’ll certainly push it up to a public repository as soon as I get a chance to clean up the sandbox.</p>Gustavo Niemeyer: Twik: a tiny language for Go2013-07-16T23:18:26Zniemeyernospam@nospam.com<p <i>twik language</i> for open fiddling.</p> <p><span id="more-2063"></span>The <a href="">implementation</a> is straightforward, with under 400 lines for the parser and evaluator, and under 350 lines in the default functions provided for the language skeleton: var, func, do, if, and, or, etc.</p> <p>It also comes with an interactive interpreter to play with. You can install it with:</p> <p><code> <pre> $ go get launchpad.net/twik/cmd/twik </pre> <p></code></p> <p>This is a short sample session:<br /> <code> <pre> > (var x 1) > x 1 > (set x 2) > x 2 > (set x (func (n) (+ n 1))) > x #func > (x 1) 2 > (func inc (n) (+ n 1)) #func > (inc 42) 43 </pre> <p></code></p> <p>Another one demonstrating the lexical scoping:</p> <p><code> <pre> > (var add . (do . (var n 0) . (func (m) (set n (+ n m)) n) . ) . ) > (add 5) 5 > (add -1) 4 > n twik source:1:1: undefined symbol: n </pre> <p></code></p> <p>New functionality may be plugged in by providing Go functions. For example, here is a simple printf function:</p> <p><code> <pre> func printf(args []interface{}) (interface{}, error) { if len(args) > 0 { if format, ok := args[0].(string); ok { _, err := fmt.Printf(format, args[1:]...) return nil, err } } return nil, fmt.Errorf("printf takes a format string") } func main() { ... err = scope.Create("printf", printf) ... } </pre> <p></code></p> <p>It can now greet the world:</p> <p><code> <pre> $ cat test.twik (func hello (name) (printf "Hello %s!\n" name) ) (hello "world") $ time ./twik test.twik Hello world! ./twik test.twik 0.00s user 0.00s system 74% cpu 0.005 total </pre> <p></code></p: The heart of juju2013-06-25T01:30:53Zniemeyernospam@nospam.com<p>The very first time the concepts behind the juju project were presented, by then still under the prototype name of <i>Ubuntu Pipes</i>, was about four years ago, in July of 2009. It was a short meeting with Mark Shuttleworth, Simon Wardley, and myself, when Canonical still had an office on a tall building by the Thames. That was just the seed of a long road of meetings and presentations that eventually led to the codification of these ideas into what today is a major component of the Ubuntu strategy on servers.</p> <p>Despite having covered the core concepts many times in those meetings and presentations, it recently occurred to me that they were never properly written down in any reasonable form. This is an omission that I’ll attempt to fix with this post while still holding the proper context in mind and while things haven’t changed too much.</p> <p><span id="more-1844"></span>It’s worth noting that I’ve stepped aside as the project technical lead in January, which makes more likely for some of these ideas to take a turn, but they are still of historical value, and true for the time being.</p> <h2>Contents</h2> <p>This post is long enough to deserve an index, but these sections do build up concepts incrementally, so for a full understanding sequential reading is best:</p> <ul> <li><a href="">Classical deployments</a> <li><a href="">Preparing a blank slate</a> <li><a href="">Service topologies</a> <li><a href="">Scaling services horizontally</a> <li><a href="">Charms</a> <li><a href="">Relations</a> <li><a href="">Configuration</a> <li><a href="">Taking from here</a> </ul> <p><a id="classical-deployments"></a><br /> <h2>Classical deployments</h2> <p.</p> <p>The following figure depicts a simple example of such a scenario, with two frontend machines that had the Wordpress software configured on them to serve the same content out of a single backend machine running the MySQL database.</p> <p><img src="" width="324" height="256" class="aligncenter size-full wp-image-1863" /></p> <p.</p> <p>The lack of a good mechanism to turn all of these tasks into high-level operations that are convenient, repeatable, and extensible, is what motivated the development of juju. The next sections provide an overview of how these problems are solved.</p> <p><a id="preparing-a-blank-slate"></a><br /> <h2>Preparing a blank slate</h2> <p>Before diving into the way in which juju environments are organized, a few words must be said about what a juju environment is in the first place.</p> <p>All resources managed by juju are said to be within a juju environment, and such an environment may be prepared by juju itself as long as the administrator has access to one of the supported infrastructure providers (<a href="">AWS</a>, <a href="">OpenStack</a>, <a href="">MAAS</a>, etc).</p> <p>In practice, creating an environment is done by running juju’s bootstrap command:</p> <p><code> <pre> $ juju bootstrap </pre> <p></code></p> <p.</p> <p><a id="service-topologies"></a><br /> <h2>Service topologies</h2> <p:</p> <p><img src="" width="304" height="53" class="aligncenter size-full wp-image-1868" /></p> <p>That’s pretty much the model that an administrator using juju has to input into the system for that deployment to be realized. This may be achieved with the following commands:</p> <p><code> <pre> $ juju deploy cs:precise/wordpress $ juju deploy cs:precise/mysql $ juju add-relation wordpress mysql </code></pre> <p.</p> <p:</p> <p><img src="" alt="topology-step-1" width="314" height="277" class="aligncenter size-full wp-image-1871" /></p> .</p> <p>At this point, the service units are able to realize the requested model:</p> <p><img src="" alt="topology-step-2" width="315" height="134" class="aligncenter size-full wp-image-1872" /></p> <p>This is close to the original scenario described, except that there’s a single frontend machine running Wordpress. The next section details how to add that second frontend machine.</p> <p><a id="scaling-services-horizontally"></a><br /> <h2>Scaling services horizontally</h2> <p>The next step to match the original scenario described is to add a second service unit that can run Wordpress, and that can be achieved by the single command:</p> <p><code> <pre> $ juju add-unit wordpress </pre> <p></code></p> <p>No further commands or information are necessary, because the juju state server understands what the model of the deployment is. That model includes both the configuration of the involved services and the fact that units of the wordpress service should talk to units of the mysql service.</p> <p>This final step makes the deployed system look equivalent to the original scenario depicted:</p> <p><img src="" alt="topology-step-3" width="314" height="280" class="aligncenter size-full wp-image-1875" /></p> <p.</p> <p>The way that the service reacts to such changes isn’t enforced by the juju infrastructure. Instead, juju delegates service-specific decisions to the charm that implements the service behavior, as described in the following section.</p> <p><a id="charms"></a><br /> <h2>Charms</h2> <p>A juju-managed environment wouldn't be nearly as interesting if all it could do was constrained by preconceived ideas that the juju developers had about what services should be supported and how they should interact among themselves and with the world.</p> <p.</p> <p>The charm metadata contains basic declarative information, such as the name and description of the charm, relationships the charm may participate in, and configuration options that the charm is able to handle.</p> <p.</p> <p>This means that in the previous example the service units depicted are in fact reporting relevant events to the hooks that live within the wordpress charm, and those hooks are the ones responsible for bringing the Wordpress software and any other dependencies up.</p> <p><img src="" alt="wordpress-service-unit" width="194" height="174" class="aligncenter size-full wp-image-1876" /></p> <p>The interface offered by juju to the charm implementation is the same, independently from which infrastructure provider is being used. As long as the charm author takes some care, one can create entire service stacks that can be moved around among different infrastructure providers.</p> <p><a id="relations"></a><br /> <h2>Relations</h2> <p.</p> <p>With juju, it’s fair to say that service relations were part of the system since inception, and have driven the whole mindset around it.</p> <p>Relations in juju have three main properties: an <i>interface</i>, a <i>kind</i>, and a <i>name</i>.</p> <p>The relation <i>interface</i>.</p> <p>The relation <i>kind</i>.</p> <p>The relation <i>name<.</p> <p>For example, the two communicating services described in examples might hold relations defined as:</p> <p><img src="" alt="wordpress-mysql-relation-details" width="310" height="100" class="aligncenter size-full wp-image-1878" /></p> :</p> <p><img src="" alt="wordpress-mysql-relation-workflow" width="434" height="396" class="aligncenter size-full wp-image-1879" /></p> <p>As depicted above, such an exchange might take the following form:</p> <ol> <li>The administrator establishes a relation between the wordpress service and the mysql service, which causes the service units of these services (wordpress/1 and mysql/0 in the example) to relate. <li. <li>The requirer side of the relation is informed that relation settings have changed via the relation-changed hook. This hook implementation may pick up the provided settings and configure the software to talk to the remote side. <li>The Wordpress software itself is run, and establishes the required TCP connection to the configured database. </ol> <p.</p> <p>Also, although this example and many real world scenarios will have relations reflecting TCP connections, this may not always be the case. It’s reasonable to have relations conveying any kind of metadata across the related services.</p> <p><a id="configuration"></a><br /> <h2>Configuration</h2> <p>Service configuration follows the same model of metadata plus executable hooks that was described above for relations. A charm can declare what configuration settings it expects in its metadata, and how to react to setting changes in an executable hook named <i>config-changed</i>. Then, once a valid setting is changed for a service, all of the respective service units will have that hook called to reflect the new configuration.</p> <p>Changing a service setting via the command line may be as simple as:</p> <p><code> <pre> $ juju set wordpress</p> <p><a id="taking-from-here"></a><br /> <h2>Taking from here</h2> <p>This conceptual overview hopefully provides some insight into the original thinking that went into designing the juju project. For more in-depth information on any of the topics covered here, the following resources are good starting points:</p> <ul> <li><a href="">The project page</a> <li><a href="">Getting started guide</a> <li><a href="">In-depth technical documentation</a> <li><a href="">Overview presentation at Google I/O 2012</a> </ul>Gustavo Niemeyer: In-flight deb packages of Go2013-06-15T21:31:24Zniemeyernospam@nospam.com<p>Since relatively early in the public life of the Go language, I’ve <a href="">been involved</a> in pushing forward packages that might be used in Ubuntu, including making the compiler suite itself happier in such packaged environments. In due time, these packages were moved over to an <a href="">automatic build system</a>, so that people wouldn’t have to rely on my good will to have up-to-date packages, nor would I have to be regularly spending time maintaining those packages. Or so was the theory.</p> <p><span id="more-1737"></span>It’s well known that the real world is not so plain, though, and issues became much more regular than hoped. Some of the issues were caused by changes in the build conventions of Go, others self-inflicted due to my limited knowledge of the <a href="">extensive conventions</a> around packaging, or bugs in <a href="">indirect dependencies</a> of the process, and more recently the sub-optimal scheduling algorithm used by the build farm has driven the builds <a href="">to a halt</a>.</p> <p>So, the question is how to get out of this rabbit hole, but still give people a convenient way to use Go in Ubuntu.</p> <p>Enter <i>godeb</i>, an experiment that dynamically translates the upstream builds of Go into deb packages. In practice, it’s a simple standalone Go program that can <a href="">parse</a> the build <a href="">list</a>, fetch the requested version, and in memory translate the contents into a correct binary deb package.</p> <p>Since you cannot build a Go application without a Go compiler first, there’s an <a href="">x86 32-bit binary</a> and an <a href="">x86 64-bit binary</a> of godeb available for download. After the compiler is installed, godeb may be fetched and rebuilt locally by running <code>go get launchpad.net/godeb</code>.</p> <p>Once the godeb binary is available, it’s easy to get up-to-date packages:</p> <p><code> <pre> $ .) ... </pre> <p></code></p> <p>It figures what the most recent build available is, downloads, translates, and installs it, asking for a password via sudo if necessary. Running <code>godeb install</code> again will fetch the latest version (or the requested one) and replace the currently installed package. Package installs default to the same architecture of godeb itself, and may be changed by setting the GOARCH environment variable to <code>386</code> or <code>amd64</code>, borrowing from a Go convention.</p> <p>New releases of Go are immediately available, and so are the old ones:</p> <p><code> <pre> $ . </pre> <p></code></p> <p>For the time being, I’m holding up maintenance of the Go PPA in Launchpad in favor of this system. Of course, you can still install the <code>golang-*</code> packages on Ubuntu 12.10 and 13.04 from the official repositories as usual.</p>Gustavo Niemeyer: Efficient XPath for Go2013-06-07T21:58:56Zniemeyernospam@nospam.com<p>This week I found some time to work on another small spin-off from the <a href="">juju</a> project at Canonical, and I’m happy to make it openly available today: the <a href="">xmlpath</a> package, which implements an efficient and strict subset of the <a href="">XPath</a> specification for the <a href="">Go</a> language.</p> <p>This new package will be used in an upcoming (and long due) revision of the <a href="">goamz</a>.</p> <p><span id="more-1559"></span>Path expressions currently supported by the package are in the following format, with all components being optional:</p> <blockquote><p> /axis-name::node-test[predicate]/axis-name::node-test[predicate] </p></blockquote> <p>Compatibility with the XPath specification goes to the following extent:</p> <ul> <li>All axes are supported (“child”, “following-sibling”, etc) <li>All abbreviated forms are supported (“.”, “//”, etc) <li>All node types except for namespace are supported <li>Predicates are restricted to [N], [path], and [path=literal] forms <li>Only a single predicate is supported per path step <li>Richer expressions and namespaces are not supported </ul> <p>For example, consider this simple document:</p> <p><code> <pre> > </pre> <p></code></p> <p>The following expressions can be applied to it, with the indicated result as first match:</p> <table> <tr> <td><b>/library/book/isbn</b></td> <td>“0836217462″</td> </tr> <tr> <td><b>/library/*/isbn</b></td> <td>“0836217462″</td> </tr> <tr> <td><b>/library/book/../book/./isbn</b></td> <td>“0836217462″</td> </tr> <tr> <td><b>/library/book/character[2]/name</b></td> <td>“Snoopy”</td> </tr> <tr> <td><b>/library/book/character[born='1950-10-04']/name</b></td> <td>“Snoopy”</td> </tr> <tr> <td><b>/library/book//node()[@id='PP']/name</b></td> <td>“Peppermint Patty”</td> </tr> <tr> <td><b>//*[author/@id='CMS']/name</b></td> <td>“Charles M Schulz”</td> </tr> <tr> <td><b>/library/book/preceding::comment()</b></td> <td>” Great book. “</td> </tr> </table> <p>The <a href="">API implemented</a> allows compiled paths to be held and re-applied any number of times, concurrently or not. For example:</p> <blockquote><p> <code> <pre> path := xmlpath.MustCompile("/library/book/isbn") root, err := xmlpath.Parse(file) if err != nil { log.Fatal(err) } if value, ok := path.String(root); ok { fmt.Println("Found:", value) } </pre> <p></code> </p></blockquote> <p>Result sets can also be optionally stepped over via an idiomatic <a href="">iterator</a> interface.</p> <p>The performance of these operations is close to using the static unmarshaling currently implemented by Go’s encoding/xml package:</p> <blockquote><p> <code> <pre> BenchmarkParse 5000 613862 ns/op BenchmarkSimplePathCompile 1000000 1983 ns/op BenchmarkSimplePathString 1000000 1565 ns/op </pre> <p></code> </p></blockquote> <p>As a reference, this is a similar encoding/xml operation, using a struct with a single nested field on the same document:</p> <blockquote><p> <code> <pre> BenchmarkSimpleUnmarshal 5000 622519 ns/op </pre> <p></code> </p></blockquote> <p>I’m hoping this will make our unavoidable XML interactions slightly less painful.</p: jsonpeer puts the P in JSONP2013-05-28T02:27:32Zniemeyernospam@nospam.com<p>Today <a href="">ubuntufinder.com</a> was updated with the latest image data for Ubuntu 13.04 and all the previous releases as well. Rather than simply hardcoding the values again, though, the JavaScript code was changed so that it imports the <a href="">new JSON-based feeds</a> that Canonical has been publishing for the official Ubuntu images that are available in EC2, thanks to recent work by Scott Moser. This means the site is always up-to-date, with no manual actions. </p> <p>Although the new feeds made that quite straightforward, there was a small detail to sort out: the Ubuntu Finder is visually dynamic, but it is actually a fully static web site served from S3, and the JSON feeds are served from the Canonical servers. This means the <a href="">same-origin policy</a> won’t allow that kind of cross-domain import to be easily done without <a href="">further action</a>.</p> <p><span id="more-1501"></span <a href="">JSONP</a> or with <a href="">cross-origin resource sharing</a> enabled, so that browsers can bypass the same-origin restriction, and that’s what was done.</p> <p <a href="">jsontest.com</a> as an example, the following URL will serve a JSON document that can only be loaded from a page that is in a location allowed by the same-origin policy:</p> <ul> <li><a href=""></a> </ul> <p>If one wanted to load that page from a different location, it might be transformed into a JSONP document by loading it from:</p> <ul> <li><a href=""></a> </ul> <p>Alternatively, <a href="">modern browsers</a> that support the <a href="">cross-origin resource sharing</a> can simply load pure JSON by omitting the <i>jsonpeercb</i> parameter. The jsonpeer server will emit the <a href="">proper header</a> to allow the browser to load it:</p> <ul> <li><a href=""></a> </ul> <p>This service is backed by a tiny <a href="">Go</a> server that lives in <a href="">App Engine</a> so it’s fast, secure (hopefully), and maintenance-less.</p> <p>Some further details about the service:</p> <ul> <li>Results are JSON with cross-origin resource sharing by default <li>With a query parameter <i>jsonpeercb=<callback name></i>, results are JSONP <li>The callback name must consist of characters in the set [_.a-zA-Z0-9] <li>Query parameters provided to jsonpeer are used when doing the upstream request <li>HTTP headers are discarded in both directions <li>Results are cached for 5 minutes on memcache before being re-fetched <li>Upstream results must be valid JSON <li>Upstream results must have Content-Type application/json or text/plain <li>Upstream results must be under 500kb <li>Both http and https work; just tweak the URL and the path accordingly </ul> <p>Have fun if you need it, and please get in touch before abusing it.</p> <p><b>UPDATE:</b> The service and blog post were tweaked so that it defaults to returning plain JSON with CORS enabled, thanks to a suggestion by James Henstridge.</p>
http://voices.canonical.com/feed/atom/tag/go/
CC-MAIN-2014-42
refinedweb
11,469
52.09
I’d like to implement a simple custom sink block in Python. AFAIK, a sink is a 1:0 basic block, with one input port, and no output port. I define it as a class: class MySink(gr.basic_block): def init(self, src_block): gr.basic_block.init(self, name=‘MySink’, in_sig=[numpy.float32], out_sig=None) gr.top_block().connect(src_block, self) Then, in the top block constructor: # … self.gsm_fcch_detector_0 = grgsm.fcch_detector(4) # Line bellow raises an ‘Unable to coerce endpoint’ exception self.my_sink = MySink(self.gsm_fcch_detector_0) As you may already have guessed, I’m a newcomer here, and I’m sure I miss something obvious. I thought the connect line should wire the FCCH detector output port to my custom sink input port, but instead it raises an exception. I will really appreciate any direction, as I’m a bit stuck here: could someone point me toward what I clearly misunderstand ? Thanks in advance.
https://www.ruby-forum.com/t/trouble-creating-simple-custom-sink-python-unable-to-coerce-endpoint/242863
CC-MAIN-2021-49
refinedweb
152
60.61
I'm implementing an example from Important code is like this: import React, { Component } from 'react'; import suburbs from 'json!../suburbs.json'; function getSuggestions(input, callback) { const suggestions = suburbs .filter(suburbObj => suburbMatchRegex.test(suburbObj.suburb)) .sort((suburbObj1, suburbObj2) => suburbObj1.suburb.toLowerCase().indexOf(lowercasedInput) - suburbObj2.suburb.toLowerCase().indexOf(lowercasedInput) ) .slice(0, 7) .map(suburbObj => suburbObj.suburb); // 'suggestions' will be an array of strings, e.g.: // ['Mentone', 'Mill Park', 'Mordialloc'] setTimeout(() => callback(null, suggestions), 300); } This copy-paste code from the example (that works), has an error in my project: Error: Cannot resolve module 'json' in /home/juanda/redux-pruebas/components If I take out the prefix json!: import suburbs from '../suburbs.json'; This way I got not errors at compile time (import is done). However I got errors when I execute it: Uncaught TypeError: _jsonfilesSuburbsJson2.default.filter is not a function If I debug it I can see suburbs is an objectc, not an array so filter function is not defined. However in the example is commented suggestions is an array. If I rewrite suggestions like this, everything works: const suggestions = suburbs var suggestions = [ { 'suburb': 'Abbeyard', 'postcode': '3737' }, { 'suburb': 'Abbotsford', 'postcode': '3067' }, { 'suburb': 'Aberfeldie', 'postcode': '3040' } ].filter(suburbObj => suburbMatchRegex.test(suburbObj.suburb)) So... what json! prefix is doing in the import? Why can't I put it in my code? Some babel configuration? First of all you need to install json-loader: npm i json-loader --save-dev Then, there are two ways how you can use it: In order to avoid adding json-loader in each import you can add to webpack.config this line: loaders: [ { test: /\.json$/, loader: 'json-loader' }, // other loaders ] Then import json files like this import suburbs from '../suburbs.json'; Use json-loader directly in your import, as in your example: import suburbs from 'json!../suburbs.json'; Note: In webpack 2.* instead of keyword loaders need to use rules., also webpack 2.* uses json-loader by default *.json files are now supported without the json-loader. You may still use it. It's not a breaking change. json-loader doesn't load json file if it's array, in this case you need to make sure it has a key, for example { "items": [ { "url": "", "repository_url": "", "labels_url": "{/name}", "comments_url": "", "events_url": "", "html_url": "", "id": 199425790, "number": 598, "title": "Just a heads up (LINE SEPARATOR character issue)", }, ..... other items in array ..... ]} This just works on React & React Native const data = require('./data/photos.json'); console.log('[-- typeof data --]', typeof data); // object const fotos = data.xs.map(item => { return { uri: item }; }); Found this thread when I couldn't load a json-file with ES6 TypeScript 2.6. I kept getting this error: TS2307 (TS) Cannot find module 'json-loader!./suburbs.json' To get it working I had to declare the module first. I hope this will save a few hours for someone. declare module "json-loader!*" { let json: any; export default json; } ... import suburbs from 'json-loader!./suburbs.json'; If I tried to omit loader from json-loader I got the following error from webpack: BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders. You need to specify 'json-loader' instead of 'json', see You don't need JSON loader. Node provides ECMAScript Modules (ES6 Module support) with the --experimental-modules flag, you can use it like this node --experimental-modules myfile.mjs Then it's very simple import myJSON from './myJsonFile.json'; console.log(myJSON); Then you'll have it bound to the variable myJSON. With json-loader installed, now you can simply use import suburbs from '../suburbs.json'; or also, even more simply import suburbs from '../suburbs';
https://javascriptinfo.com/view/63352/es6-modules-implementation-how-to-load-a-json-file
CC-MAIN-2020-50
refinedweb
604
50.73
Java Examples - Solving Tower of Hanoi Advertisements Problem Description: How to use method for solving Tower of Hanoi problem? Solution: This example displays the way of using method for solving Tower of Hanoi problem( for 3 disks). public class MainClass { public static void main(String[] args) { int nDisks = 3; doTowers(nDisks, 'A', 'B', 'C'); } public static void doTowers(int topN, char from, char inter, char to) { if (topN == 1){ System.out.println("Disk 1 from " + from + " to " + to); }else { doTowers(topN - 1, from, to, inter); System.out.println("Disk " + topN + " from " + from + " to " + to); doTowers(topN - 1, inter, from, to); } } } Result: The above code sample will produce the following result. Disk 1 from A to C Disk 2 from A to B Disk 1 from C to B Disk 3 from A to C Disk 1 from B to A Disk 2 from B to C Disk 1 from A to C java_methods.htm Advertisements
http://www.tutorialspoint.com/javaexamples/method_tower.htm
CC-MAIN-2016-22
refinedweb
155
64.24
Lets start by importing the microbit and random libraries: from microbit import * import random Create some constants, one for the SPEED which is the amount of time in between each bop for each level, and one for the LEVELUP's which is the amount of points at each level: SPEED = {0: 1000, 1: 750, 2: 650, 3: 600, 4: 550, 5: 500} LEVELUP = (5, 10, 15, 20, 25, 30) Create 4 functions which when caused will show A, B, a tick and a cross: def show_a(): display.clear() display.show("A") def show_b(): display.clear() display.show("B") def show_tick(): display.clear() display.set_pixel(0, 3, 9) display.set_pixel(1, 4, 9) display.set_pixel(2, 3, 9) display.set_pixel(3, 2, 9) display.set_pixel(4, 1, 9) def show_cross(): display.clear() display.show("X") Create a function which will wait for the button to be pressed, returning True if it is and False if it isn't: def wait_for_button(rightbutton, wrongbutton): rightpressed = False wrongpressed = False started = running_time() now = running_time() while now - started < SPEED[level]: if rightbutton.is_pressed(): rightpressed = True if wrongbutton.is_pressed(): wrongpressed = True now = running_time() if rightpressed == True and wrongpressed == False: return True else: return False Set 3 variables for the level, the score and one which will be set to True when the game is over: level = 0 score = 0 gameover = False Scroll "BopBit" on the screen to show its the start of the game: display.scroll("BopBit") Loop until the game is over: while gameover == False: Randomly pick an action (either A or B), show it on the screen and wait for a button to be pressed: success = False #randomly pick an A or B button action = random.randint(0, 1) #wait for the button to be pressed if action == 0: show_a() success = wait_for_button(button_a, button_b) elif action == 1: show_b() success = wait_for_button(button_b, button_a) If the player pressed the right button in time show a tick and increase the score or show a cross: if success: show_tick() score = score + 1 #if the score is a levelup score increase the level if score in LEVELUP: level = level + 1 else: show_cross() gameover = True Wait for a small amount of time (half the current speed): sleep(int(SPEED[level] / 2)) After the game is over, sleep for 1 second, and display the players score on a loop: sleep(1000) while True: display.scroll("{} points".format(score)) You can view the complete code in my Microbit MicroPython examples repository on github. How about taking it further by adding new actions such as shaking or a connecting up a speaker and adding a sound track, Hey,nice Hi there, I'm not a game guru but I'm a bit interested in your blog. How does this work? I mean, what should I do first? Is this as easy as writing essays? Well, when you say about writing essays, I've got a good helper though, Urgent Essay Writing. Never lets me down. Thanks for tutorial. This is very helpful.
http://www.stuffaboutcode.com/2016/02/microbit-bop-it-game-in-python.html
CC-MAIN-2017-17
refinedweb
498
67.38
Looking for some help from the community. I can't seem to find the exact answer to my question after browsing around. I am in the beginning stages of a program and after declaring a struct (cardStruct) then declaring an array of struct type (cardStruct deck[MAX_CARDS]), I am trying to access the array through my function FormCards. Here's my problem, hopefully you guys can point me in the right direction. Here's my code:Here's my code:Code: cards.cpp:39: error: variable or field 'FormCards' declared void cards.cpp:39: error: 'cardStruct' was not declared in this scope Code: #include <iostream>#include <cstdlib> #include <ctime> using namespace std; //Global Constants const int MAX_CARDS = 52; //Represents the size of the deck of cards const int MAX_SUIT = 13; //Function Declarations void FormCards (); int main () { enum SuitType {CLUBS, HEARTS, SPADES, DIAMONDS}; //Enum type to represent each card's suit struct cardStruct { SuitType suit; int value; int point; }; cardStruct deck[MAX_CARDS]; } void FormCards (cardStruct deck[]) { int i, k; //loop index int index = 0; //Used for assigning points and values in nested for loop //For loop assigns suit //13 cards per suit for (i = 0; i < MAX_CARDS; i++) { if (i < 13) deck[i].suit = DIAMOND; else if (i < 26) deck[i].suit = CLUB; else if ( i < 39) deck[i].suit = HEART; else deck[i].suit = SPADE; } //Nested for loop assigns values and points for (i = 0; i < MAX_SUIT; i++) { //assign values deck[index].value = k + 1; //assign points //HEART card sless than 10 has a point of 5 //HEART cards of J, Q, K have points of 10 if (deck[index].suit == HEART) { if (deck[index].value >= 10) deck[index].points = 10; else deck[index].points = 5; } //Queen of SPADE has a point of 100 else if (deck[index].suit == SPADE && deck[index].value == 12) deck[index].points = -100; //Rest of the cards will have 0 points else deck[index].points = 0; index++; //Increase index by 1 }
http://cboard.cprogramming.com/cplusplus-programming/154346-accessing-array-struct-type-function-printable-thread.html
CC-MAIN-2015-27
refinedweb
326
73.88
Top Features in Spring WS 2.0 Release, Page 2 Best New Features in Spring WS 2.0 This section highlights the most notable new features of Spring WS 2.0. Annotation-driven Enpoint Model The first feature I'll talk about is the single-line configuration in the spring-ws-servlet.xml file. This single line (shown below) configures the annotation-driven Spring WS endpoint model. So in Spring WS 2.0, you don't have to define any bean in spring-ws-context.xml to configure the @Endpoint programming model. <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="" elementFormDefault="qualified" targetNamespace=""> Automatic WSDL Exposure Using sws:dynamic-wsdl and sws:static-wsdl Spring WS gives us the option to generate the WSDL from XSD dynamically (i.e., without writing it ourselves). Before version 2.0, we had to define a bean in a context file to generate WSDL dynamically. With Spring WS 2.0, you can generate the WSDL dynamically by using the <sws:dynamic-wsdl> tag. <sws:dynamic-wsdl <sws:xsd </sws:dynamic-wsdl> We can also publish an existing WSDL using the tag. If you deploy the application now on any server like Jetty or Tomcat, you will be able to see the WSDL at. Improved, More Flexible @EndpointModel So far we have exposed our contract (i.e. WSDL), but we have not written the code that will be invoked on the server side. In Spring WS, you write endpoints that handle incoming XML messages. An endpoint is a class annotated with the @Endpoint annotation. In this endpoint class, you will create one or more methods that handle incoming request XML messages. The handle methods can take a wide range of parameter and return types, such as JAXB2, dom4j, XPATH, SAX, STAX, and so on. You can also mix and match the parameters (i.e. you can have a request parameter as a DOM object and return a JAXB2 response object). This is the most important feature introduced in this release. The handle methods are annotated with @PayloadRoot or @SoapAction to map which kind of messages a method can handle. You can get the complete list of supported parameter and return types from the SpringSource documentation. As an example, let's write an endpoint for profile service..shekhar.usermanagement.profile.UserProfileCreateRequest; import com.shekhar.usermanagement.profile.UserProfileCreateResponse; @Endpoint public class UserProfileEndpoint { private UserService service; @Autowired public UserProfileEndpoint(UserService service) { this.service = service; } @PayloadRoot(localPart = "UserProfileCreateRequest", namespace = "") @ResponsePayload public UserProfileCreateResponse create(@RequestPayload UserProfileCreateRequest request) { String message = service.createUser(request.getUserProfile()); UserProfileCreateResponse response = new UserProfileCreateResponse(); response.setMessage(message); return response; } } In the endpoint shown above, the @PayloadRoot annotation maps all the incoming requests with the namespace "" and localpart "UserProfileCreateRequest" to the create method. I have used JAXB2 as the parameter and return type. You can generate JAXB2 objects from XSD using the Maven 2 plugin. For more information please download the code from my github repository. Snap Judgment: Spring WS 2.0 Is the Best With its new @Endpoint programming model, it is very easy to create a SOAP-based Web service with Spring WS 2.0.The improved @Endpoint programming model is very flexible and requires very little configuration. You don't have to write all the boilerplate code to do the configuration, like when you define beans in a context file. Just write a few XML tags in the application context XML file and you are done. To me, Spring WS 2.0 is the best Java stack to write SOAP-based Web services. About the Author Shekhar Gulati. Originally published on. Page 2 of 2
http://www.developer.com/java/ent/top-features-in-spring-ws-2.0-release.html
CC-MAIN-2017-04
refinedweb
603
51.14
Wemos D1 Mini Web Server based Servo Motor Control So far, we have generated the pwm signal in various ways and thus controlled the servo motors. In this tutorial, we are going to do this differently. We will be using a web server run by our Wemos board and we will be able to measure the pwm. Also it will control the amount of rotation of the desired servo motor. In short we will learn about Wemos D1 Mini Web Server based Servo Motor Control. Materials Required SG90 Servo Motor A servo motor is a type of motor that can rotate very accurately. This type of motor consists of a control circuit that provides feedback on the current position of the motor shaft. This feature allows servo motors to rotate with great precision. Servo motors are classified into different types based on their application, such as AC servo motors and DC servo motors. Square wave or PWM Pulse Width Modulation or pwm, a way to regulate electrical power by changing the cut-off time and the connection of the source in each cycle. In fact, pwm is a square signal that can be 1 or 5 volts at a time, or 0, which means 0 volts. For example, if the Duty Cycle of a PWM wave is equal to 80%, that is, in each cycle 80% of the voltage is equal to 5 volts and 20% of the voltage is equal to 0. The PWM is shown in the figure below. How this project works? In this project, we first run a web server on port 80 using the Wemos D1 mini board, which uses the ESP8266 chip. We can also customize the page as needed, where we have a slider to change the pwm values. By changing the slider values from 0 to 180 we will be able to control the servo motor connected to Wemos D1 Mini. Connection Diagram In this project, we will use one of the pwm pins of ESP8266 board to start the SG90 servo motor. In this case, we will use pin D4, but you can change this part according to your interest and needs by changing a part of the code. Make the connections according to the schematic and the table below. It should be noted that all IO pins in Wemos except D0 and A0 support pwm, so you can extend this project to a large number to control more servers. Some More Projects: - ESP8266 Web Server for Controlling Electrical Devices - Controlling ESP32 via Bluetooth using Blynk - Interfacing Ultrasonic Sensor HC SR04 with Arduino Uno - Interfacing MQ2 Gas Sensor with Arduino - IoT based Timer Switch using Blynk and NodeMCU - Raspberry Pi Temperature Logger DS18B20 - ESP32 based Switch Notification Project using Blynk Code Analysis We need to upload the code to start the project, but first we will look at the important parts and sections that need to be explained. We will first call the required libraries. In this project we will use only servo and ESP8266WiFi libraries. #include <ESP8266WiFi.h> #include <Servo.h> In this line, we specify the PIN for connecting the signal wire of the SG90 servo motor with Wemos D1 Mini. static const int ServoGPIO = D4; In the following, we introduce the Wi-Fi network information intended for connecting the board. const char* ssid = "Your WiFi SSID"; const char* password = "Your WiFi Password"; This part of the code is made for the appearance and functions of the web page, which you can change if necessary and customize it to your liking. client.println(“<!DOCTYPE html><html>”); client.println(“<head><meta name=\”viewport\” content=\”width=device-width, initial-scale=1\”>”); client.println(“<title>Servo Angle Controller</title>”); client.println(“<link rel=\”icon\” href=\”data:,\”>”); client.println(“<style>body { text-align: center; font-family: \”Trebuchet MS\”, Arial; margin-left:auto; margin-right:auto;}”); client.println(“.headertext{ font-weight:bold; font-family:Arial ; text-align: center; color: brown ;}”); client.println(“.slider { width: 500px; }</style>”); client.println(“<script src=\”\”></script>”); client.println(“</head><body><h1><u><div class = \”headertext\”> Web Server based Servo Angle Controller</u></h1>”); client.println(“<p><h3>Angle</h3>>”); Final Code & Uploading the Code You can download the code from the link below. Unzip it and open it using Arduino IDE. Compile the code and upload the code to Wemos D1 mini board. Construction & Testing Once you complete the hardware connections and upload the code, Now its time to get the ip address of your webserver. Open the Arduino IDE serial monitor and reset the WeMOS D1 Mini. Here it will show you the IP address of your web server. Now enter this IP address in browser and press enter. You will get the GUI interface of your webserver as shown below. If you move the slider then you will see a corresponding movement in servo motor. Conclusion In this project, by building a web server using the Wemos board that uses the ESP8266 chip. We were able to run a web page in which we used a slider to measure the pwm values on the ESP8266 board that is connected to the D4 pin. Change the slider so that the servo motor shaft changes from 0 to 180 degrees as per your requirement. Of course, by changing the code and adding elements, you will be able to control more SG90 servo motors together.
https://www.iotstarters.com/wemos-d1-mini-web-server-based-servo-motor-control/
CC-MAIN-2021-25
refinedweb
895
62.98
MyInfo 4.01 Sponsored Links Download location for MyInfo 4.01 MyInfo 4.01....read more NOTE: You are now downloading MyInfo 4.01. This trial download is provided to you free of charge. Please purchase it to get the full version of this software. Select a download mirror MyInfo 4.01 Screenshot MyInfo 4.01 Keywords Bookmark MyInfo 4.01 MyInfo 4.01 Copyright WareSeeker.com do not provide cracks, serial numbers etc for MyInfo 4.01. Document MS-SQL and Oracle Databases. SchemaToDoc can transform your MS-SQL and Oracle metadata into easy-to-read Word documents. The program documents: Primary Keys, Field Information (type, size, de Free Download Never lose your valuable information again. Nodez is a powerful information outliner with full-featured rich text. Use Nodez to organize your information in an info tree: from a simple recipe book to Free Download is the ideal solution to help keep your documents and information easily accessable and secure Free Download Metadata browser for .NET Framework 2.0. Features: type inheritance tree, type nesting tree, type construction tree; type filter; detailed information for assemblies, namespaces and types; printing wi Free Download SwitchCop shows:General Information about Switch: Information like Switch nam... Free Download Secure your email and documents! Free Download Maple is a useful document organizer that enables you to create your own hierarchical trees for storing information such as documents, notes, and images. Free Download Latest Software Popular Software Favourite Software
http://wareseeker.com/download/myinfo-4.01.rar/1f3273f6d
CC-MAIN-2016-40
refinedweb
244
52.05
def midpoint(p1, p2): """ PRE: p1 and p2 are Point objects (from the graphics module) POST: a new Point equidistant from and co-linear with p1 and p2 is computed and returned What graphics module are you using? (pypi contains several dozen, none named 'graphics') What does the interface of a Point look like? If Point has named attributes (like p.x, p.y, etc) you could do something like def midpoint(p1, p2): return Point((p1.x+p2.x)/2, (p1.y+p2.y)/2) If Point can be accessed as a list (like p[0], p[1], etc) you could instead do def midpoint(p1, p2): return Point((p1[0]+p2[0])/2, (p1[1]+p2[1])/2) If Point has Point addition and scalar division or multiplication overloaded, you could do def midpoint(p1, p2): return (p1+p2)/2 # or *0.5 (although strictly speaking adding two Points should be meaningless, and subtracting one point from another should give you a Vector - thus def midpoint(p1, p2): return p1 + (p2-p1)/2 # or *0.5
https://codedump.io/share/YdfDEULwMgt7/1/how-to-write-a-function-which-calculate-the-midpoint-between-2-points-in-python
CC-MAIN-2017-51
refinedweb
178
64.04
Take this simple Groovy class: public class TestClass { String s } Hitting ‘autogenerate equals and hashCode’ a popular IDE generates the following code: public class TestClass { String s boolean equals(o) { if (this.is(o)) return true; if (!o || getClass() != o.class) return false; TestClass testClass = (TestClass) o; if (s ? !s.equals(testClass.s) : testClass.s != null) return false; return true; } int hashCode() { return (s ? s.hashCode() : 0); } } At first this looks unusual but ok, but taking a closer look there is a bug in there, can you spot it? And even better: write a test for it? Lessons learned: - If something looks suspicious write a test for it. - Question your assumptions. There is no assumption which is safe from be in question. - Don’t try to be too clever. 5 thoughts on “Find the bug: Groovy and autogenerated equals” You can tell a Python coder didn’t design that 😉 What happens when s is empty (but not null) in 2 different instances of TestClass? Yeah, it’s the Groovy Truth issue… assert new TestClass( s:” ) != new TestClass( s:null ) Yes! You are right. Another interesting case happens when you use a Grails domain class mapped to an Oracle database: Oracle does not differentiate between null and empty Strings, hence the Groovy truth issue does not occur. The sad part is this bug has been in IntelliJ for at least a year now and I reported it to JetBrains about just as long ago and it is still not fixed. I know you didn’t mention it was IntelliJ but I’m about 99% sure it is. Yes, sadly it is IntelliJ and the bug is still present. Please provide a link to the bug so others can vote.
https://schneide.blog/2010/04/13/find-the-bug-groovy-and-autogenerated-equals/
CC-MAIN-2022-27
refinedweb
288
73.78
#!/home/philou/install/perl-5.8.2-threads/bin/perl -w use strict; use threads; use threads::shared; use Thread::Semaphore; my $s = 'Thread::Semaphore'->new( 1 ); sub t { while( $s->down() ) { print "DOWN!\n"; sleep( 1 ); } } 'threads'->new( \&t ); while( <> ) { $s->up(); print "UP!\n"; } [download] Declaring the `$s' variable as `shared' does not help at all : #!/home/philou/install/perl-5.8.2-threads/bin/perl -w use strict; use threads; use threads::shared; use Thread::Semaphore; my $s : shared = 'Thread::Semaphore'->new( 1 ); sub t { while( $s->down() ) { print "DOWN!\n"; sleep( 1 ); } } 'threads'->new( \&t ); while( <> ) { $s->up(); print "UP!\n"; } [download] thread failed to start: Can't call method "down" on unblessed referenc +e at ./t.pl line 11. [download] Any suggestion appreciated. Philou my $s = &shared( Thread::Semaphore->new ); [download] First off, I've never used Thread::Semaphore. Part of the reason I've never used it is because to my knowledge, you cannot share objects between threads, but for Thread::Semaphore to be useful, you would need to be able to invoke the methods from multiple threads? And I don't believe that this will work. From my perspective, almost everything in the Thread::* namespace was written for use with perl5005threads, which are now deprecated in favour of iThreads, because they never really worked properly. As such, I think that everything in the Thread::* namespace should be withdrawn or if it is really iThreads compatible, be renamed into the threads::* namespace so that it becomes clear which of those packages in Thread::* are actually usable with iThreads. Of course, this won't happen because the namespace nazis will say that having packages where the first element of the name is all lowercase will confuse people, because all lowercase is reserved for pragmas. The fact that 90% of the modules in the Thread::* namespace were never designed or tested for use with iThreads, which just makes people that try to use them with iThreads think that iThreads are broken. But then, most of those same "namespace nazis" don't believe that Perl should have ever had threads in the first place, wouldn't use them or promote them on principle, and therefore don't give a flying f*** about the confusion this stupid decision causes. Of course, never having tried to use Thread::Semaphore (I never saw a the need for it), I could be completely wrong about it. Thread::Queue does work and I couldn't live without that module. Even so, the gist of my rant above remains true regardless. Until something is done to segregate those modules that are designed, for and tested with, iThreads; from those that are left overs from 5005threads that will never work; from those that were designed to be used with Forks (a mechanisms for bypassing threads completely), that have never been tested for use with threads proper, all of the heroic effort by Arthur Bergman to get iThreads to where they are now will tend to be wasted, because people will be trying to use the wrong modules with iThreads and fall foul of the stupid namespace.
http://www.perlmonks.org/index.pl?node_id=394885
CC-MAIN-2018-13
refinedweb
522
73
Indicates whether or not an instance is new. More... #include <dds/sub/status/DataState.hpp> Inherits bitset< OMG_DDS_STATE_BIT_COUNT >. Indicates whether or not an instance is new. For each instance (identified by the key), the middleware internally maintains a view state relative to each dds::sub::DataReader. The view state can be either: The view_state available in the dds::sub::SampleInfo is a snapshot of the view state of the instance relative to the dds::sub::DataReader used to access the samples at the time the collection was obtained (i.e. at the time read or take was called). The view_state is therefore the same for all samples in the returned collection that refer to the same instance. Once an instance has been detected as not having any "live" writers and all the samples associated with the instance are "taken" from the dds::sub::DataReader, the middleware can reclaim all local resources regarding the instance. Future samples will be treated as "never seen." An std::bitset of ViewStates. Creates an any ViewState object. new_view() | not_new_view()
https://community.rti.com/static/documentation/connext-dds/5.3.1/doc/api/connext_dds/api_cpp2/classdds_1_1sub_1_1status_1_1ViewState.html
CC-MAIN-2022-33
refinedweb
174
56.76
Origami 0.3.2 Lightweight bit packing for classes Origami (Tested against 3.4) Origami is a lightweight package to help you serialize (or fold) objects into a binary format. Features: - Easy to add to existing classes - One class decorator and format string, and you’re ready to start folding objects. - Bit-level field sizes - For an attribute that’s always going to be [0,127], why use 4 whole bytes? Exact control over field sizes with common defaults. - Define common patterns - With creases you can define custom methods for intercepting common attribute folding/unfolding. - Is uint:17 a common field? Add a crease and replace it with long_addr (or whatever you’re using a 17 bit uint for) for more meaningful fold strings! - Only fold attributes you care about - Fold a class more than one way - A client doesn’t need the same folded attributes as a database. High degree of control over how different Crafters fold the same class. - Nesting - When describing a class’s folds, refer to another pattern by its class name to easily nest patterns. - Useful defaults - The @pattern decorator automatically generates an appropriate unfold method on the class for most use-cases, so you don’t have to. - Flexible, accessible configuration - If you want to hand-craft an unfold method, that’s fine too. For more direct control, you can work directly with a Crafter (useful for dynamic code loading/generation) Installation pip install origami Basic Usage Let’s say we’ve created the following classes for our collaborative editing tool: class Point(object): def __init__(self, x=0, y=0): self.x = x self.y = y class Action(object): def __init__(self, id=None, point=None): self.id = id self.point = point Our code is set up in such a way that coordinate values are always between [0, 511]. We’re using TCP to sync actions, so let’s add some folding: from origami import pattern, fold, unfold @pattern class Point(object): folds = 'x=uint:9, y=uint:9' def __init__(self, x=0, y=0): self.x = x self.y = y @pattern class Action(object): folds = 'id=uint:32, point=Point' def __init__(self, id=None, point=None): self.id = id self.point = point And to use them: point = Point(10, 20) action = Action(next_id(), point) action_data = fold(action) print(action_data.bytes) copy_action = unfold(action_data, Action) print( copy_action.point.x, copy_action.point.y, copy_action.id ) server.send_action(action_data) The @pattern decorator does most of the lifting here, specifying a Crafter and hooking up the important fields for folding. folds describes which attributes to fold, and how to fold them. uint:{n} and bool are built-in bitstring formats, while Point refers to the recently learned pattern for the Point class. Note that to use the generated unfold method from the pattern decorator, the class must support an __init__ method that takes no arguments. - NOTE: - unfold can take as its second argument either a learned class or an instance of a learned class. When the class is passed unfold(data, Action) a new instance is created and returned. When an instance is passed unfold(data, empty_action), the foldable attributes are unfolded into that object directly and the same object is returned. This can be useful when creating an instance of the object requires additional setup (such as connecting to a database, or secure credentials that can’t be folded). What data types are supported? Origami uses bitstring under the hood, so any format must eventually reduce to one that bitstring understands (formats). See Nesting for building more complex structures. Why not just use Pickle? As always, the answer is “it depends”. Origami’s primary advantage over pickle is the packed data’s size, and the ability to selectively pack attributes without writing repetitive __getstate__ and __setstate__ functions. Pickle has the following advantages over origami: - Simplicity - While origami aims to have low code overhead, it doesn’t get much lower than pickle’s zero. For the set of values which origami covers, pickle requires no additional code beyond what you’d normally write for your class. - Built-in module - Pickle comes with python. Origami currently depends on bitstring. - Pickle ALL the things - Pickle can pack any python class, and handles recursive objects and object sharing like a champ. Origami supports a small subset of data types, and handles neither recursion or sharing. Origami has the following advantages over pickle: - Packed Size - Origami offers serious space savings over pickle for basic objects. See Appendix A for a (contrived) comparison. - Consise partial attribute folding - Origami offers the ability to fold select attributes, when all values aren’t needed/ shouldn’t be distributed. This is also possible with pickle by defining ___getstate__ and __setstate__ functions, but this feels a bit heavy-weight compared to origami’s fold strings (see Multiple patterns) - Multi-format folding - Related to the previous, origami allows the same class to be folded differently for different consumers. - Python-independent format - Origami (more directly, the underlying use of bitstring) does not depend on python-specific behavior for (un)folding values. Multiple patterns The @pattern decorator takes two optional arguments, crafter and unfold. The crafter argument defaults to ‘global’ and specifies which Crafter to teach the pattern to. This allows us to register classes with different crafters, or the same class with multiple crafters. Since crafters are referred to as strings, it’s easy to pass them around in config settings. Imagine the Block class for a Minecraft clone, where instances sometimes have bonus loot. However, we don’t want clients to see this flag because malicious users will unroll the packet and know which blocks to mine. At the same time, the bonus flag should be saved to disk so we don’t compute it twice. We want to fold the same object two different ways, depending on where it’s going: @pattern('client') @pattern('disk') class Block(object): folds = { 'client': 'x=uint:32, y=uint:32, type=uint:8', 'disk': 'x=uint:32, y=uint:32, type=uint:8, bonus=bool' } def __init__(self, x=0, y=0, bonus=False, type=0): # Usual setting of self.{attr} for {attr} in signature # And a function to use our blocks def update_stale_blocks(self, blocks): for block in blocks: client_data = fold(block, crafter='client') server_data = fold(block, crafter='disk') self.save_block(server_data) for client in self.clients: client.send_block(client_data) Like pattern, fold and unfold take the optional argument crafter and default to global. Nesting Origami’s nesting allows complex structures to be built on top of the primitives that bitstring understands. from origami import pattern @pattern class Color(object): folds = 'r=uint:8, g=uint:8, b=uint:8, a=uint:8' def __init__(self, r=0, g=0, b=0, a=0): # Set self.[rgba] Now, we can (un)fold an arbitrary palette without needing to remember how each color is (un)folded: @pattern class Palette(object): folds = 'primary=Color, secondary=Color' def __init__(self, primary=None, secondary=None): # Set self.[primary, secondary] Custom Unfold method By default, the @pattern decorator will generate an unfold method for the class. To work properly, this function expects the class to support an empty constructor. The following class will not work: @pattern class Foo(object): folds = 'alive=bool' def __init__(self, alive): self.alive = alive In this case, we can tell pattern that we’d like to provide our own unfold method: @pattern(unfold=False) class Foo(object): folds = 'alive=bool' def __init__(self, alive): self.alive = alive @classmethod def unfold(cls, crafter_name, instance, **kwargs): instance = instance or cls(False) for attr, value in kwargs.items(): setattr(instance, attr, value) return instance Where: - crafter_name is the name of the crafter that is unfolding the object - instance can be an instance of the class, or None - kwargs is a dictionary of {attr -> value} where attr is a string of the attribute to set on the instance. - For the class Foo above, unfolding an instance that was alive would pass **kwargs as {‘alive’: True} Creases Sometimes the bitstring format strings (such as uint:8) aren’t enough to cover the types of data to fold. Or, there may be some intermediate action to take whenever an attribute is folded. Consider a block type, which is one of four values. We can serialize this as an int, but want to interact with it as its appropriate type string: types = ['Grass', 'Wood', 'Stone', 'Diamond'] def fold_block(value): return block_types.index(value) def unfold_block(value): return block_types[value] @pattern class Block(object): folds = 'enabled=bool, type=block' creases = { 'block': { 'fmt': 'uint:2', 'fold': fold_block, 'unfold': unfold_block } } def __init__(self, enabled=True, type='Grass'): self.enabled = enabled self.type = type Now when we fold a Block, it will use the bitstring format bool for the enabled field, and our custom functions for any attribute using the block formatter. These are considered format creases since they will be applied to any attribute with a format using that name. We can also specify name creases which are creases that only act on attributes with a matching name. To achieve the same thing as we have above using a name crease, we would instead pass: creases = { 'type': {'fmt': 'uint:2', 'fold': fold_block, 'unfold': unfold_block} } That looks almost exactly the same! Crafters decide if a crease is a name or format crease based on the key for the functions - if the key is found on the left of the equals sign, it’s a name crease. Otherwise, it’s a format crease. Formats and crease names should not contain : or = since these are used to delimit the different folds for a pattern. { and } are also reserved. Spaces should not be used (they will be stripped off). NOTES: - Name creases always win out over format creases. If an attribute is covered by both, only the name crease will be used. - Creases are defined for the class and will be used by any Crafters that know the class. If you need unique creases for Crafters on the class, read on. - ‘fmt’ is only required when the key is a format, and is not already a valid bitstring format. - This format crease does not need a fmt key because uint:8 is a bitstring format: {'uint:8': {'fold': int, 'unfold': str}} - This format crease does need a fmt key, because block is not a bitstring format: {'block': {'fmt': 'uint:8', fold': int, 'unfold': str}} - ‘fmt’ must refer to a bitstring format - a learned pattern is not valid, since crease fold/unfold methods should take one arg, while a pattern can potentially require multiple bitstring formats. Working directly with a Crafter Sometimes pattern just doesn’t cut it. For instance, we want to register different creases to each Crafter for a single class. In this case, it’s best to talk directly to the Crafters and explain what we want. Here’s a class using the pattern decorator: @pattern class Point(object): folds = 'x=uint:9, y=uint:9' def __init__(self, x=0, y=0): self.x = x self.y = y And the equivalent code, explicitly setting the same Crafter up with the class: class Point(object): def __init__(self, x=0, y=0): self.x = x self.y = y def unfold_func(crafter_name, instance, **kwargs): instance = instance or Point() for attr, value in kwargs.items(): setattr(instance, attr, value) return instance folds = 'x=uint:9, y=uint:9' creases = {} Crafter('global').learn_pattern(Point, unfold_func, folds, creases) Now, we can pass different folds or creases to different crafters: Crafter('foo').learn_pattern(Point, unfold_func, folds, foo_creases) Crafter('bar').learn_pattern(Point, unfold_func, folds, bar_creases) In most cases, different creases shouldn’t be necessary; creases should be more tightly bound to the representation of attributes, which is (usually) a property of the class and not the things describing the class. Appendix A: Size comparison between origami and pickle Origami (2 bytes): from origami import pattern, fold @pattern class Point(object): folds = 'x=uint:8, y=uint:8' def __init__(self, x=0, y=0): self.x, self.y = x, y p = Point(4, 5) print fold(p).bytes # '\x04\x05' Pickle (111 bytes, optimized 87 bytes): from pickle import dumps from pickletools import optimize class Point(object): def __init__(self, x=0, y=0): self.x, self.y = x, y p = Point(4, 5) pp = dumps(p) opp = optimize(pp) print len(pp) # 111 print len(opp) # 87 - Author: Joe Cross - License: MIT - Package Index Owner: crossj - DOAP record: Origami-0.3.2.xml
https://pypi.python.org/pypi/Origami/0.3.2
CC-MAIN-2016-50
refinedweb
2,079
62.38