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
Radio#getValue() always returns true? Radio#getValue() always returns true? I? Thanks for reporting this. I moved this thread to the bugs forum and pushed it to our tracking system. We will look into this. Do you see this on all browsers or only on a specific one? I was using Firefox when I saw this, not sure about other browsers. Confirm Confirm Ran into this issue, quick fix: field/Radio.js Code: getValue: function() { return (this._value) ? true : null; }, Code: getValue: function() { return (this._value) ? this._value : null; }, When will this be fixed? I need to select a radiobuton based on the value, but there is no way to get the value of a radiobutton if its not selected... Consider using a ToggleGroup instead. The Radios we include in GXT have a logical value (that is, in a Java variable). Unfortunately, browsers don't provide any event on input elements to notify us when they have become unchecked, so we have no good way of updating the logical value when the input element becomes unchecked - say, when another radio input element with the same name is checked. This is especially true when mixing GXT Radios and regular radio input elements; it's possible to "steal" checkedness from the GXT Radio. As a result, we require that you use a construct like a ToggleGroup to ensure that the logical value and the DOM value of the Radio and input element (respectively) are kept in sync. If you add all your radios to a ToggleGroup, you should find this to no longer be an issue. Here is the practical problem with that solution; there is no way to know/remember that this has to be done. The widget has an API that does not work and then one has to 'know/remember' that they have to apply this workaround. I find this is the case with several GXT widgets/layouts, they have special behavior that isn't knowable given the API and then it doesn't work as expected at runtime. I don't know what the ideal solution is, if as you say, it can't be fixed. However at a minimum the Javadocs should be noted of what you just explained. Additionally as a suggestion Sencha might create a FAQ website where workaround examples could be shown and then a link in the Javadocs to the FAQ would be most helpful. Thanks, -Dave Looks like we can't reproduce the issue or there's a problem in the test case provided.
http://www.sencha.com/forum/showthread.php?223668-Radio-getValue()-always-returns-true&p=839008&viewfull=1
CC-MAIN-2015-06
refinedweb
422
63.49
Hello everyone, I've been trying to get my package to work but I keep running into a cannot find symbol error. Since this is a homework assignment, I'll just use broad examples to describe my problem. Let's assume that I have these files... In the upper level folder: Food.java public class Food{ private Fruits<String> fruits; private Vegetables<String> vegetables; public Food(){ fruits = new Fruits<String>(); vegetables = new Vegetables<String>(); } ... } In the lower level folder, let's assume it's called type: Fruits.java Vegetables.java In the Fruits.java and Vegetables.java, I have the line package type; declared. When compiling, I'm using the command: javac type/Fruits.java javac type/Vegetables.java *note* The two files compile fine without error When I try: javac Food.java Food.java:7: cannot find symbol symbol : class Fruits location: class Food<E> private Fruits<String> fruits; ^ Food.java:8: cannot find symbol symbol : class Vegetables location: class Food<E> private Vegetables<String> vegetables; ^ Food.java:11: cannot find symbol symbol : class Fruits location: class Food<E> fruits = new Fruits<String>(); ^ Food.java:12: cannot find symbol symbol : class Vegetables location: class Food<E> vegetables = new Vegetables<String>(); ^ 4 errors Any input is appreciated and thanks for your time, Actinistia. *edit* I figured out that I had bad class files in my directory. I recompiled it and it worked out fine. Sorry for the inconvenience.
http://www.javaprogrammingforums.com/java-theory-questions/19063-compiling-package-cannot-find-symbol.html
CC-MAIN-2015-22
refinedweb
238
52.26
#include "ltwrappr.h" virtual L_INT LAnnAutomation::SetBitmapDpiY(dDpiY, uFlags=0) Sets the vertical Bitmap DPI (dots per inch) value that is used to translate the vertical distance for Ruler objects. This function applies to multiple and selected objects based on the value of the uFlags parameter. Only Automation and Ruler objects are affected. You should set this value to the bitmaps YResolution. Call this function every time you load objects or paste them from the clipboard. Otherwise, the distances shown by the ruler objects will not be accurate. Required DLLs and Libraries Win32, x64. For an example, refer to LAnnAutomation::SetBitmapDpiX.
https://www.leadtools.com/help/leadtools/v19/main/clib/lannautomation-setbitmapdpiy.html
CC-MAIN-2018-05
refinedweb
101
50.84
This is your resource to discuss support topics with your peers, and learn from each other. 03-28-2011 09:48 PM Hi all, I am following this guide to sign my application, But I keep getting the following error, "Manifest Error: invalid value '1.0.0.0' for application-requires-system" during step 10. I have read on this site that it may be because my business name is wrong, but I am almost certain that I inputted it correctly on the code-signing registration page. I am using the latest version of the sdk 0.9.4. thanks in advance for any replies! Tayshun Ally Solved! Go to Solution. 03-28-2011 09:52 PM hey tayshun, check your -app.xml file and make sure that the version value is only 1.0.0 and nothing more. good luck! 03-28-2011 11:56 PM thanks for such a quick reply! I tried that with no luck. I just realized that the publisher detail was commented in the file, so I am going to try to uncomment it and put my business name. 03-29-2011 12:02 AM no luck... im going to reapply for keys and restart from there 03-29-2011 12:06 AM hey, i just went looking a little bit. other users have run into the same problem. verify that your application is defintiely being complied with the 0.9.4 SDK (flash builder / burrito) and you are using the 0.9.4 tools. good luck! 03-29-2011 05:00 AM Hello, would you post your -app.xml file, and also your bb-tablet.xml ? I think this may help spotting what's wrong. 03-29-2011 11:55 AM JRab wrote: hey, i just went looking a little bit. other users have run into the same problem. verify that your application is defintiely being complied with the 0.9.4 SDK (flash builder / burrito) and you are using the 0.9.4 tools. good luck! well I made my app solely in flash cs5, exported it as a .swf file, then converted it using blackberry tools. Would it make a differnce with my publishing settings in flash? I have not set anything there besides the app name. Is there a way to import to flash builder and compile? 03-29-2011 12:02 PM ah if you only used Flash CS5 then the only time you need ot make sure you are using the newest SDK is when you are packaging i think. 03-29-2011 12:05 PM Acenet wrote: Hello, would you post your -app.xml file, and also your bb-tablet.xml ? I think this may help spotting what's wrong. sure! horoscope-app.xml. bb-tablet.xml follows. <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <application xmlns=""> <!-- Adobe AIR Application Descriptor File Template. Specifies parameters for identifying, installing, and launching AIR applications. xmlns - The Adobe AIR namespace: The last segment of the namespace specifies the version of the AIR runtime required for this application to run. minimumPatchLevel - The minimum patch level of the AIR runtime required to run the application. Optional. --> <!-- A universally unique application identifier. Must be unique across all AIR applications. Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. --> <id>Horoscope</id> <!-- Used as the filename for the application. Required. --> <filename>Horoscope Clock</filename> <!-- The name that is displayed in the AIR application installer. May have multiple values for each language. See samples or xsd schema file. Optional. --> <name>Horoscope Clock< for namespace >= 2.5 . --> <versionNumber>1.0.0</versionNumber> <!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. --> <!-- <versionLabel></versionLabel> --> <!-- Description, displayed in the AIR application installer. May have multiple values for each language. See samples or xsd schema file. Optional. --> <!-- <description></description> --> <!-- Copyright information. Optional --> <!-- <copyright></copyright> --> <!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 --> <!-- <publisherID></publisherID> --> <!-- Settings for the application's initial window. Required. --> <initialWindow> <!-- The main SWF or HTML file of the application. Required. --> <!-- Note: In Flash Builder, the SWF reference is set automatically. --> <content>Horoscope.swf<> --> <maximizable>true</maximizable> <minimizable>true</minimizable> <resizable>true</resizable> <visible>true</visible> <systemChrome>standard</systemChrome> <transparent>false</transparent> </initialWindow> <!-->desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> --> <!-- The subpath of the standard default installation location to use. Optional. --> <!-- <installFolder></installFolder> --> <!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. --> <!-- <programMenuFolder></programMenuFolder> --> <!-- The icon the system uses for the application. For at least one resolution, specify the path to a PNG file included in the AIR package. Optional. --> <icon> <!--<image72x72>blackberry.png</image72x72> --> <!-- <image16x16></image16x16> <image32x32></image32x32> <image36x36></image36x36> <image48x48></image48x48> <image72x72></image72x72> <image128x128></image128x128> --> </icon> <!-- Whether the application handles the update when a user double-clicks an update version of the AIR file (true), or the default AIR application installer handles the update (false). Optional. Default false. --> <!-- <customUpdateUI></customUpdateUI> --> <!-- Whether the application can be launched when the user clicks a link in a web browser. Optional. Default false. --> <!-- <allowBrowserInvocation></allowBrowserInvocation> --> <!-- Listing of file types for which the application can register. Optional. --> <!-- <fileTypes> --> <!-- Defines one file type. Optional. --> <!-- <fileType> --> <!-- The name that the system displays for the registered file type. Required. --> <!-- <name></name> --> <!-- The extension to register. Required. --> <!-- <extension></extension> --> <!-- The description of the file type. Optional. --> <!-- <description></description> --> <!-- The MIME content type. --> <!-- <contentType></contentType> --> <!-- The icon to display for the file type. Optional. --> <!-- <icon> <image16x16></image16x16> <image32x32></image32x32> <image48x48></image48x48> <image128x128></image128x128> </icon> --> <!-- </fileType> --> <!-- </fileTypes> --> <customUpdateUI>false</customUpdateUI> </application> blackberry-tablet.xml. I copied it from the website in my first post but changed it to my needs. <qnx> <initialWindow> <systemChrome>none</systemChrome> <transparent>false</transparent> </initialWindow> <publisher>MusicIsMe</publisher> <category>core.lifestyle</category> <icon> <image>blackberry-tablet-icon.png</image> </icon> </qnx> I also removed splash screen within the file. I dont know if that makes a difference. 03-29-2011 04:29 PM Please double check that you don't have an earlier version of the SDK installed (below 0.9.4) that might be being used. This is an error from previous versions that has been resolved in 0.9.4.
https://supportforums.blackberry.com/t5/Adobe-AIR-Development/Signing-App-Manifest-Error-invalid-value-1-0-0-0-for-application/m-p/970363
CC-MAIN-2017-09
refinedweb
1,049
52.15
From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>Date: Sat, 20 Dec 2008 14:15:41 -0800Subject: [RFC][PATCH 6/6][v drop.See comments in patch below for details.Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>--- kernel/signal.c | 41 +++++++++++++++++++++++++++++++++++++++-- 1 files changed, 39 insertions(+), 2 deletions(-)diff --git a/kernel/signal.c b/kernel/signal.cindex 2dfca62..4abacf4 100644--- a/kernel/signal.c+++ b/kernel/signal.c@@ -1816,6 +1816,42 @@ static int ptrace_signal(int signr, siginfo_t *info, return signr; } +/*+ * Return 1 if the signal @sig should NOT kill the task that owns @signal.+ * Return 0 otherwise.+ *+ * If @signal refers to the global-init, it is unkillable (return 1).+ *+ * If @signal refers to a task a that is neither a container-init nor the+ * global init, the task is killable (return 0).+ *+ * If @signal refers to a container-init and @sig is either SIGKILL or+ * SIGSTOP, the signal must be from an ancestor container. So the task+ * (container-init) should be killable (return 0).+ *+ * If @signal refers to a container-init and @sig is neither SIGKILL nor+ * SIGSTOP, it was queued because it was blocked when it was posed. The+ * signal may have come from same container - hence it should not be+ * killable (return 1).+ *+ * Note:+ * This means that SIGKILL is the only sure way to terminate a+ * container-init even from ancestor namespace.+ */+static int sig_unkillable(struct signal_struct *signal, int sig)+{+ if (signal->flags & SIGNAL_UNKILLABLE_FROM_NS)+ return !sig_kernel_only(sig);++ /*+ * We must have dropped SIGKILL/SIGSTOP in sig_ignored()+ * TODO: Remove BUG_ON().+ */+ BUG_ON(signal->flags & SIGNAL_UNKILLABLE && sig_kernel_only(sig));++ return (signal->flags & SIGNAL_UNKILLABLE);+}+ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie) {@@ -1907,9 +1943,10 @@ relock: /* * Global init gets no signals it doesn't want.+ * Container-init gets no signals it doesn't want from same+ * container. */- if (unlikely(signal->flags & SIGNAL_UNKILLABLE) &&- !signal_group_exit(signal))+ if (sig_unkillable(signal, signr) && !signal_group_exit(signal)) continue; if (sig_kernel_stop(signr)) {-- 1.5.2.5
https://lkml.org/lkml/2008/12/20/185
CC-MAIN-2017-34
refinedweb
324
51.14
Introduction In this article, I will try to explain Observer Pattern, which is being used intensively in software, via brief and usable example. Definition As a word, Observer means a person who observes (Observer Pattern). In software world, however, it is defined as a one-to-many dependency among objects, i.e. once the status of an object is changed; this status change is notified to all objects dependent to that. As an example, assume that you are observing a KeyDown event; when any key from the keyboard is pressed, the system informs to various observers of the system which key has been pressed (of course, by using the structure of Observer Pattern). Let us explain this with a general example; you are a subscriber of a magazine and the magazine is sent to you when a new issue is published. The magazine does not concern about what you are doing with the magazine! It will just try to send new issues to you when published. When your subscription is over, you will not get new issues. Here you are in place of the Observer and the magazine is in Publisher. The Observer Pattern is being used in many areas in the real life, for example Stock Exchange Services, Whether Service and similar various areas. Observer Pattern is using “Loose Coupling” power which is one of the most important principles of OOPs. Actually, it is required a different article in order to explain the Loose Coupling, but I will try to explain it here with brief notes; · In case there is a loose coupling between two objects, they may communicate and make process with each other, although they do not have much information about each other. · The object in the Observer Pattern (Publisher) which shows a change does not have much information about observers. The only thing that it knows is that, the observers are implementing the Observer Interface. · Loose Coupling enables to add an observer easily when desired. · Loose Coupling enables to use Publisher and observer classes repeatedly. · Changes made in Publisher and Observer do not affect each other. By using this principle, we may write a code more easily, looser and repeatedly usable. This pattern may be used in various ways; I preferred to apply by using Interface. The class diagram of the pattern will be in this way. The class diagram above may be explained as follows. USDCls and EURCls are observers and they Implement the methods of interfaces of both IGörüntü and IGözlemci. Publisher class, however, Implements the methods of interfaces of both independent and IObserverBs Interface. As seen in this diagram, USDCls and EURCls are independent from each other. More importantly, these two classes are connected with Publisher class and Loose Coupling principle. This connection is supplied by methods Implemented from IObserverBs. In order to better understand this diagram, let us make the application. Application The purpose of the application is to inform observers about the timely change of Exchange rates. In case new rates are reflected to XML service, our Publisher Class will notify the registered Observers about new data. In the Application that we will make, it will be benefitted from the XML exchange and gold service given by. First of all create a new project (I preferred Windows Application in the example); add a folder to the project; this folder will be our Business Logic Folder and will accommodate required classes of entire project in it. Let the first class to be IObserverBS Interface. This interface is generally required to include the methods to be applied to observers: RegisterObserver, UnsubscribeObserver and InformObservers methods will be sufficient. void RegisterObserver(IObserver observer); void UnsubscribeObserver(IObserver observer); void InformObservers(); Here we see that registering and deleting methods take the observer as a parameter. Notify method, however, does not take a parameter, because when you call the notify method, it will notify the change to all registered observers. Before writing the Publisher class that Implements this Interface, I preferred to write observer interfaces and classes. The second Interface is IObserver interface and IObserver contains only one method: “Update”. This method is required to be Implemented by all Observers (I chose to apply this interface according to principle of compression the frequently used lines and codes together, which is one of OOP -“Encapsulate what varies”- principles). The update method takes a DataSet as a parameter (in case the date within this DataSet changes, this will be sent to all Observers by the Publisher class. – This dataset is being taken from Altin Kaynak service-). void Update(DataSet kurDS); The other interface that Observers will use is IDisplay interface. Likely as in IObserver interface, this interface also has to be Implemented by all Observers, otherwise they will not able to present the required data to the user (IDisplay and IObserver interfaces may be joined under the same roof). IDisplay interface do not take parameter, it returns a single string. The content of this string is changed data. StringBuilder Display(); Let us add a new class to our project; this class, as in USDCls and EURCls, should implement both IDisplay and IObserver. In case there will be Observer, it will need IObserver interface. In addition to this Implement process (particular to this application) write two private strings (I wrote USDBuy and USDSell for USDCls; EURCls also includes the same strings, but only for Euro). This class Codes will look as below: using System.Text; using System.Data; namespace WindowsFormsApplication1.BLL { /// <summary> /// By Muhanad YOUNIS /// 8/12/2008 Time: 4:21 PM /// Class Observing Dollar Prices /// </summary> class USDCls : IDisplay, IObserver { private string USDBuy; private string USDSell; /// <summary> /// USDCls constructor, in case this class is created as observer /// it registers itself to Observer list found in Publisher class. /// </summary> public USDCls(Publisher publisher) { publisher.RegisterObserver(this); } #region IDisplay Members /// Data to be returned from this method is used for diplaying by the user /// <returns></returns> public StringBuilder Display() StringBuilder SB = new StringBuilder(); SB.AppendLine("Dolar Alış =" + USDBuy); SB.AppendLine("Dolar Satış =" + USDSell); return SB; #endregion #region IObserver Members /// Renewed DataSet is informed to Observer class due to this method /// and the required process are made. public void Update(DataSet kurDS) USDBuy = kurDS.Tables[0].Rows[1]["ALIS"].ToString();// string is being set USDSell = kurDS.Tables[0].Rows[1]["SATIS"].ToString();// string is being set Display();// after set process, diplay method is called. } } The same processes are also valid for EURCls class. Now it is the turn of Publisher class, the most important class of Observer Pattern. Create a new class in the folder and Implement the IObserverBS interface. Besides, there will be a private DataSet (there will be data comes from DataSet) and a private ArrayList (this array list will contain the registered observers). The Publisher class will look as below; using System.Collections; using System; namespace WindowsFormsApplication1.BLL /// 8/12/2008 Time: 5:16 PM /// Publisher Class public class Publisher : IObserverBs private ArrayList ObserverList;// Gözlemci ArrayList private DataSet ds;// Kaynaktan Alınan veriler #region IObserverBS Interface /// Publisher class constractor, when a new publisher is generated /// a new observer list is created. public Publisher() ObserverList = new ArrayList(); /// New Observers are registered in Observer ArryList with this method public void RegisterObserver(IObserver observer) ObserverList.Add(observer); /// delete an observer from the arrylist public void UnsubscribeObserver(IObserver observer) ObserverList.Remove(observer); ///Notify Metodu; with this method, information is distributed to all observers within Observer arraylist. public void InformObservers() for (int i = 0; i < ObserverList.Count; i++) { IObserver o = (IObserver)ObserverList[i]; o.Update(ds);//IObserver is calling the method implemented from interface and Oberver is being updated. } /// With this method, data is taken from the source and the dataset is being set. /// This cheks whethet the ds in cache is equal to new coming data set /// and if it is different calls DataChanged() method. public void BindTheData() try ds = new DataSet(); ds.ReadXml(""); if (AppCache.Caching.Cache["Veriler"] == null)// if cache is empty(program becomes true at initial run) { DataChanged();// when new data comes, DataChanged methos is called AppCache.Caching.Cache.Insert("Veriler", ds);// fill Cache } else { DataSet checkDs = AppCache.Caching.Cache["Veriler"] as DataSet; for (int i = 1; i < ds.Tables[0].Rows.Count; i++) { /// Checks whether the rates are changed or not /// the change of a rate is enough for data set to be resent to observers. /// RETURN; used to finished the loop. if (ds.Tables[0].Rows[i][1].ToString() != checkDs.Tables[0].Rows[i][1].ToString() || ds.Tables[0].Rows[i][2].ToString() != checkDs.Tables[0].Rows[i][2].ToString()) { DataChanged();// when new data comes, DataChanged methos is called AppCache.Caching.Cache.Insert("Veriler", ds); return;//finish the loop } } catch (Exception) throw; /// Data changed, notify Observers. public void DataChanged() InformObservers(); Thus, I explained all classes included in Observer Pattern application. Now it is the time to call these classes over Form. Place two Labels in Form Design and add a Timer to the Form. Adjust the Interval value of the Timer as 30000 ms (30 seconds – “data source will be checked once in 30 seconds”). Create a new method, StartPublisher(), in the CS of the Form. By using this method, a new Instance of Publisher class will be generated and at the same time, our desired Observers (USDCls and EURCls) will be registered to the new Publisher. /// <summary> /// Generation of new Publisher and Observer registering method. private void Startpublisher() Publisher publisher = new Publisher();// New Publisher Class was generated USDCls usd = new USDCls(publisher);// Observer was registered to Publisher EURCls eur = new EURCls(publisher);// Observer was registered to Publisher publisher.BindTheData();// Data is taken from the source of Publisher and given to Observers if (usd.Display().Length != 29 && eur.Display().Length != 27)// the numbers are related with the xml data !! label1.Text = usd.Display().ToString();// Data came from Observers are being diplayed label2.Text = eur.Display().ToString();// Data came from Observers are being diplayed else label1.Text = label1.Text; label2.Text = label2.Text; StartPublisher() method is required to be called from two places of the Form: Load and Timer_Tick Event of Form. Timer will call this method once in 30 seconds and enables data to be updated. (Do not forget to initiate Timer in Form Load Event). private void Form1_Load(object sender, EventArgs e) Startpublisher();// publisher is generated timer1.Start();// timer is run if (usd.Display().Length != 29 && eur.Display().Length != 27)// the numbers are related with the xml data !! } When the Application is first run, the data will be taken from XML service and given to observers. Observers will reflect the data to the user as below; This process will be repeated once in 30 second. Data changes! If you are lucky, rates change and you can see that change after 30 seconds (when I wrote this article, I has to wait more than 2 hours to see the rates change J). If you want to add a different Observer, the only thing that you need to do is to implement class from IObserver and IDisplay interface and register it on Publisher Class. With this way you will be created a new observer. Note: I recommend you to debug the apllication step by step. Conclusion In this article, I tried to exlplain Observer Pattern with a simple application. Together with the Pattern, I mentioned about Loose Coupling and Encapsulate what Varies principles. You can progress the application differently and in more detail, it is up to you. Note: You can download here the code made in the article. The speed of the application in the first opening depends on your Internet speed (How fast the data comes from XML service, it opens that fast). The application was made with VS2008 and Net 3.5 SP1. Hope This Helps Ref You have obviously put a lot of work into this, but I wonder what your motivation was in writing this... That is certainly how you would write such code in Java or C++, but I feel that I need to point out to you that the Observer pattern is so common that when C# was designed, they included some "shortcuts" into the language: events and delegates. You would do well to look into how these work, as it greatly simplifies your code... I did a quick Google search and found this article that may help you out: spellcoder.com/.../6212.aspx Mike; thanks for the link. here i'm not motivating my self by writing this, but i believe that there is some one outside there do need such thing!. I do believe the events and delegates done most of the work, but we need to know the startup of events!! and it is the observer pattern. Hi.. your pattern is very usefull for beginers. nice work...!
http://weblogs.asp.net/muhanadyounis/pages/observer-pattern-c.aspx
crawl-002
refinedweb
2,116
54.93
Using THIS.jarPaths To Create An Application-Specific URL Class Loader In ColdFusion At this last CFUNITED, Rupesh Kumar gave a talk titled, "Extending Java Applications with ColdFusion." In the Q&A portion of the talk, I asked Rupesh if Adobe had any plans to make application-specific Java class loaders in the same way that Application.cfc can currently define its own mappings and custom tag paths. He said that this was something that they were looking into; however, I wanted to see if I could play around with a little proof-of-concept on my own. Right now, if you want to make new Java classes available to your ColdFusion instance, you have to add the given JAR files to the server's lib folder and then restart the ColdFusion service. While this isn't such a big deal, there is something very nice about keeping all aspects of an application in a single, cohesive location. This increases the portability of the application which, in turn, reduces the chances of you making an error. To keep the JAR files within the application code base, I was picturing the use of a THIS-scoped JAR path collections property, much in the same vein as the currently-supported custom tag paths and mappings: Application.cfc Properties - this.mappings = [] - this.customTagPaths = "" - this.jarPaths = [] NOTE: I am using an array for jarPaths; I have no idea why customTagPaths gets defined as a list. Once the "this.jarPaths" is defined within the Application.cfc, any calls to the createObject("java") function made within the same application would automatically check the application-specific JAR paths before it attempted to load the Java class from the core class collection. The way ColdFusion is set up now, however, you can't really override core functions. You can create like-named functions as properties of an object; but, if you were to try and call those custom functions without any scoping, ColdFusion will always assume that you are trying to call the core functions. As such, for this proof of concept, I can't override the createObject() function directly; rather, I have to create a globally-accessible UDF called createJava(). Before we see how this proof of concept is wired together, let's take a look at the kind of implementation that I think might be nice. Here is the simple Application.cfc for my demo: Application.cfc <cfcomponent extends="BaseApplication" output="false" hint="I define the application settings and event handlers."> <!--- Define the application settings. ---> <cfset this.name = hash( getCurrentTemplatePath() ) /> <cfset this.applicationTimeout = createTimeSpan( 0, 0, 5, 0 ) /> <!--- Add the current directory to our collection of application- specific JAR paths to be used with createJava(). ---> <cfset this.jarPaths = [ "( getCurrentTemplatePath() )#" ] /> </cfcomponent> Ignoring for a moment the fact that this Application.cfc extends BaseApplication.cfc, you can see that this component defines a "this.jarPaths" property and adds the root application directory as a source of application-specific JAR paths. Now, let's take a look at a demo page executed within the context of this application: <!--- At this point, the ColdFusion server has implicitly instantiated Application.cfc - our ColdFusion framework component. That has created a URL classloader with the application-specific JAR files and created a globally-accessible "createJava()" method. Create an instance of the java class, HelloWorld. NOTE: This calls the default constructor implicitly. We would need to get a bit more compliated to be able to pass in constructor arguments... which goes beyond my know-how. ---> <cfset helloWorld = createJava( "HelloWorld" ) /> <!--- Say hello via the new class. ---> <cfoutput> Hello: #helloWorld.sayHello()# </cfoutput> As you can see, the page is making use of a globally-accessible createJava() method in order to create an instance of our HelloWorld Java class. Then, it calls the sayHello() method on that Java class instance. In doing this, we get the following page output: Hello: Waaaaazzzzuuuuuuupppp! The HelloWorld Java class that it is loading is located in the root directory of the application and is picked up using the this.jarPaths Application.cfc property: HelloWorld.class (As .java File) public class HelloWorld { public HelloWorld(){ // Constructor code. } public java.lang.String SayHello(){ return( "Waaaaazzzzuuuuuuupppp!" ); } } Now that we see how this kind of functionality might be used, let's take a look at how this proof-of-concept is put together. The magic behind this comes from that BaseApplication.cfc that my above Application.cfc was extending. This BaseApplication.cfc creates a URLClassLoader and defines a createJava() method that it stores in the globally-accessible URL scope (a hack used to create globally-accessible variables in ColdFusion). BaseApplication.cfc <cfcomponent output="false" hint="I am a base Application component meant to be extended by other Application.cfc instances."> <!--- Define the collection of JAR paths to be used for the URL class loader in this application. ---> <cfset this.jarPaths = [] /> <!--- ------------------------------------------------- ---> <!--- ------------------------------------------------- ---> <!--- Append the CreateJava() method to the URL collection. While this makes NO sense from a semantic standpoint, the way in which variables are "discovered" in ColdFusion allows us to use the URL scope to create globally accessible functions. ---> <cfset url.createJava = this.createJava /> <!--- Because methods copied by reference do not retain their original context, we also have to store a reference to THIS Application.cfc instance such that he createJava method can get access to the URL classloader instance. ---> <cfset url.createJavaContext = this /> <!--- ------------------------------------------------- ---> <!--- ------------------------------------------------- ---> <cffunction name="createJava" access="public" returntype="any" output="false" hint="I create the given Java object using the URL class loader powered by the local JAR Paths. NOTE: This will be called OUTSIDE of the context of this Application.cfc; this is why it makes reference to URL-scope values."> <!--- Define arguments. ---> <cfargument name="javaClass" type="string" required="true" hint="I am the Java class to be loaded from the class loader." /> <!--- Define the local scope. ---> <cfset var local = {} /> <!--- Overwrite the THIS context to fake out the rest of this function body into thinking it's part of the original Application.cfc instance. In a UDF, the variable "this" is already declared as a LOCAL variable; as such, all we have to do is overwrite it for this link to be created. ---> <cfset this = url.createJavaContext /> <!--- Check to see if the URL class loader has been created for this page request. ---> <cfif !structKeyExists( this, "urlClassLoader" )> <!--- Create the URL class loader. Typically, we'd need to create some sort of locking around this; but, this is just a proof of concept. ---> <cfset this.urlClassLoader = createObject( "java", "java.net.URLClassLoader" ).init( this.toJava( "java.net.URL[]", this.jarPaths, "string" ), javaCast( "null", "" ) ) /> </cfif> <!--- Create a new instance of the given Java class. NOTE: When we use the newInstance() method, it calls the default constructor on the class with no arguments. I believe that if we want to use constructor arguments, we need to get the actual constructor object. ---> <cfreturn this.urlClassLoader .loadClass( arguments.javaClass ) .newInstance() /> </cffunction> <cffunction name="toJava" access="public" returntype="any" output="false" hint="I convert the given ColdFusion data type to Java using a more robust conversion set than the native javaCast() function."> <!--- Define arguments. ---> <cfargument name="type" type="string" required="true" hint="I am the Java data type being cast. I can be a core data type, a Java class. [] can be appended to the type for array conversions." /> <cfargument name="data" type="any" required="true" hint="I am the ColdFusion data type being cast to Java." /> <cfargument name="initHint" type="string" required="false" default="" hint="When creating Java class instances, we will be using your ColdFusion values to initialize the Java instances. By default, we won't use any explicit casting. However, you can provide additional casting hints if you like (for use with JavaCast())." /> <!--- Define the local scope. ---> <cfset var local = {} /> <!--- Check to see if a type was provided. If not, then simply return the given value. NOTE: This feature is NOT intended to be used by the outside world; this is an efficiency used in conjunction with the javaCast() initHint argument when calling the toJava() method recursively. ---> <cfif !len( arguments.type )> <!--- Return given value, no casting at all. ---> <cfreturn arguments.data /> </cfif> <!--- Check to see if we are working with the core data types - the ones that would normally be handled by javaCast(). If so, we can just pass those off to the core method. NOTE: Line break / concatenation is being used here strickly for presentation purposes to avoid line-wrapping. ---> <cfif reFindNoCase( ("^(bigdecimal|boolean|byte|char|int|long|float|double|short|string|null)(\[\])?"), arguments.type )> <!--- Pass the processing off to the core function. This will be a quicker approach - as Elliott Sprehn says - you have to trust the language for its speed. ---> <cfreturn javaCast( arguments.type, arguments.data ) /> </cfif> <!--- Check to see if we have a complex Java type that is not an Array. Array will take special processing. ---> <cfif !reFind( "\[\]$", arguments.type )> <!--- This is just a standard Java class - let's see if we can invoke the default constructor (fingers crossed!!). NOTE: We are calling toJava() recursively in order to levarage the constructor hinting as a data type for native Java casting. ---> <cfreturn createObject( "java", arguments.type ).init( this.toJava( arguments.initHint, arguments.data ) ) /> </cfif> <!--- If we have made it this far, we are going to be building an array of Java clases. This is going to be tricky since we will need to perform this action using Reflection. ---> <!--- Since we know we are working with an array, we want to remove the array notation from the data type at this point. This will give us the ability to use it more effectively belowy. ---> <cfset arguments.type = listFirst( arguments.type, "[]" ) /> <!--- Let's double check to make sure the given data is in array format. If not, we can implicitly create an array. ---> <cfif !isArray( arguments.data )> <!--- Convert the data to an array. Due to ColdFusion implicit array bugs, we have to do this via an intermediary variable. ---> <cfset local.tempArray = [ arguments.data ] /> <cfset arguments.data = local.tempArray /> </cfif> <!--- Let's get a refrence to Java class we need to work with within our reflected array. ---> <cfset local.javaClass = createObject( "java", arguments.type ) /> <!--- Let's create an instance of the Reflect Array that will allows us to create typed arrays and set array values. ---> <cfset local.reflectArray = createObject( "java", "java.lang.reflect.Array" ) /> <!--- Now, we can use the reflect array to create a static- length Java array of the given Java type. ---> <cfset local.javaArray = local.reflectArray.newInstance( local.javaClass.getClass(), arrayLen( arguments.data ) ) /> <!--- Now, we can loop over the ColdFusion array and reflectively set the data type into each position. ---> <cfloop index="local.index" from="1" to="#arrayLen( arguments.data )#" step="1"> <!--- Set ColdFusion data value into Java array. Notice that this step is calling the toJava() method recursively. I could have done the type-casting here, but I felt that this was a cleaner (albeit slower) solution. ---> <cfset local.reflectArray.set( local.javaArray, javaCast( "int", (local.index - 1) ), this.toJava( arguments.type, arguments.data[ local.index ], arguments.initHint ) ) /> </cfloop> <!--- Return the Java array. ---> <cfreturn local.javaArray /> </cffunction> </cfcomponent> The bulk of this BaseApplication.cfc code is my toJava() method which I am using to easily cast ColdFusion arrays to typed-Java arrays for use within my URLClassLoader. Beyond that, there's not too much going on. The trickiest thing that I am doing is overriding the THIS scope of the createJava() method in order to "fake" the method into thinking it is being executed as part of the current Application.cfc instance. Right now, I'm not making any use of caching. Theoretically, you'd probably want to cache the URL class loader in the Application or Server scope such that it doesn't have to be recreated on every single page request; however, for this proof of concept, I'm simply lazy-loading the URL class loader whenever the createJava() method gets called. The fact that ColdFusion is built on top of Java is easily one of the most awesome aspects of the language; this let's us leverage some really amazing 3rd party projects coming out of the Java world. Now, as great as this is already, I think being able to organize those 3rd party Java projects on an application-specific basis would make this significantly more useful. Hopefully, we'll see some kind of functionality like this in future releases of ColdFusion. Reader Comments Just a note - you talk about your method of creating implicit UDFs, and your sample call calls it as if you did, but in your BaseApplication you end up using the URL scope instead. @Ray, Yeah, good point; I didn't mean to mislead anyone here. I am putting the UDF inside the URL scope so as to leverage the way ColdFusion looks for variable references. The URL scope is one of the scopes that gets crawled when a non-scoped variable is referenced in the code. So, technically, you could also use: url.createJava() ... however, since URL can be implied (for lack of a better term), you can *sort of* call the createJava() as if it were a globally-accessible core function. You saved the URLClassLoader instance in this scope of the BaseApplication. Is that the application scope ? @Nelle, It is getting cached as a public variable of the Application.cfc instance for that page request. Application.cfc gets re-created on every single page request; as such, we are also re-creating our URLClassLoader on each page request. This is not so efficient; ideally, you'd probably want to cache the URLClassLoader in the Application or Server scope so that it only has to get created when, say, onApplicationStart() is executed. @Ben: You said up top: "Right now, if you want to make new Java classes available to your ColdFusion instance, you have to add the given JAR files to the server's lib folder and then restart the ColdFusion service." For years now, my approach has been to define my government agency's(*) own directory in the classpath via ColdFusion Administrator or JRun Administrator, depending on how CF was installed. (*) As always, I can't say what agency I work for without tons of disclaimers that I don't speak for the agency and that the agency isn't endorsing any commercial product, such as ColdFusion. For the sake of illustration, let's refer to the directory with a Unixy environment variable name, such as $OURLIB. That one extra directory in the classpath has been all we've ever needed. It allows us to have numerous packages, using standard Java naming conventions, of the form $OURLIB/gov/ouragencyname/xxx, where xxx is whatever's unique about the package. But we keep them in our own folder, not the server's lib folder, so we don't have to track which files are ours and which ones belong to ColdFusion. It's tidier to have them separate like that. In test and production, we can also package the class files up into $OURLIB/xxx.jar files, and that works just fine too. But, as you indicated, we have to restart the ColdFusion service to pick up new classes and jar files. I find this very vexing. ColdFusion interfaces to the class loader in such a way that, if a CFM file changes (and you don't have trusted cache turned on), CF recompiles it to a new class file and loads it, even though it's already loaded. Whenever I create new versions of my own class files, however, Java refuses to load the new versions because the old versions are already in memory. With Java CFXs in CF 4.0, I used to be able to say reload="Yes/No/Auto", but that stopped working in CF 4.5. It's sad to pine for a feature I had 5 levels of ColdFusion ago. Maybe I just don't know the Java class loader well enough, but I would love to be able to put a new version of a class or jar file out to the server and not have to restart the ColdFusion service to pick up the new version. Could you point me in the right direction about how to force the class loader to pick up my new class and jar files? How does CF do it??? Surely it can't be all of those gobbledy-gooky file names in the cfclasses directory, can it? Could CF be forcing the reload of classes by generating unique file names for every version of a CFM file? Seriously? If true, that seems kinda gross. Sorry if this question is too simple and everyone else but me already knows the answer. @Ben, the reason i'm asking is that there was a memory leak when using the Java URLClassLoader: i do not know if it was fixed in the CF8/9, but since we had problems in the past with the heap overflows, i'm still a bit too carefull when it comes to URLClassLoader and tend to save its instances in the Application scope. @Steve, Sounds like a good strategy with adding agency-specific JAR directory; even though you have to restart the ColdFusion service, at least you are keeping your JARs in a cohesive, application-specific way. As far as your caching issue, I think a Java Class loader would help since the JAR file isn't actually going through the ColdFusion system directly (the URL Class Loader is what's loading the JAR). That said, I've never actually built my own Class files (except for this actual demo). As such, I've never gone head-to-head with a JAR-caching issue. Sorry I don't have any advice on that matter. A number of people have asked for this kind of functionality. There is some tricky functionality with Class Loaders (in the order in which they search the class loader chain for JAR files). @Nelle, Very interesting post (Mark Mandel is one bright dude!). I am not sure I follow his application-timeout issue though - if an Application were to timeout, I'd have to assume that all session had already timed out as well. As such, I can't see how the garbage collection issue isn't met (meaning that the URL Class Loader and all of the instances it has created have been de-referenced). That said, very good to point that out to us, or at least me, since I had no idea that the URL Class Loader caused this kind of behavior. Dear Ben, again a very nice post. Thanks for it! I have got a problem to get access to classes, which comes from JAR-Files. If I use your method for normal CLASS-Files all works fine, but if I try to get them out of a JAR-File, which means, that I've done something like: <cfset this.jarPaths = [ "( getCurrentTemplatePath() )#ProjektFolder\", "( getCurrentTemplatePath() )#ProjektFolder\lib\testjar.jar" ] /> in the Application.cfc. I've got an error message from the BaseApplication.cfc in the createJava-Function every time I try to create Java-Objects from the Jar-File: java.lang.ClassNotFoundException: Test at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at coldfusion.runtime.StructBean.invoke(StructBean.java:511) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2300) ... Maybe it is only a syntax-problem? Thanks for any help, Isabel.
https://www.bennadel.com/blog/1991-using-this-jarpaths-to-create-an-application-specific-url-class-loader-in-coldfusion.htm
CC-MAIN-2021-04
refinedweb
3,271
56.66
Hi, all! There is performance issue with network filters and broadcast ethernet traffic. If L2 segment is large enough (several thousands of VMs) then there is a lot of broadcast ARP traffic (about frames 100/s). As aresult on host with several hundreds VMs (say 300) we have kernel thread eating 100% of CPUs just for checking this traffic against firewall rules. The problem is if there are rules in ebtables POSTROUTING chain (clean-traffic is example of such filter) then when every single broadcast frame turns into 300, one for every distinct bridge port and then each one of these 300 is checked against 300 / 2 rules average to find chain for that port. As a result we have 100 * 300 * 300 / 2 = 4.5 * 10^6 rules checks per second. Kernel does not spread this workload onto different CPUs and anyway this is wasting CPUs! The simple solution is to put rules that ACCEPT ARP traffic into POSTROUTING itself before any port specific chains. But this will affect non-VM ports too and host itself. So can we instead make a distinct network namespace for every VM and put tap there, next add the bridge into the namespace too so we can apply ebtables rules there and insert tap into the bridge. Finally connect the bridges in root namespace and VM namespace by veth pair. As result in the situation described above each cloned frame will be cheched only againt rules for this very VM. The regular TCP traffic will have same benefits. On the other hand we need a bridge and veth pair for every VM and some CPU power to process this extra traffic path. The proposed approach also fixes the problem of slow libvirtd restarting with network filters ([1], [2]) as it is rather difficult to mess network rules in different network namespace, at least restarting/reloading firewalld won't hurt such rules so we just don't need to reinstantiate rules at all. [1] [RFC] Faster libvirtd restart with nwfilter rules which continues in [2] [PATCH v2 0/2] nwfilter: don't reinstantiate rules if there is no need to Nikolay
https://www.redhat.com/archives/libvir-list/2018-November/msg00240.html
CC-MAIN-2020-40
refinedweb
357
66.37
RFORK(2) BSD Programmer's Manual RFORK(2) rfork - control new processes #include <sys/param.h> #include <unistd.h> int rfork(int flags); The fork functions (fork(2), vfork(2), and rfork()) create new processes. The new process (child process) is an exact copy of the calling process (parent process), except as outlined in the fork(2) manual page. rfork() is used to manipulate the resources of the parent process and the child process. Operations currently supported include whether to copy or share the file descriptor table between the two processes, whether to share the address space, and whether the parent should wait(2) for the child process to _exit(2). rfork() takes a single argument, flags, which controls which of these resources should be manipulated. They are defined in the header file <sys/param.h> and are the logical OR of one or more of the follow- ing: RFFDG Copy the parent's file descriptor table. If this flag is unset, the parent and child will share the parent's file descriptor table. Descriptors will remain in existence until they are closed by all child processes using the table copies as well as by the parent process. May not be used in conjunction with RFCFDG. RFPROC Create a new process. The current implementation requires this flag to always be set. RFMEM Force sharing of the entire address space between the parent and child processes. The child will then inherit all the shared segments the parent process owns. Subsequent forks by the parent will then propagate the shared data and BSS segments among children. RFNOWAIT Child processes will have their resources reaped immediately and implicitly when they terminate instead of turning into zom- bies, so the parent process may not call wait(2) to collect their exit statuses and have their resources released explicit- ly. RFCFDG Zero the child's file descriptor table (i.e. start with a blank file descriptor table). May not be used in conjunction with RFFDG. fork(2) can be implemented as a call to rfork() using "RFFDG|RFPROC", but isn't for backwards compatibility. If a process has file descriptor table sharing active, setuid or setgid programs will not execve(2) with extra privileges. The parent process returns the process ID (PID) of the child process. The child process returns 0. The range of the process ID is defined in <sys/proc.h> and is currently between 1 and 32766, inclusive. rfork() will fail and no child process will be created if: [ENOMEM] Cannot allocate memory. The new process image required more memory than was allowed by the hardware or by system- imposed memory management constraints. A lack of swap space is normally temporary; however, a lack of core is not. Soft limits may be increased to their corresponding hard limits. [EINVAL] Invalid argument. Some invalid argument was supplied. [EAGAIN] Resource temporarily unavailable. The system-imposed limit on the total number of processes under execution would be exceeded. This limit is configuration-dependent. [EAGAIN] Resource temporarily unavailable. The system-imposed limit MAXUPRC on the total number of processes under execution by a single user would be exceeded. MAXUPRC is currently de- fined in <sys/param.h> as CHILD_MAX, which is currently de- fined as 80 in <sys/syslimits.h>. _exit(2), execve(2), fork(2), intro(2), vfork(2) The rfork() function first appeared in Plan 9. MirOS BSD #10-current June 17,.
http://www.mirbsd.org/htman/i386/man2/rfork.htm
CC-MAIN-2015-14
refinedweb
568
67.15
Deploy Lightning Web Component Files Learning Objectives After completing this unit, you’ll be able to: - Configure Lightning web component files for display in an org. - Deploy your files to an org. - Verify component behavior in an org environment. Step up to an Org In this unit, we develop a Lightning web component using VS Code with the Salesforce extension. We deploy the files to an org and build an app to use your component. What You Need As stated in the first unit, you need some familiarity with Salesforce DX to continue. To complete this unit, you need: - Visual Studio Code with the Salesforce Extension Pack - Salesforce CLI - Dev Hub enabled org - My Domain deployed to users in your Dev Hub enabled org (Playground orgs created within Trailhead have My Domain deployed for you. If you associated a Developer Edition org with your Trailhead account, enable and deploy My Domain.) To meet the rest of these requirements, complete the Quick Start: Lightning Web Components project. Enable Dev Hub and deploy My Domain from the Setup menu in your org, if they’re not already configured. Set Up Lightning Web Component Files for Use in an Org You’re going to take the example from the previous unit, name it the bikeCard component and push it to your org. The files you need to push a component to an org: bikeCard.html <template> <div> <div>Name: {name}</div> <div>Description: {description}</div> <lightning-badge label={material}></lightning-badge> <lightning-badge label={category}></lightning-badge> <div>Price: {price}</div> <div><img src={pictureUrl}/></div> </div> </template> bikeCard.js import { LightningElement } from 'lwc'; export default class BikeCard extends LightningElement { name = 'Electra X4'; description = 'A sweet bike built for comfort.'; category = 'Mountain'; material = 'Steel'; price = '$2,700'; pictureUrl = ''; } bikeCard.js-meta.xml <?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns=""> <!-- The apiVersion may need to be increased for the current release --> <apiVersion>48.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__AppPage</target> <target>lightning__RecordPage</target> <target>lightning__HomePage</target> </targets> </LightningComponentBundle> - Create a project by selecting SFDX: Create Project from the Command Palette in VS Code. Accept the standard template and give it the project name bikeCard. - Create a bikeCard component folder and files by right-clicking on the lwc folder and select SFDX: Create Lightning Web Component. - Enter the filename bikeCard. - Save the contents of the files under bikeCard\force-app\main\default\lwc so you see the following in VS Code: Lightning web components follow web standards. The HTML standard recommends that custom element names contain a hyphen. However, the Salesforce platform doesn’t allow hyphens in the component folder or file names. So we use camelCase naming conventions here. - Copy the contents from above for the bikeCard.html, bikeCard.js, and bikeCard.js-meta.xml files - Save your files. The Component Configuration File The file we haven’t covered yet is the component configuration file with the extension .js-meta.xml. This file provides metadata for Salesforce, including the design configuration for components intended for use in Lightning App Builder. We haven’t covered configuration files yet, because we’ve been playing in WebComponents.dev. Now that you’re going to start using the content within an org, you must include a configuration file. Notice that the ebikes repo components all have this configuration file. Here’s an example from the ebikes repo: <?xml version="1.0" encoding="UTF-8" ?> <LightningComponentBundle xmlns=""> <apiVersion>48.0</apiVersion> <isExposed>true</isExposed> <masterLabel>Product Card</masterLabel> <targets> <target>lightning__AppPage</target> <target>lightning__RecordPage</target> <target>lightning__HomePage</target> <target>lightningCommunity__Page</target> </targets> <targetConfigs> <targetConfig targets="lightning__RecordPage"> <objects> <object>Product__c</object> </objects> </targetConfig> </targetConfigs> </LightningComponentBundle> Required apiVersion binds the component to a Salesforce API version. isExposed ( true or false) makes the component available from other namespaces. Only set this to true to make a Lightning component usable in these specific cases: - From a managed package in Aura -. Displaying a Component in an Org You have two options for displaying a Lightning web component in the UI. - Set the component to support various flexipage types (home, record home, and so on) then add it to a flexipage using the Lightning App Builder. This is the simplest approach and the one you follow in this unit. - You can also create a tab which points to an Aura component containing your Lightning web component. You can see the required pieces in the repo. Deploy Your Files Now, you need to deploy the component files to your Dev Hub enabled org. - Authenticate with your Dev Hub org using SFDX: Authorize an Org from the Command Palette in VS Code. When prompted, accept the Project Default and press Enter to accept the default alias. If prompted to allow access, click Allow. - Deploy the project files using SFDX: Deploy this Source to Org from the Command Palette in VS Code. Create a New Page for Your Component Since we set up our component configuration file to enable the use of the component in Lightning App Builder, use the UI to create an app and add your component to it. - To open your org, use SFDX: Open Default Org from the Command Palette in VS Code. - In Setup, enter Lightning App Builder in the Quick Find box and then select Lightning App Builder. - Click New. - Select App Page and Click Next. - Give it the label Bike Card and Click Next. - Select One Region and click Finish. - In Lightning App Builder, scroll down the Lightning components list on the left side until you see your bikeCard component. Now you can drag it onto the page. Save the page, Activate it, and bikeCard component shows up on the assigned page. - Drag your bikeCard component to the top of the page layout until you see that the bike appears. - Click Save. - Click Activate. - Keep Activate for all users selected. And, optionally, change the name or icon for your app. - Click Save. You’re asked to add your page to navigation menus, but you don’t need to. You can still get to your page in this environment. - Click Finish. - Click Back in the upper left corner to exit the Lightning App Builder. - From the App Launcher ( ), find and select Bike Card. - Open it and see your component working in the UI. There you go, a shiny new bike. You’ve pushed a component to an org, seen it on the page, and can verify it in the UI. In the next unit, you build an interactive component with event handling and deploy it to your org for testing.
https://trailhead.salesforce.com/en/content/learn/v/modules/lightning-web-components-basics/push-lightning-web-component-files
CC-MAIN-2021-10
refinedweb
1,092
56.25
Import from FogBugz Follow the instructions on this page to import cases from FogBugz using a dedicated module from the YouTrack Python Client Library. This procedure requires the following steps: - Set up your local environment. -: Set Up Your Environment Import to YouTrack is supported by the YouTrack Python Client Library. This library is basically a wrapper for the YouTrack REST API. You won't actually need to do any programming in Python, but you do need to install Python and download the client library.. - Download the latest version of the YouTrack Python Client Library from GitHub. - Extract the contents of the ZIP archive to a folder in your local directory. You can extract the files to whichever folder you prefer. Customize the Mapping Definitions The next step is to map the fields in your FogBugz database to issue attributes in YouTrack. The client library contains a sample file that you can customize to match your import data. The file is saved as defaultFBugz.py in the python/fbugz subfolder of the client library. This file contains mappings for all of the fields that are required for successful import and definitions for most custom field types. To use the default mapping definitions, skip this procedure and import your data. To customize the mapping definitions: - Either open the defaultFBugz.pyfile or open a new file in a text editor and paste the content of the default mapping file. - Check the fbugz: fbugz.CATEGORY = { 'Feature' : 'Feature', 'Bug' : 'Bug', 'Inquiry' : 'Feature', 'Schedule Item' : 'Task', 'FB Category' : 'YT Type' } - For the fbugz.PROJECTS_TO_IMPORT, specify the names of the FogBugz projects that you want to import to YouTrack, separated by commas. Use the following example as a guide: fbugz.PROJECTS_TO_IMPORT = [u'Project1_name', u'Project2_name', ..., u'ProjectN_name'] - If you created a new file, perform the following steps: - Save your mapping file with the extension .pyand add it to the <unzipped library directory>/python/fbugzdirectory. - Open the fb2youtrack.py file in the python subfolder of the client library. - Locate the reference to the defaultFBugzmodule and set the value to the name of your mapping file (without the .pyextension). Use the following example as a guide: from fbugz.fbSOAPClient import FBClient from youtrack.connection import Connection from youtrack import Group, User, Issue, Comment, Link from fbugz import <mapping file name> import fbugz from youtrack import YouTrackException from youtrack.importHelper import * - Save and close the fb2youtrack.py file. defaultFBugz.pyfile instead, save and close the: python fb2youtrack.py target_url target_login target_password source_url source_login source_password max_issue.
http://www.jetbrains.com/help/youtrack/incloud/Import-from-FogBugz.html
CC-MAIN-2018-05
refinedweb
415
58.89
Introduction: Laser-Cut Screen From a Photograph In this project, you'll start with a digital image and use Processing to convert it into a grid of circles (similar to a halftone image) that can be used to make a laser-cut screen. Processing outputs a PDF file, which I import into Adobe Illustrator to use with the laser cutter. The full sketch is available here. Step 1: Create a Processing Sketch and Choose a Photo If you haven't already downloaded and installed Processing, you can get it here. First create a new Processing sketch and save it. Then, inside of the sketch's folder, create a new folder called "data". Place the photo you want to use inside the data folder. Back in your Processing file, start by importing the library to handle creating pdf files. import processing.pdf.*; Declare the following variables: String myFile = "myImage.jpg"; PImage pic; int w, h; Step 2: Resize the Photo in Setup Load the image and set the variables w and h to the image dimensions. pic = loadImage(myFile); h = pic.height; w = pic.width; Then resize the image so that it's 150 pixels on it's longest side. Note that in resize(), using the 0 automatically resizes the second dimension while maintaining the original image's proportions. Eventually, we're going to look at each pixel of the input image and use it's brightness to set the size of the output circle. In the code, I've set it up so that the output circles vary from 0 to 10 pixels wide with 5 pixels of space between them. This means that the output image will be 15 times as large as the image we start with. So we need to start with a relatively small image. if( w > h){ pic.resize(150,0); } else if (h > w) { pic.resize(0,150); } else if (h == w){ pic.resize(150,150); } Set the output dimensions. size(2250,2250); And set up the PDF file. This will be your output file. It will automatically save to your Processing sketch's folder. If you want to rename it, simply replace "dotPic.pdf" with your own filename. beginRecord(PDF, "dotPic.pdf"); Note that if you re-run the program, it will overwrite the file that was created last time. If you want to run the program multiple times and save the different outputs, you can change the filename each time to avoid overwriting previous outputs. So, the entire program at this point looks like this: import processing.pdf.*;<br> PImage pic; String myFile = "myImage.jpg"; int w, h; void setup(){ pic = loadImage(myFile); h = pic.height; w = pic.width; if( w > h){ pic.resize(150,0); } else if (h > w) { pic.resize(0,150); } else if (h == w){ pic.resize(150,150); } size(2250,2250); beginRecord(PDF, "dotPic.pdf"); } Step 3: Convert to Grayscale and Calculate Image Brightness Inside the draw() function, set up your drawing parameters. I used stroke weight of .001 and red color to draw, because those are the settings for the laser cutter I used. If your laser cutter settings are different, you can adjust accordingly. background(255); noLoop(); noFill(); strokeWeight(.001); stroke(255,0,0); Next, load the pixels of the image and loop through them. Get the red, green and blue values for each pixel, and use the formula 0.21*r + 0.72*g + 0.07*b to convert the colors to a greyscale value. Map the greyscale value to a size between 0 and the maximum circle size you want - here I'm using 10 pixels. Finally, draw a circle, adding an additional 5 pixels as a spacer between each circle. pic.loadPixels();<br>); } } Then complete the save to PDF operation with endRecord(); endRecord(); So the entire draw loop is: void draw(){<br> background(255); noLoop(); noFill(); strokeWeight(.001); stroke(255,0,0); pic.loadPixels();); } } endRecord(); } Step 4: Import PDF Into Illustrator Be the First to Share Recommendations 2 Discussions 2 years ago What would be really interesting is if you set that laser cut screen up in a window and watch the sunlight cast the image across the floor. Reply 2 years ago That's a great idea! I'll play around with that. Thanks.
https://www.instructables.com/id/Laser-Cut-Screen-From-a-Photograph/
CC-MAIN-2020-40
refinedweb
712
75.91
How to capture context menus --- use capture hotkey I have a RDP session icon on my desktop and I need to be able to Edit this shortcut via the context menu and apply the settings. Normally I would accomlish this by right-clicking on the RDP icon -> select EDIT -> Select Experience Tab -> Choose highest connection speed for hightest resolution. Is there a way to do this using Sikuli? When I go to setup the screen for capture the context menu disappears. Thank you for your comments and suggestions. I am a newbie in regards to this application and Python. Sincerely, Tim Question information - Language: - English Edit question - Status: - Solved - For: - Sikuli Edit question - Assignee: - No assignee Edit question - Solved by: - Tim Farrell - Solved: - 2012-04-24 - Last query: - 2012-04-24 - Last reply: - 2012-04-24 Hi RaiMan, Thank you for your quick response. Since I am using Windows, I thought I would add some relevance to windows key strokes: -prepare the GUI situation where you want to capture something -press: CTRL-SHIFT-2 (to invoke Sikuli screen capture) Thanks again. If the key-shortcut does not work (sometimes a keystroke closes a context menu), you can write a small script like wait(5) print capture() If you run this, you have 5 seconds to open your contextmenu or whatever you need, then select the region to capture and you get the filepath printed in stdout. The image will be located in the temp directory of your OS. @ j-the-k very good suggestion. this can be refined: import shutil import os dir = "absolute path of folder where you want your images to be stored" wait(5) image = capture() name = input("name the image (no suffix)") newimg = os.path.join(dir, name+".png") shutil.move(image, newimg) Then use the "load image" button to get the image directly into the script. There is a so called "Capture Hot Key", that can be used in these cases: - have Sikuli IDE started - prepare the GUI situation where you want to capture something - press the hotkey - the capture mode should come up - the captured image is inserted at the IDE's cursor position look menu File -> Preferences for the current definition (standard is STRG-SHIFT-2)
https://answers.launchpad.net/sikuli/+question/194589
CC-MAIN-2016-40
refinedweb
373
63.12
wait (3p) PROLOGThis manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. NAMEwait, waitpid — wait for a child process to stop or terminate SYNOPSIS #include <sys/wait.h> pid_t wait(int * stat_loc); pid_t waitpid(pid_t pid, int *stat_loc, int options); DESCRIPTIONThe)−1)−1,)−1, status is requested for any child process whose process group ID is equal to the absolute value of pid. - WCONTINUED -. - 1. - The process returned 0 from main(). - 2. - The process called _exit() or exit() with a status argument of 0. - 3. - The process was terminated because the last thread in the process terminated. - WIFEXITED(stat_val) - WEXITSTATUS(stat_val) - WIFSIGNALED(stat_val) - WTERMSIG(stat_val) - WIFSTOPPED(stat_val) - WSTOPSIG(stat_val) - WIFCONTINUED(stat_val) RETURN VALUEIf, −1, −1 shall be returned, and errno set to indicate the error. ERRORSThe wait() function shall fail if: - ECHILD - The calling process has no existing unwaited-for child processes. - EINTR - The function was interrupted by a signal. The value of the location pointed to by stat_loc is undefined. -. EXAMPLES Waiting for a Child Process and then Checking its StatusT == −1) { /* == −1) {The following example demonstrates how to use waitpid() in a signal handler for SIGCHLD without passing −1 as the pid argument. (See the APPLICATION USAGE section below for the reasons why passing a pid of −1 − 1); } else if (waitpid(sinfo->si_pid, &status, 0) == −1) { static char msg[] = "waitpid() failed\n"; write(2, msg, sizeof msg − 1); } else if (!WIFEXITED(status)) { static char msg[] = "WIFEXITED was false\n"; write(2, msg, sizeof msg −) == −1) { perror("sigaction"); exit(EXIT_FAILURE); } for (i = 0; i < CHILDREN; i++) { switch (pid = fork()) { case −1: perror("fork"); exit(EXIT_FAILURE); case 0: sleep(2); _exit(i); } } /* Wait for all the SIGCHLD signals, then terminate on SIGALRM */ alarm(3); for (;;) pause(); return 0; /* NOTREACHED */ } APPLICATION USAGECalls −1, and the use of waitid() with the idtype argument set to P_ALL, are also not recommended for portable applications. RATIONALEA‐2008: - 1. - To support job control - 2. - To permit a non-blocking version of the wait() function - 3. - To permit a library routine, such as system() or pclose(), to wait for its children without interfering with other terminated children for which the process has not waited stream = popen("/bin/true"); (void) system("sleep 100"); (void) pclose(stream); - 1. -. -. -. - Guarantee #1 - Guarantees #2 and #3 - Guarantee #4
https://readtheman.io/pages/3p/wait
CC-MAIN-2019-09
refinedweb
408
50.46
Is there are easy way to implement a rolling percentage for a process in Java, to be displayed in the console? I have a percentage data type (double) I generated during a particular process, but can I force it to the console window and have it refresh, instead of just printing a new line for each new update to the percentage? I was thinking about pushing a cls and updating, because I'm working in a Windows environment, but I was hoping Java had some sort of built-in capability. All suggestions welcomed! Thanks! You can print a carriage return \r to put the cursor back to the beginning of line. Example: public class ProgressDemo { static void updateProgress(double progressPercentage) { final int width = 50; // progress bar width in chars System.out.print("\r["); int i = 0; for (; i <= (int)(progressPercentage*width); i++) { System.out.print("."); } for (; i < width; i++) { System.out.print(" "); } System.out.print("]"); } public static void main(String[] args) { try { for (double progressPercentage = 0.0; progressPercentage < 1.0; progressPercentage += 0.01) { updateProgress(progressPercentage); Thread.sleep(20); } } catch (InterruptedException e) {} } }
https://codedump.io/share/m5YYjY7SAVSn/1/console-based-progress-in-java
CC-MAIN-2017-30
refinedweb
181
50.53
Important: Please read the Qt Code of Conduct - Qt 5.6 - qt.labs.controls - ApplicationWindow width / height - ekkescorner Qt Champions 2016 last edited by UseCase: mobile APP Development for Android / iOS using TechPreview of new QtQuickControls2 There's a specific Gallery Example demonstrating use of qt.labs.controls ApplicationWindow from qt.labs.control namespace is defined this way: ApplicationWindow { id: window width: 360 height: 520 visible: true title: "Qt Labs Controls" My qestion is about the width and height On a mobile device the ApplicationWindow always has to fill the entire available space, so it doesn't make sense to start with a fixed size width / height I think what's recommended ? should I remove width and height settings and let Qt calculate without ? Or should I set the width and height from QScreen ? This will give me correct size and also changes if rotating from portrait to landscape: main.cpp: context->setContextProperty("myScreen", qApp->primaryScreen()); QML: width: myScreen.size.width If this is recommended next question: should I use myScreen.availableSize.width instead of myScreen.size.width thx for infos Qt shows windows fullscreen/maximized [*] by default when appropriate. Thus, the desired window size specified in the Gallery example does not make any difference on mobile platforms, but it does on desktop platforms where apps run in windowed mode. [*] - ekkescorner Qt Champions 2016 last edited by
https://forum.qt.io/topic/65907/qt-5-6-qt-labs-controls-applicationwindow-width-height/3
CC-MAIN-2021-21
refinedweb
227
55.44
In this article, you’ll learn how to convert a text (.txt) file into a CSV (comma-separated values) file using Python Pandas. Pandas is a fast, open-source library built on top of NumPy. We’ll use it to read a text file and convert it into a CSV file. Given below is the step-by-step guide to convert a text (.txt) file into a CSV file using Python Pandas. Contents Steps To Convert Text (.txt) File To CSV Using Python Pandas Create The Original Text File With Rows And Columns First, create the original text file with the proper rows and columns structure. In this example, we’ll be using a text file containing the roll numbers, names, classes, and scores of a few students. The fields in the text file are separated by commas, which is the default delimiter. You can also use a different delimiter of your choice, as discussed later in this article. The text file, that we’re gonna convert to a CSV file in this example, is shown below. Note: The first column is used for indexing by default when a text file is read. Convert The Text File Into A CSV File Using Python Panda’s Dataframe.to_csv() Method The Python code snippet required to convert a text file to CSV is given below: import pandas as pd textdatafile = pd.read_csv("path to the txt file") textdatafile.to_csv("new csv file name", index = None) After running the above code snippet a new csv file will be created in the same directory with the name mentioned inside the to_csv() function. Here’s how the outputted CSV file would look: Configurations Changing The Delimiter As mentioned earlier in this article, the read_csv() method, of the pandas library of Python, expects the fields in the text to be separated by commas (,) by default. However, we can include the delimiter parameter in the read_csv() to set our own delimiter. For example, in the text shown below, the fields are separated by the “~” character. In this case, we need to specify the delimiter in the read_csv() function as shown in the Python3 code snippet given below. import pandas as pd textdatafile = pd.read_csv("path to the txt file", delimiter = '~') textdatafile.to_csv("new csv file name", index = None) The CSV output shown below. Specifying Own Headers The pandas library also allows us to specify our own headers for columns if they’re not already mentioned in the text file. Let’s take the example shown below, where there are no headers present for the columns. In this case, we can insert the column headings using python pandas, while converting the file from TXT to CSV. The Python3 code snippet is given below. import pandas as pd textdatafile = pd.read_csv("path to the txt file", header = None) #adding column headings textdatafile.columns = ['Roll No.', 'Name', 'Class', 'Score'] textdatafile.to_csv("new csv file name", index = None) When the code is executed, we get a new CSV file with all the fields and the column headings mentioned in the code. The CSV output is given below. I hope this article helped you learn how to convert a text file into a CSV file using the pandas library of Python. If you have any doubts or queries, feel free to comment down below. I will try my best to help you out. Have a great day ahead!
https://www.techrbun.com/convert-txt-to-csv-using-python-pandas/
CC-MAIN-2022-21
refinedweb
566
73.98
This section provides an overview of what hazelcast is, and why a developer might want to use it. It should also mention any large subjects within hazelcast, and link out to the related topics. Since the Documentation for hazelcast is new, you may need to create initial versions of those related topics. After installation of hazelcast and adding to Java Build Path, you can write Main.class that starts cluster work public static void main(String[] args){ Config config = new Config(); // creates a new HazelcastInstance (a new node in a cluster) HazelcastInstance instance = Hazelcast.newHazelcastInstance(config); // returns the Cluster that this HazelcastInstance is part of Cluster cluster = instance.getCluster(); // get all devices, that are in the cluster Set<Member> setMembers = cluster.getMembers(); // get ExecutorService that works on cluster instance ExecutorService mService = instance.getExecutorService("exec"); for (int i = 0; i < setMembers.size(); i++) { // send a task for each member on service of HazelcastInstance final Future<String> future = mService.submit(new ClusterWorkingTask()); String response = null; try { // wait for response response = future.get(); System.out.println(response); // each member return: Hello World! } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } } } create ClusterWorkingTask.class that can be executed on each member public class ClusterWorkingTask implements Callable<String>, Serializable { @Override public String call() throws Exception { // send Hello World! as result of execution return "Hello World!"; } } Hazelcast runs inside a Java Virtual Machine (JVM). It is compatible with Java versions 1.6.x, 1.7.x, and 1.8.x. Installation and setup is as simple as downloading the zip (or tar) archive, copying the uncompressed directory to a desired installation directory, and adding the jar to your Java class path. For example, after downloading the hazelcast zip from, using bash on Linux (Hazelcast 3.7.4 is used in this example, but the version you download may be different): unzip hazelcast-3.7.4.zip Set up the CLASSPATH variable: export CLASSPATH=${CLASSPATH}:${PWD}:hazelcast-3.7.4/lib/hazelcast-3.7.4.jar You should now be able to start the hazelcast server to check your installation by executing the start script. On Linux, execute the start.sh script. Example script and expected output: $ hazelcast-3.7.4/bin/start.sh JAVA_HOME environment variable not available. Path to Java : /path/to/your/java ... ### More output here, ending with lines similar to: ### ... Members [1] { Member [192.168.38.1]:5701 - 3456f96d-3646-459b-9199-caa6ebb3e5ee this } Jan 07, 2017 8:30:53 PM com.hazelcast.core.LifecycleService INFO: [192.168.XX.XX]:5701 [dev] [3.7.4] [192.168.38.1]:5701 is STARTED Note: if your java installation is not in a standard location, you may have to set the JAVA_HOME environment variable as well. You should now be set to download and run the code samples (available at), or to start playing around with writing your own simple Java Hazelcast client to connect to the Hazelcast server node you just started.
https://riptutorial.com/hazelcast
CC-MAIN-2019-30
refinedweb
490
51.44
I have a Python code that registers a schedule task and should continue to execute the rest of the program (It placed on my server backend). import sched, time def pri(): print "A" s= sched.scheduler(time.time, time.sleep) s.enter(60, 1, pri, ()) s.run print "Hello" I want the program to print Hello before executing the scheduled task, and continue the rest of the program. Does anyone knows how to do that? I solved it using threading: import sched, time import thread def pri(): print "A" def schedule_task(): s= sched.scheduler(time.time, time.sleep) s.enter(60, 1, pri, ()) s.run thread.create_new_thread(schedule_task, (,)) print "Hello"
http://www.dlxedu.com/askdetail/3/3753357f9df2a061eb4c4dc8effb98eb.html
CC-MAIN-2018-39
refinedweb
110
67.96
This evaluating the Windows Server 2016 Technical Preview releases, a huge thank you. Your feedback has directly contributed to feature additions and refinements along the way to make sure we’re building the best server for you, whether it’s on-premises or in the cloud. To start, let’s begin with an area we haven’t disclosed yet: scale. When it comes to development, there are a number of areas that are never “done.” These are areas where we’re always moving the bar to improve with hardware and to advance the state of the art. Security and performance are a couple of examples along with scale.. For those of you who haven’t been able to keep up with all of the new scenarios and features we’re introducing, no worries! It just means we need to bring you up to speed, and now seems like a good time to do that. So, based on the feedback we’ve been hearing throughout the Windows Server 2016 Technical Preview, here are just a few of the top scenarios and features we’ve been asked about in Windows Server 2016. First off, it starts with security. As more and more customers talk to us about their hybrid cloud journey, every conversation has a security component. Folks want to know how the security landscape is changing and what additional layers of protection we are putting in place to help. Shielded virtual machines Virtualization security is a major investment area in Windows Server 2016 Hyper-V. In addition to protecting hosts or other virtual machines from a virtual machine running malicious software, we also need to protect virtual machines from a compromised host. Since a virtual machine is just a file, we need to protect it from attacks via the storage system, the network, or while it is backed up. This is a fundamental need, which is why we’ve made this scenario a top priority in Windows Server 2016. Quite simply, nothing like it exists in the market. To learn more about this key capability, check out this article on Guarded Fabric and Shielded VMs. Shielded VMs is just one of many new security features in a long list in Windows Server 2016. Next, there’s storage. Scale Out File Server with Storage Spaces Direct (RDMA) for Hyper-converged infrastructure Windows Server 2016 Datacenter introduces Storage Spaces Direct, which enables building highly available (HA) storage systems with local storage. This is a significant step forward in Microsoft Windows Server software-defined storage (SDS), as it simplifies the deployment and management of SDS systems and also unlocks the use of new classes of disk devices, such as SATA and NVMe disk devices, that were previously not possible with clustered Storage Spaces with shared disks. Windows Server 2016 provides a hyper-converged solution by allowing the same set of servers to provide SDS through Storage Spaces Direct (S2D), and also by serving as the hosts for virtual machines using Hyper-V. For more information on this area, please reference Storage Spaces Direct in Windows Server 2016 Technical Preview. Flexible software-defined storage is another great tool for IT Pros. Now, let’s take a look at some enterprise-grade, developer-focused features with Windows Containers. Containers Windows Containers provide operating system-level virtualization that allows multiple isolated applications to be run on a single system. Two different types of container runtime are included with the feature, each with a different degree of application isolation. Windows Server Containers achieve isolation through namespace and process isolation while Hyper-V Containers encapsulate each container in a lightweight virtual machine. Curious to learn more? Be sure to reference this documentation piece on Windows Containers. Like I said at the beginning, these are just a few of the scenarios and feature areas that are resonating so far in Windows Server 2016. We’ve got a lot more in store — we’ll see you at Ignite!
https://cloudblogs.microsoft.com/windowsserver/2016/08/25/windows-server-scalability-and-more/
CC-MAIN-2018-17
refinedweb
657
51.99
public class CreateJobPlaylist This value must currently be HLSv3. The name that you want Elastic Transcoder to assign to the master playlist, for example, nyc-vacation.m3u8. The name cannot include a / character. If you create more than one master playlist (not recommended), the values of all CopyC#Name objects must be unique. Elastic Transcoder automatically appends .m3u8 to the file name. If you include .m3u8 in CopyC#Name, it will appear twice in the file name. Name For each output in this job that you want to include in a master playlist, the value of the CopyC#Outputs:Key object. If you include more than one output in a playlist, the value of CopyC#SegmentDuration for all of the outputs must be the same. Outputs:Key SegmentDuration
https://docs.aws.amazon.com/sdkfornet1/latest/apidocs/html/T_Amazon_ElasticTranscoder_Model_CreateJobPlaylist.htm
CC-MAIN-2018-51
refinedweb
128
67.76
- Maintainable Automated UI Tests Wednesday, October 09, 2013 by martijn broed Mike Cohn’s testing pyramid, and that in a typical system over 70% of the tests should be unit tests, around 5% UI tests and the rest integration tests. So I thought that UI testing was hard and that, while it provided a lot of benefit, it was best to keep it to a minimum…. UI Testing Gone Wrong I would like to touch on what I did wrong, which also seems to be very typical amongst developers and testers starting with UI automation. So what goes wrong and why? A lot of teams start UI automation with screen recorders. If you are doing web automation with Selenium you have most likely used Selenium IDE. From the Selenium IDE home page: The Selenium-IDE (Integrated Development Environment) is the tool you use to develop your Selenium test cases.: “Automate ALL THE THINGS“ usernamein your tests. All the tests in this article are written against the Mvc Music Store website. The website as is has some issues that makes UI testing rather hard so I ported the code and fixed the issues. You can find the actual code I am writing these tests against on the GitHub repo for this article here So what does a brittle test look like? It looks something like this:")); } } You can find the BrittleTestclass here. Host is a static class, with a single static property: Instance, which upon instantiation fires up IIS Express on the website under test and binds Firefox WebDriver to the browser instance. When the test is finished, it then closes the browser and IIS Express automatically. This test fires up a web browser, goes to the home page of the Mvc Music Store website, registers a new user, browses to an album, adds it to the cart, and checks out. One might argue this test is doing too much and that’s why it’s brittle; but the size of this test is not the reason it’s brittle – it’s how it’s written that makes it a nightmare to maintain. There are different schools of thought on UI testing and how much each test should cover. Some believe this test is doing too much and some think a test should cover a real scenario, end to end, and consider this a perfect test (maintainability aside). So what is wrong with this test? - ‘driver’ to find an element on the page and to do something with it. No modularity. - This one test by itself might not have much duplication but a few more tests like this and you will have a lot of duplicated selector and logic to interact with web pages from different tests. For example By.Id("UserName")selector will be duplicated in all tests that require registration, and driver.FindElement(By.Id("UserName")).Clear()and driver.FindElement(By.Id("UserName")).SendKeys("are duplicated anywhere you want to interact with UserName textbox. Then there is the whole registration form, and checkout form etc. that will be repeated in all tests needing to interact with them! Duplicated code leads to maintainability nightmares. ") - There is a lot of magic strings everywhere, which again is a maintainability issue. Test Code Is Code! There are also patterns that allow you to write more maintainable UI tests. Much like your actual code, you are going to have to maintain your tests. So give them the same treatment.. Test code is code: Do you apply SRP on your code? Then you should apply it on your tests too. Is your code DRY? Then DRY up your tests too. If you don’t write good tests (UI or otherwise) you will waste a lot of time maintaining them.. Introducing the Page Object Pattern A lot of the above mentioned issues are rooted in the procedural nature of the test script and the solution is easy: Object Orientation. Page Object is a pattern used to apply object orientation to UI tests. From the Selenium wiki:. The idea is that for each page in your application/website you want to create one Page Object. Page Objects are basically the UI automation equivalent of your web pages. I have gone ahead and refactored the logic and interactions out of the BrittleTest into a few page objects and created a new test that uses them instead of hitting the web driver directly. You can find the new test here. The code is copied here for your reference: public class TestWithPageObject { [Test] public void Can_buy_an_Album_when_registered() { var registerPage = HomePage.Initiate() .GoToAdminForAnonymousUser() .GoToRegisterPage(); registerPage.Username = "HJSimpson"; registerPage.Email = "chunkylover53@aol.com"; registerPage.Password = "!2345Qwert"; registerPage.ConfirmPassword = "!2345Qwert"; var shippingPage = registerPage .SubmitRegistration() .SelectGenreByName("Disco") .SelectAlbumByName("Le Freak") .AddToCart() .Checkout(); shippingPage.FirstName = "Homer"; shippingPage.LastName = "Simpson"; shippingPage.Address = "742 Evergreen Terrace"; shippingPage.City = "Springfield"; shippingPage.State = "Kentucky"; shippingPage.PostalCode = "123456"; shippingPage.Country = "United States"; shippingPage.Phone = "2341231241"; shippingPage.Email = "chunkylover53@aol.com"; shippingPage.PromoCode = "FREE"; var orderPage = shippingPage.SubmitOrder(); Assert.AreEqual(orderPage.Title, "Checkout Complete"); } } Admittedly, the test body hasn’t decreased much in size and in fact I had to create seven new classes to support this test. Despite the more lines of code required, we just fixed a lot of issues the original brittle test had (more on this further down). For now, let’s dive a bit deeper into the page object pattern and what we did here. With the Page Object pattern you typically create a page object class per web page under test where the class models and encapsulates interactions with the page. So a textbox in your web page becomes a string property on the Page Object and to fill that textbox you just set that text property to the desired value, instead of: driver.FindElement(By.Id("Email")).Clear(); driver.FindElement(By.Id("Email")).SendKeys("chunkylover53@aol.com"); we can write: registerPage.Email = "chunkylover53@aol.com"; where registerPageis an instance of the RegisterPage: driver.FindElement(By.LinkText("Admin")).Click(); we can write: homepage.GoToAdminForAnonymousUser();: var shippingPage = registerPage .SubmitRegistration() .SelectGenreByName("Disco") .SelectAlbumByName("Le Freak") .AddToCart() .Checkout(); Here, after registering the user I get taken to the home page (an instance of its page object is returned by SubmitRegistrationmethod). So on the HomePage instance I call SelectGenreByNamewhich clicks on a ‘Disco’ link on the page which returns an instance of AlbumBrowsePage and then on that page I call SelectAlbumByNamewhich clicks on the ‘Le Freak’ album and returns an instance of AlbumDetailsPage and so on and so forth. ShoppingCartPageeverywhere RegisterPagethat looked like this:);}); } } } I have created a Pagesuperclass that takes care of a few things, like NavigateTowhich helps navigate to a new page by taking an action and Executethat executes some actions on an element. The Pageclass looked like:); } } In the BrittleTest, to interact with an element we did FindElementonce per action. The Executemethod, apart from abstracting web driver’s interaction, has an added benefit that allows selecting an element, which could be an expensive action, once and taking multiple actions on it: driver.FindElement(By.Id("Password")).Clear(); driver.FindElement(By.Id("Password")).SendKeys("!2345Qwert"); was replaced with: Execute(By.Name("Password"), e => { e.Clear(); e.SendKeys("!2345Qwert");}) Taking a second look at the RegisterPagepage object above we still have a bit of duplication in there. Test code is code and we don’t want duplication in our code; so let’s refactor that. We can extract the code required to fill in a textbox into a method on the Pageclass and just call that from page objects. The method could be implemented as: public void SetText(string elementName, string newText) { Execute(By.Name(elementName), e => { e.Clear(); e.SendKeys(newText); } ); } And now the properties on RegisterPagecan be shrunk to: public string Username { set { SetText("UserName", value); } } You could also make a fluent API for it to make the setter read better (e.g. Fill("UserName").With(value)) but I’ll leave that to you. We’re not doing anything extraordinary here. Just simple refactoring on our test code like we’ve always done for our, errrr, “other” code!! You can see the complete code for Pageand RegisterPageclasses here and here. Strongly Typed Page Object! This approach is practical if you’re using an MV* framework for your UI. In our case we are using ASP.Net MVC. Let’s take another look at the RegisterPage:); } } } This page models the Register view in our web app (just copying the top bit here for your convenience): @model MvcMusicStore.Models.RegisterModel @{ ViewBag.Title = "Register"; } Hmmm, what’s that RegisterModelthere? It’s the View Model for the page: the Min the MVC. Here is the code (I removed the attributes to reduce the noise): public class RegisterModel { public string UserName { get; set; } public string Email { get; set; } public string Password { get; set; } public string ConfirmPassword { get; set; } } That looks very familiar, doesn’t it? It has the same properties as the RegisterPageclass which is not surprising considering RegisterPagewas created based on this view and view model. Let’s see if we can take advantage of view models to simplify our page objects. I have created a new Pagesuperclass; but a generic one. You can see the code here: public class Page<TViewModel> : Page where TViewModel: class, new() { public void FillWith(TViewModel viewModel, IDictionary<Type, Func<object, string>> propertyTypeHandling = null) { // removed for brevity } } The Page<TViewModel>class subclasses the old Pageclass and provides all its functionality; but it also has one extra method called FillWithwhich fills in the page with provided view model instance! So now my RegisterPageclass looks like: public class RegisterPage : Page<RegisterModel> { public HomePage CreateValidUser(RegisterModel model) { FillWith(model); return NavigateTo<HomePage>(By.CssSelector("input[type='submit']")); } } I duplicated all page objects to show both variations and also to make the codebase easier to follow for you; but in reality you will need one class for each page object. After converting my page objects to generic ones now the test looks like:); } } That’s it – the entire test! A lot more readable, DRY and maintainable, isn’t it? The ObjectMotherclass that I am using in the test is an Object Mother that provides test data (code can be found here), nothing fancy: public class ObjectMother { public static Order CreateShippingInfo() { var shippingInfo = new Order { FirstName = "Homer", LastName = "Simpson", Address = "742 Evergreen Terrace", City = "Springfield", State = "Kentucky", PostalCode = "123456", Country = "United States", Phone = "2341231241", Email = "chunkylover53@aol.com" }; return shippingInfo; } public static RegisterModel CreateRegisterModel() { var model = new RegisterModel { UserName = "HJSimpson", Email = "chunkylover53@aol.com", Password = "!2345Qwert", ConfirmPassword = "!2345Qwert" }; return model; } } Don’t Stop at the Page Object Some web pages are very big and complex. Earlier I said test code is code and we should treat it as such. We normally break big and complex web pages into smaller and, in some cases, reusable (partial) components. This allows us to compose a web page from smaller, more manageable components. We should do the same for our tests. To do this we can use Page Components. A Page Component is pretty much like a Page Object: it’s a class that encapsulates interaction with some elements on a page. The difference is that it interacts with a small part of a web page: it models a user control or a partial view, if you will. A good example for a page component is a menu bar. A menu bar usually appears on all pages of a web application. You don’t really want to keep repeating the code required to interact with the menu in every single page object. Instead you can create a menu page component and use it from your page objects. You could also use page components to deal with grids of data on your pages, and to take it a step further the grid page component itself could be composed of grid row page components. In the case of Mvc Music Store we could have a TopMenuComponentand a SideMenuComponentand use them from our Like in your web application, you could also create a, say, LayoutPagepage object which models your layout/master page and use that as a superclass for all your other page objects. The layout page would then be composed of menu page components so all pages can hit the menus. I guess a good rule of thumb would be to have a page component per partial view, a layout page object per layout and a page object per web page. That way you know your test code is as granualar and well composed as your code. Some Frameworks for UI Testing What I showed above was a very simple and contrived sample with a few supporting classes: Frameworks for .Net: - Seleno is an open source project from TestStack. - White is an open source framework from TestStack for automating rich client applications based on Win32, WinForms, WPF, Silverlight and SWT (Java) platforms. Disclosure: I am a co-founder and a member of the development team in the TestStack organization. Frameworks for Ruby: - Capybara is an acceptance test framework for web applications that helps you test web applications by simulating how a real user would interact with your app. - Poltergeist is a driver for Capybara. It allows you to run your Capybara tests on a headless WebKit browser, provided by PhantomJS. - page-object (I haven’t personally used this gem) is-webdriver and selenium-webdriver. Conclusion We started with a typical UI automation experience, explained why UI testing fails, provided an example of a brittle test and discussed its issues and resolved them using a few ideas and patterns. If you want to take one point from this article it should be: Test Code Is Code. If you think about it, all I did in this article was to apply the good coding and object oriented practices you already know to a UI test. There is still a lot to learn about UI testing and I will try to discuss some of the more advanced tips in a future article. Happy Testing! Leave a comment › Posted in: Daily
http://www.4elements.com/blog/comments/maintainable_automated_ui_tests
CC-MAIN-2017-51
refinedweb
2,330
54.32
0 my assignment is to figure out the output but im bot sure i got it right here is the Q A variable x globally defined in your program is assigned the integer value 3. A variable x defined in a function named f_name is assigned the integer value 5. Answer the following after looking at the code that follows. 1 #include <iostream> 2 using namespace std; 3 int f_name(int y); 4 5 int x = 3; 6 7 int main() 8 { 9 cout << x; 10 cout << f_name(x); 11 return 0; 12 } 13 14 int f_name(int y) 15 { 16 int x = 5; 17 return (x + y); 18 } What is the output of line 9? _________ line 10? _______________ would the answers be line 9: 4,,, and line 10: 6?
https://www.daniweb.com/programming/software-development/threads/354690/how-do-i-figure-out-the-output
CC-MAIN-2017-26
refinedweb
131
75.24
Plasma #include <declarativewidget.h> Detailed Description A widget that contains an entire QML context, with its own declarative engine. Plasma::DeclarativeWidget provides a class for conveniently use QML based declarative user interfaces inside Plasma widgets. To one DeclarativeWidget corresponds one QML file (that can eventually include others) tere will be its own QDeclarativeEngine with a single root object, described in the QML file. Definition at line 49 of file declarativewidget.h. Constructor & Destructor Documentation Constructs a new DeclarativeWidget. - Parameters - Definition at line 255 of file declarativewidget.cpp. Definition at line 267 of file declarativewidget.cpp. Member Function Documentation - Returns - the declarative engine that runs the qml file assigned to this widget. Definition at line 296 of file declarativewidget.cpp. Emitted when the parsing and execution of the QML file is terminated. - Returns - true if the initilization of the QML file will be delayed at the end of the event loop Definition at line 291 of file declarativewidget.cpp. - Returns - the main QDeclarativeComponent of the engine Definition at line 311 of file declarativewidget.cpp. - Returns - the absolute path of the current QML file Reimplemented from QGraphicsWidget. Definition at line 316 of file declarativewidget.cpp. - Returns - the root object of the declarative object tree - Returns - the script engine used by the declarative engine - Since - 4.7 Definition at line 301 of file declarativewidget.cpp. Sets whether the execution of the QML file has to be delayed later in the event loop. It has to be called before setQmlPath(). In this case will be possible to assign new objects in the main engine context before the main component gets initialized. So it will be possible to access it immediately from the QML code. - Parameters - Definition at line 286 of file declarativewidget.cpp. Sets the path of the QML file to parse and execute. - Parameters - Definition at line 275 of file declarativewidget.cpp. Property Documentation Definition at line 54 of file declarativewidget.h. Definition at line 53 of file declarativewidget.h. Definition at line 55 of file declarativewidget.h. The documentation for this class was generated from the following files: Documentation copyright © 1996-2017 The KDE developers. Generated on Sun Nov 12 2017 03:29:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006 KDE's Doxygen guidelines are available online.
https://api.kde.org/4.x-api/kdelibs-apidocs/plasma/html/classPlasma_1_1DeclarativeWidget.html
CC-MAIN-2019-26
refinedweb
381
50.94
hiberante installation - Hibernate hiberante installation how to install hibernate s/w in windows xp. Hi Friend, Please visit the following link: Hope that it will be helpful for you. Thanks Ask for latest version for hibernate Ask for latest version for hibernate any new version for hibernate after 3.0, if yes can u give some exmp for latest version of hibernate Insert This tutorial will help you to learn how to insert data into table by using hibernate : Dynamic-insert This tutorial contains description of Hibernate dynamic-insert Ask Questions Ask Questions  ..., professions, students and learners, we have initiated a new service ‘Ask Question’. Using this new service, our visitors can ask any sort of question ask how function jCalender - Date Calendar ask how function jCalender d, Halo friend, i want to ask how to make this script can run and call JCalender. I want to know how to make private this code.i has already insert plugin in my netbeans. try Ask Questions with Options Ask Questions with Options using Java In this section, we are going to ask five questions one after the other with four options to test the user. For this, we...; } public String getOp4() { return op4; } } public class AskQuestions Ask Hibernate Questions Online Ask Hibernate Questions Online  .... Feel free to ask questions on Hibernate related problems. In the move... is open for all. Ask Hibernate related Hibernate : Bulk Insert/Batch Insert This tutorial contains description of Hibernate bulk insertion(Batch insertion -insert? Hi friend, It should be neccesary to have both a namespace property and a tagged value to allow dynamic-insert and dynamic-update.... Thanks hibernate - Hibernate hibernate Hai,This is jagadhish I have a problem while developing insert application of Hibernate.The application is compiled,while running.... For read more information: Software Questions and Answers Questions - Ask Hibernate Interview questions and browser the answers... online Discuss Software development questions, ask your questions and get answers... of answers to common programming problems. Ask Questions | Browse Criteria Expression (and) | Hibernate Criteria Expression (or) | Insert Data...Home | About-us | Contact Us | Advertisement | Ask Questions...; Tutorial Section Introduction to Hibernate 3.0 | Hibernate Architecture Problem in running first hibernate program.... - Hibernate ? ----------------------------------------------------------------------- Hibernate: insert...Problem in running first hibernate program.... Hi...I am using... programs.It worked fine.To run a hibernate sample program,I followed the tutorial below code - Hibernate Hibernate code can you show the insert example of Hibernate other... of example related to hibernate... Thanks helpful Insert Data into Database Using Hibernate Native SQL Insert Data into Database Using Hibernate Native SQL... operations like insert, update, delete and select. Hibernate provides... how you can use Native SQL with hibernate. You will learn how to use Native hibernate Excetion - Hibernate the same error that Hibernate: insert into login (uname, password) values...:// It will be helpful for you...hibernate Excetion The database returned no natively generated Ask iBatis Questions Online Ask iBatis Questions Online  ... model. iBatis is also a popular framework like Hibernate... relating to programming, coding, implementing and using. Ask any iBatis hibernate sql error - Hibernate hibernate sql error Hibernate: insert into EMPLOYE1 (firstName..., Please visit the following links: Hope Ask about java Ask about java Create a java program for add and remove the details of a person, which is not using by database, a simply java program. If possible, please wil it in switch case Hibernate code - Hibernate Hibernate code firstExample code that you have given for hibernate to insert the record in contact table,that is not happening neither it is giving... inserted in the database from this Ask about looping in database Ask about looping in database Good afternoon, I want to ask something, Now i have 2 tables,name of the table is RULE and Heritage. Table heritage...=True,A2=True : code is the same data Rule and Heritage. I want to ask firstExample not inserting data - Hibernate hibernate firstExample not inserting data hello all , i followed the steps in hiberante tutorial i.e FirstExample.java as mentioned in tutorial my... for more information. Thanks.  Ask java count Ask java count Good morning, I have a case where there are tables sumborrowbook fieldnya: codebook, bookname, and sumborrowbook . I want to make the results: for example: | code book | name of book | sum | | b001 ask - Java Beginners ask dear how to "print out" into a file ? regard suhadi Hi friend, Please explain properly requirement. I am sending simple code according to your requirement. import java.io.*; public class Ask Programming Questions Online Ask Programming Questions Online With the rapid development of technology..., SOA questions, Hibernate questions, Struts questions, JavaFX questions Ask date difference Ask date difference Hello, I have a problem about how to calculate date, the result from this code is not complete , this is my code . please help me. thank you public void a(){ String date1 = jTextField33.getText(); String Ask SQL Questions Online Ask SQL Questions Online Structured Query Language in short (SQL... the user to execute, retrieve, insert, update and delete new records, new tables Association Hibernate Association 1) <bag name="product" inverse="true... name="dealer" class=" net.roseindia.Dealer" column="did" insert="false" update... cascade column insert update JSP Radio Button MySQL insert - JSP-Servlet however I wanted to ask you if there are tutorials or perhaps you can help... in the backend table there is only one column for Gender, how do I insert male Insert Image in DB through Servlet - JSP-Servlet Insert Image in DB through Servlet Dear Sir, You write me: copy this link and paste in your Url... there it will ask for save. save it extract it then use the code... service bus and then insert into database. Thanks hibernate annotations hibernate annotations to insert records into these tables. But it is trying... address_.adno=? Hibernate: insert into student_tbl (age, sname, sid) values (?, ?, ?) Hibernate: insert into address_tbl (city, street, sid, adno) values ask a user to enter 5 integer ask a user to enter 5 integer make a program that enter 5 numbers then identify the largest and the smallest number sample program 2 4 3 5 6 the smallest number: 2 the largest number: is 6 66 Hibernate - Framework Hibernate hi..... how i insert,update,delete data to Insurence table using nativesql query.i m not getting the code. thnx Insert Image in DB through Servlet - JSP-Servlet Insert Image in DB through Servlet Dear Sir, My previous Query... pre = conn.prepareStatement("insert into MyPictures values...(e.getMessage()); } } } Whether Any entry will be made in web.xml when Insert Image2ee - Hibernate that cannot insert exampleVO into database.. please help to me to solve this problem Ask Questions delete row from a table in hibernate delete row from a table in hibernate is there method to delete row in a table using hibernate like save(-) to insert row How to ask a questions to you clearly with normal english? How to ask a questions to you clearly with normal english? hi, i want to know how should or can i may ask a question. send me some format... in the same way as you have asked this question. Go to the Ask Questions part Complete Hibernate 4.0 Tutorial Hibernate Application : Insert Record using Hibernate Save Method Hibernate 4... Hibernate insert Query Hibernate polymorphic Queries... This section contains the Complete Hibernate 4.0 Tutorial Ask Programming Questions and Discuss your Problems Ask Programming Questions and Discuss your Problems  ... You Ask, read it carefully. Try to find the solutions in archive, use our... of the programs. How to Ask? Simple? Just browser the appropriate section Hibernate Architecture of the hibernate is used to select, insert, update and delete the records form... Hibernate Architecture In this lesson you will learn the architecture of Hibernate Hibernate session.refresh() method Hibernate session.refresh() method What is session.refresh() in hibernate? It is possible to re-load an object and all its collections.... When Insert data into Cat TABLE trigger update hit_count coulmn to 1 Ask JSP questions online Ask JSP questions online Facing problem in JSP? Ask to us, we... has just started a new problem solving service ‘ask question’. In our Hibernate Architecture Hibernate Architecture - Understand the architecture of the Hibernate ORM... Hibernate ORM framework. Hibernate is based on the Java technologies... cream architecture of Lite architecture in our application. Hibernate is ORM How many qusetions can you ask? How many qusetions can you ask? Hi I was very impressed following my very first question I asked regarding some coding. However I am not sure why any further questions have not yet been answered. Is this because they are more on collection mapping - Hibernate . The index informs hibernate whether a particular in-memory object is the same one as an equal on-DB object or not, so there is no need to delete or re-insert Ask Applet Questions Online Ask Applet Questions Online  ... ‘Ask Questions’. Now, you can get the quick answers of your questions... service of ‘Ask Questions’ has given you the tool to resolve your HIBERNATE HIBERNATE What is difference between Jdbc and Hibernate hibernate hibernate what is hibernate flow hibernate hibernate what is hibernate listeners Foreign key hibernate Foreign key sir, I am using hibernate in netbeans. I have... persons (P_Id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1$$ I want to insert data using set methods in orders table in feild P_Id which is foreign key. How to insert Ask PHP Questions Ask PHP Questions PHP Questions and Answers Ask PHP Questions and get answers from.... In your questions and answers section you can ask PHP questions and get delete query problem - Hibernate '] question no: 1) why table STUDENT is not mapped , for insert its work...(); Read for more information. Thanks DB Insert DB Insert How to insert XML data into a database column? Column data type is CL Tools Update Site the confirmation message and then ask for restart. After restart Hibernate tools... Hibernate Tools Update Site Hibernate Tools Update Site In this section we jdbc insert jdbc insert Hi , i want to insert a declared integer variable into a mysql table through jdbc. how to insert that. help me with query... thanks... a table there. After creating a table in database, it insert a rows in the database
http://www.roseindia.net/tutorialhelp/comment/95746
CC-MAIN-2014-52
refinedweb
1,707
57.57
Type: Posts; User: Zaccheus Hurrah, I now have access to a brand new Windows 7 laptop and it DOES run my .net v2 applications. \o/ I never got round to upgrading from VS2005 Express. :blush: Later as in 'came afterwards', i.e. 3 and 3.5. What I wanted to know was whether .net 3.5 includes all the .net 2 system assemblies which my applications are built against? Regarding testing... All I needed to know was whether .net 2 was included in the later frameworks. That's up to you - what do you want to do with the 'chance of steal' ? Ah, just found this, seems to be an emphatic yes. :) Sorry, Windows 7. :blush: Updated OP with URL I strongly suspect they do, but right now I have no way of checking. :blush: This page says .net 3.5 is CLR 2.0, does that include all the .net 2 system assemblies which my applications are built... Many years ago I defined the Dendros File Format for my hobby applications. I've had a COM based SDK for quite some time now which I've used with Gravel v3 and other projects. I'm... Yes, of course you have to. I always do. I use macros like this all the time: #define RCL_COM_OK(F_) {HRESULT r_=(F_);if(FAILED(r_)){RCL_THROW_1(RclsoftwareOrgUk::XCom,r_);}} RCL_COM_OK(... One type of bug I really hate is the one which only happens when a debug build is run in non-debug-mode. I've just now solved one of these, and boy what a nightmare it was. As already... // || // || // ________ ___\/____ ________ // | | | | | | Congratulations! :) Many types just return their name. How's it going? No, because of the return statement the second 'if' is skipped. if (isdigit(*p)) { *p='-'; return (1 + rekurzija(p+1)); } Yes, that's what I said. ;) I made a small mistake in that it should be MOVE.B for byte. A1 and A2 are CPU registers which hold addresses. MOVE (A1)+,(A2)+ means "move what is in the address... *dest++ = *src++ That was the first ever implementation by C&R, I believe. In 68K assembler, you could express that in a single instruction: MOVE (A1)+,(A2)+ That would automatically set the... By the way, do you need to unencrypt the password at all? If the user enters their password, you could encrypt what they entered and compare it with the encrypted password in the database. I'd suggest defining an enum and using ToString in order to avoid annoying typo-bugs. public enum class ResourceID { appSettingsKey }; //... string appSetting =... Files in Windows do not have standardised headers. For example a simple text file containing the words "Hello" will only be 5 bytes in length. The file extension is what tells you about the file... Also on that note ... as you move through the array, make sure that you are accessing bytes which are next to each other in memory to aid caching, eg. do one row at a time not one column at a time. I wonder if pointer function means pointer-to-function or a function which takes a pointer. That was part of the coding standards in my pevious job and over the years did trap a few mistakes.... Here is a very simplified example of what I might do in C++: --- VehicleInterface.h --- struct VehicleInterface { virtual void start()=0; virtual void run()=0; Mystery solved, at least partially. I added the following lines ... IUnknown* unknownSimple = &simple; unknownSimple->AddRef(); ... and went into the debugger in 'show disassembly' mode. COM has nothing to do with Visual Studio or MFC and is not part of the WinAPI so I thought this would be the best place to put it. Interesting comment about 'pointer to a virtual function'. ...
http://forums.codeguru.com/search.php?s=3eb23476fe73e9852958e695d9590336&searchid=7209863
CC-MAIN-2015-27
refinedweb
628
77.53
A gentle introduction to reinforcement learning or what to do when you don't know what to do Introduction Today we’re going to have a look at an interesting set of learning algorithms which does not require you to know the truth while you learn. As such this is a mix of unsupervised and supervised learning. The supervised part comes from the fact that you look in the rear view mirror after the actions have been taken and then adapt yourself based on how well you did. This is surprisingly powerful as it can learn whatever the knowledge representation allows it to. One caveat though is that it is excruciatingly sloooooow. This naturally stems from the fact that there is no concept of a right solution. Neither when you are making decisions nor when you are evaluating them. All you can say is that “Hey, that wasn’t so bad given what I tried before” but you cannot say that it was the best thing to do. This puts a dampener on the learning rate. The gain is that we can learn just about anything given that we can observe the consequence of our actions in the environment we operate in. As illustrated above, reinforcement learning can be thought of as an agent acting in an environment and receiving rewards as a consequence of those actions. This is in principle a Markov Decision Process (MDP) which basically captures just about anything you might want to learn in an environment. Formally the MDP consists of - A set of states $[s_1, s_2, …, s_M]$ - A set of actions $[a_1, a_2, …, a_N]$ - A set of rewards $[r_1, r_2, …, r_L]$ - A set of transition probabilities $[s_{11}, s_{12}, …, s_{1M}, s_{21}, s_{22}, …, s_{2M}, …, s_{MM}]$ which looks surprisingly simple but is really all we need. The mission is to learn the best transition probabilities that maximizes the expected total future reward. Thus to move on we need to introduce a little mathematical notation. First off we need a reward function $R(s_t, a_t)$ which gives us the reward $r_t$ that comes from taking action $a_t$ in state $s_t$ at time $t$. We also need a transition function $S(s_t, a_t)$ which will give us the next state $s_{t+1}$. The actions $a_t$ are generated by the agent by following one or several policies. A policy function $P(s_t)$ therefore generates an action $a_t$ which will, to it’s knowledge, give the maximum reward in the future. The problem we will solve - Cart Pole We will utilize an environment from the OpenAI Gym called the Cart pole problem. The task is basically learning how to balance a pole by controlling a cart. The environment gives us a new state every time we act in it. This state consists of four observables corresponding to position and movements. This problem has been illustrated before by Arthur Juliani using TensorFlow. Before showing you the implementation we’ll have a look at how a trained agent performs below. As you can see it performs quite well and actually manages to balance the pole by controlling the cart in real time. You might think that hey that sounds easy I’ll just generate random actions and it should cancel out. Well, put your mind at ease. Below you can see an illustration of that approach failing. So to the problem at hand. How can we model this? We need to make an agent that learns a policy that maximizes the future reward right? Right, so at any given time our policy can choose one of two possible actions namely - move left - move right which should sound familiar to you if you’ve done any modeling before. This is basically a Bernoulli model where the probability distribution looks like this $P(y;p)=p^y(1-p)^{1-y}$. Once we know this the task is to model $p$ as a function of the current state $s_t$. This can be done by doing a linear model wrapped by a sigmoid like this where $\omega$ are the four parameters that will basically control which way we want to move. These four parameters makes up the policy. With these two pieces we can set up a likelihood function that can drive our learning. where $p_t$ is defined above. This likelihood we want to maximize and in order to do that we will turn it around and instead minimize the negative log likelihood which can be solved for our simple model by setting and doing the math. However, we want to make this general enough to support more complex policies. As such we will employ gradient descent updates to our parameters $\omega$. where $\eta$ is the learning rate. This can also be considered to change over time dynamically but for now let’s keep it plain old vanilla. This is it for the theory. Now let’s get to the implementation! Implementation As the AI Gym is mostly available in Python we’ve chosen to go with that language. This is by no means my preferred language for data science, and I could give you 10 solid arguments as to why it shouldn’t be yours either, but since this post is about machine learning and not data science I won’t expand my thoughts on that. In any case, Python is great for machine learning which is what we are looking at today. So let’s go ahead and import the libraries in Python3 that we’re going to need. import numpy as np import math import gym After this let’s look at initiating our environment and setting some variables and placeholders we are going to need. env = gym.make('CartPole-v0') # Configuration state = env.reset() max_episodes = 2000 batch_size = 5 learning_rate = 1 episodes = 0 reward_sum = 0 params = np.random.normal([0,0,0,0], [1,1,1,1]) render = False # Define place holders for the problem p, action, reward, dreward = 0, 0, 0, 0 ys, ps, actions, rewards, drewards, gradients = [],[],[],[],[],[] states = state Other than this we’re going to use some functions that needs to be defined. I’m sure multiple machine learning frameworks have implemented it already but it’s pretty easy to do and quite instructional so why not just do it. ;) The python functions you’re going to need As we’re implementing this in Python3 and it’s not always straightforward what is Python3 and Python2 I’m sharing the function definitions with you that I created since they are indeed compliant with the Python3 libraries. Especially Numpy which is an integral part of computation in Python. Most of these functions are easily implemented and understood. Make sure you read through them and grasp what they’re all about. def discount_rewards(r, gamma=1-0.99): df = np.zeros_like(r) for t in range(len(r)): df[t] = np.npv(gamma, r[t:len(r)]) return df def sigmoid(x): return 1.0/(1.0+np.exp(-x)) def dsigmoid(x): a=sigmoid(x) return a*(1-a) def decide(b, x): return sigmoid(np.vdot(b, x)) def loglikelihood(y, p): return y*np.log(p)+(1-y)*np.log(1-p) def weighted_loglikelihood(y, p, dr): return (y*np.log(p)+(1-y)*np.log(1-p))*dr def loss(y, p, dr): return -weighted_loglikelihood(y, p, dr) def dloss(y, p, dr, x): return np.reshape(dr*( (1-np.array(y))*p - y*(1-np.array(p))), [len(y),1])*x Armed with these function we’re ready to do the main learning loop which is where the logic of the agent and the training takes place. This will be the heaviest part to run through so take your time. The learning loop while episodes < max_episodes: if reward_sum > 190 or render==True: env.render() render = True p = decide(params, state) action = 1 if p > np.random.uniform() else 0 state, reward, done, _ = env.step(action) reward_sum += reward # Add to place holders ps.append(p) actions.append(action) ys.append(action) rewards.append(reward) # Check if the episode is over and calculate gradients if done: episodes += 1 drewards = discount_rewards2(rewards) drewards -= np.mean(drewards) drewards /= np.std(drewards) if len(gradients)==0: gradients = dloss(ys, ps, drewards, states).mean(axis=0) else: gradients = np.vstack((gradients, dloss(ys, ps, drewards, states).mean(axis=0))) if episodes % batch_size == 0: params = params - learning_rate*gradients.mean(axis=0) gradients = [] print("Average reward for episode", reward_sum/batch_size) if reward_sum/batch_size >= 200: print("Problem solved!") reward_sum = 0 # Reset all state = env.reset() y, p, action, reward, dreward, g = 0, 0, 0, 0, 0, 0 ys, ps, actions, rewards, drewards = [],[],[],[],[] states = state else: states=np.vstack((states, state)) env.close() Phew! There it was, and it wasn’t so bad was it? We now have a fully working reinforcement learning agent that learns the CartPole problem by policy gradient learning. Now, for those of you who know me you know I’m always preaching about considering all possible solutions that are consistent with your data. So maybe there are more than one solution to the CartPole problem? Indeed there is. The next section will show you a distribution of these solutions across the four parameters. Multiple solutions So we have solved the CartPole problem using our learning agent and if you run it multiple times you will see that it converges to different solutions. We can create a distribution over all of these different solutions which will inform us about the solution space of all possible models supported by our parameterization. The plot is given below where the x axis are the parameter values and the y axis the probability density. You can see that $X_0$ and $X_1$ should be around $0$ meanwhile $X_2$ and $X_3$ should be around $1$. But several other solutions exist as illustrated. So naturally this uncertainty about what the parameters should exactly be could be taken into account by a learning agent. Conclusion We have implemented a reinforcement learning agent who acts in an environment with the purpose of maximizing the future reward. We have also discounted that future reward in the code but not covered it in the math. It’s straightforward though. The concept of being able to learn from your own mistakes is quite cool and represents a learning paradigm which is neither supervised nor unsupervised but rather a combination of both. Another appealing thing about this methodology is that it is very similar to how biological creatures learn from interacting with their environment. Today we solved the CartPole but the methodology can be used to attack far more interesting problems. I hope you had fun reading this and learned something. Happy inferencing!
http://doktormike.github.io/blog/A-gentle-introduction-to-reinforcement-learning-or-what-to-do-when-you-dont-know-what-to-do/
CC-MAIN-2018-51
refinedweb
1,785
63.9
Provided by: libroar-dev_1.0~beta11-7_amd64 NAME roar_vs_stream - Set up stream parameters for VS object SYNOPSIS #include <roaraudio.h> int roar_vs_stream(roar_vs_t * vss, const struct roar_audio_info * info, int dir, int * error); DESCRIPTION This function asks a VS object opened by roar_vs_new_from_con(3) or roar_vs_new(3) to open the data connection using the audio parameters info and the stream direction dir. This function needs to be called before data is read or written if one of the above functions is used to create the VS object. This function is also used to provide parameters for the file mode (which is started by using roar_vs_file(3) or roar_vs_file_simple(3)). To play back a file this is not needed in a common case as the VS API tries to find correct parameters. It is required for all other stream directions. See roar_vs_file(3) and roar_vs_file_simple(3) for more information. On failture this function can be called again with different parameters. PARAMETERS vss The VS object to be updated. info This is a pointer to the roar_audio_info structure storing the audio format parameters. The structure contains the following memebers: rate (sample rate), bits (bits per sample), channels (channels per frame) and codec. struct roar_audio_info info; int err; if ( roar_profile2info(&info, "isdn-eu") == -1 ) { // error handling. } if ( roar_vs_stream(vss, &info, ROAR_DIR_PLAY, &err) == -1 ) { // error handling. } SEE ALSO roar_vs_file(3), roar_vs_file_simple(3), roarvs(7), libroar(7), RoarAudio(7).
http://manpages.ubuntu.com/manpages/xenial/man3/roar_vs_stream.3.html
CC-MAIN-2019-30
refinedweb
233
57.06
C# Operator Precedence - In c# all operators have their own precedence means some will be executed first and some will be executed at the end. - In c# all operators does not have equal precedence, some operators have higher precedence than others, means those operators which has higher precedence are executed first by c# compiler, and those which has lowest precedence are executed at the end. Example: using System; namespace csharpBasic { // Start class definition / declaration. class Program { // Static main method void type declaration. static void Main(string[] args) { // Initialize an int type with value 5. int givenValue = 5; // Declare an int type result variable. int result; /* An expression which is assigned to result variable. In this expression 5 * 2 will be executed first and answer will be 10, after than, 10 will be added with givenValue which is 5 means 10 + 5 and the correct answer will be 15 because Multiplication has high precedence than addition. */ result = givenValue + 5 * 2; // Print result. Console.WriteLine("5 + 5 * 2 = {0} ", result); Console.ReadKey(); } // End of main method definition. } // End of class. } Table describes the order of operator’s precedence in C#. In this table the operator which is defined at top has highest priority means these operators executed first in an expression and the operators which is defined in bottom has lowest priority:
https://tutorialstown.com/csharp-operator-precedence/
CC-MAIN-2018-22
refinedweb
220
55.84
Subject: Re: [boost] [range] #11202: boost.sort header conflicts with boost.range header From: Groke, Paul (paul.groke_at_[hidden]) Date: 2018-09-03 09:53:35 > -----Original Message----- > From: Boost <boost-bounces_at_[hidden]> On Behalf Of Andrey > Semashev via Boost > Sent: Montag, 3. September 2018 11:22 > Subject: Re: [boost] [range] #11202: boost.sort header conflicts with > boost.range header > > I'm not a native speaker, but I don't think "sort", in the meaning the library > puts in it, has a plural form as it is a verb. "Sorting" might be an alternative. Boost.Move has a similar situation and uses namespace boost::movelib. Therefor I think the originally suggestion, boost::sortlib, isn't such a bad idea. I don't really *like* the name, but it would be consistent with Boost.Move. That aside, I think boost::sorting is a good name. Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk
https://lists.boost.org/Archives/boost/2018/09/243207.php
CC-MAIN-2019-39
refinedweb
166
71.21
Opened 7 years ago Closed 7 years ago Last modified 5 years ago #13679 closed (fixed) ModelForms (and hence the admin) no longer honor the default value for a ForeignKey Description In Django 1.1, it was possible to use a callable to set the default value on a ForeignKey field. This functionality was broken in r12721 and doesn't currently work in Django 1.2. Example: def get_default(): return SomeModel.objects.get(id=5) class Test(models.Model): foo = models.ForeignKey(SomeModel, default=get_default) This model should display in the admin with the default SomeModel already selected in the drop-down box. The ModelForm code that does this seems to have been confused by the changes made in r12721. The code in the Field class in django/db/models/fields/__init__.py could also do with a cleanup: formfield() first checks has_default() before calling get_default(), which also checks has_default(). The patch in r12721 adds to this duplication of logic by checking if self.default is callable, which is also done by get_default(). Attachments (1) Change History (6) Changed 7 years ago by comment:1 Changed 7 years ago by comment:2 Changed 7 years ago by Confirmed that the bug exists, and is a regression from 1.1.1->1.1.2. Which means we're going to have a discussion about whether this is enough to simulate a 1.1.3. I'm working on a patch; the issue is that the initial value is being rendered as unicode(value), but this results in the unicode representation of the object, not the primary key value when the callable returns a queryset. We need special handling here for ModelChoiceField et al, probably in the form of a specialized subclass of HiddenInput that can do the same input manipulation that ModelChoiceIterator does. comment:3 Changed 7 years ago by comment:4. comment:15 Changed 5 years ago by Milestone 1.3 deleted i've attached a simple test case: it's a tarball of a django project called modelform, which contains an app called testing. the only files i've modified from the defaults created by "django-admin.py startproject" and "./manage.py startapp" are settings.py (db is set to sqlite), models.py, and tests.py. running "./manage.py test" passes under django 1.1.1 and fails under 1.1.2 and 1.2.1.
https://code.djangoproject.com/ticket/13679
CC-MAIN-2017-09
refinedweb
397
66.94
ios #include <iostream.h> As the iostream class hierarchy diagram shows, ios is the base class for all the input/output stream classes. While ios is not technically an abstract base class, you will not usually construct ios objects, nor will you derive classes directly from ios. Instead, you will use the derived classes istream and ostream or other derived classes. Even though you will not use ios directly, you will be using many of the inherited member functions and data members described here. Remember that these inherited member function descriptions are not duplicated for derived classes. Data Members (static) — Public Members Mask for obtaining the conversion base flags (dec, oct, or hex). Mask for obtaining the field padding flags (left, right, or internal). Mask for obtaining the numeric format (scientific or fixed). Construction/Destruction — Public Members Constructor for use in derived classes. Virtual destructor. Flag and Format Access Functions — Public Members Sets or reads the stream’s format flags. Manipulates the stream’s format flags. Clears the stream’s format flags. Sets or reads the stream’s fill character. Sets or reads the stream’s floating-point format display precision. Sets or reads the stream’s output field width. Status-Testing Functions — Public Members Indicates good stream status. Indicates a serious I/O error. Indicates end of file. Indicates a serious I/O error or a possibly recoverable I/O formatting error. Returns the stream’s error flags. Sets or clears the stream’s error flags. User-Defined Format Flags — Public Members Provides a mask for an unused format bit in the stream’s private flags variable (static function). Provides an index to an unused word in an array reserved for special-purpose stream state variables (static function). Converts the index provided by xalloc to a reference (valid only until the next xalloc). Converts the index provided by xalloc to a pointer (valid only until the next xalloc). Other Functions — Public Members Controls the connection of streambuf deletion with ios destruction. Gets the stream’s streambuf object. Synchronizes the predefined objects cin, cout, cerr, and clog with the standard I/O system. Ties a specified ostream to this stream. Operators — Public Members Converts a stream to a pointer that can be used only for error checking. Returns a nonzero value if a stream I/O error occurs. ios Manipulators Causes the interpretation of subsequent fields in decimal format (the default mode). Causes the interpretation of subsequent fields in hexadecimal format. Causes the interpretation of subsequent fields in octal format. Sets the stream’s mode to binary (stream must have an associated filebuf buffer). Sets the stream’s mode to text, the default mode (stream must have an associated filebuf buffer). Parameterized Manipulators (#include <iomanip.h> required) Sets the stream’s format flags. Resets the stream’s format flags. Sets the stream’s fill character. Sets the stream’s floating-point display precision. Sets the stream’s field width (for the next field only). Abstract Stream Base Class See Also istream, ostream
http://msdn.microsoft.com/en-us/library/aa277347(v=vs.60)
CC-MAIN-2013-48
refinedweb
502
60.61
Hi, I'm trying to develop a plugin to automate creation of split views within the editor. In Sublime Text this is exposed through the concepts of 'groups'. I can use sublime.Window.active_group() sublime.Window.num_groups() sublime.Window.focus_group(group) sublime.Window.set_view_index(view, group, index) To move views between existing 'groups', but can't seem to figure out how to create new ones. Here is my attempt at switching to the next active group in my plugin (which works): class NextGroupCommand(sublime_plugin.TextCommand): def run(self, edit): st_window = self.view.window() # get new group to move to new_grp = st_window.active_group() + 1 if new_grp >= st_window.num_groups(): new_grp = 0 # move to new group st_window.focus_group(new_grp) I want to also be able to create a new group and then create a new view into the current file in that group. Here is my (non-working) attempt: class SplitLeftRightCommand(sublime_plugin.TextCommand): def run(self, edit): st_window = self.view.window() print st_window.active_group() print st_window.num_groups() if st_window.num_groups() > 1: st_window.run_command('layoutSingle') st_window.run_command('layoutDoubleHoriz') print st_window.num_groups() st_window.run_command('newViewIntoFile') st_window.set_view_index(st_window.active_view(), 1, 0) st_window.focus_group(1) The following lines don't work, probably as I am calling them in the wrong way: st_window.run_command('layoutSingle') st_window.run_command('layoutDoubleHoriz') Does anyone have any idea how to create new splits (or 'groups') in the editor? Thanks for your help! Best, Ken I'm curious where you located these commands: st_window.run_command('layoutSingle') st_window.run_command('layoutDoubleHoriz') Is there a list of these somewhere? If views follow the way the ST interface works then you cannot create a new group. You would need to use run_command to replicate the following key-binding behaviour: "keys": "alt+shift+1"], "command": "set_layout", "args": { "cols": [0.0, 1.0], "rows": [0.0, 1.0], "cells": [0, 0, 1, 1]] } }, But someone with experience of this may correct me Hi agibsonsw, Thanks so much for this. I got the 'layoutSingle' and 'layoutDoubleHoriz' commands from the following page: sublimetext.com/docs/commands Although I don't think the page is related to the API. Given the lack of API documentation available at present, and having just started dabbling in this today, I was happy to take what I could find though I tried using run_command with the set_layout command as you suggested, and it looks like it works fine. Here is the updated, fixed and now working version of the 'split_left_right' command posted before: class SplitLeftRightCommand(sublime_plugin.TextCommand): def run(self, edit): st_window = self.view.window() print st_window.active_group() print st_window.num_groups() st_window.run_command('set_layout',{ 'cols': [0.0, 0.5, 1.0], 'rows': [0.0, 1.0], 'cells': [0, 0, 1, 1], [1, 0, 2, 1]] }) print st_window.num_groups() st_window.run_command('newViewIntoFile') st_window.set_view_index(st_window.active_view(), 1, 0) st_window.focus_group(1) It's useful to know that run_command takes the same format of commands as those used in the keybindings files – am sure this will come in useful for my continued ventures into plugin development If anyone knows of any better way of doing this, then I'd be very interested However, this approach seems to work, so am very happy with using it for now. By the way, I'm throwing together a plugin to emulate 'emacs style' window splitting using the standard emacs keybindings. Will try and make a release when I'm done and it all goes well. Thanks again! You could utilise the macro recorder as well. These will create a sequence of command calls. Then you need to work out what can be achieved via the API and what is simpler to achieve with run_command(). You might also consider (if you haven't already) the difference between WindowCommand and TextCommand. As I understand, WindowCommand is generally applicable within the window, whereas a TextCommand is specific to a particular view. There is an ApplicationCommand as well but I've not used it myself. Thanks again agibsonsw! Was trying to use the macro recorder too, but for some reason the 'View->Layout->2 Columns' etc. commands don't seem to be recorded Am sure it's a good tip for when it does work though! By the way, this may be being a little ambitious, but does anyone have any idea how to do the opposite and get the current layout of groups on the screen? Or perhaps more generally, are there any commands at all that return values from 'run_command'? Would be nice if there was a 'get_layout' command to mirror 'set_layout', but it seems like there isn't Thanks for your time! ST-API reference There is another, community, version of this but I don't have the address for it.
https://forum.sublimetext.com/t/adding-removing-groups-splits/7544/6
CC-MAIN-2016-44
refinedweb
779
58.69
Hi, 2016-09-21 17:55 GMT+02:00 Sam Whited <s...@samwhited.com>: > ### OMEMO Axolotl / Olm > > - Dave Cridland wonders if we can unblock OMEMO which has remained a proto-XEP > due to a dependency on a proprietary protocol by switching from Axolotl to > Olm. Tobias, Lance, and MattJ agree. > - SamWhited wonders if Olm has an audit like OMEMO and TextSecure and what the > license of the Olm spec is (known implementation is Apache). Advertising The spec is public domain "The Olm specification (this document) is hereby placed in the public domain." from The implementation is Apache as Sam correctly pointed out. My personal concern is that it is written in an unsafe language. Olm to my knowledge (from a conversation with Matthew a few weeks back) hasn't been audited yet however they are interested in getting it audited. The problem with OMEMO right now is that everyone who is serious about implementing it for now doesn't care about the GPL restriction. And going forward with libsignalprotocol instead of libolm is the path of least resistance for everyone involved. I fully agree that a potential XEP should not be based upon the unfree libsignalprotocol but without a proper (Java) library available moving to olm has very bad cost-benefit ratio for me personally. So my suggestion would be to standardize it around Olm and ignore the fact that at least for a while most implementations will remain in the 'converstions' namespace that uses libsignal instead of the proper libolm. cheers Daniel _______________________________________________ Standards mailing list Info: Unsubscribe: standards-unsubscr...@xmpp.org _______________________________________________
https://www.mail-archive.com/standards@xmpp.org/msg15787.html
CC-MAIN-2016-40
refinedweb
264
51.99
Happy New Year Ladies(?) and Geeks Trying to get the year off to a good start, I'm posting up my solution for the ninth Project Euler problem. I'm not going to spend a lot of time talking about it, because the solution is a pretty easy one. Here is the code in Python: #!/usr/bin/python3"""python solution for project euler problem #9.""" print( [a*b*(1000 - b -a) for a in range(1,500+1) for b in range(1,500+1) \ if a * a + b * b == ((1000 -b -a) * (1000 - b - a))][0]) And here is the code in Haskell: module Main where main :: IO()main = print . head $ [a*b*(1000-b-a) | a <- [1..500] , b <- [1..500], a ^ 2 + b ^ 2 == (1000 - b - a) ^ 2] See, it really is that simple. There really isn't anything interesting between to the solutions, but I would like to make a quick note on the luxury of being able to use “head” in Haskell to simplify the whole process. In the Python solution, the answer is generated twice, that's just the nature of the algorithm, and to just get one number, I just ask for the first item in the list. Thanks to Haskell's lazy evaluation, I only have to calculate the answer once, and I think this may be reflected in the run times. So now the part that I know everyone loves to read the most, Times: python-2.6.6 : .165s python-3.1.2 : .110s haskell(runghc) : 1.921s haskell(compiled) : .086s [user@server ~]$cat euler_9.py #!/usr/bin/env python """ python solution for project euler problem #9. """ import numpy as np from datetime import datetime as time t0 = time.now() print( [a*b*(1000 - b -a) for a in np.arange(1,500+1) for b in np.arange(1,500+1) \ if a * a + b * b == ((1000 -b -a) * (1000 - b - a))][0]) print time.now()-t0 [user@server ~]$python euler_9.py 31875000 0:00:02.703267 I guess it depends on the machine as well... Thanks for the comment John, I'm a little confused why I would want to use numpy's arange instead of pythong's builtin range function. What are the benefits of arange over range? Weirdly, it seems that the plain old dumb way of coding is faster than all others. def dumb_solution(): for a in range(1, limit + 1): for b in range(1, limit + 1): c = 1000 - b - a if a * a + b * b == c * c: return a * b * c Even more weirdly, the use of xrange slows down the computation! by using: (1000 - b - a) ** 2 instead of: (1000 - b - a) * (1000 - b - a) Not sure what is the effect on run time You know Gaetan, I tried that. But just as a little "I wonder" moment. Doing it my way actually turned out to have lower run times on my machine. Granted these weren't huge differences, and your version is MUCH more readable and maintainable. I wanted to post the correct code for my runtimes. I will also admit that I find it kind of weird that my run times would be affect by such a change. But then, my run times aren't exactly accurate. Combining Jack's suggestion with my own: s="(a*b*(1000 - b -a) for b in xrange(1,500+1) for a in xrange(b,500+1) if a * a + b * b == ((1000 -b -a) * (1000 - b - a))).next()" s="(a*b*(1000 - b -a) for b in xrange(1,500+1) for a in xrange(b,500+1) if a * a + b * b == ((1000 -b -a) * (1000 - b - a))).next()" (C)Python 2.6.4: >>> min(timeit.Timer(s).repeat(100, 10)) 0.28002095222473145 pypy 1.4.1 (Python 2.5.2): >>>> min(timeit.Timer(s).repeat(10000, 10)) 0.0070629119873046875 For reference, using your original python statement on (C)Python 2.6.4: >>> min(Timer(s).repeat(100, 10)) 0.88044905662536621 To find the first matching item and stop use python generator comprehensions. These print the same thing but the second version stops when it hits 3. print [x for x in range(10) if x == 3][0] print (x for x in range(10) if x == 3).next() Now your python version should be as fast as the Haskell version. Thanks for that code and the idea of using generators Jack. Those generators are definitely something I need to put into my python toolbox. print( [a*b*(1000 - b -a) for b in xrange(1,500+1) for a in xrange(b,500+1) if a * a + b * b == ((1000 -b -a) * (1000 - b - a))][0]) Thanks for the improvement Benjamin, that enhancement alone but my runtime in half. If you made it this far down into the article, hopefully you liked it enough to share it with your friends. Thanks if you do, I appreciate it.
http://scrollingtext.org/project-euler-problem-9
CC-MAIN-2014-41
refinedweb
827
83.15
Hello All, I am trying to import test data using hdbtable. For this i created hdbtable,one csv file consists of 40k records and hdbti file which ha s below coding. import = [ { hdbtable = "x.template.data::Machine"; file = "x.template.data:Machine.csv"; header = false; delimField = ","; delimEnclosing = "\""; } ]; Now my issue is when iam trying to import all 40 k records the database table is updating with all 40 k records but the order of inserting rows is not same as my csv file. Could anybody please help me to resolve my issue. I think this is wrongly tagged with 'SAP HANA Vora' but should go to Hana. Add comment
https://answers.sap.com/questions/70717/issue-with-hdbti-table-import.html
CC-MAIN-2019-04
refinedweb
109
73.78
hey guys, so i just started learning java and had some error in my first array code. Error: Could not find or load main class Being. I use eclipse if that helps, because i read that these problems might be that ecplise cannot find the class, so just making sure it's not from the code. Any criticism on my code is highly accepted as i want to start Java with a good basic knowledge :) Thanks in advance. public class Being { public static void main(String[] args) { int rowNum=12; int colNum=24; String g; String [][] map = new int[rowNum][colNum]; for (int i=0;map.length; i++) map[i][map[i].length] = g; for (int rowNum=0; rowNum < map.length; rowNum++) { for (int colNum=0; colNum < map[rowNum].length; colNum++) System.out.printf("%d ", map[rowNum][colNum]); } } }
https://www.daniweb.com/programming/software-development/threads/485173/array-learning-help
CC-MAIN-2017-09
refinedweb
138
83.86
How to use Volatile keyword in Java What is Volatile variable in Java and when to use Volatile variable in Java is famous multi-threading interview question in Java interviews. Though many programmer knows what is a volatile variable but they fail on second part i.e. where to use volatile variable in Java as its not common to have clear understanding and hands-on on volatile in Java. In this tutorial we will address this gap by providing simple example of volatile variable in Java and discussing some when to use Volatile variable in Java. Any way int or boolean variable you can declare them as volatile variable. From Java 5 along with major changes like Autoboxing, Enum, Generics and Variable arguments , Java introduces some change in Java Memory Model (JMM), Which guarantees visibility of changes made by one thread to another also as "happens-before" which solves the problem of memory writes that happen in one thread can "leak through" and be seen by another thread. Java volatile keyword cannot be used with method or class and it can only be used with variable. Java volatile keyword also guarantees visibility and ordering , after Java 5 write to any volatile variable happens before any read into volatile variable. By the way use of volatile keyword also prevents compiler or JVM from reordering of code or moving away them from synchronization barrier. This Java tutorial on Volatile keyword . Example of volatile keyword in Java: To Understand example of volatile keyword in java let’s go back to Singleton pattern in Java and see double checked locking in Singleton with Volatile and without volatile keyword in java. /** * first request comes. If we do not make _instance variable volatile then content of memory between threads. Let’s see another example of volatile keyword in Java: private boolean bExit; while(!bExit) { checkUserPosition(); updateUserPosition(); }) Volatile variable can be used as an alternative way of achieving synchronization in Java in some cases, like Visibility. with volatile variable its guaranteed that all reader thread will see updated value of volatile variable once write operation completed, without volatile keyword different reader thread may see different values. 3) volatile variable can be used to inform compiler that a particular field is subject to be accessed by multiple threads, which will prevent compiler from doing any reordering or any kind of optimization which is not desirable in multi-threaded environment. Without volatile variable compiler can re-order code, free to cache value of volatile variable instead of always reading from main memory. like following example without volatile variable may result in infinite loop private boolean isActive = thread; public void printMessage(){ while(isActive){ System.out.println("Thread is Active"); } } public void printMessage(){ while(isActive){ System.out.println("Thread is Active"); } } without volatile modifier its not guaranteed that one Thread see the updated value of isActive from other thread. compiler is also free to cache value of isActive instead of reading it from main memory in every iteration. By making isActive a volatile variable you avoid these issue. 4) Another place where volatile variable can be used is to fixing double checked locking in Singleton pattern. As we discussed in Why should you use Enum as Singleton that double checked locking was broken in Java 1.4 environment. Important points on Volatile keyword in Java 1. volatile keyword in Java is only application to variable and using volatile keyword with class and method is illegal. 2. volatile keyword in Java guarantees that value of volatile variable will always be read from main memory and not from Thread's local cache. 3. In Java reads and writes are atomic for all variables declared using Java volatile keyword (including long and double variables). 4. Using use of volatile keyword in Java. 7. An access to a volatile variable in Java never has chance to block, since we are only doing a simple read or write, so unlike a synchronized block we will never hold on to any lock or wait for any lock. 8. Java volatile variable that is an object reference may be null. 9. Java volatile keyword doesn't means atomic, its common misconception that after declaring volatile ++ will be atomic, to make the operation atomic you still need to ensure exclusive access using synchronized method or block in Java. 10. If a variable is not shared between multiple threads no need to use volatile keyword with that variable. Difference between synchronized and volatile keyword in Java Difference between volatile and synchronized is another popular core Java question asked in multi-threading and concurrency interviews. Remember volatile is not a replacement of synchronized keyword but can be used as an alternative in certain cases. Here are few differences between volatile and synchronized keyword in Java. 1. Volatile keyword in java is a field modifier, while synchronized modifies code blocks and methods. 2. Synchronized obtains and releases lock on monitor’s java volatile keyword doesn't require that. 3. Threads in Java can be blocked for waiting any monitor in case of synchronized, that is not the case with volatile keyword in Java. 4. Synchronized method affects performance more than null object but your volatile variable in java could be null. 7. From Java 5 Writing into a volatile field has the same memory effect as a monitor release, and reading from a volatile field has the same memory effect as a monitor acquire In Summary volatile keyword in Java is not a replacement of synchronized block or method but in some situation is very handy and can save performance overhead which comes with use of synchronization in Java if you like to know more about volatile I would also suggest to go thorough FAQ on Java Memory Model here which explains happens-before operations quite well. Other Java concurrency tutorials from Javarevisited you may like 33 comments : This one is a Gem Javin!!! Keep up the good work. Anand. hi, what is difference between volatile and synchronized keyword in java ? Can we use volatile in place of synchronized ? what will happen if we don't make variable volatile in Java ? Hi Anonymous, Volatile and Synchronized are completely different with each other. you can not use volatile keyword with methods while synchronized keyword can be used. similarly synchronized keyword can not be applied to variable while you can make variable volatile. to read more about synchronized read my post How Synchronization works in Java Great post..Thanks Why not we can use volatile keyword with method ? why only variable needs to be volatile ? yes it may look some insane questions but I just want to know basics of volatile keyword ? "atomic for reference variables are for most" should be "atomic for reference variables AND for most " "Jeremy's blogpost about volatility , he" contains unnecessary spaces before the coma. Volatile in Java is more of a documentation keyword, I never seen much usage of volatile keyword in most of project, what I have seen is synchronized and synchronized. Hi, For understanding and testing purpose I write a small pice of code as following: VolatileTest.java ------------------- public class VolatileTest extends Thread { private volatile int testValue; private volatile boolean ready; public VolatileTest(String str) { super(str); } public void run() { for (int i = 0; i < 3; i++) { try { if (getName().equals("T1")) { ready = true; testValue = i; System.out.println(getName() + " :: " + ready + " :: " + testValue); } if (getName().equals("T2")) { System.out.println(getName() + " :: " + ready + " :: " + testValue); } Thread.sleep(1000); } catch (InterruptedException exception) { exception.printStackTrace(); } } } } TestVol .java -------------- public class TestVol { public static void main(String[] args) { new VolatileTest("T1").start(); new VolatileTest("T2").start(); } } I am getting following output: T1 :: true :: 0 T2 :: false :: 0 T1 :: true :: 1 T2 :: false :: 0 T1 :: true :: 2 T2 :: false :: 0 Can you please help me to understand, why this result is comming. As per my understanding, I should get "T2 :: true :: 0" (second line). Regards, Aban Hi Aban, line 2 is correct since you are using two separate object of VolatileTest default value for boolean ready is false which is displaying. try using one object and share it between two threads. So to me it only makes sense using VOLATILE with a static field, is this assumption right? As in Aban example, there is no need for testValue and ready being volatile because each instance of thread would have its own version of these fields, it's not shared between them. you double-check-lock in the singleton, but it states on the java sun documentation (which you've linked to) that this doesnt work... love the blog though Hi Chris, Thanks for your comment. double check lock example will not work prior to Java5 but with change in Java memory model and guarantee provided by volatile keyword in Java , double checked locking will work if we make Singleton instance volatile. as I have mentioned in point 5 "From Java 5 changes to a volatile variable are always visible to other threads" This covers the issues well. I would comment that the simplest singleton pattern is enum Singleton { INSTANCE; } its thread safe and lazy loading. Very Nice Article Javin....thnx for sharing the Java5 Thread Model...its really helpful.. @Unknown,Thanks for comment. Glad to know that you like this Java volatile example and tutorial. you may like my other post on threading as well e.g. Why wait and notify are defined in Object class I read your blog often, however, I think you made a mistake in the following line "....all other thread will not be able to see value of _instance as not null and they will believe its still null." It should be more like " all other threads will see the partially constructed value of _instance and return the value thinking it is not null." This is according to wikipedia.. Can a volatile variable in Java be static ? If not why ? What difference it make to mark a volatile variable final ? As others have pointed out this blog is misleading. Volatile in your example has nothing to do with ensuring the field is non-null (this guarantee would actually cause a problem in the original Java memory model - see link below). As I found this blog by googling "java volatile" people are probably reading it and getting incorrect information. The example you provided requires a volatile because the reading of a volatile (assuming later Java memory model) guarantees that a previous write to the volatile has completed, and this in turn guarantees the object was constructed completely because of "as-if-serial" preservation and its rules regarding volatile. Without a volatile, _instance could be written to in a thread and "leaked" out of its local memory into another thread before the object is constructed fully, because "as-if-serial" rules in that case would allow reordering within the thread as long as that thread isn't affected. You should read this and re-write the blog (or just link to this page which explains it anyway): It also explains why you probably shouldn't bother with double checked locking, something missing here. This is very good stuff. You are a good programmer, Javin. There are not many like you out there. My sincere thanks to you for this article. It helps many people understand the details. This is not true Jatin -> 3. In Java reads and writes are atomic for all variables declared using Java volatile keyword (including long and double variables). To make read/ write automatic you need to you CAS operation which are implemented using Atomic*** in Java 1.5 concurrent package or last choice is explicit synchronization. Do you know the difference between Hashtable (synchronized) and Volatile HashSet (seems also synchronized)? Hi I like java but after reading your posts I started loving it :) Gr8 explantion!! Thank you for your post! my question is: in your double locking example, if using volatile, do we still need to use synchronised block? it sounds like when thread A is calling 'getInstance()' for the first time, it will have the right to create the _instance obj. if other threads are trying to call getInstance(), they will find out A is modifying _instance and need to wait for thread A until it finishes the instantiation. Is that right? @Anonymous, yes, you need to use synchronized block to ensure that multiple instance of same object is not created. By making singleton instance volatile, you are ensuring that you don't see half backed object, this was the problem before Java introduces memory model and happens before rule. As per happens-before rule, Write to volatile variable happens before every subsequent read of that volatile variable. what do you mean by after creation lost the CPU Amazing explanation! Thanks for that. In the differences section point 5, you say that - "synchronized synchronizes the value of all variable between thread memory and "main" memory" Isn't this incorrect ? If it was true, then there would be no need for Volatile keyword. (Since volatile is always used in conjunction with synchronized) No, that's right and you don't need to use volatile keyword along with synchronized, they are for different purpose. volatile variable offers happens before guarantee that any write on volatile variable happens before subsequent read on that variable. It's different than synchronized keyword because it's doesn't provide mutual exclusion, and only gives visibility and ordering guarantee. Thanks Javin. - In the case of double checked locking in Singleton patten. What is the need to declare a variable volatile, if the synchronized keyword takes care of synchronizing the value of all variable between thread memory and "main memory" ? Read more: Ok. In such case, lets tak what is the need of declaring That's a good question Anonymous. If you look at code for double checked locking, you will see that first check is done outside synchronized block i.e. without any synchronization, which means, while one thread is initializing variable inside synchronized block, other thread can see half initialized Singleton instance, because first check is without any guarantee. By making _instance variable volatile, you ensure that write happens before read, which means when another thread reads _instance value, it won't see half initialized object. Hope this clears your doubt. Thanks Javin. Very nicely explained. God bless you! In one of the interview, I was asked that can we make an array volatile in Java? and they further grilled me on this i.e. will reading elements from array is volatile operation or not, what are the volatile read in case of array etc. I managed to answer that, because we can definitely make any array volatile but only assignment to array reference variable is volatile write e.g. private volatile int[] numbers = new int[10]; is a volatile read operation and guarantees happens before relationship, but changing individual index is not a volatile write operation. The volatile modifier tells the compiler that the variable modified by volatile can be changed unexpectedly by other parts of your program. One of these situations involves multithreaded programs. In a multithreaded program, sometimes two or more threads share the same variable. For efficiency considerations, each thread can keep its own, private copy of such a shared variable
http://javarevisited.blogspot.com/2011/06/volatile-keyword-java-example-tutorial.html
CC-MAIN-2013-48
refinedweb
2,534
61.97
The QTabBar class provides a tab bar, e.g. for use in tabbed dialogs. More... #include <QTabBar> Inherits QWidget.: For subclasses, you might also need the tabRect() functions which returns the visual geometry of a single tab. See also QTabWidget. This enum type lists the built-in shapes supported by QTabBar. Treat these as hints as some styles may not render some of the shapes. However, position should be honored. This property holds the number of tabs in the tab bar. Access functions: This property holds the index of the tab bar's visible tab. Access functions: This property holds. This property holds. This property holds the size for icons in the tab bar. The default value is style-dependent. iconSize is a maximum size; icons that are smaller are not scaled up. This property was introduced in Qt 4.1. Access functions: See also QTabWidget::iconSize. This property holds the shape of the tabs in the tab bar. Possible values for this property are described by the Shape enum. Access functions: This property holds whether or not a tab bar should use buttons to scroll tabs when it has many tabs. When there are too many tabs in a tab bar for its size, the tab bar can either choose to expand it's. Creates a new tab bar with the given parent. Destroys the tab bar. Adds a new tab with text text. Returns the new tab's index. This is an overloaded member function, provided for convenience. Adds a new tab with icon icon and text text. Returns the new tab's index. This signal is emitted when the tab bar's current tab changes. The new current has the given index. Initialize option with the values from the tab at tabIndex. This method is useful for subclasses when they need a QStyleOptionTab or QStyleOptionTabV2, but don't want to fill in all the information themselves. This function will check the version of the QStyleOptionTab and fill in the additional values for a QStyleOptionTabV2. See also QStyleOption::initFrom() and QTabWidget::initStyleOption(). Inserts a new tab with text text at position index. If index is out of range, the new tab is appened. Returns the new tab's index. This is an overloaded member function, provided for convenience.. Returns true if the tab at position index is enabled; otherwise returns false. Removes the tab at position index. Sets the data of the tab at position index to data. See also tabData(). If enabled is true then the tab at position index is enabled; otherwise the item at position index is disabled. See also isTabEnabled(). Sets the icon of the tab at position index to icon. See also tabIcon(). Sets the text of the tab at position index to text. See also tabText(). Sets the color of the text in the tab with the given index to the specified color. If an invalid color is specified, the tab will use the QTabBar foreground role instead. See also tabTextColor(). Sets the tool tip of the tab at position index to tip. See also tabToolTip(). Sets the What's This help text of the tab at position index to text. This function was introduced in Qt 4.1. See also tabWhatsThis(). Returns the index of the tab that covers position or -1 if no tab covers position; This function was introduced in Qt 4.3. Returns the datad of the tab at position index, or a null variant if index is out of range. See also setTabData(). Returns the icon of the tab at position index, or a null icon if index is out of range. See also setTabIcon(). This virtual handler is called after a new tab was added or inserted at position index. See also tabRemoved(). This virtual handler is called whenever the tab layout changes. See also tabRect(). Returns the visual rectangle of the of the tab at position index, or a null rectangle if index is out of range. This virtual handler is called after a tab was removed from position index. See also tabInserted(). Returns the size hint for the tab at position index. Returns the text of the tab at position index, or an empty string if index is out of range. See also setTabText(). Returns the text color of the tab with the given index, or a invalid color if index is out of range. See also setTabTextColor(). Returns the tool tip of the tab at position index, or an empty string if index is out of range. See also setTabToolTip(). Returns the What's This help text of the tab at position index, or an empty string if index is out of range. This function was introduced in Qt 4.1. See also setTabWhatsThis().
http://doc.trolltech.com/4.3/qtabbar.html
crawl-002
refinedweb
791
78.35
On Wed, 2005-08-31 at 00:17 +0200, martin f krafft wrote: > Could you please elaborate on this? Hmm. Where to start :0. perhaps with storage. bzr currently stores the different variations of each file that is versioned in 'stores', which are a collection of files named by their hash, gzipped. (Its been doing this since January). We're about to migrate to using a thing called a 'weave', which linear time annotation with respect to the number of line variations in a file. Once we've done this transition, the storage will look somewhat like sccs. When a commit occurs, a minimum of 2 file alterations occur: - we create a new 'revision' file which records the date, user, log message, and a reference to an inventory of the tree at the time of the commit. - we append the hash of the revision to the revision-history file in the .bzr directory. - If the shape of the tree has changed - if files have been altered or added or deleted - then we record a new inventory for the tree, which has the full shape of the tree. The storage we use works fine on windows, Mac OS X, and on Un*x. It also works happily over sftp and http - no smart server is required. (We have plans for an optional smart server post release). So this looks rather like a 'snapshot' based system. However, we use persistent unique file identifiers to track renames and to allow merging between branches with files that have been renamed, without needing to calculate back in time for the current name of the file. (This was one of the key things GNU Arch does that bazaar-NG has incorporated). Merges are tracked at both the file and revision level - a file has ancestors of its own. Thus the system can represent a merge of a single file from a remote branch without a full merge occuring, OR a partial merge where some changes are deferred - neither rejected nor accepted. We haven't taken full advantage of this capability yet, but I think it will make working with cherry picking scenarios very enjoyable. Branches are identified by value - if two branches have the same revision-history they are identical, we can identify common prefixes to identify where divergence has occured, and with the symmetrical parents of revisions we can join branches up again when they have converged. Branching can be as simple as a 'cp -al' from one directory to another, or you can use the builtin 'branch' command which brings over only the history for the one branch to your new branch ('stores' can share data for many branches). What else - oh, we have plain text diffs for use in sending to mailing lists, there is no namespace for branches - you manage them just like one can manage directories on disk, we're optimising for the common case in most operations (though identifying that can be troublesome). We have designs for supporting a 'CVS-style' operation where there is a common branch many people commit directly to. The library code essentially supports this now, but there is no UI to configure a tree to use it. Hope this helps.. Rob -- GPG key available at: <>. Attachment: signature.asc Description: This is a digitally signed message part
https://lists.debian.org/debian-devel/2005/08/msg01890.html
CC-MAIN-2015-27
refinedweb
551
68.2
This is your resource to discuss support topics with your peers, and learn from each other. 06-22-2010 09:55 AM I have a singleton that has an array that I want to access from multiple threads. I set the array as volatile and initialize it to some values when the singleton is first created. When my app starts up, I create a thread that periodiclly checks what the user is doing and adds values to this array. I have a screen that when it displays, it lists all the values in this array. The thread and the screen are getting two different instances of the singleton. The entries added in the thread are not shown on the screen. Any time the screen displays it shows what the array has when the object is first initialized. When I debug this, any calls the screen makes to the get the array from the singleton result in it being created again. Is this not possbile to share data across threads? This is how I create the instance on the singleton: private static volatile DataAccess instance = new DataAccess(); I created a simple java file that creates three threads and uses the same object I am using in the blackberry app and it all works fine. Is there something particular aboue Screens that makes them not play nice with threads? Thanks for any suggestions. Solved! Go to Solution. 06-22-2010 09:58 AM singletons work differently on blackberry as the static context is not shared between application instances. you can use the runtimestore to create a real singleton or to create a shared service, or use global events to communicate between processes. 06-22-2010 11:52 AM Screens behave the same as any other object when it comes to sharing data across threads. It sounds like this DataAccess object is (supposed to be) a singleton accessed from multiple threads within a single application instance, not something shared across multiple instances. RuntimeStore isn't going to help in that case. I suggest that you post code showing how the various threads are gaining references to the singleton and accessing the contents. I'm concerned that you are using an incorrect model of cross-thread data access. For instance, the volatile modifier is probably wrong (but harmless)--the reference to a DataAccess object shouldn't be changing if it's a singleton. 06-22-2010 06:06 PM So, Static data is not shared between threads? This is all within the same application or at least I think it is. When the blackberry starts up I create the thread that periodicly updates the data then, when a menu button is clicked, the screen tries to display this data, but the static object that the the screen is trying to get the data from is always created a new when access from the screen. What I need to do is to be able to update data from a thread and then access it from a Screen. I made a very simple version of this to show you so we are only looking at the data sharing aspects of it: //Thread that updates the data public class UpdateThread implements Runnable { int sleep = 2000; int count = 0; public void run() { try { while (true) { count++; DataAccess.setData("Update from thread" + count); Thread.sleep(sleep); } } catch (InterruptedException iex) { } } } //Static object that holds the data: public class DataAccess { private volatile static String data; static { data = "first value"; } public static synchronized String getData() { return data; } public static synchronized void setData (String val) { data = val; } } //screen to display the data: import net.rim.device.api.ui.component.LabelField; import net.rim.device.api.ui.container.MainScreen; public class DisplayData extends MainScreen { public DisplayData () { LabelField lbl = new LabelField(DataAccess.getData()); add(lbl); } } I have two entry points for my app, and maybe this is where my problem lies, one that runs on startup of the device and another when you click the app icon. When the deivce starts up I start my UpdateThread and I can see it updating the data. Then, when I try to display it in the screen it displays the original value. Am I going about this the wrong way? I will looked into the shared service or global events. Do you have an example? Thanks. 06-22-2010 06:32 PM Static data is indeed shared between threads. My apologies if my wording suggested otherwise. I think that you correctly identified the issue: using alternate entry points the way you describe, you probably are running two separate instances of your application. They would not share the same static data. A RIM knowledge base article on using alternate entry points discusses a technique to do what you want and run only a single application instance. Alternatively, you can use the RuntimeStore technique that Simon suggested originally. 06-23-2010 11:16 AM Hi Ted, thanks so much for your help on this. I looked at that article you posted and that is how I am creating my alternate entry point. What I think is happening is that when the main method is called when the blackberry boots, up it creates the background application which seems to have its' own memory space. Then when my main method is called again for the the UI stuff it creates another memory space. So it seems that it is not possible to do what I want to do. It makes sense, now that I look at it because it is a main method that is being called twice so it starts too separate apps. I just assumed that since the code was all in the same application they would be considered one instance. Is there a way to have the startup app and the UI app share the same memory space, besides using the runtime store as you suggested. Thanks. 06-23-2010 11:19 AM runtimestore is used for exactly this purpose. i don't know of another way to share. you can communicate using global events and have some other options, but runtimestore is the easiest. 06-23-2010 11:32 AM Thanks to both of you. I will just have to re-write my app to use the runtime store. 06-23-2010 11:37 AM One other alternative, and one I prefer, is not have two separate applications. have one application, that starts up when the device starts. Then there is no need to share. The only downside of this is that you have to careful that you do not do a System.exit(). Instead your application can go to the background when the user closes it. 06-23-2010 11:53 AM devin wrote: Is there a way to have the startup app and the UI app share the same memory space, besides using the runtime store as you suggested. I think that the RIM article I referenced earlier describes (fairly abstractly) how to do this. The trick is that the icon is an alternate entry point that does not have a UI. Instead, it signals the startup app to come to the foreground (and bring up its UI); the app instance started by the icon then quietly exits. Like Peter noted, the startup app must not call System.exit(). That means that when it returns to the background (appearing to the user to have exited), it has merely popped the last screen from the display stack. The default action of close() is to call System.exit() if the display stack is empty; you will need to override close() to avoid that, or else organize your code so close() is never called.
https://supportforums.blackberry.com/t5/Java-Development/Problems-accessing-data-across-threads/m-p/529659/highlight/true
CC-MAIN-2017-13
refinedweb
1,275
70.53
I have an assignment where I have to have seven different lottery numbers ranging from 1 to 35. A separate powerball number should also be generated. The powerball number should be within the range of 1-10. I have to write a java program that gives eight sets of seven numbers plus one powerball number. It has to have an array and the random() method has to be used and at least one repetition statement. I got it to give me one set of seven and a powerball number. I tried to do a "while...do" statement but it created an infinite loop until I stopped the process. A very, very fast infinite loop. Here's what I have I just need to figure out what I need to do in order to loop and create a set of 8. I tried the "For" loop statement but I wasn't sure where in the code it needed to go. Maybe it has to be rewritten completely, I don't know. I'm new to java and I'm doing the best I can. Here's what I have, I'm at a loss: import java.util.Collections; import java.util.ArrayList; public class Lottery //Declare the class { public static void main(String[] args) { //To display set of seven numbers between 1 - 35 ArrayList<Integer> numbers = new ArrayList<Integer>(); for (int i = 0; i < 35; i++) { numbers.add(i + 1); } Collections.shuffle(numbers); System.out.print("This week's numbers are: "); //This displays the first 7 set of random numbers for (int j = 0; j < 7; j++) { System.out.print(numbers.get(j) + " "); } //To display a powerball number between 1 - 10 ArrayList<Integer> pNum = new ArrayList<Integer>(); for (int p = 0; p < 10; p++) { pNum.add(p + 1); } Collections.shuffle(pNum); System.out.print("The powerball number is: "); //This displays the random powerball number for (int q = 0; q < 1; q++) { System.out.print(pNum.get(q) + " "); } } }
https://www.daniweb.com/programming/software-development/threads/292956/lottery-numbers-set-of-eight
CC-MAIN-2022-05
refinedweb
326
66.23
Hi, the way I read the SAX specification, the qName (or raw name) of elements that is passed to the callback methods is of purely informal character and does not necessarily contain the full (raw) element name. However, C2's serialization to XML results in the qName being used to name the output elements. This is due to the missing or incomplete namespace support in the SerializerToXML from Xalan which is used. AbstractTextSerializer already contains code to work around Xalan problems, so it could fix this problem as well, although fixing it comes at the cost of 2 hashtable lookups and string concatenations per element. If you agree that this should be done, the following patch will do the job. Joerg Henne
http://mail-archives.apache.org/mod_mbox/cocoon-dev/200108.mbox/%3C3B816BBB.6281814A@cogito.de%3E
CC-MAIN-2015-32
refinedweb
122
55.37
Details - Type: Bug - Status: Open - Priority: Major - Resolution: Unresolved - Affects Version/s: 1.7-beta-2 - Fix Version/s: None - Component/s: None - Labels:None - Number of attachments : Description The plugin marks: @Override public Object invokeMethod ( final Class sender , final Object receiver , final String methodName , final Object[] arguments, final boolean isCallToSuper, final boolean fromInsideClass ) with a yellow warning saying Class should have a type parameter. If you then change Class to Class<?> you get a red error saying invokeMethod doesn't override. Issue Links - is related to GRECLIPSE-455 Class and Class<?> not the same for overloading purposes GRECLIPSE-294 Generics warnings and problems Activity Curses, cloning doesn't appear to clone the comments. Andy made some important points on GRECLIPSE-455 that indicate why this issue has been cloned here: Supertype method is in groovy.lang.DelegatingMetaClass: public Object invokeMethod(Class sender, Object receiver, String methodName, Object[] arguments, boolean isCallToSuper, boolean fromInsideClass) { subtype method that Russel mentions is in gant source file 'org.codehaus.gant.GantMetaClass': @Override public Object invokeMethod ( final Class sender , final Object receiver , final String methodName , final Object[] arguments, final boolean isCallToSuper, final boolean fromInsideClass ) Collapsing this down to the core issue, we have public class TheBase { public Object invokeMethod(Class sender) { return null; } } class RusselsUberClass extends TheBase { @Override public Object invokeMethod ( final Class<?> sender ) {return null;} } This gives an error on the override because the method in the supertype is only declared as being type Class<?>. Either removing the <?> in the subtype or adding it to the supertype fixes the bug, but only the latter fix of altering the superclass method to take a Class<?> produces completely clean code. Given that groovy classes (for 1.6.5 and above) appear to be Java5 classes (they are version 49 in the class files) - the fix would be to change the definition of DelegatingMetaClass in groovy.lang. It is annoying that there is an eclipse warning that you can't get rid of just by adjusting your own source, but I suspect it is working as designed. In fact if I try it with javac on the command line (when the subtype is declared to take Class<?>), I get the same thing. N:\>javac TheBase.java TheBase.java:6: method does not override or implement a method from a supertype @Override public Object invokeMethod ( final Class<?> sender ) {return null;} ^ 1 error This issue is a clone of GRECLIPSE-455. The issue actually raises two points: 1. There is a problem in GrEclipse relating to messages. 2. There is a problem in Groovy that the source code is not appropriately marked up for generics. It seems appropriate therefore to have the issue appear for Both GrEclipse and Groovy.
http://jira.codehaus.org/browse/GROOVY-3829
CC-MAIN-2013-48
refinedweb
450
53.61
Introduction: Particle Photon World Wide Light Switch Ever wish you could turn the lights at your office on from your house with the flick of a switch? That's what this Instructable is all about. We will use a simple switch to remotely turn a relay on over the Internet, and even better, its super easy! Replace the simple switch with anything that generates a contact closure like a motion detector, float switch, PIR, etc. We will be turning a light bulb on and off in this example but since the relay on the receiver is just a simple relay capable of switching 10 amps at 120VAC or 24VDC you can use it to turn almost anything on or off. It can also be used to generate a dry contact closure for things like a PLC, Thermostat, etc. Step 1: What You Need Qty 2 ControlEverything.com Particle Relay Controllers Qty 2 12VDC Power supplies to power Relay controllers(Optional with ControlEverything.com Relay Controllers). Qty 2 Particle Photon/Spark Core modules. These are included with ControlEverything.com Relay Controllers. Qty 1 Simple switch. Qty 1 Light Bulb and AC power source to light it. Step 2: Associate Particle Modules With a Particle Account In order to gain access to the internet and communicate to each other the Particle modules need to be connected to your WiFi network and will need to be associated with your account. To Start install the Particle Photon Modules into the Relay controllers. You may want to put an identifier sticker on the boards at this point so you can tell them apart later. Use your 12VDC power supply to power up one of the controllers. Now proceed through the steps to associate them with your Particle account as explained here: that you do not have to connect a USB cable since the module is powered by the 12VDC power supply. Be sure to name the device something that makes since like switch or remote. Now power down that controller and proceed through the same steps to associate your second controller with your account giving it a different descriptive name. Once the controllers are setup on your account power them both up. Make sure the LEDs on both modules are breathing cyan, this means they are connected to the cloud and ready to go. Time to flash some code! Step 3: Flash Some Code ControlEverything.com already has an example library that will work perfectly for the board that has the switch input. All we need to do is write a very simple application into the board that will provide the relay output to switch the light. We will do all of this through Particle.io's fantastic WEB based IDE for writing and flashing the code into the module. Go to build.particle.io/build to start. Input Board Code From the devices menu on the left(looks like a target) select the board which is your switch input. Now from the Libraries menu on the left(looks like a ribbon) type in NCD1RELAY under Community Libraries. Once that comes up in the code view window click on the CloudControl.cpp tab to select it. Then click the USE THIS EXAMPLE button. Now you should see a tab in the code view window that says CloudControl.ino If so just click the flash button on the left(looks like a lightning bolt). The LED on your switch input board will flash magenta and then will re associate with your WiFi network. That board is flashed and ready to go. Relay Output Board Code The Relay output board needs a little code to get going, but dont worry, it's really easy. From the devices menu on the left select the board which is your relay output board(connects to the light bulb). From the Libraries menu search for NCD1RELAY again. In the Code View Window select the Loop_Test.cpp tab and click the USE THIS EXAMPLE button. Once the Editor is done forking you should a see loop-test.ino tab in your Code View Window. We will make some modifications to this file. Just paste this code into the the Code View Window: /* Includes ------------------------------------------------------------------*/ #include "NCD1Relay/NCD1Relay.h" SYSTEM_MODE(AUTOMATIC); NCD1Relay relayController; /* This function is called once at start up ----------------------------------*/ void setup() { Serial.begin(115200); relayController.setAddress(0,0,0); Particle.subscribe("Input_1", myHandler, MY_DEVICES); } /* This function loops forever --------------------------------------------*/ void loop() { } void myHandler(const char *event, const char *data) { String command(data); if(command.equalsIgnoreCase("on")){ relayController.turnOnRelay(); } if(command.equalsIgnoreCase("off")){ relayController.turnOffRelay(); } } Step 4: Wire It Up The boards are flashed with our brilliant code. Now all that's left is to wire them up to our switch and to the light. Input Board Wiring The input board is pretty simple. Just connect your switch to the GP2 terminal and one of the GND terminals. Relay Board Wiring For the relay board you will connect your AC source hot leg to the COM terminal of the relay and the Light bulb AC hot leg to the NO terminal of the relay. Then just connect the neutral leg of your AC source directly to the neutral leg of the light bulb. Step 5: Test It Out Close the input on the transmitter board with your button or switch and watch how magically the light bulb at the other end turns on. How cool is that!? Now just think of what this could be used for! The possibilities are endless! Recommendations We have a be nice policy. Please be positive and constructive. 2 Comments Such a cool project! Just like you said, the possibilities of this project are endless! @tomatoskins, Thinking about this even further it could be possible to use multiple input boards to trigger the same receiver. Or you could use a multi input board to trigger multiple receivers. It's almost crazy how far you could go with this! Really cool stuff.
http://www.instructables.com/id/Particle-Photon-World-Wide-Light-Switch/
CC-MAIN-2018-13
refinedweb
992
74.49
Aduit sexy bi woman chicks About and son boobs quicktime thong bangsex webcams. Legs anal cultural female. What how. Offender russian have xxx gift sexy state import photos paris australian sexual book about relatos. Doll of australian 100 bangsex bit sex having pam art skirt art law with fucking from. Clip mature anderson high hudgens how buffie. Fat 100 girl pam. Blondes tanning to the sex sex class afternoon daughter hilton. Tit. Hilton hot high video male long time story man state aduit butt girl pinoy free hot do kathleen interracial ass shot nights man anderson in sexiest. Pussy washington anal. Couple psp porn. Skirt 18 good with bear movie. Hoe first pirate lingerie movie legs hina videos daniela. Chicks fever day list of the dildo ass quality torrent photography is erotica book. Import trobbing mom pictures 2007 doll love. Wild pic company bear. Girls junior buffie art beastiality. Chubby fat year sexiest actor man nights chicks 18 incest video. Jungle fever experience regie do star is divx list hindi state after school divx hudgens first robertson. Aduit anal production. Lesbain lingerie group the afternoon in foot to robertson gay pirate actor downloaded games galleries what photography tha. Gyorfi to downloads quicktime harmful video pussy film of women pinoy thumbnail beastiality hindi miss lady harmful mature sex shot sexual butt called couple with. Software what mature how most photo from sexual daughter sexe. Pinoy clips kentucky love daughter family cum quality. Kathleen clips. Downloads gift on hindi things fucking girls lesbain. Hailey most hoe torrent from. List kentucky kathleen history fuck nude time hardcore pics skirt is. Chicks fuck lady the experience thong buffie australian after fuck cum photography high experience amature kentucky. Nude scandal regie on having lesbian tanning mp4 naked celebrity legs old shot things a a best pic fat sex heaven heaven last caseros vasectomy masturbate long gay for book. Tit tapes film thong game com boys daniela regie film porn police ng. Sex trobbing foot things art Girls. Blondes miss thumbnail hindi from couple import from girl pictures year body australian thong with jungle things female women doll masturbate best of anderson kathleen junior photos what game. To clip of. Photos hudgens butt a hina. Lesbian sexual after anderson bit fever do clips russian beastiality lesbain pinoy time offender what software school celebrity history import state. Kentucky actor dildo have anal games trobbing rage. Have mp4 group galleries art class clip pirate have harmful legs sexiest fucking chubby old love butt. Company psp caseros bangsex blondes strapon porn production ass the long day galleries pinoy afternoon psp best dildo pirate about having love harmful lady dildo sex is miss amature nude downloaded celebrity good scandal hot doll boys called com games hudgens book after most women downloads. Skirt experience sexe long male story downloaded. Class hoe information. State what hindi strapon Incest. What class high hilton celebrity free of clips mp4. History hoe boys caseros from hardcore from love sex games chicks have gift love videos time wife nude skirt. Vasectomy state last webcams film celebrity downloaded of harmful high free. Thong games art pam legs aduit trobbing ass having. Pic mature about about star butt girls pinoy hot information. Chubby of trobbing quicktime quality sex. Porn beastiality bear lady group tit miss mp4 masturbate regie gay junior mom hudgens strapon boobs boys clip. Caseros porn and mom lady limo film police regie porn chicks art man mp4 bizarre group lady sexy webcams downloads bit. Hoe paris masturbate chubby nights time pictures! Hina clips chicks naked games couple. Kentucky women on harmful psp harmful psp clip afternoon with hot production downloaded pussy anal paris legs with sexiest fucking free dildo old best clip com erotica have things male nude hindi. Rage naked lesbian nude strapon 18 miss torrent anal history sex daniela class wife actor erotica last. Butt female for mature gyorfi aduit tapes company female cultural pirate information day college for hardcore and in. Tha women do lingerie shot junior book photography after lesbain pinoy girl best photo day. Fucking incest gay family is dildo. Year 18 nude boys tit relatos. Good body couple import quality. Free australian galleries relatos anderson photos russian wild video ennifer. Bizarre do women clips fever To. Female from. Hudgens mp4 time strapon downloads celebrity cum bangsex a. Legs gay hindi hindi mature! Downloaded photo story what aduit hina sexual female fever. Downloads free tapes tit how offender erotica galleries afternoon company bangsex sexe wild ass book skirt webcams nude strapon naked movie bit most law russian male buffie. And paris. Love doll vasectomy after sex body pirate tapes videos company actor hot high year video police tha fuck sexual nights porn kathleen masturbate limo wife! Torrent hot kathleen galleries. Hudgens scandal mp4 limo how thumbnail boobs? Shot love australian of things blondes incest. Mom high in dildo stories women. Com having hilton amature first pictures hoe a couple cum to about to masturbate stories junior story. List information erotica women fucking history interracial trobbing about quality hailey kathleen old lingerie xxx australian bear game scandal hailey list pic kentucky have and galleries after nude fat lady amature production harmful class downloads fuck tanning thong! Caseros couple book. Book what information import state law sex washington long women first interracial police. Daniela software to daughter. Quicktime clip porn butt shot pinoy miss and shot australian girls fever. Tha sexiest having downloaded 18 bit gyorfi is! Pictures wife anal lingerie harmful anal sex hardcore. Fat family robertson son production class import relatos d. Games russian 100 daughter in Long. How thong software on game tit old foot star. Girl information software downloads free sex police butt. The having lesbian have information naked. Lesbain bear day family police good star. Male hoe buffie love things psp lesbian about. After chubby group day. Couple import nude list pussy pic chicks. Hudgens erotica pam gift. Scandal junior photography book in photos to fever list 18 fucking masturbate girls. Boys body daniela tanning history divx hina ass police heaven. A 18 software foot the hot photos sexy long legs 100 games mature! Pictures kentucky divx 18 psp anderson female bangsex caseros with. Webcams is lesbian daughter mom history chubby galleries son things anal state skirt star art videos downloads free scandal first ass. Hudgens heaven trobbing beastiality school pinoy having a sex limo and harmful russian is lesbian incest daughter hoe aduit tapes group girls anal with last quality doll skirt clip fat pussy hardcore fucking about ian. Wild movie chicks mom hailey Junior? Book fever hindi. For what anal strapon. Lingerie day mom webcams state cum male! School quicktime do xxx nights vasectomy pussy junior? Naked a bear. Fucking man quicktime hilton love cultural bizarre shot actor college mature old nude stories scandal have videos first incest psp police hudgens pictures nude do pussy legs bizarre mp4. Pics fuck to galleries dildo buffie scandal heaven com time psp washington regie. Mature. Videos russian fever downloads art sex how pussy. Old pirate fat couple masturbate import! Tanning star year beastiality after most skirt son girls objavljeno pic. Having divx photography. Daniela legs amature hot experience long. Com list. Quicktime games love anal good female from history kentucky photos. For 18 sexual divx about photo tapes company. Hina women class russian sexiest bangsex best movie hailey kathleen photo pic high quality body. Limo things photos relatos sexe aduit body 100 on group college bit foot sexiest tapes called pam. Bangsex lady jungle caseros hot. Porn porn mp4 company afternoon quality man story hudgens mom production sexiest photo good. Daughter lesbian downloaded. Software fuck offender harmful hoe stories pic thumbnail offender. Masturbate celebrity nude year last hudgens to female called art 100 hina. Tanning girls hot blondes Hot. Sexy bi woman tit Bit mom shot cultural kathleen sexual list college hailey hindi downloaded naked russian. Man gay beastiality tanning. Fuck sexual sexiest butt russian chubby lady tapes body. Gift girls have quicktime about galleries free sex art company stories clip naked anal couple fat thong pinoy sex scandal xxx sex class torrent boobs com legs. Downloads wild how fuck long first experience sexual time pam kentucky mom boobs do hardcore photos good mature robertson how photos software torrent. Fat games lingerie. Called russian shot limo law hoe class. Old last experience having heaven tanning import galleries experience family 100 videos nights mp4 male clips time old. Heaven lesbain. Sex hilton offender experience divx caseros school. To is for hailey. Actor sexiest thong information! Trobbing star after interracial skirt tha female game masturbate daughter buffie caseros sex dildo hailey heaven robertson quality amature man bear doll man celebrity 18 ass lady jungle actor have sexual class buffie. Most relatos incest art things lesbain porn limo film family wife book strapon mp4 male harmful free porn video daniela actor bizarre to 100 dildo on. On man doll video called kentucky. Aduit tit photo junior college legs son a. Offender from games. Free webcams law tit law. Import tapes love bear high. Art chubby. Wild girl most after. Foot after tapes production. Downloads nude what. Blondes the. Chicks vasectomy in and do boobs photography chubby son with year cultural history doll information. Last fat stories webcams pictures paris gift downloaded thong xxx doll. The body naked sexiest girls offender washington relatos fever cultural. Regie hardcore legs love quicktime thumbnail free videos divx pirate to pirate. Old beastiality skirt pic psp pussy sexe trobbing list boys hudgens film photos porn hindi day do washington erotica regie paris com com body company torrent first hot last anderson harmful. Love daughter kentucky women mp4 pirate male rage for good. The mom games most couple his. Porn about old film incest Have. Body with divx. Regie hudgens the for gyorfi called import junior pirate boys production sexe law trobbing russian heaven hindi on game photo tapes anderson free erotica cultural day mp4 tha film 100 stories 18 vasectomy 18 psp actor story time first sex female wild. Hot anderson harmful xxx porn year how things anderson anal good last games best thong. Relatos class butt videos downloaded 100 gift lady shot regie. Amature after blondes things downloaded tit pirate sex information gay in a tit junior high xxx free blondes interracial have fuck amature nude daughter male games hoe washington pam. Movie is girls nude women amature videos caseros experience divx rage paris psp pirate. Mature couple boobs lingerie photos sex information vasectomy actor. Mom story amature strapon sexe miss bangsex state hailey. Caseros! Xxx sexy bi woman after torrent. Xxx sexiest pinoy russian female strapon police dildo mp4 buffie film gyorfi clip how bear thumbnail time clips. Couple pictures story movie star cum porn rage sexual naked from sex doll school quicktime webcams list hoe family kathleen mom offender. On hot boobs jungle com with video vasectomy 100 to galleries wild photography kentucky junior about tit first sexe girls love mp4 group offender male afternoon women wife. Videos girl star girls regie hoe star of nights photos skirt man daniela old chubby and for bit shot clips long robertson strapon the. Scandal art australian. Son lesbain female company! Chicks thumbnail chubby day kentucky hot celebrity is hina old son. Divx afternoon beastiality old legs do foot kathleen miss. Masturbate long lady. College book pam robertson masturbate good legs hardcore limo thong a production robertson year 18 last daughter fuck is pics college software video fucking chubby lesbian game celebrity to games galleries girl best bear fever. Son naked celebrity beastiality. First aduit group in. Hilton cum incest things ass pics? Naked college webcams galleries shot experience movie last legs downloaded australian pictures! Pussy pirate fat day what. Stories on sexual! Blondes art gyorfi having police male wild scandal year good bear. Interracial aduit sex gift production family. Long law having webcams com for from to. Girl chicks hina pic most quality interracial high caseros porn art sexual buffie most class fuck a limo clip have hilton women tanning stories of bizarre kathleen clips in history. old videos sex photo. Interracial having pam love pam production clip afternoon relatos fat photo beastiality family pussy fuck bangsex harmful couple experience girl good in pam anderson college bangsex import wild for art tanning anal. Last girls class male clip! To tit jungle company. Celebrity with tit stories fever story gyorfi. Mature best photos strapon daughter kathleen police afternoon chicks old amature game love photography legs gay torrent robertson pictures female hailey for dildo dildo. Thumbnail fuck pinoy quicktime have daniela most cultural. Son lesbain tha kentucky cum butt information company anderson tit junior about scandal photography. Miss sexe man trobbing washington cum boobs group school pirate butt things wife rage. Mp4 long celebrity experience game chicks naked tapes. Pics hardcore 100 film video game lesbian women good list old tanning psp. Mature porn free photo boobs girl photo blondes buffie photos lady. 18 gift chubby story last erotica quality tapes history is love masturbate buffie russian downloaded lesbian fuck anderson from hudgens celebrity anal nude hardcore free xxx thumbnail and incest xxx. Tanning hindi 100 foot doll book and a class long strapon girl hardcore couple body blondes. Of trobbing photography shot cultural do relatos webcams pic school lesbain daughter. Sexual star mom pussy production bit college information free fat lingerie pussy porn a erotica called book sexiest what history beastiality son police erotica australian man nights sex thong lesbain wild boobs ass butt t. long offender tit free foot limo cum with 18 group! Mature foot long. Com for torrent porn bit college stories about photo women blondes strapon. And buffie a information most the son free. Australian aduit long shot photography wife! Shot high naked thumbnail. Have ass on bangsex in have hailey tanning porn son and russian anderson couple mp4 naked police. Nude porn pics lesbian clip photography after celebrity tha downloads. Chubby game hoe erotica of regie day strapon hoe the film sexy skirt daniela film police bizarre xxx downloads ass. About hot. Have college divx! Information fucking lingerie russian hardcore anal. incest 100 australian cultural heaven. Book incest com anal first rage having. 18 thumbnail how divx lesbain. Chicks what called do strapon from chubby daniela chicks year family pictures how gyorfi pic downloaded tanning robertson erotica gift police jungle pussy amature fuck rs. about! Police buffie videos and. Art anderson masturbate. Year hailey porn art washington old. Story sex pam quicktime group called afternoon. High xxx. Pam tit import hudgens lesbian about trobbing hailey sexual pussy sexual legs is fucking hindi. Pussy thong gift having photos male pic gay information things! Kathleen pussy naked beastiality. Having pinoy. With good hailey rage nude miss called bangsex! Do photography police clips webcams pics quicktime pinoy daughter caseros pirate tha. Beastiality story hoe movie. Day cultural galleries dildo lingerie galleries on celebrity bear. Of state to masturbate ass torrent law pam 100 doll ass software amature tapes school pirate stories thumbnail most pics offender boys blondes hardcore.
http://uk.geocities.com/male837web/vmzhu-yy/sexy-bi-woman.htm
crawl-002
refinedweb
2,494
68.26
java.lang.Object | +--curve_plot_test Generate histograms for the Haar coefficients created by applying the Haar transform to the time series for the Applied Materials (symbol: AMAT) daily close price. Plot the histograms along with a normal curve with a mean and standard deviation calculated from the coefficients. There are 512 data points in the AMAT daily close price time series. This program generates a histogram for the first three high frequency sets of coefficients (e.g., 256, 128, and 64 coefficients). Financial theory states that the average daily return (e.g, the difference between today'ss close prices and yesterday's close price) is normally distributed. So the histogram of the highest frequency coefficients, which reflect the difference between two close prices, should be bell curve shaped, centered around zero. The close price in the AMAT time series rises sharply about half way through. So as the coefficient frequency decreases, the histogram will be shifted farther and farter away from zero. Note that an inplace Haar transform is used that replaces the values with the coefficients. The order function orders the coefficients from the butterfly pattern generated by the inplace algorithm into increasing frequencies, where the lowest frequency is at the beginning of the array. Each frequency is a power of two: 2, 4, 8, 16, 32, 64, 128, 256. curve_plot_test() public void plot_log(double[] v) public static void main(java.lang.String[] args)
http://www.bearcave.com/software/java/wavelets/doc/curve_plot_test.html
CC-MAIN-2017-47
refinedweb
234
55.24
GroovyFX provides a Groovy binding for JavaFX 8.. GroovyFX provides the SceneGraphBuilder object, which supports all of the JavaFX controls, shapes, gradients, effects, and animation; as well as other elements of the JavaFX API such as enumerations and colors. Additionally, Groovy closures can be used as event handlers, leading to clean and concise code. A simple and complete "Hello, World" program is shown below. The general pattern for a GroovyFX application is to define the JavaFX components within a Groovy closure that is passed to the static start method of the GroovyFX class. Inside this closure, we simply start declaring our JavaFX scene graph nodes. Each JavaFX class has a corresponding GroovyFX node. For example, the JavaFX Stage class becomes the stage node. All GroovyFX node names are exactly the same as their JavaFX counterparts with the start of their class names converted to lowercase letters. import static groovyx.javafx.GroovyFX.start start { stage(title: 'GroovyFX Hello World', visible: true) { scene(fill: BLACK, width: 500, height: 250) { hbox(padding: 60) { text(text: 'Groovy', font: '80pt sanserif') { fill linearGradient(endX: 0, stops: [PALEGREEN, SEAGREEN]) } text(text: 'FX', font: '80pt sanserif') { fill linearGradient(endX: 0, stops: [CYAN, DODGERBLUE]) effect dropShadow(color: DODGERBLUE, radius: 25, spread: 0.25) } } } } } The result of running this program is shown in the image below. See the Getting Started section of the user guide for more information. GroovyFX is licensed under the Apache License, Version 2.0. You can download this project in either zip or tar formats. You can also clone the project with Git by running: $ git clone git://github.com/groovyfx-project/groovyfx
http://groovyfx.org/
CC-MAIN-2021-10
refinedweb
268
64.1
Blink is the “Hello World” of the GPIO interfacing world. It’s the simplest program and circuit that lets you see something happening. If you have the following saved in a file called blink.c: #include <wiringPi.h> int main (void) { wiringPiSetup () ; pinMode (0, OUTPUT) ; for (;;) { digitalWrite (0, HIGH) ; delay (500) ; digitalWrite (0, LOW) ; delay (500) ; } return 0 ; } then to compile and run, you would enter: gcc -Wall -o blink blink.c -lwiringPi sudo ./blink To see the output of this, you would need to connect a single LED to the GPIO connector of the Raspberry Pi as follows: and if all goes well, you should see the LED flashing once a second. The LED is any generic LED you may have – typically 5mm diameter and the resistor is 330Ω. You can find blink.c and others – blink8.c and blink12.c in the examples directory of the wiringPi distribution. To use the makefile to compile them: make blink make blink8 make blink12
http://wiringpi.com/examples/blink/
CC-MAIN-2018-17
refinedweb
163
76.22
The third day kicked off with Rikard Edgren and his “Growing from a reckless bug hunter to a stakeholder conversationalist”. Rikard’s message was that you need earn respect by finding valuable information. Tester’s are in the information business. Testing is never better than the communication of the results! Rikard described his way to become context-driven in three major steps. It started with his biggest mistake. He and his team found 30 bugs, and they were proud. And they wondered why nobody came back to them with a response. The reason was that they were context-unaware and failed to understand the real testing mission. Second step was the poster story. Rikard and his colleagues published the famous poster of quality characteristics, I have it hanging next to my desk myself, and they felt as context-hipsters. His tip was to use the poster for finding test ideas and James Bach’s list for test strategy purpose. But Rikard was not happy with the poster because it uses his namespace. His new approach suggests, start with a blank page and ask the stakeholders what is important for them. Use the customer’s words. The last step is “The Conversationalist”. Rikard is doing more talking than testing nowadays and values information pull over information push. You have to adjust your language to the stakeholder, and invest the time to find out that you know you are testing the right thing. Explain your testing, why are you testing and why is your test strategy good? Anchor you test strategy, often the test report is not the problem, it’s the strategy that is not understood. My takeaways from that session are, that I am not the only one who made mistakes due to misunderstanding the mission. In my opinion it is important for a tester to speak the languages of the parties he is working with and that the tester is able to translate from his language/namespace to the stakeholders namespace. Rikard fortified my opinion. Next on my list was Geoff Thompson talking about “Test Process Improvement – How hard can it be?” The talk was mostly about change, and why it’s so hard to improve your test process. I liked the statement “It seems to be easier to keep paying people doing things wrong.” The key messages of the talk were taken from John Kotter’s book “Our Iceberg is Melting”. There is also a nice video available. The Dunning-Kruger effect is important to consider when going through change. The unskilled overrate their abilities, while the skilled underrate them. And there is also the dis-organized people accept change with open arms while organized people already think they are effective. At the center of every process and every change to it stand people and culture. And there will always be someone in a change project who says: No! As change manager you have to concentrate on those people to be successful. My takeaway was that “change is difficult”. Well, we are humans, ain’t we, and we don’t like change. It was time for the next “Soap Box Session”, and it was my buddy Dan Billing up on the box. Dan gave a shout-out to the Weekend Testing Europe chapter, which is a great institution to improve your testing. So far I only joined Weekend Testing America sessions, but they are all worth attending. I can only affirm Dan’s statement: “Join Weekend Testing!” It would not be Dan if he talked only about a non-security topic. So there was a second part. And it was about EXTERMINATE! Dan’s Dr. Who favorite villain related mnemonic about security testing! Next up was Michael Bolton and his statement “No more exploratory testing!”. I have read Exploratory Testing 3.0, so I new roughly what was coming, but still it is a pleasure to see Michael on stage. That was obviously the view of many, because the auditorium was packed. The beginning of the history of testing was very much confirming my experience of the past 13 years as a tester. In 1972 there was the book “Program Test Methods”, it was trying to structure testing and it ignored completely the human aspect to testing. Testing became confused with its artifacts. Testing became over-formalized by processes (see also the latest attempt: ISO29119), and testing was all about the test cases. Since computers are procedural, so have to follow procedures to test it. It was also the time that “ad hoc” and “exploratory” got confused and many mix up “unscripted” with “unstructured” when talking about exploratory testing. Michael’s article “Testing without a map” shows that Exploratory Testing has a lot of structure. The key elements of exploratory testing are freedom and responsibility. Scripted testing is controlling the tester from the outside. And people seem to forget, that you need to do exploratory testing first to get to scripted testing. We have to relax our degree of description to follow to give testers the freedom and responsibility they deserve to fulfill their tasks. And we always seem to forget, that there is no other cognitive profession using cases to frame and describe their work. And very important, don’t confuse checklists with test cases. So the conclusion is, all testing is exploratory, so you can skip the “exploratory”. And “scripting” is just an approach. My takeaway from this talk was learning about the background why in my former company, which was heavily iSTQB- and waterfall-driven, exploratory testing had a bad reputation: 1) they simply did not understand it, 2) they tried to reduce the human factor. Which can also be seen in the naming: Test Factory! My second takeaway is that my approach of the last 2 years to start with heavy exploratory testing and then produce correct and useful test scripts for regression testing purpose was correct. Only some know why I had to abandon it, and I won’t state it here. And we came to the closing keynote “Wild West Security” by Paco Hope. Paco designed his metaphor for his key message based on the famous western movie “The Magnificent Seven”. He described seven roles of an IT project who all have their responsibilities for security and have to contribute to it. All roles have certain specialties that make them predestined to contribute to security. He described how Testers, DevOps, Product Owner, Project Manager, Architects, Developers, and Security Specialists can help with making their product secure. The key message was: “Everyone who has something to do with Software has something to do with Software Security”. It was a fun metaphor to show how everyone can and has to contribute to software security. And my key takeaway is to learn more about security testing and aspects I need to be aware of. The ladies from the test lab took the stage: Carly, Adina, Jyothi, Susan, and Guna made a fantastic job in providing challenges and riddles, hosting a wonderful area in the Expo where people could meet, discuss, and learn. Thank you lab rats! You did a fantastic job! Then it was time to announce the next destination and the next conference chair for EuroSTAR 2016. And it will be in Stockholm from Oct 31st – Nov 3rd, with conference chair Shmuel Gershon! In my opinion two excellent choices! And it was time for the do-over session. Attendees could vote for sessions that they wanted to see, to see again, or wanted others to see it. And it was a session I missed on Wednesday and wanted to see, lucky me. Julie Gardiner was talking about “Survival Skills for Testers”. That was my session of day 3, why I described it in an extra post. To conclude a wonderful experience I went last to conference chair Ruud Teunissen’s “How to share your lessons learned”. I shared with you already a lot of information and insights of the 3 days of EuroSTAR, next will be my team. Thanks for staying till the end, I hope you like my review of day 3 of EuroSTAR.
https://testpappy.wordpress.com/2015/11/08/eurostar-2015-my-third-day-in-review/
CC-MAIN-2018-26
refinedweb
1,351
73.27
The proposal to merge lp:~zorba-coders/zorba/fix-rq-28msec into lp:zorba has been updated. Advertising Description changed to: This module is not imported by anything; it is only used for checking zorbacmd's -l (compile library module) flag. So the namespace URI can be anything. I just changed it to a different site due to the changes in the way 28msec.com handles unknown URLs. (Why this test case contacted 28msec.com *at all* is a different bug.) For more details, see: -- Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: Post to : zorba-coders@lists.launchpad.net Unsubscribe : More help :
https://www.mail-archive.com/zorba-coders@lists.launchpad.net/msg08715.html
CC-MAIN-2017-17
refinedweb
107
62.14
What is the Access Control Service? The Microsoft Azure Access Control Service (or ACS) is a cloud-based service that provides a way of authenticating and authorizing users to gain access to web applications and services. Changes to How Access Control Service Namespaces are Created New ACS namespace creation will be restricted starting June 30th, 2017. If you need to create an ACS namespace beyond this date, you will need to call Azure customer support. Azure Active Directory (Azure AD) and Azure AD B2C ACS functionality is fully supported for existing namespaces. However, the future of ACS is Azure Active Directory. We are committed to improving and updating Azure Active Directory to natively support many of the scenarios enabled by ACS. We encourage you to explore the offerings that Azure AD B2C can provide today. If you have questions or feedback about these changes or ACS in general, please do not hesitate to contact us at acsfeedback@microsoft.com.
https://azure.microsoft.com/zh-cn/blog/acs-access-control-service-namespace-creation-restriction/
CC-MAIN-2017-43
refinedweb
159
53.92
I’ve been spoiled by PHP! It sometimes makes your job too easy with its large collection of library functions. Python, on the other hand, has a lot of powerful tools for doing low-level stuff. To get something done, which would take a single function call in PHP, you may have to meld together a number of those tools and build a new one. I was looking for a Python equivalent of PHP’s ip2long() function. which converts an IPv4 address from dotted decimal notation(for example 208.69.34.231) to a 32 bit integer(3494191847). After spending few minutes with Google, I realized that Python has no such function in it’s core or standard library. To achieve this, I had to make use of Python’s socket interface and struct library. Here’s what I did: from socket import inet_aton from sturct import unpack def ip2long(ip_addr): ...ip_packed = inet_aton(ip_addr) ...ip = unpack("!L", ip_packed)[0] ...return ip Note: Dots(.) in the above code represents indentation. WordPress is eating up the whitespace mysteriously! The first line inside the ip2long() method, the inet_aton() function, converts the dotted-quad IP address to a 32-bit packed binary format, which is string of four characters in length. To make it an integer, you have to unpack it with the unpack() method, which takes the format as the first argument(which is “!L” in this case, for big-endian unsigned integer) and the packed string as the second. It returns a tuple with the 32-bit integer as the first element. To make a long2ip() function you can just reverse engineer the above process with struct.pack and and socket.inet_ntoa. One thought on “Python equivalent of PHP’s ip2long()” you have a typo in the import statements, it should be ‘struct’ not ‘sturct’
https://rubayeet.wordpress.com/2009/10/23/python-equivalent-php-ip2lon/
CC-MAIN-2017-09
refinedweb
303
74.19
How far is it from point a to point b? There are complicated ways to answer this question, that e.g. takes into account whether you’re walking or driving etc. However, if you only need the approximate distance “as the crow flies”, some simple math is sufficient. I’m assuming you’ve used Google’s geo-coding, or geonames.org’s postal code search, etc., and now have locations with lat and lng attributes. The Earth isn’t a perfect sphere, among many non-spherical properties, it’s actually fatter around the equator than between the poles: The algorithm doesn’t take any of this into account, and instead uses a single value for the Earth’s radius. Assuming you’re not going very far (i.e. “halfway around the globe”, the result will probably not be too far off, YMMV of course). Module haversine.py: import math def cosrad(n): "Return the cosine of ``n`` degrees in radians." return math.cos(math.radians(n)) def haversine((lat1, long1), (lat2, long2)): """Calculate the distance between two points on earth. """ earth_radius = 6371 # km dLat = math.radians(lat2 - lat1) dLong = math.radians(long2 - long1) a = (math.sin(dLat / 2) ** 2 + cosrad(lat1) * cosrad(lat2) * math.sin(dLong / 2) ** 2) c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a)) d = earth_radius * c return d def distance(a, b): "Return the distance between two points that have .lat and .lng members." return haversine( (float(a.lat), float(a.lng)), (float(b.lat), float(b.lng)))
http://blog.tkbe.org/archive/python-calculating-the-distance-between-two-locations/
CC-MAIN-2014-10
refinedweb
254
60.41
ActiveRoute TagHelper Jürgen Gutsch - 03 March, 2017 I recently read the pretty cool blog post by Ben Cull about the IsActiveRoute TagHelper:. This TagHelper adds a css class to an element, if the specified route or route parts are in the current active route. This is pretty useful, if you want to highlight an active item in a menu. Inspired by this idea, I created a different TagHelper, which shows or hide contents, if the specified route or route parts are in the current route. This could be useful, e.g. if you don't want to have a link in an active menu item. From the perspective of an semantic web, it doesn't make sense to link to the current page. That means, the menu item that points to the current page should not be a link. The usage of this TagHelper will look like this: <ul class="nav navbar-nav"> <li> <a asp-active-route <span>Home</span> </a> <span asp-active-routeHome</span> </li> <li> <a asp-active-route <span>About</span> </a> <span asp-active-routeAbout</span> </li> <li> <a asp-active-route <span>Contact</span> </a> <span asp-active-routeContact</span> </li> </ul> As you may see on the a-Tag, multiple TagHelper can work on a single Tag. In this case the built in AnchorTagHelper and the ActiveRouteTagHelper are manipulating the Tag. The a-Tag will be hidden if the specified route is active and the span-Tag is shown in that case. If you now navigate to the About page, the a-Tag is removed from the specific menu item and the span-Tag is shown. The HTML result of the menu now looks pretty clean: <ul class="nav navbar-nav"> <li> <a href="/"> <span>Home</span> </a> </li> <li> <span>About</span> </li> <li> <a href="/Home/About"> <span>Contact</span> </a> </li> </ul> Using this approach for the menu, we don't need Ben Culls TagHelper here to add a special CSS class. The style for the active item can be set via the selection of that list item with just the span in it: .nav.navbar-nav li > a { ... } .nav.navbar-nav li > a > span { ... } .nav.navbar-nav li > span { ... } /* this is the active item*/ This CSS is based on the default Bootstrap based template in a new ASP.NET Core project. If you use another template, just replace the CSS class which identifies the menu with your specific identifier. That means, to get that active menu item looking nice, you may just add a CSS like this: .navbar-nav li > span { padding: 15px; display: block; color: white; } This results in the following view: To get this working, we need to implement the TagHelper. I just created a new class in the project and called it ActiveRouteTagHelper and added the needed properties: [HtmlTargetElement(Attributes = "asp-active-route")] public class ActiveRouteTagHelper : TagHelper { [HtmlAttributeName("asp-controller")] public string Controller { get; set; } [HtmlAttributeName("asp-action")] public string Action { get; set; } [HtmlAttributeName("asp-hide-if-active")] public bool HideIfActive { get; set; } } That class inherits the TagHelper base class. To use it on any HTML tag, I defined a attribute name which is needed to on the HTML we want to manipulate. I used the name "asp-active-route". Also the attributes getting a specific name. I could use the default name, without the leading "asp" prefix, but I thouhgt it would make sense to share the Controller and Action properties with the built-in AnchorTagHelper. And to be consistent, I use the prefix in all cases. Now we need to override the Process method to actually manipulate the specific HTML tag: public override void Process(TagHelperContext context, TagHelperOutput output) { if (!CanShow()) { output.SuppressOutput(); } var attribute = output.Attributes.First(x => x.Name == "asp-active-route"); output.Attributes.Remove(attribute); } If I cannot show the Tag because of the conditions in the CahShow() method, I completely suppress the output. Nothing is generated in that case. Not the contents and not the HTML tag itself. At the end of the method, I remove the identifying attribute, which is used to activate this TagHelper, because this attribute will be kept usually. To get the RouteData of the current route, we cant use the TagHelperContext or the TagHelperOutput. We need to add the inject the ViewContext: [HtmlAttributeNotBound] [ViewContext] public ViewContext ViewContext { get; set; } Now we are able to access the route data and get the needed information about the current route: private bool CanShow() { var currentController = ViewContext.RouteData.Values["Controller"].ToString(); var currentAction = ViewContext.RouteData.Values["Action"].ToString(); var show = false; if (!String.IsNullOrWhiteSpace(Controller) && Controller.Equals(currentController, StringComparison.CurrentCultureIgnoreCase)) { show = true; } if (show && !String.IsNullOrWhiteSpace(Action) && Action.Equals(currentAction, StringComparison.CurrentCultureIgnoreCase)) { show = true; } else { show = false; } if (HideIfActive) { show = !show; } return show; } One last step you need to do, is to register your own TagHelpers. In Visual Studio open the _ViewImports.cshtml and add the following line of code: @addTagHelper *, CoreWebApplication Where CoreWebApplication is the assembly name of your project. * means use all TagHelpers in that library Conclusion I hope this makes sense to you and helps you a little more to get into the TagHelpers. I always have fun, creating a new TagHelper. With less code, I'm able to extend the View engine the way I need. I always focus on semantic HTML, if possible. Because it makes the Web a little more accessible to other devices and engines than we usually use. This could be screen readers for blind people, as well as search engines. Maybe I can do some more posts about accessibility in ASP.NET Core applications.
https://asp.net-hacker.rocks/2017/03/03/taghelper-to-show-or-hide-on-route-conditions.html
CC-MAIN-2021-49
refinedweb
935
63.59
hi, Two quick and semi-related questions for the Gurus of the MIPS. First off, it would appear that profiling on any of the Broadcom MIPS processors is broken. I get the following warnings when compiling the platform-specific irq.c file: CC arch/mips/sibyte/sb1250/irq.o arch/mips/sibyte/sb1250/irq.c: In function 'plat_irq_dispatch': arch/mips/sibyte/sb1250/irq.c:462: warning: implicit declaration of function 'sbprof_cpu_intr' arch/mips/sibyte/sb1250/irq.c:467: warning: implicit declaration of function 'sb1250_timer_interrupt' arch/mips/sibyte/sb1250/irq.c:471: warning: implicit declaration of function 'sb1250_mailbox_interrupt' On linking, it's revealed why the declarations are implicit: arch/mips/sibyte/sb1250/built-in.o: In function `plat_irq_dispatch':' Actually, with the code as it is in the git repository, you will also get: arch/mips/sibyte/sb1250/irq.c:461: undefined reference to `exception_epc' But this can be fixed by adding the following line to irq.c in the asm block of includes: #include <asm/branch.h> The primary function, sbprof_cpu_intr(), seems to be missing. It is called in the bcm1480 and sb1250 versions of irq.c. I looked but couldn't see anything comparable in any other Sibyte directories, any other MIPS architectures in general, or indeed in any other architecture in general. The ZBus profiling is also broken, showing some signs of being a little stale. This one's not quite so important to me, but it would still be very useful: arch/mips/sibyte/sb1250/bcm1250_tbprof.c: In function 'sbprof_tb_ioctl': arch/mips/sibyte/sb1250/bcm1250_tbprof.c:362: error: expected expression before 'wait_queue_t' arch/mips/sibyte/sb1250/bcm1250_tbprof.c:363: error: 'wait' undeclared (first use in this function) arch/mips/sibyte/sb1250/bcm1250_tbprof.c:363: error: (Each undeclared identifier is reported only once arch/mips/sibyte/sb1250/bcm1250_tbprof.c:363: error: for each function it appears in.) arch/mips/sibyte/sb1250/bcm1250_tbprof.c: In function 'sbprof_tb_init': arch/mips/sibyte/sb1250/bcm1250_tbprof.c:396: warning: format '%lld' expects type 'long long int', but argument 2 has type 'u_int64_t' Ok, so my first question is: who (if anyone) is working on the profiling code and are there any patches - regardless of how experimental - that will get this part of the code working?? Jonathan __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around
https://www.linux-mips.org/archives/linux-mips/2006-06/msg00064.html
CC-MAIN-2016-36
refinedweb
387
51.44
hi all: when using namespace or nested resources in routes.rb,such as "namespace :admin { resources :books }, we can use [:admin,@book] way to generate path. It works fine in form_for , but when I use it with respond_with in controller, I get problems. The problem is when I put following code in controller: def create @book=Book.find(params[:id]) @book.save respond_with[:admin,@book] end if there are some problems and the @book is not saved, the function should render new action, hence we can get error messages, but now it render index action. and the log file said it got a error 302. if I replace 'respond_with [ :admin,@book]' with 'respond_with @book,:location=>admin_book_path(@book)", it works fine. should we not use "[:admin,@book]" way with respond_with? thanks on 2013-05-23 02.
https://www.ruby-forum.com/topic/4414136
CC-MAIN-2017-09
refinedweb
135
66.64
A namespace for utility functions that probe system properties. Return the CPU load as returned by "uptime". Note that the interpretation of this number depends on the actual number of processors in the machine. This is presently only implemented on Linux, using the /proc/loadavg pseudo-file, on other systems we simply return zero. Definition at line 620 of file utilities.cc. Fills the stats structure with information about the memory consumption of this process. This is only implemented on Linux. Definition at line 629 of file utilities.cc. Return the name of the host this process runs on. Definition at line 662 of file utilities.cc. Return the present time as HH:MM:SS. Definition at line 676 of file utilities.cc. Return the present date as YYYY/MM/DD. MM and DD may be either one or two digits. Definition at line 691 of file utilities.cc. Call the system function posix_memalign, or a replacement function if not available, to allocate memory with a certain minimal alignment. The first argument will then return a pointer to this memory block that can be released later on through a standard free call. Definition at line 706 of file utilities.cc.
http://www.dealii.org/developer/doxygen/deal.II/namespaceUtilities_1_1System.html
CC-MAIN-2017-43
refinedweb
200
60.92
Because of environment and tools gap: When a service is moved to a staging or production environment, the service may behave in a different way. We might have to spend multiple dev cycles before we get to a stable version. These differences can be close to zero if we can have a multi node cluster on the desktop. Or, we would have to run the code in dev or staging cluster with a different namespace. There are options like Minikube or Docker Desktop; they create a single node cluster on your desktop. But actual need is to have multi node production like environment. Roost It creates a multi-node Kubernetes cluster on your desktop based on your system resources. It also provides a single click option to change cluster sizing, memory, CPU cap etc. as per your system or application requirements. Check my video for details: Discussion (0)
https://dev.to/sudhirzb/develop-build-and-run-in-a-production-like-cluster-1j8k
CC-MAIN-2022-33
refinedweb
148
65.01
AzureRunMe is an awesome tool written by Rob Blackwell from two10degree. Thousands of machines are powered by AzureRunMe. Today, I had the privilege to play with it. Here are the steps to start using AzureRunMe. 1. Create your Java project. For experimenting purpose, I have created a HelloWorld Java program. To leave a record of whether the program has been run, the Hello World is written to a local file in addition to the console. But really, many other projects should all work with AzureRunMe. In Eclipse, I click File->New->Java Project, fill project name with HelloWorld, click Next, click Finish. Double click HelloWorld from Package Explorer on the left, right click HelloWorld\src folder, select New->Class, fill helloWorld into Package, fill HelloWorld into name. Click Finish. package helloWorld;import java.io.FileWriter;import java.io.IOException;public class HelloWorld { public static void main(String[] args) throws IOException { String outputFileName = "output.txt"; String helloWorld = "Hello World!"; FileWriter outputFile = new FileWriter(outputFileName); outputFile.write(helloWorld); outputFile.flush(); outputFile.close(); System.out.println(helloWorld); }} 2. Copy zip the installed JDK into a single java.zip file. 3. Write a runme.cmd to run the Java Project from console. 4. Zip the whole folder into a zip file, dist.zip. 5. Upload the zip file to an Windows Azure Blob Container. There are many tools to perform Blob uploading and downloading for Windows Azure, for this case, I use Windows Azure AzCopy following this blog post . Download the zip file, run the MSI, and append "C:\Program Files\Microsoft AzCopy" to the Path to make command line experience more smoothly. I created a new directory helloworldcopy and put java.zip and dist.zip into the helloworldcopy directory, run azcopy, here is the screenshot. Uploading 100 MB zip file actually quite fast, it is completed in less than one minute. Now, the uploaded Blob should be live at and 6. create a Windows Azure VM via Windows Azure Portal. (The same can be done via Windows Azure CLI) For example, the machine I created is called azurerunme.cloudapp.net. It is a micro Instance running on Windows Server 2012. 7. Download AzureRunMe. AzureRunMe is an open source project, the source code can be obtained from github. Assuming you already got git clone Here is the screenshot of cloning process. 8. The next step is the compilation of AzureRunMe. AzureRunMe project is Visual Studio 2010 project. Open AzureRunMe.sln at the root directory using Visual Studio 2010. In Visual Studio, click Build->Build Solution to compile AzureRunMe project. After compilation, a WorkerRole.dll will be generated at WorkerRole\bin\Debug\WorkerRole.dll. 9. Update Packages value in ServiceConfiguration.cscfg file to point to the location of your zip file blob. 10. Update DataConnectionString, CloudDriveConnectionString, LogConnectionString and Microsoft.WindowsAzure.Plugins.Diagnostics.ConectionString with your storage account information. Similar to the update of the Packages, go to your Windows Azure Portal to obtain your storage account name and key, update DataConnectionString, CloudDriveConnectionString and LogConnectionString, Microsoft.WindowsAzure.Plugins.Diagnostics.ConectionString. 11. Similar to update Packages above, typically, the command to run your java program in the ServiceConfiguration.cscfg also needs to be updated. There are three setting values that need to be updated including OnStartCommands, Commands, OnStopCommands, PreUpdateCommands, PostUpdateCommands. AzureRunMe controls the program running from it using these four command configuration values. 12. Right click AzureRunMe project in Visual Studio to package it. 13. Right click AzureRunMe project in Visual Studio to publish it. You may need to make sure that you have an unoccupied cloud service that can be used for this deployment. For me, it took 8 minutes to complete the publishing process. After the publishing, you might want to login the cloud service to validate the AzureRunMe had been running correctly. If everything is correct, you can see the following folder/file structure C:\applications\jdk1.7.0_11\bin C:\applications\runme.bat C:\applications\myjar.jar Then runme.bat is as simple as jdk1.7.0_11\bin\java -jar myjar.jar . Opinions are mine, follow me at twitter.
http://blogs.msdn.com/b/gongcheng/archive/2013/02/14/run-a-java-project-on-windows-azure-worker-role-using-azurerunme.aspx
CC-MAIN-2015-35
refinedweb
676
51.95
New Models¶ Note: This is considered an advanced topic. Evennia offers many convenient ways to store object data, such as via Attributes or Scripts. This is sufficient for most use cases. But if you aim to build a large stand-alone system, trying to squeeze your storage requirements into those may be more complex than you bargain for. Examples may be to store guild data for guild members to be able to change, tracking the flow of money across a game-wide economic system or implement other custom game systems that requires the storage of custom data in a quickly accessible way. Whereas Tags or Scripts can handle many situations, sometimes things may be easier to handle by adding your own database model. Overview of database tables¶ SQL-type databases (which is what Evennia supports) are basically highly optimized systems for retrieving text stored in tables. A table may look like this id | db_key | db_typeclass_path | db_permissions ... ------------------------------------------------------------------ 1 | Griatch | evennia.DefaultCharacter | Immortals ... 2 | Rock | evennia.DefaultObject | None ... Each line is considerably longer in your database. Each column is referred to as a “field” and every row is a separate object. You can check this out for yourself. If you use the default sqlite3 database, go to your game folder and run evennia dbshell You will drop into the database shell. While there, try: sqlite> .help # view help sqlite> .tables # view all tables # show the table field names for objects_objectdb sqlite> .schema objects_objectdb # show the first row from the objects_objectdb table sqlite> select * from objects_objectdb limit 1; sqlite> .exit Evennia uses Django, which abstracts away the database SQL manipulation and allows you to search and manipulate your database entirely in Python. Each database table is in Django represented by a class commonly called a model since it describes the look of the table. In Evennia, Objects, Scripts, Channels etc are examples of Django models that we then extend and build on. Adding a new database table¶ Here is how you add your own database table/models: In Django lingo, we will create a new “application” - a subsystem under the main Evennia program. For this example we’ll call it “myapp”. Run the following (you need to have a working Evennia running before you do this, so make sure you have run the steps in Getting Started first): cd mygame/world evennia startapp myapp A new folder myappis created. “myapp” will also be the name (the “app label”) from now on. We chose to put it in the world/subfolder here, but you could put it in the root of your mygameif that makes more sense. The myappfolder contains a few empty default files. What we are interested in for now is models.py. In models.pyyou define your model(s). Each model will be a table in the database. See the next section and don’t continue until you have added the models you want. You now need to tell Evennia that the models of your app should be a part of your database scheme. Add this line to your mygame/server/conf/settings.pyfile (make sure to use the path where you put myappand don’t forget the comma at the end of the tuple): INSTALLED_APPS = INSTALLED_APPS + ("world.myapp", ) From mygame/, run evennia makemigrations myapp evennia migrate This will add your new database table to the database. If you have put your game under version control (and you should), don’t forget to git add myapp/* to add all items to version control. Defining your models¶ A Django model is the Python representation of a database table. It can be handled like any other Python class. It defines fields on itself, objects of a special type. These become the “columns” of the database table. Finally, you create new instances of the model to add new rows to the database. We won’t describe all aspects of Django models here, for that we refer to the vast Django documentation on the subject. Here is a (very) brief example: from django.db import models class MyDataStore(models.Model): "A simple model for storing some data" db_key = models.CharField(max_length=80, db_index=True) db_category = models.CharField(max_length=80, null=True, blank=True) db_text = models.TextField(null=True, blank=True) # we need this one if we want to be # able to store this in an Evennia Attribute! db_date_created = models.DateTimeField('date created', editable=False, auto_now_add=True, db_index=True) We create four fields: two character fields of limited length and one text field which has no maximum length. Finally we create a field containing the current time of us creating this object. The db_date_createdfield, with exactly this name, is required if you want to be able to store instances of your custom model in an Evennia Attribute. It will automatically be set upon creation and can after that not be changed. Having this field will allow you to do e.g. obj.db.myinstance = mydatastore. If you know you’ll never store your model instances in Attributes the db_date_createdfield is optional. You don’t have to start field names with db_, this is an Evennia convention. It’s nevertheless recommended that you do use db_, partly for clarity and consistency with Evennia (if you ever want to share your code) and partly for the case of you later deciding to use Evennia’s SharedMemoryModel parent down the line. The field keyword db_index creates a database index for this field, which allows quicker lookups, so it’s recommended to put it on fields you know you’ll often use in queries. The null=True and blank=True keywords means that these fields may be left empty or set to the empty string without the database complaining. There are many other field types and keywords to define them, see django docs for more info. Similar to using django-admin you are able to do evennia inspectdb to get an automated listing of model information for an existing database. As is the case with any model generating tool you should only use this as a starting point for your models. Creating a new model instance¶ To create a new row in your table, you instantiate the model and then call its save() method: from evennia.myapp import MyDataStore new_datastore = MyDataStore(db_key="LargeSword", db_category="weapons", db_text="This is a huge weapon!") # this is required to actually create the row in the database! new_datastore.save() Note that the db_date_created field of the model is not specified. Its flag at_now_add=True makes sure to set it to the current date when the object is created (it can also not be changed further after creation). When you update an existing object with some new field value, remember that you have to save the object afterwards, otherwise the database will not update: my_datastore.db_key = "Larger Sword" my_datastore.save() Evennia’s normal models don’t need to explicitly save, since they are based on SharedMemoryModel rather than the raw django model. This is covered in the next section. Searching for your models¶ To search your new custom database table you need to use its database manager to build a query. Note that even if you use SharedMemoryModel as described in the previous section, you have to use the actual field names in the query, not the wrapper name (so db_key and not just key). from world.myapp import MyDataStore # get all datastore objects exactly matching a given key matches = MyDataStore.objects.filter(db_key="Larger Sword") # get all datastore objects with a key containing "sword" # and having the category "weapons" (both ignoring upper/lower case) matches2 = MyDataStore.objects.filter(db_key__icontains="sword", db_category__iequals="weapons") # show the matching data (e.g. inside a command) for match in matches2: self.caller.msg(match.db_text) See the Django query documentation for a lot more information about querying the database.
http://evennia.readthedocs.io/en/latest/New-Models.html
CC-MAIN-2018-13
refinedweb
1,299
55.44
JQuery, the popular open source, cross-browser JavaScript library, simplifies JavaScript programming by enabling developers to easily write code that incorporates event handling, animations and calls to Web services. The library supports browser independence, a simple event-handling model and extensibility through a plug-in API. Combining these features with a Test Driven Development (TDD) approach can greatly reduce bugs in your Web applications. What is TDD, you ask? TDD is a style of programming in which you test drive your application code during development, i.e., you write your tests first and then your application's source code. With properly planned code reviews, test-driven development can help in designing and implementing high-quality applications as well as in conforming to the stated requirements. As a result, TDD can reduce development time, code complexity, and post-deployment bugs. In this article, I will explore how to use TDD with jQuery in Visual Studio. To get started, you should have the following installed in your system: You can also use Visual Studio 2010 -- it comes with jQuery by default. Test Driven Development is an Agile development technique that typically involves the following steps: Some popular JavaScript TDD frameworks include: In this article, I will use the QUnit TDD tool for demonstration. This tool is capable of testing any JavaScript code -- even code written on the server side -- making it great for testing JavaScript libraries and frameworks. Particularly useful for regression testing, QUnit opens up a lot of possibilities for unit testing your JavaScript code. In QUnit, you have the concept of Units and Modules. Units refer to units of testable code; they can be as simple as typical unit tests. Modules on the other hand are a mechanism to group the results of the tests, whether they succeeded or failed. The following code snippet illustrates how you can use QUnit to unit test your JavaScript code: // Unit testing using QUnit function isNumberEvenOrOdd(valueToTest) { return (valueToTest % 2 === 0); } test('isNumberEvenOrOdd()', function() { ok(!isNumberEvenOrOdd (1), 'One is an odd number'); ok(isNumberEvenOrOdd (2), 'Two is an even number'); }) In the above code snippet, ok is an assertion. Other assertions include same, equals, and so on. ok same equals You can also use QUnit to run asynchronous tests, meaning tests for functions that are asynchronous. To write such test cases, you'll need to use setTimeout as shown in the code snippet below: setTimeout asyncTest('This is an asynchronous test case', function() { setTimeout(function() { ok(true); start(); }, 250) }) Review the QUnit API documentation for more information. When writing unit tests for JavaScript, the major challenge is making them browser independent. Not all JavaScript TDD frameworks support all browsers. In this article I discussed the features of jQuery and how you can work with one JavaScript TDD framework, QUnit, to practice test driven development using jQuery. Happy coding! Advertiser Disclosure:
http://www.devx.com/webdev/Article/48222
CC-MAIN-2021-49
refinedweb
476
51.99
Difference between pages "Lenovo Thinkpad T420" and "Form:Organization" (Difference between pages) Revision as of 20:37, January 17, 2014 (view source)Duncan.Britton (Talk) (→Bootloader Setup) Latest revision as of 22:52, January 7, 2015 (view source) Drobbins (Talk | contribs) Line 1: Line 1: − +<noinclude> −== Introduction ==+__NOTOC__ −Throughout, this article will assume the following:+ −* You have installed Gentoo or Funtoo in the past.+ −** If you haven't, this article will still serve you well, but please have either the official funtoo, or gentoo install guides open. We move through non-machine-specific bits with little elaboration.+ −* Have a T420 or similar machine.+ −Even if you do not have a T420, you may find this guide useful for:+== Add a New Organization == −* Nvidia Optimus Cards.+ −* Power management.+ −* General setup.+ −This installation assumes (For now) that the install is starting from an MS-Windows installation. If you are not on Windows, please add your favourite choice of steps, keep the emphasis on ease of understanding.+{{#forminput:form=Organization|query string=namespace=Organization}} +</noinclude><includeonly> +{{{for template|Organization}}} +{{TableStart}} +<tr><th class="active">Logo</th><td>{{{field|Logo|uploadable|values from namespace=File}}}</td><== Getting Started ==+== Location == −You'll want to get yourself running off a LiveCD or LiveUSB to start. This guide will assume liveUSB, since some users find them more difficult to prepare, this is usually due to boot flag issues. + −(Note: ''Live USB restore drives are nice to have in general! The author keeps one in his college binder.'')+ −==== Windows ====+{{TableStart}} −We can use LiLi for this, it provides a nice, simple interface and is fairly reliable: [ LiLi Download]+=== SysrescueCD ===+{{{field −Grab the version that Suites your needs here: [ Sysrescue Download]+| Geoloc −Next use LiLi (Or whatever you happen to be using) to flash the image or burn your CD. Reboot, change your boot device, and you'll find yourself at a grub menu.+| input type=googlemaps +| height=300 +| width=100% +| autozoom=off +| zoom=2 +}}} </td></tr> +<tr><th class="active">Location name</th><td>{{{field|Location name|list}}}</td></tr> +{{TableEnd}} −Since the T series are all 64-bit laptops, make sure to boot the 64-bit kernel, as the default is 32-bit.+{{{end template}}} −''But Why?: If we pick 32-bit, later on we won't be able to chroot into our Funtoo's 64-bit stage 3.''+== Documentation == −You should see a fairly verbose boot as sysrescueCD scans for modules it requires and starts up. It is safe to simply accept prompt defaults here, unless they are errors.+Enter documentation or extended information for the organization below. If you need to add more complex wikitext, use the "Edit" button after saving this page, and enter your wiki text at the bottom. This allows you to provide rich documentation content for the repository. −When you are greeted by the interactive command prompt, enter 'wizard' as prompted, and accept the default entry in the dialogue. This will give us a functioning XFCE desktop environment.+{{{standard input|free text|rows=30}}} −== Partitioning ==+{{{for template|OrganizationFooter}}} −Partitioning is the only step of this install which provides real risk to data on other operating systems. Be extremely careful if there is something you do not wish to loose. These steps are not foolproof and may result in lost data.+{{{end template}}} −Please be aware that MBR disks only support '''4''' primary partitions. You can solve this by creating an 'extended' partition and adding logical partitions to it. If you are feeling particularly brave try GPT on your disk.+{{{standard input|summary}}} −So lets start:+{{{standard input|minor edit}}} {{{standard input|watch}}} −First open up gparted. You should see it on the taskbar if you're using systemrescueCD. It will scan available drives and show you the partition table. Most users will likely find one of the following to their liking:+ −==== Pure Funtoo ====+{{{standard input|save}}} {{{standard input|preview}}} {{{standard input|changes}}} {{{standard input|cancel}}} −You'll likely want:+ −<pre>+ −/boot :: EXT2 :: 100mb-500mb+ − ''Note: We choose EXT2 because there is really no good use for a journalled boot partition, but feel free to use EXT4 instead!''+ −/ :: EXT4 :: 60gb (suggested floor value) - 500++ −swap :: linux-swap :: Your RAM Value (Optional, allows for hibernation)+ −</pre>+ −You may wish for a separate /home, which is perfectly legitimate, or any number of other partitions. + − + −==== Dual Boot with Windows ====+ −If dual booting with Windows, it is advisable to have Windows installed '''first''' since it will muck with the MBR and possibly want to create it's own boot partition.+ −You'll likely want:+ −<pre>+ −System Reserved :: NTFS :: Whatever windows chooses.+ −Windows :: NTFS :: >100gb (If you plan on doing any serious work on windows)+ −/boot :: EXT2 :: 100mb-500mb+ −Extended Partition -+ − / :: EXT4 :: Whatever is left.+ − swap :: linux-swap:: Your RAM value. (Optional, allows for hibernation)+ −</pre>+ −You may also want a separate /home, etc. These will fit into your extended partition without contributing to MBR's 4 partition limit.+ − + −== Starting the (actual) Install ==+ −Up until now everything we've done has just been foreplay. Finally we can mount our partitions and get started on the installation!+ − + −==== Mounting ====+ −First, lets mount all of our partitions.+ −* Make a directory for root. Lets assume '''/mnt/funtoo'''+ −<console>+ −###i## mkdir /mnt/funtoo+ −</console>+ −* Mount your '/' partition to /mnt/funtoo+ −<console>+ −###i## mount /dev/sd## /mnt/funtoo+ −</console>+ −* Make a directory for your boot partition.+ −<console>+ −###i## mkdir /mnt/funtoo/boot+ −</console>+ −* Mount your boot partition.+ −<console>+ −###i## mount /dev/sd## /mnt/funtoo/boot+ −</console>+ −* Mount anything else you may have made and need. (Not swap)+ − + −==== Checking the Date ====+ −Although this may seem super un-important, if you want to avoid lots of spammy warning messages later, checking your date is beneficial.+ −<console>+ −###i## date+ −</console>+ −If it needs to be set, you'll want something like:+ −<console>+ −###i## date 071620002011+ −#Fri Jul 16 20:00:00 UTC 2011+ −</console>+ − + −==== Fetch a Stage 3 ====+ −Next we need to fetch a tarball containing a barebones stage. We will download the core-i7 architecture version, if you have a core i5 or i3, don't worry, it's all the same.+ −<console>+ −###i## cd /mnt/funtoo+ −###i## wget −</console>+ − + −Next let's unpack with:+ −<console>+ −###i## tar xJpf stage3-current.tar.xz+ −</console>+ −{{Note}} ''Seriously, don't forget the 'p' option.''+ − + −If you run 'ls' now, you should see the <code>/mnt/funtoo</code> is fully populated with folders such as lib, home, and proc.+ − + −==== Chroot'ing ====+ −Now we need to change the ''apparent root'' of our system to our fledgling Funtoo system.+ −<console>+ −###i## cd /mnt/funtoo+ −###i## mount --bind /proc ./proc+ −###i## mount --bind /dev ./dev+ −###i## cp /etc/resolv.conf ./etc+ −###i## env -i HOME=/root TERM=$TERM chroot /mnt/funtoo /bin/bash --login+ −</console>+ − + −==== Getting the Portage Tree ====+ −Funtoo (Unlike Gentoo) uses a git based portage tree, however if you're coming from Gentoo, you'll be glad to know we sync with the Gentoo tree once every 12 hours.+ −<console>+ −###i## emerge --sync+ −</console>+ −''You can ignore most of the errors that might be spat out at this stage, however if they do not disappear on subsequent merges, talk to us in #funtoo.''+ −Your first sync will take significantly longer then subsequent syncs, as the whole tree must be synced.+ − + −==== A Configuration Celebration ====+ −Now that we have our portage tree cloned, we need to do some initial setup on some files before doing anything else with portage.+ − + −'''Fstab'''+ − + −<console>+ −###i## nano /etc/fstab+ −</console>+ − + −You'll want something like this: (Replace the dev values with what you are using)+ −{{File+ −|/etc/fstab|<pre>+ −# <fs> <mountpoint> <type> <opts> <dump/pass>+ − + −/dev/sda1 /boot ext2 noauto,noatime 1 2+ −/dev/sda3 none swap sw 0 0+ −/dev/sda4 / ext4 noatime 0 1+ −/dev/cdrom /mnt/cdrom auto noauto,ro 0 0+ −</pre>}}+ − + −'''Localtime'''+ − + −Lets remove the default localtime, and create a symbolic link to the proper time zone. (You probably will want something other then Vancouver)+ −<console>+ −###i## rm /etc/localtime+ −###i## ln -s /usr/share/zoneinfo/America/Vancouver /etc/localtime+ −</console>+ − + −''' Hostname '''+ −Set your host name: + −<console>+ −###i## nano /etc/conf.d/hostname+ −</console>+ − + −'''Hwclock'''+ − + −If you're using a dual boot system, you'll want to change this. Otherwise it's entirely optional.+ −<console>+ −###i## nano /etc/conf.d/hwclock+ −</console>+ − + −If you're on windows you'll want:+ −<console>+ −###i## clock="local"+ −</console>+ − + −'''Make.conf'''+ −Important enough that it deserves it's own article. A template make.conf for the T420 will be forthcoming.+ − + −For now:+ −If you have an i5 or i3 you will want+ −{{File+ −|/etc/portage/make.conf|<pre>+ −MAKEOPTS="-j3"+ −</pre>}}+ −If you have an i7 you'll probably want:+ −{{File+ −|/etc/portage/make.conf|<pre>+ −MAKEOPTS="-j5"+ −</pre>}}+ − + −''But I have Hyperthreading! Why only -j3?''+ −Hyperthreading and compiling don't play well together. You'll have the same (or better) performance with -j3 as -j5 with a dual core hyper threaded processor.+ − + −== Stop, Kernel time! ==+ −''For this guide we'll be using some pre-found config options that I will be adding later.''+ − + −* Networking:+ −** iwlwifi and auxilary+ −** Unknown intel ethernet adapter. Selected several.+ −* GPU+ −** Intel available default.+ −** nvidia will be dealt with later+ − + −Install:+ −* wpa_supplicant+ −* iwl6000-ucode+ −* wireless-tools+ − + − + −== Bootloader Setup ==+ −In funtoo the setup of grub is extremely simplified.+ −<console>+ −###i## emerge -vqat boot-update+ −</console>+ −''Q: What are those options? A: We'll get to them later, lets get the system booted first, okay? ''+ −Boot-update is a tool that will allow for very simple configuration of grub similar to older versions (But nicer still). + − + −You will now edit the file <code>/etc/boot.conf</code>:+ −{{File+ −|/etc/boot.conf|<pre>+ −boot {+ − generate grub+ − default "Funtoo Linux genkernel"+ − timeout 3 + −}+ − + −"Funtoo Linux" {+ − kernel bzImage[-v]+ − # params += nomodeset+ −}+ − + −"Funtoo Linux genkernel" {+ − kernel kernel[-v]+ − initrd initramfs[-v]+ − params += real_root=auto + − # params += nomodeset+ −} + −</pre>}}+ −This can be configured (We'll touch on this later. We need to make sure the kernel is booting and working before we start tweaking) with options for the kernel.+ − + −==== Dual-Booters Only ====+ −If you want to dual boot with windows you'll need to add an entry here:+ −{{File+ −|/etc/boot.conf|<pre>+ −<pre>+ −"Windows 7" {+ − type win7+ − params root=/dev/sda1+ −}+ −</pre>}}+ −==== Installing Grub onto the Drive(Everyone) ====+ −Next we can install grub onto the drive.+ −<console>+ −###i## grub-install --no-floppy /dev/sda+ −###i## boot-update+ −</pre>}}+ −No errors means we should be good to go!+ − + −== Tidy up and go. ==+ −Just a few more things!+ − + −Lets set a root password.+ −<pre>+ −passwd+ −</pre>+ − + −It is advisable to exit the chroot and umount all the relevant install drives. Or at least just exit the chroot, but you can just simply reboot from here.+ −<pre>+ −exit+ −cd /+ −umount /mnt/funtoo/boot /mnt/funtoo/dev /mnt/funtoo/proc /mnt/funtoo+ −reboot+ −</pre>+ − + −== Configuring the New System ==+ −Welcome to funtoo! You should be greeted by a bunch of spammy text that scrolls by reasonably fast and then a couple penguins and openrc. Login to your root user and lets start playing.+ − + −A note, this part of the guide is meant to be much more of a dialogue between us.+ − + −==== Getting up the (wired) network ====+ −If you're gifted with a wired network connect, use it! The initial setup is much more convenient and quick.+ − + −Quickly set up the network with+ −<pre>+ −/etc/init.d/dhcpcd start+ −</pre>+ −Now check to see if our wired adapter is listed with ifconfig.+ −<pre>+ −ifconfig+ −# (or)+ −ping google.com+ −</pre>+ −If you see it listed with a description, we're good to go!+ − + −==== Making the make.conf ====+ −Before we start merging into our tree everything under the sun, lets do some system planning.+ − + −You can use this as a starting point:+ −<pre>+ −# These settings were set by the metro build script that automatically built this stage.+ −# Please consult /etc/make.conf.example for a more detailed example.+ − + −ACCEPT_KEYWORDS="~amd64"+ −CHOST="x86_64-pc-linux-gnu"+ −CFLAGS="-march=corei7 -O2 -pipe"+ −CXXFLAGS="-march=corei7 -O2 -pipe"+ −SYNC="git://github.com/funtoo/ports-2012.git"+ − + − # -j3 :: Have make use 3 threads by default.+ −MAKEOPTS="-j3"+ − # Setup emerge's default options:+ − # --ask :: Double check before merging.+ − # --verbose :: Show use flags etc.+ − # --quiet :: Don't show me make spam.+ − # --tree :: Use nice dependancy graphs.+ −EMERGE_DEFAULT_OPTS="--ask --verbose --quiet --tree"+ − + −# Portage Features+ −# TODO: Descriptions+ −FEATURES="mini-manifest parallel-fetch userfetch parallel-install sandbox fixpackages collision-protect"+ − + − # We might use binary packages later. Lets set that up just in case.+ −PORTAGE_BINHOST=/usr/portage/packages+ − + − + − # CCache+ − # This is not going to be done by default.+ − # Why? It's only wortwhile if you plan on compiling packages multiple+ − # times per version, which the average user will not.+ −#CCACHE_SIZE="5G"+ −#CCACHE_DIR="/var/cache/ccache"+ − + −# Licenses+ −# By default we're just going to accept everything.+ −ACCEPT_LICENSE="*"+ − + − + −# Device Specific Settings+ −# INPUT_DEVICES :: A list of input devices you'll be wanting. This is needed for xorg and not much else.+ −INPUT_DEVICES="evdev synaptics"+ −# VIDEO CARDS :: A list of video cards. Optimus users beware here.+ −VIDEO_CARDS="intel i915 i965 nvidia"+ − + −# Use flags.+ −# Application specific flags should be migrated to /etc/portage/package.use (which can be a folder with multiple files!)+ −# To look at the user flags for an application use "equery uses FOOPKG"+ −USE="+ −acpi alsa /+ −bash-completition /+ −curl /+ −dvdr /+ −ithreads /+ −ncurses networkmanager/+ −policykit /+ −ssl sse sse2 sse3 sse4 /+ −threads /+ −udev /+ −vim-syntax /+ −zsh-completion /+ −"+ −</pre>+ − + −==== Getting an Editor ====+ −Well, first things first lets get ourselves an editor. The author prefers vim, but you may like emacs or something else... Feel free to disregard this and explore! If you plan to have multiple users however, this will often be expected by experienced linux users.+ − + −<pre>+ −emerge vim+ −</pre>+ −Check that your USE flags look reasonable (see above) and feel free to do any fine tweaking in /etc/portage/package.use.+ −Consult your output after merge! You may want to follow some of it's advice.+ − + −You can find multiple good guides on google for vim configurations and setups.+ −Funtoo also provides a very nice base configuration in /etc/vim/vimrc.+ − + −==== Boot Parameters ====+ −The T420 has a number of boot parameters that can be set to conserve power. On a laptop these options are generally reasonable:+ −<pre>+ −$ cat /etc/boot.conf+ −boot {+ − generate grub+ − default "Funtoo Linux" + − timeout 15 + −}+ − + −"Funtoo Linux" {+ − kernel bzImage[-v]+ − # Force PCIE Active State Power Management on.+ − params += pcie_aspm=force+ − # TODO (Range 1..15)+ − params += epb=7+ − # TODO+ − params += hpet=force+ − # i915 Enable rc6 sleep state (?)+ − params += i915.i915_enable_rc6=1+ − # TODO (Framebuffer?)+ − params += i915.i915_enable_fbc=1+ − # Downclock the lvds screen (60hz -> 50hz)+ − params += i915.lvds_downclock=1+ − # Quiet some of the excessively verbose kernel boot+ − params += quiet+ −}+ − + −"Windows 7" {+ − type win7+ − params root=/dev/sda1+ −}+ − + −#"Funtoo Linux genkernel" {+ −# kernel kernel[-v]+ −# initrd initramfs[-v]+ −# params += real_root=auto + −#} + −</pre>+ − + −When you're done, update grub with+ −<pre>+ −boot-update+ −</pre>+ − + −==== Power Saving Local Scripts ====+ −Next we're going to set up a script that runs at default runlevel for the machine. This will echo several options to various dev files. Most distros would do this via /etc/rc.local or something of the like.+ − + −With Funtoo (and Gentoo) this is accomplished via+ −<pre>+ −/etc/local.d+ −</pre>+ −Consult the README (in directory) for more information.+ − + −<pre>+ −$ cat /etc/local.d/power-saving.start+ −# /bin/bash+ −#+ −echo 1 > /sys/modules/snd_hda_intel/parameters/power_save+ −for i in /sys/bus/usb/devices/*/power/autosuspend; do+ − echo 1 > $i+ −done+ −for i in /sys/class/scsi_host/host*/link_power_management_policy; do+ − echo min_power > $i+ −done+ −</pre>+ −If you copy this wholesale remember to chmod -x the file!+ − + −==== rc.conf ====+ −rc.conf lets us change some options to do with open RC.+ − + −First, lets set rc_sys to it's default, this will suppress a warning message at boot.+ −<pre>+ −rc_sys=""+ −</pre>+ − + −Next, we can turn on rc_parallel to get a bit of speedup on boot.+ −<pre>+ −rc_parallel="YES"+ −</pre>+ −If you get errors or problems with services on boot, try turning this off.+ − + −== Making it Usable ==+ −Next we'll be setting up a normal user and installing the venerable Xorg.+ − + −==== Mouse in framebuffer ====+ −Right now we should be looking at a framebuffer'd console. + −<pre>+ −/etc/init.d/gpm start+ −</pre>+ −gpm is a daemon that allows us to use our mouse (trackpad/trackpoint) on console. Give it a try! If you want to keep it on across boots, add it to your init.+ −<pre>+ −rc-update add gpm default+ −</pre>+ − + −==== Making a New User =====+ −Lets use superadduser to make the task ever so much easier (Though, it is already easy)+ −<pre>+ −emerge superadduser+ −superadduser+ −</pre>+ − + −Walk through the prompts and set up your user how you choose.+ − + −==== Sudo Make Me a Sandwich ====+ −Next lets merge in sudo, and set up our new user to be able to use sudo.+ −<pre>+ −emerge sudo+ −</pre>+ −Now edit the config with+ −<pre>+ −visudo+ −</pre>+ −You'll probably want to uncomment out one of the two options:+ −<pre>+ −## Uncomment to allow members of group wheel to execute any command+ −# %wheel ALL=(ALL) ALL+ − + −## Same thing without a password+ −# %wheel ALL=(ALL) NOPASSWD: ALL+ −</pre>+ − + −Now just add your user to the 'wheel' group.+ −<pre>+ −gpasswd -a foouser wheel+ −exit+ −</pre>+ −Now re-login as your user, and you should be good to go!+ − + −==== Tmux ====+ −Before we emerge xorg, lets get tmux working so we can easily scroll through output and look at USE flags etc.+ −<pre>+ −emerge tmux+ −</pre>+ −The default config will suffice for now. You may find it beneficial to learn to use tmux ''properly'' sometime, but for now we'll hold hands.+ − + −<pre>+ −tmux+ −</pre>+ −Now we can scroll through output with CTRL+B [ and the up and down arrows.+ − + −== Xorg ==+ −Xorg is a large topic in and on itself. We'll focus on getting a working xorg and a simple window manager.+ − + −<pre>+ −# (in tmux)+ −sudo emerge xorg-server+ −</pre>+ −Once again use CTRL+B [ to start scrolling (escape to exit) and look through your use flags, adding anything you might want.+ − + −== A note on Gnome ==+ −Want to get rid of that awful lock screen on wake from suspend?+ −<pre>gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'</pre>+ − + −[[Category:HOWTO]]+ −[[Category:HWLaptop]]+ −[[Category:Hardware Compatibility]]+ Latest revision as of 22:52, January 7, 2015 Add a New Organization Retrieved from ""
http://www.funtoo.org/index.php?title=Funtoo_Linux_Networking&diff=8446&oldid=2080
CC-MAIN-2015-11
refinedweb
3,051
64.3
On Sun, Dec 04, 2005 at 03:57:50PM -0800, Andrew Morton wrote:> Wu Fengguang <wfg@mail.ustc.edu.cn> wrote:> >> > [PATCH] radix-tree: Remove unnecessary indirections and clean up code> > > > is only partially merged into -mm tree. This patch completes it.> > md: autorun ... > md: ... autorun DONE.> Unable to handle kernel paging request at virtual address 8000003cSorry, the bug is caused by the returning line: return slot;It should be return &slot;The patch originally applies to void *radix_tree_lookup()But in -mm the function turns into void **__lookup_slot()And in my radixtree patch, it is void *radix_tree_lookup_node()The prototypes changed forth and back, so the problem was never discovered.WuSubject: radixtree: sync with mainlineCc: Christoph Lameter <clameter@sgi.com>The patch from Christoph Lameter:[PATCH] radix-tree: Remove unnecessary indirections and clean up codeis only partially merged into -mm tree. This patch completes it.Signed-off-by: Christoph Lameter <clameter@sgi.com>Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> lib/radix-tree.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-)--- linux.orig/lib/radix-tree.c+++ linux/lib/radix-tree.c@@ -291,27 +291,25 @@ static inline void **__lookup_slot(struc unsigned long index) { unsigned int height, shift;- struct radix_tree_node **slot;+ struct radix_tree_node *slot; height = root->height; if (index > radix_tree_maxindex(height)) return NULL; shift = (height-1) * RADIX_TREE_MAP_SHIFT;- slot = &root->rnode;+ slot = root->rnode; while (height > 0) {- if (*slot == NULL)+ if (slot == NULL) return NULL; - slot = (struct radix_tree_node **)- ((*slot)->slots +- ((index >> shift) & RADIX_TREE_MAP_MASK));+ slot = slot->slots[(index >> shift) & RADIX_TREE_MAP_MASK]; shift -= RADIX_TREE_MAP_SHIFT; height--; } - return (void **)slot;+ return &slot; } /**
https://lkml.org/lkml/2005/12/5/30
CC-MAIN-2015-35
refinedweb
259
52.49
Introduction In the programming field, .NET is the most successful development platform..Net Framework 2.0 is enough to satisfy for most of us. .NET Framework 3.0 came with many new and useable features. With .NET Framework 3.0, developers feel more easy when develops. In the new version of .NET, there is nothing new with CLR (Common Language runtime) but it introduces four new technologies. Are we not apprehensive about accepting anything newer, especially if that is going to deprecate the existing one? The latest versions of .NET are .NET Framework 3.0. Programming with .NET Framework 3.0 become more advance. It is built with all the advantage of .NET framework 2.0, and is all set to bring in a paradigm shift in the way we write our applications today. When we go to develop any application then the main goal we set is, to create the Best application in least amount of time. The .NET Framework 3.0 will still ship with Windows Vista, and will be available down-level for Windows XP and Windows Server 2003 as planned.This newly released framework was earlier named as WinFx! .NET Framework 3.0 , compromise of familiar .NET Framework2.0 components (ASP.NET, ADO.NET, Window Forms etc).There are four new technologies in .NET Framework 3.0. These technologies are added to face the new challenge of software development. These new complementary technologies are added to address some of the most arduous challenges of contemporary software development. The New in .NET Framework 3.0 Here .NET Framework 3.0 is same like as .NET Framework 2.0, but with some new technology and feature. The entire features are same in new framework, which was in .NET Framework 2.0. The .NET 3.0 introducing four new foundation technologies:, the developer of .NET Framework 3.0, mostly use WPF over windows Forms. Figure 1: NET Framework 3.0 Windows Workflow Foundation (WF): Windows Workflow Foundation (WWF) is a Microsoft technology for defining, executing, and managing workflows. Workflow as it name implies. It shows the flow of work; mean how the work is going, how activities are performing. WF provides such a common workflow technology for Windows. If we have to make workflow enabled application on windows then we use Windows Workflow Foundation.System.Workflow is the namespace of Windows Workflow Foundation in Microsoft .NET Framework version 3.0. Windows Workflow Foundation provides full support for Visual Basic .NET and C#, debugging, a graphical workflow designer and the ability to develop our workflow completely in code. A workflow is a set of activities stored as a model that describe a real world process. Each Activity can be represented as a class. By using this we can reuse that activity easily. With WF, we can understand with our flow of operation. We can easily understand with our all activity. Windows Presentation Foundation (WPF): The Windows Presentation Foundation (WPF), also named Avalon, is the graphical subsystem feature of the .NET Framework 3.0. WPF is a consistent programming model for building solutions, and enables the use of richer controls, design, and development in Windows programs. In most windows application user interface play an important role .A developer needs to use Windows Forms to build a Windows GUI, or HTML/ASPX/Applets/JavaScript etc. Developer's job become tough here when he go to, building a coherent user interface for different kinds of clients using diverse technologies isn't a simple job. WPF provide consistent platform for these entire user interface aspects to solve the problem. WPF support video, animation, 2/3D graphics, and various kinds of documents. Windows Communication Foundation (WCF): WCF means programmers can communicate between each other either they are on same computer or in networking .Windows Communication Foundation is a communications infrastructure built around the Web services architecture. When the application becomes built then most of the application need to communication between each other. This was a big problem in last few years, so all vendors becomes agreed to support SOAP based web services, which make interoperability between application, either they are from same platforms or different platforms. The WCF programming model unifies web services, .NET Remoting, distributed transactions, and message queues into a single service-oriented programming model for distributed computing. However, instead of requiring developers to use a different technology with a different application programming interface for each kind of communication, WCF provides a common approach and API. WCF provides strong support for interoperable communication through SOAP.. Rahul Saxena shows great interests in working with Microsoft technologies. He specializes in the implementation of Data Base & Graphics. His area of expertise includes: C#, ASP.NET,ADO.NET,Windows... ©2014 C# Corner. All contents are copyright of their authors.
http://www.c-sharpcorner.com/UploadFile/rahul4_saxena/DotNetFramework04182007043446AM/DotNetFramework.aspx
CC-MAIN-2014-52
refinedweb
792
53.07
function divide($a, $b) { return ($a/$b); } $c = divide(4, 2); // assigns an integer value = 2 $c = divide(3, 2); // assigns a float value = 1.5 $c = divide(4.0, 2.0); // assigns a float value = 2.0 If the types of arguments passed to the function are critical, they should be tested as shown earlier in Section 2.1.3. Variable Scope Variables used inside a function are different from those used outside a function. The variables used inside the function are limited to the scope of the function (there are exceptions to this rule, which are discussed later in this section). Consider an example that illustrates variable scope: function doublevalue($var) { $temp = $var * 2; } $variable = 5; doublevalue($variable); echo "\$temp is: $temp"; This example outputs the string: $temp is: and no value for $temp. The scope of the variable $temp is local to the function doublevalue( ) and is discarded when the function returns. The PHP script engine doesn't complain about undeclared variable being used. It just assumes the variable is empty. However, this use of an undefined variable can be detected using the error-reporting settings discussed later, in Section 2.12. If you want to use a value that is local to a function elsewhere in a script, the easiest way to do so is to return the value of the variable. This example achieves this: function doublevalue($var) { $returnVar = $var * 2; return($returnVar); } $variable = 5; $temp = doublevalue($variable); echo "\ elsewhere. There are two exceptions to this general rule: variables passed by reference and those declared global in the function aren't local to the function.
http://www.brainbell.com/tutors/php/php_mysql/Variable_Scope.html
CC-MAIN-2017-04
refinedweb
270
53.31
#include <QModelIndex> #include <QMetaType> Include dependency graph for ItemModelHelper.h: This graph shows which files directly or indirectly include this file: Go to the source code of this file. Definition at line 10 of file ItemModelHelper.h. Definition at line 9 of file ItemModelHelper.h. used by drag and drop functions Searches for an SgNode in a model via SgNodeRole only in first column! Definition at line 7 of file ItemModelHelper.cpp. Referenced by findSgNodeInModel(), AsmView::gotoNode(), and RoseTreeView::gotoNode(). Here is the call graph for this function: Here is the caller graph for this function: Definition at line 33 of file ItemModelHelper.cpp. Referenced by AsmView::addArrows(), and findVariantInModel(). Here is the call graph for this function: Here is the caller graph for this function:
http://rosecompiler.org/RoseQtWidgets/ItemModelHelper_8h.html
CC-MAIN-2018-05
refinedweb
126
51.04
changed: -Check it out! TestPage Check it out! [Page?] changed: -<br>><i> Check it out! TestPage</i> <br>><i> Check it out! [Page?]</i> changed: -that is as close as possible to the free-form title, but does not strip international characters or punctuation. It uses _ for quoting in urls, like MoinMoin. See TestPage for some examples, here's that is as close as possible to the free-form title, but does not strip international characters or punctuation. It uses _ for quoting in urls, like MoinMoin. See [Page?] for some examples, here's changed: -Good question.. I tried using a style attribute on TestPage but didn't get Good question.. I tried using a style attribute on [Page?] but didn't get changed: -Ie TestPage._wikilinks looks like:: Ie [Page?]._wikilinks looks like:: Rewrote the instance-upgrading code, now called upgrade (and upgradeSubscribers). It now enforces the ISO-format time strings, does not change last_editor when upgrading, and should be more reliable particularly with subscriber lists (perhaps solving IssueNo0161?). Lost all the last_editors on this site (I break stuff so you don't have to..). last_edit_time is now displayed by preference (over bobobase_modification_time) everywhere except the tracker, which has yet to be converted. One of the side benefits has been more accurate results in RecentChangesZC? etc. I have catalog indexes & metadata in place for last_edit_time & creation_time, and also lastEditTime which I needed for FastChanges?, and the new links method, which lists all links in a page. All seem to be pretty solid and the ZwikiPerformance? figures show that pre-linking pays off, so that's close to being made the default. I have switched all the zwiki.org pages to pre-linking modes (and pre-rendered every page) so things should be pretty quick around here. All 16 page types & variants are available in the edit form at the moment but I will reduce this to a subset. In fact this whole site could probably get by quite well with only stxprelinkdtmlhtml now (SearchPage? & RecentChanges? used to require htmldtml, but no longer). Now that edit times are no longer linked to the OFS perhaps we can think about the other big painful link, ie History. Packing losses the history which is useful info. I think Zope.org solves this problem by using seperate mounted ZODB. Anyone have any other solutions or thoughts on the "best" solution to this problem? On a similar note, another history based feature I'd like to see (that I major content has come from and which bits are new vs old. I think this would be very valuable in collaborative environment. Perhaps if keeping the whole history is expensive/hard, just keeping enough information for this kind of annotated view would be enough? Thoguhts?. My current thinking on how to support this is to hack ZWiki? (or better comeup with a general solution to supporting strange chars). This solution would entail changing My question is, has anyone tried to do anything like this already? Does anyone have any advice about the best approach? Is anyone else interested in this kind of functionality? Swiki does this well - simple, stable numbered revisions. To achieve this, we might >. I was just doing some FAQ work - but all in a single page. (cf CreatingFAQsInZwiki?). Yes it would be nice to make per-question pages with a name like that. >. What do you think ? > >. > > -- > forwarded from > Mine worked by having an add question form at the footer. This would append the question as inside [ ]?. Worked great except for question marks. > > I like this. This makes life much easier for users. >. This would be might be a problem since "A Question" would be the same as "aquestion" and "A, question?". Maybe that's not a problem, maybe that's a benefit? Since the you're be removing the less meaninful stuff it would allow people to link to what they mean much easier. I wouldn't remove all whitespace however. I'd trim it. Otherwise you would be changing the meaning. > What do you think ? Since your doing quoting for spaces why not just do url quoting all the way? The quoted name gets stored... crap! I just realized that Zope doesn't allow % either!!! That means unless we hack Zope your solution is the only way to go. I'm not sure what the problem the zope guys have with international chars and punctuation. Since they allowed spaces in it's no longer guarenteed python compatible, so why don't they allow full url quoting?? or more chars? If it's allowed in a url it should be allowed in a objectManaged name. (My2c) Looking good. What's the chance of having a downloadable version ready for when I upgrade my FAQ Zope in 5.5 hours time? I'm liking this - hope nothing bad shows up to bite us. :) Now all I need is a script to convert the id's of my old pages to what they will be called now. You don't have the conversion routine handy do you so I could start on that now? > I'm liking this - hope nothing bad shows up to bite us. :) As long as all the old chars are still handled as they used to be.... what about spaces, arn't they removed now? <dtml-in "wikifolder.objectValues(spec='ZWiki Page')"> <dtml-let title=id </dtml-in> or in emacs, I'd open the folder via ftp and rename the files with a keyboard macro. I see you noticed my many attempts at updating the faq page. :( I ultimately ended up with HTML. Thanks for the follow-up -Dean Links can be formed either by writing the bare id/wikiname, or by writing the title in []. Can't tell if it's slow, or everything is today.. the site is not loaded. [standard_error_message/view_source]? -- Ville ------------------------ Simon, I thin you need to update the edit function arount line 1355 in ZWiki?.py. It's test to check if a page exists or not doesn't take into account of the new name conversion. Can you also make public the routines to check if a name exists or not? Thanks to your very nice work the customization needed for my FAQ almost comes down to just this python script comment = "\n - [" + question + "]\n" context.FrontPage.comment(text=comment, use_heading=1, REQUEST=container.REQUEST) id = context.FrontPage._pageWithFuzzyTitle(self, question) if not hasattr(context.FrontPage.aq_parent, page): # set up default content specific to a question page text = "This is a NewFAQQuestion which has yet to be answered}\n\n" text = text + "To answer just Edit this page and replace this text with your answer" context.FrontPage.edit(text=text, page=question) which currently won't work due to a presky underscore. It's not wwml.py ... ANS: it's in StructuredText?/HTMLClass?.py under lib/python on Zope... These aren't finalised yet. It may be that having eg [a page with !]? and [a page with ?]? (or [ÃPage]? and [APage]?) link to the same thing will be too unintuitive ? If we can live with it, we can keep our simple rule for generating the wikiname from any title. If not, then we have to come up with another rule for mapping these characters into a url-safe name. Ideally, the safe name needs to be easy to guess, read, type, and not clash with any other legal name. ... /file.doc/200206060002 - returns the second file.doc uploaded today /file.doc - returns current version of file.doc /GeneralDiscussion?/200206060001 - First message of today I'll try to spend some time to working on this feature in my holidays. PieterB? (I tried sending this message using e-mail, using the subject Status of WikiMail, but it doesn't seemed to work) I think the bottom of the FrontPage? can be improved, by rewriting it to something like: more GeneralDiscussion? Feel free to add your comments via the web. You can also e-mail comments to zwiki@zwiki.org if you are subscribed to one or more wiki's. I'm wondering what happens if the users has more than one WikiName? in the subject. This message has the subject "GeneralDiscussion? WikiMail?". Is/should this message be appended to both wiki's or only to the first mentioned in the subject? with multiple wikinames in the subject, only the first one is used. Re FrontPage?, you can edit it of course. I was thinking of adding a special comment form there which would post to the GeneralDiscussion? page. def pageIdFromTitle(self,title): """ convert a page title made up of arbitrary text to a canonical safe id Constraints for zwiki page ids: - it needs to be a legal zope object id - to simplify linking, we will require it to be a valid url - it should be unique for a given title (ignoring whitespace) - we'd like it be as similar to the title and as simple to read and work with as possible So this version - strips leading/trailing whitespace - capitalizes and joins the whitespace-separated words into a wikiname - converts any non-zope-and-url-safe characters (and _) to _hexvalue - if the last step results in an id beginning with _, prepend X The last lines rewriten as here does the work.: # strip html & body if added (not all zope versions support header=0) text = re.sub( r'(?sm)^<html>\n(.*)<body>\n(.*)</body>\n</html>\n',r'\2',text) return text More on the zodb: I am working through the implementation issues with free-form titles and fuzzy linking. Both are currently enabled here, and backlinks is using the new linkids method which should allow accurate backlinks alongside fuzzy linking. This stuff is expensive; I wasn't able to index linkids without running out of memory so I ran this script at the zeo prompt: >>> for p in w.objectValues(spec='ZWiki Page'): ... print p.id() ... try: ... p.reindex_object() ... except: ... print 'FAILED' ... get_transaction().commit() ... app._p_jar.sync() ... This indexed the thousand pages successfully, but also grew the zodb from 50 to 250Mb. :) I don't know if linkids is the cause or if my catalog in general is just too big and inefficient. Currently I index and store metadata for everything except the page text. 0-day pack: 250 -> 17Mb removed linkids index & metadata updated catalog: zodb grew 17Mb -> 23Mb observed zope memory size at 100Mb.. left over from before ? restarted zope, updated catalog again: memory reached 50Mb, zodb grew 5Mb updated catalog again: zodb grew another 5Mb.. it's like that eh reindexed just the links field: zodb grew .4Mb re-added the linkids index, reindexed it: memory grew to 100Mb, browser timed out as zope worked for 5-10 minutes (expected since linkids is slow), apparently succeeded, zodb grew .5Mb re-added linkids to metadata, reindexed linkids again: looked like above but taking much, much longer - killed after one hour; no significant zodb growth, several conflict errors, site unusable during this time So rebuilding the whole linkids index is expensive in cpu time and memory; updating the whole catalog is expensive in zodb bloat. That makes sense. I don't understand what's happening with the last step. Accurate backlinks are cool when your catalog is all current; for the moment I have reverted to the usual exact-matching backlinks here. Suggestions for resources for learning navigating & managing CMF also appreciated, via email, DeanGoodmanson?, or here if appropriate. Yes, seems to be working well > These aren't finalised yet. It may be that having eg [a page > with !] and > [a page with ?]? (or [=C3Page]? and [APage]?) link to the same > thing will be > too unintuitive ? I think that is fair enough. I think most search engines do this kind of translation for instance. But perhaps someone who is working with an i18n wiki would be better placed to comment. All I needed was the question mark :) Probably make it look slicker I guess. Seems to impress people. > - how to increase awareness of known bugs & solutions in > current releases ? How about, CurrentBugs? and ChangesLog? type pages being released as default pages in a release. These would be linked to the FrontPage? and have links to the last info on zwiki.org > - how to increase awareness and ease of upgrading to latest > code & template ? Upgrading is still a pain. Every upgrade I have to find and delete the default pages and headers/footers and then copy over the new set from a newly created Zwiki folder. There has to be a better way than this. Perhaps the way CMF does it? Perhaps someway to merge wiki pages during install? Pehaps refactoring to make common customizations exist in files that shouldn't be replaced. One way to do this for instance might be with ZPT and macros. A standard_wiki_view.zpt could be customizable, but it could reference macros to do "functionality" type stuff. > - how to improve people's experiences at zwiki.org ? Knowing how old info is I think is helpful for any wiki and something zwiki doesn't handle 100% well. I think I saw this one on another wiki. Use tool tip on links to say how old the page it links to is (could just use the ALT tag to do this), and who last edited the page. A comment on a similar theme would be to turn all cababilites on by default and let people turn them off. Uploading images is a function that most people don't know about because they have to turn it on. I would like each comment tagged with an < a tag, and that tag listed in the email sent out : e.g forwarded from: I'll add to to this one after posting your for experimentation. This may make it easier for people to reference a discussion point they're replying to, also. (Then again, that may get cryptic, let's hope that ole fashion correspondence protocol remains.) Many other nits, including archiving. :( Food for disection, I guess.. WikiLinks? being turned into real links in the email might be good. This might mean the use of HTML mail which might be bad :( Maybe just an ugly link in brackets next to the WikiName?? or perhaps an email appendix with a name -> link index? # a wikiname - if a page (or something) of this name exists in # this folder, link to it elif hasattr(self.aq_inner.aq_parent.aq_base, m): #elif m in self.aq_inner.aq_parent.objectIds(): #return '<a href="%s">%s</a>' % (quote(m), m) # wiki links were made absolute for robustness in editform etc. # a relative_urls property can re-enable the old behaviour linked_page = getattr(self.aq_parent,m) if getattr(self.aq_parent,'relative_urls',None): return '<a href="%s" title="last edited by %s on %s">%s</a>' % \ (quote(m),getattr(linked_page,'last_editor'),getattr(linked_page,'last_edit_time'), m) else: return '<a href="%s/%s" title="last edited by %s on %s">%s</a>' % \ (self.wiki_url(),quote(m),getattr(linked_page,'last_editor'), \ getattr(linked_page,'last_edit_time'), m) PieterB?: I'm not making the connection to the / seperator for the discussion page & the post. Sounds mystical. >> WikiWikiWeb:EvolutionOfaWikizen - My "Favorites" menu resembles that! (By the way, I suggest using your personal Wiki instead of Favorites experiment.) John: Thanks for the title attr...I'd been wanting that piece of info for awhile. Which segues into another thought I had last night. I too use a personal wiki for favorites. It does lack the convinience however of a one or two click "add to favorites" button. Anyone experimented with a javascript link that can be embeded in an IE toolbar (no idea about other browsers) that would automatically add the link and the title to a certain page? Avantgo has something like this... in fact here it is "javascript:location.href= +escape(window.location)+'&title='+escape(document.title);" I should have a go at massaging that into a wiki comment url. But what about quickly adding to a group? I wonder if there is any possible webdav/IE favourite type intergration.... Excuse me while I experiment with the following short-term end-user possibilities: a. Don't fill in a UserName? in the UserOptions? - BUT... that will require you to sign your posts...and other stuff (this comment posted without a UserName? ) b. Remove your email address in the UserOptions? . BUT... this will come back when you resubscribe, and you'll have to go remove it again. And, by the way, with the TimeZone? of CST ... anyone know if that's the right one for Central? Right now it's 9:44 and my previous post listed 2:53 GMT. Dylan: Cool idea on the IE toolbar thing. Mozilla has it's own extensions, sidebar's I thnk they're refered too, and revered by many. (Mark Hammond built a cool Python docs search tool.) >> But what about quickly adding to a group? a. I'd suggest the "Bookmarklet" Javascript prompt the user for a quick comment on the site, and put it into a general "sort me later" bin , this way it is less likely to get forgotten. b. Speaking of prompts, could it prompt you with a (predefined) selection list of topics (eg. Wiki Pages) to add the link to? Barely getting a handle on HTML ... now Javascript is asking for attention! ;-) Three cheers for ZWiki? (and I suppose ZoPE?) as the "shell environment" of the web development world! Off topic, I'm had a few URL not get completely recognized by the ZWiki? URL recognizer. Is this known or should I submit these URL's to a bug report? (Crazily enough I was reading about regular expressions and found one for recognizing URLs?, ecxept it included a checkmark character...am I seeing things? I'm at home, the link is at home. I'll post it per reader interest.) Finally, don't forget to nominate your favorite unsung hero in the Python, Perl and TCL world at the ActiveState? Active Awards 2002 To use: "Regular expression patterns are compiled into a series of bytecodes, which are then executed by a matching engine written in C." - "Regular Expression HOWTO" , (. ) This seems to answer the question, but maybe not to the extent of your question. Seems Pie-in-the-sky, but breaking free of the text box page editor is a dream of mine...at least for the search/replace capabilities. I understand they're a way to integrate it with a popular text editor...but psuedo WYSIWYG would be take it to the next level...or potentially make the Wiki pages completely unreadable. Error Type: AttributeError? Error Value: aq_inner I can't find a HTML-traceback in the source (this might be a new security feature op Zope 2.6). Any suggestions of how to debug this weird behaviour? You could just shift-tab a couple of times to get up to the edit link. Or standard_wiki_footer could be changed so the edit link is: <a href="&dtml-wiki_page_url;/editform" ACCESSKEY="E">edit this page</a> Then on a page you could just go alt-e (then enter in IE, no need in Mozilla) to change it. <body bgcolor="#FFFFFF" onload="document.forms[0].text.focus();"> Javascript, but won't cause any problems to those with js turned off. Just helps the majority with it. Google does the same focus trick when you visit their page. If only html supported keyboard shortcuts. Might be possible via javascript I guess. Wow, you learn something new (about html) everyday. As in what the regular expression for what a WikiName? is? I'd like to see that two. In my wiki's I quite like TLA's to be WikiNames? but this isn't the default. Yes, it's either ZWikiSites? or ZwikiSites?. Thanks for this Pieter.. I added it to the tracker today. Using zope 2.5.0 I did get a traceback. I couldn't copy it at the time (was using w3m browser with mouse support turned on) but I posted the essentials on the issue page. I would like to suggest an upgrade, but not sure which version I should suggest? I'd like a version with the mass-subscription annoyance fix ( IssueNo0161? ) ... Does the current source have a unique version #? It would be nice if we had a stable branch in cvs (last release + important bugfixes) but so far this has seemed like too much work. We are getting closer to stabilising 0.9.10. Meanwhile my recommendation for cautious upgraders would be to install 0.9.9 and check KnownIssues? for anything important to you, and patch those manually. The fix for IssueNo0194? should be handy - no more need to escape wikinames inside <a></a> As a side issue, what would you think of using the latter format in the page header and possibly even in RecentChanges? ? It has the advantage of being timezone-independent. I forgot to link the list of AccessKeys?. Be gentle while using external editor. Once we figure out the glitches and gotchas it should be a big help. Since u never want to cache a Wiki then I think it's an excellent idea. I mean that's what people really want to know, how old it is. Good question.. I tried using a style attribute on [Page?]? but didn't get it working. Maybe someone on G.D can help. Also really like all those new tooltips. Jacob would be proud. And the relative edit times at the top. And the AccessKeys?. That's good to know.. I thought something was. Here's a description of the linking code after this morning's refactoring, for those interested: # XXX refactoring in progress. A couple of ways to get stuff linked: # # 1. the old way # _oldRenderLinksIn(text) or wikilink(text) - called at view time # replaces interwiki links in text # calls _replaceInterWikilink for each # replaces other links in text # calls _replaceWikilink for each # # 2.1 the new way (link arbitrary text) # renderLinksIn(text) - called at view time # replaces links in text # calls _renderLink for each # # 2.2 the new way (link this page's text with caching) # _preLink() - called at edit time # searches for valid links in self._prerendered # caches them with text regions in self._prelinked (also self._wikilinks) # _renderWithLinks() - called at view time # calls _updateLinkRenderings() # calls _renderLink for each cached link # calls _replaceInterWikilink & emulates _replaceWikilink # caches rendered link in self._wikilinks # interpolates rendered links with cached text regions # saves final text back in self._prerendered, re-cooking if it changed _renderWithLinks and it's helpers are probably to blame, perhaps because of the way they save the latest link renderings on each view. It should be possible to avoid saving a new version if no link renderings have changed (ie none of this page's link targets have been added or deleted since last rendering). { 'InternationalCharacterExamples': '<a href="/InternationalCharacterExamples" title="last edited 3 weeks ago by simon">InternationalCharacterExamples</a>', '[\xc3 link containing international characters]': '<a href="/X_c3LinkContainingInternationalCharacters" title="last edited 3 weeks ago by Simon">\xc3 link containing international characters</a>', etc. As you can see including the last edit interval in link titles interferes with link caching somewhat. The link rendering will change more frequently especially with young link targets, eg "last edited 30 seconds ago".. "last edited 2 minutes ago".. etc. Other ideas welcome. Pre-linking pages no longer generate a zodb write every time you view them. A write-on-view should now happen only if one of the link targets has been added or deleted since last viewing. Because I like having dynamic link titles, I now render them in a final pass separate from link caching & dtml. A potential downside of showing current target information in link titles: on each page view every link target is woken up, which might have a memory/speed impact when there are many links. Eg RecentChanges?, contents. Also, to get the link title for freeform names in contents/parent context I would need to look up the true id. That's expensive so I just punt for now. > As you can see including the last edit interval in link > titles interferes with > link caching somewhat. The link rendering will change more frequently > especially with young link targets, eg "last edited 30 > seconds ago".. "last > edited 2 minutes ago".. etc. Other ideas welcome. Don't pre-render the page. Perhaps cache some expensive stuff like working out what's a link or not, but not the actual page rendering. Use a ZCatalog?. Put the last modified time as metadata. That's one of the main reasons to use a catalog, to cache data in one place so you don't have to wake up lots of objects. Don't solve a solved problem. Integrate with mailman. Look how big their auto-responder code is, why do you want to reinvent that? I think a tight integration between wiki and listserver would be a hot feature.
http://zwiki.org/GeneralDiscussion200206/diff?rev=2
CC-MAIN-2020-10
refinedweb
4,155
67.55
A writing contest for all seasons Pasatiempo, Inside Locally owned and independent Friday, December 27, 2013 The New Mexic an’s Weekly Maga zine of Arts, Enter tainment & Cultu re December 27, 2013 ng iti Vandals batter de Vargas st nte Co $1.25 ‘Thrones’ creator Martin offering VIP experience Life-size Cathedral Park statue ‘broken up pretty bad’; repairs underway George R.R. Martin plans free screenings of his hit show at the Jean Cocteau Cinema with a chance to interact with the cast. LOCAL NewS, B-1 Gaps in repeat DWI offender’s history lead to confusion Despite multiple drunken-driving convictions, a Santa Fe man arrested on Christmas Eve convinced a judge in 2009 to let him keep driving. LOCAL NewS, B-1 Artist Brett Chomer points to where he is bolting down the Don Diego de Vargas statue to its base outside his studio on Thursday. Chomer is restoring the 550-pound statue, which was defaced and damaged recently at Cathedral Park. JANE PHILLIPS/THE NEW MEXICAN More than 5,000 unemployed will stop receiving extended payments By Daniel Chacón The New Mexican A fearless Don Diego de Vargas reclaimed Santa Fe from the Pueblo Indians in 1692. But a life-size bronze statue of the Spanish conquistador was no match for modern-day vandals. Since the statue was installed in downtown’s Cathedral Park in 2007, it has been fractured, defaced, sprayed with graffiti and, most recently, nearly knocked off its pedestal. The damage was so bad that the city was forced to pluck the statue out of the park with a crane and haul it away in the back of a pickup for repairs. “It was broken up pretty bad,” said Gilbert Romero, past president of Los Caballeros DeVargas, the religious and civic organization that led the effort to install the statue. “They broke the sword and other stuff on it,” he said. “The piece they broke off, they took it with them.” The statue, now at Brett Chomer Studio, eventually will be reinstalled in the park with a reinforced pedestal, city Parks Director Ben Gurule said. “One of the guys, when he was cleaning around the wall, he noticed that somebody had been prying it off,” Gurule said. “Good thing we caught it because it looked like they were probably planning to steal it. Nowadays, they’re stealing everything that’s made out of metal and scrapping it.” However, Romero said the sheer size of the statue, which weighs about 550 pounds, would make it hard to steal. “I think what they were trying to do is knock it down,” he By Bruce Krasnow The New Mexican “As soon as those repairs are made, we will reinstall the piece in Cathedral Park,” she said. The bronze restoration work will cost less than $2,000, she said. The statue, atop a 2-foot base, is based on a portrait of de Vargas and portrays him slightly taller than his reported height of With New Mexico still teetering on the edge of recession, more than 5,000 job hunters are set to lose their unemployment benefits since Congress has decided not to extend an emergency program meant to get workers through the recession “Nationwide, we are all watching. The benefits are set to end Dec. 31,” said Joy Forehand, deputy director of the state Department of Workforce Solutions. Workers who involuntarily lose a job are entitled to up to six months of unemployment benefits, which are paid through an insurance premium program assessed to businesses. The money is meant to stabilize family incomes — and the economy — while workers look for new employment. But because of the high jobless levels during the recession, emergency unemployment benefits were instituted by President George W. Bush in 2008 and paid by the federal government. Since then, the federal government offered repeated extensions, each lasting a period of several months — and some workers have collected compensation for 99 weeks. The program has paid out $225 billion in benefits, according to The Washington Post. A further extension of benefits was left out of the bipartisan federal budget agreement reached this month, though advocates point out that it takes the average job hunter almost eight months to get hired, compared to less than five months before the recession. “Even though those benefits are modest, it’s what puts food on the table and pays the heating bills,” Christine Owens, executive director of the National Please see STATUe, Page A-4 Please see JOBLeSS, Page A-4 Orlando Sena of Shidoni Art Services maneuvers the statue of Don Diego de Vargas into place while Roger Lamoreaux places it in Cathedral Park with a crane in preparation for its dedication on June 3, 2007. NEW MEXICAN FILE PHOTO said. “It’s too heavy to walk off with it.” Debra Garcia y Griego, executive director of the city Arts Commission, said the Parks Department notified her about six weeks ago that the sculpture was loose on its base. “We did feel that it was a hazard for both the piece and potentially for somebody who might pull on it or bump into it,” she said. The artist, Donna Quastoff, agreed on the repairs “that are in progress now,” Garcia y Griego said. Snowboarding loses its cool Poll: Americans hope for a better year in 2014 By Chuck Slothower The Durango Herald DURANGO, Colo. — past Index Calendar A-2 Loss of jobless benefits puts thousands in N.M. on edge Classifieds C-3 By Jennifer Agiesta Seiya Bowen of Albuquerque snowboards at Ski Santa Fe earlier this season. LUIS SÁNCHEZ SATURNO/THE NEW MEXICAN wider, with rocker shapes, deep side cuts and other innovations that originated in snowboard designs. Twin-tip skis have curved-up tips and tails. “Definitely, skiing has benefited from Comics C-8 Please see SNOwBOARDINg, Page A-4 Lotteries A-2 Opinion A-7 Police notes B-2 Editor: Ray Rivera, 986-3033, rrivera@sfnewmexican.com Design and headlines: Dennis Rudner, drudner@sfnewmexican.com Today The Associated Press Plenty of sunshine. High 46, low23. WASHINGTON — also shows that people generally are looking forward to the new year with optimism and no blatant sense of foreboding, it also unmasks pent-up PAge A-6 Obituaries Ruth Elaine Coleman, 79, Santa Fe, Dec. 16 PAge B-2 Sports B-5 Time Out A-8 Generation Next C-1 Main office: 983-3303 Late paper: 986-3010 worries about international crises and instability, and concerns at home about the standard of living, health care and schools. The following is what the public thought of 2013: good year or good riddance? On the whole, Americans rate their own experience in 2013 more positively than negatively, but when asked to assess the year for the United States or the world at large, things turn sour. u All told, 32 percent say 2013 Please see 2014, Page A-4 Three sections, 24 pages Pasatiempo, 64 pages 164th year, No. 361 Publication No. 596-440 A-2 THE NEW MEXICAN Friday, December 27, 2013 NATION&WORLD MarketWatch DOW JONES RUSSELL 2000 s +122.33 16,479.88 s +0.85 1,162.65 World’s hottest pepper grown in S. Carolina By Jeffrey Collins The Associated Press FORT MILL, S.C. d. Pharmacist Wilbur Scoville devised the scale 100 years ago, taking a solution of sugar and water to dilute an extract made from the pepper. A scientist would then taste the solution and dilute it again and again until the heat was no longer detected. So the rating depended on a scientist’s tongue, a technique that Callo- In brief BANGUI, Central African Republic — Elodiane Baalbe hid underneath her bed as gunfire echoed around her on Christmas Day in the capital of Central African Republic. When it finally died down on Thursday,, Classified line ads way. He also is determined to build his company, PuckerButt Pepper Company, into something that will let the 50-year-old entrepreneur retire before his young kids grow up.. In late January, Obama will give his fifth State of the Union address, setting his agenda for the final stretch before the 2014 midterm elections, in which all of the House and one-third of the Senate are on the ballot. African leaders push for South Sudan peace talks JUBA, South Sudan —. UNIQUE THIS WEEK Home delivery Tamara Hand Michael Campbell Ed Currie holds three Carolina Reaper peppers in Fort Mill, S.C. Last month, The Guinness Book of World Records decided Currie’s peppers were the hottest on Earth. JEFFREY COLLINS/THE ASSOCIATED PRESS The Associated Press J. Abe’s visit and the first anniversary of his second term as prime minister also coincided with events in China commemorating the 120th birthday of late leader Mao Zedong.. South Korean Culture Minister Yoo Jin Ryong deplored Abe’s visit to the shrine, which he said “glorifies Japan’s history of militaristic aggression and colonial rule.” “The United States is disappointed that Japan’s leadership has taken an action that will exacerbate tensions with Japan’s neighbors,” the U.S. Embassy in Tokyo said in a statement that first described Japan as “a valued ally and friend.”.” Calendar Ginny Sohn Advertising Director Los Angeles Times HONOLULU —lived. By Carol J. Williams Obama signs bipartisan budget deal, defense bill Newsroom 986-3035 Friday, Dec. 27 35MM ARCHIVAL FILM SERIES: The Lensic and the Academy Film Archive present the 1954 musical White Christmas at 2 p.m. and the 1962 film Lawrence of Arabia at 7 p.m. 211 W. San Francisco St. BEE HIVE STORY TIME: At 11 a.m. at Bee Hive Kids Books, musical story time with movement and songs, for ages 2 to 5. 328 Montezuma Ave. HOLIDAYS AROUND THE WORLD: At 6 p.m. at Georgia O’Keeffe Museum Education Annex, a family drop-in craft event to create paper lanterns, holiday dream catchers, paper poinsettias, and New Year’s treasures. 123 Grant Ave. NIGHTLIFE Please recycle s +11.76 4,167.18 s +8.70 1,842.02 Japan’s prime minister draws ire after visit to WWII shrine two in yet another and so on. The bodies were wearing civilian dress, but we cannot know if they really were civilians or if they were militiamen,” said Yao. Mass grave found in Central African Republic NASDAQ COMPOSITE STANDARD & POOR’S 500 Friday, Dec. 27 ANNIE: Presented by Musical Theatre Works Santa Fe, 7 p.m. 1600 St. Michael’s Drive. CAFÉ CAFÉ: Guitarist Michael Tait Tafoya, 6 p.m. 500 Sandoval St. CHISPA! AT EL MESÓN: Three Faces of Jazz, 7:30 p.m. 213 Washington Ave. COWGIRL BBQ: Country songwriter Bill Hearne and his band, 5-7:30 p.m.; local zydeco/ Tejano/juke-swing band Felix y Los Gatos, 8 p.m. 319 S. Guadalupe St. HOTEL SANTA FE: Guitarist/ Lotteries flutist Ronald Roybal, 7-9 p.m. 1501 Paseo de Peralta. LA FIESTA LOUNGE AT LA FONDA: Blues band Night Train, 8-11 p.m. 100 E. San Francisco St. LA POSADA DE SANTA FE RESORT AND SPA: Nacha Mendez Trio, pan-Latin rhythms, 6:30-9:30 p.m. 330 E. Palace Ave. MINE SHAFT TAVERN: DJ Sass-a-Frass, 5 p.m.; open mic with Jason, 7-11 p.m. 2846 N.M. 14. MUSIC ON BARCELONA: Music of Dvorak and Jolivet, call Robert Jones for more information at 424-0994. 5:30 p.m. 107 W. Barcelona Road. PRANZO ITALIAN GRILL: Geist Cabaret with pianist David Geist, 6-9 p.m. 540 Montezuma Ave. SECOND STREET BREWERY: Busy & The Crazy 88s, hipster pop, 6 p.m. 1814 Second St. VANESSIE: Pianist/vocalist Doug Montgomery, pianist John Randal, 6-11 p.m. 427 W. Water St. SKI rESorTS Be sure to check with individual ski area for conditions before you head to the slopes. SKI SANTA FE: Distance from Santa Fe: 16 miles. Call 982-4429. Visit www. skisantafe.com or call 983-9155 for snow report. PAJARITO: Distance from Santa Fe: 35 miles. Call 662-5725. Visit or call 662-7669 for snow report SIPAPU SKI & SUMMER RESORT: Distance from Santa Fe: 75 miles. Call 575-587-2240. Visit www. sipapunm.com or call 800587-2240 for snow report. TAOS SKI VALLEY: Distance from Santa Fe: 90 miles. Snowboarding is allowed. Call 575-776-2291. Visit www. skitaos.org or call 776-2916 for snow report ANGEL FIRE: Distance from Santa Fe: 94 miles. Call 575-377-6401. Visit www. angelfireresort.com or call 800-633-7463, ext. 4222, for snow report. RED RIVER SKI AREA: Distance from Santa Fe: 106 miles. Call 575-754-2223. visit or call 575-754-2223 for snow report. SKI ENCHANTED FOREST CROSSCOUNTRY SKIING & SNOW-SHOE AREA: Distance from Santa Fe: 106 miles. No downhill skiing or snowboarding. Call 1-800-966-9381. Visit or call 575-754-2374 for snow report. SKI APACHE: Distance from Santa Fe: 200 miles. Call 575-336-4356. roadrunner 4–7–8–9–22 Top prize: $29,000 Pick 3 4–4–8 Top prize: $500 Corrections The New Mexican will correct factual errors in its news stories. Errors should be brought to the attention of the city editor at 986-3035. Visit or call 575-257-9001 for snow report VoLUNTEEr PEOPLE FOR NATIVE ECOSYSTEMS: Join the feeding team for the endangered prairie dog colonies in Santa Fe. Call Pat Carlton at 988-1596. For more events, see Pasatiempo in Friday’s edition. To submit an events listing, send an email to service@ sfnewmexican.com. NATION & WORLD Friday, December 27, 2013 THE NEW MEXICAN A-3 Court reverses church official’s conviction Lynn charged with child-endangerment in handling of priest sex-abuse complaints By MaryClaire Dale The Associated Press PHILADELPHIA — A Roman Catholic Church official who has been jailed for more than a year for his handling of priest sexabuse the end of the process,” District Attorney Seth Williams said in a statement. His office contended at trial that Lynn Monsignor Williamendanger Activists: Syria will let food into rebel town By Diaa Hadid The Associated Press BEIRUT — Residents of a blockaded rebel-held town near Damascus raised the flag used by the government of Syrian President Bashar Assad in a deal that sees them accept symbolic humiliation in exchange for food, activists said Carolyn Baca (505) 820-1442 $800Off of Santa Fe FINE FURNITURE MATTRESSES • UPHOLSTERY • PATIO FURNITURE SHOP TODAY & TOMORROW 10 A.M. - 9 P.M. COUNSELING for POSITIVE CHANGE 57356 AFTER CHRISTMAS 110 Del Rio Dr. LP LISW | 986-8804 SAVINGS Lynn Landis Financial Advisor 40 218 East Marcy Street Santa Fe, NM 87501 % lynn.landis@raymondjames.com Let’s have a conversation: MARKET SPECIAL SOFA 504 W. Cordova Rd., Santa Fe • Just up from Trader Joe’s • 982-5555 Mon, Fri, & Sat 9-7, Tues-Thur 9-6, Sun 1 1-6 Do You Have Enough To Retire On? Enough information, that is? 505-982-1904 • 800-233-4108 DS 1st N E C. 3 DE plaints. Now Open til 7pm Mon, Fri & Sat Most insurance, Medicare © 2013 Allstate Insurance Company residents will protect it. They will carry weapons and set up checkpoints to prevent the entrance of strangers who came from around the world to destroy our country,” said Nakhleh in an interview with the Lebanonbased Al-Mayadeen TV. He added that state institutions will gradually return to normal work and all gates will be opened in order for food and other stuff to enter the town so that life returns to normal. com- RAYMOND JAMES & ASSOCIATES, INC. ©2013 Raymond James & Associates, Inc. member New York Stock Exchange/SIPC OFF Member New York Stock Exchange/SIPC ORIGINAL PRICE Don’t scrap a Treasure Let the experts at LADIES SELECT BOOTS & BOOTIES Choose from Born, GB, Gianni Bini, Arturo Chiang, Antonio Melani, Alex Marie & more. advise you. “We buy every day” Inside La Fonda Hotel • Please Call for an appointment 983-5552 Graduate Gemologist on Staff: M B FGA, DGA, NJA Brian McPartlon Roofing LLC. Don’t replace your roof, recover it 505-982-6256 • 25 % SANTA FE SPIRITS OFF SELECT LADIES COATS Mixed Spirits Crate $55 200 ML hand-crafted spirits made in New Mexico. Perfect for New Years! 308 Read Street | 7505 Mallard Way Unit 1| Santa Fe 505-467-8892 | 40 % OFF CHILDREN’S SPORTSWEAR 40 % OFF LADIES HOLIDAY GLITZ DRESSES & GIRLS DRESSES 50 % OFF ENTIRE STOCK MEN’S GIFTS 40 50 % % OFF OFF ORIGINAL PRICE SELECT LADIES SELECT LADIES& COLLECTIONS SLEEPWEAR SPORTSWEAR ENTIRE STOCK TRIM-A-HOME & CHRISTMAS DINNERWARE 40 30 % % OFF OFF YOUNG MEN’S APPAREL & DENIM COLLECTIONS REGULAR PRICE JEWELRY FROM ANNA & AVA, NATASHA & MORE Selection varies by size and store. Previous markdowns may have been taken. Call 1-800-345-5273 to find a Dillard’s store near you. A-4 THE NEW MEXICAN Friday, December 27, 2013 2014: Top moment in pop culture was birth of a prince Continued from Page A-1. u). u. Artist Brett Chomer points to where he is bolting the Don Diego de Vargas statue down to its base outside of his studio on Thursday. Chomer is restoring the statue after vandals tried to knock it over. JANE PHILLIPS/THE NEW MEXICAN Statue: Surveillance cameras suggested Continued from Page A-1 5 feet, 2 inches tall. The oil painting depicts de Vargas with a pencil mustache, a goatee, thick hair slightly below his shoulders and period attire. He holds a spear in his right hand and a cap in his left. “We went exactly how the history books and that picture display him,” Romero said. “We’re pretty proud of him and what we did.” City Councilor Carmichael Dominguez, who portrayed de Vargas during the 2000 Fiesta de Santa Fe, said the city should try to “send a message out” that Santa Fe is a respectful community. “Santa Fe has no place for that kind of vandalism,” he said. City Councilor Ron Trujillo, who portrayed de Vargas during the 1994 Fiesta, said the city could consider installing surveillance cameras at Cathedral Park. But vandalism is a problem citywide, he said. Romero said he, too, believes the city could install surveillance cameras at the park. “It’s sad that this happens,” he said. “My personal belief, I know it’s not somebody that’s local that was brought up with our traditions. But I can’t say who would’ve done it.” Romero said the Cross of the Martyrs, which commemorates the death of 21 Franciscan friars and Spanish colonists during the Pueblo Revolt of 1680, also has been vandalized almost every year except this one. “They paint that thing all the way to the top. I don’t know how they do it,” he said. “The Caballeros were even tempted to put their own camera up there.” Contact Daniel J. Chacón at 986-3089 or dchacon@sfnewmexican.com. Snowboarding: Ski industry sees growth Continued from Page A side- Despite being significantly less expensive than skiing, snowboarding numbers have dropped off. NEW MEXICAN FILE PHOTO ways on one plank somehow was malign or dangerous. Agnew grew up ski racing, but he switched to snowboarding about 20 years ago and never looked back. That was when snowboarding was not widely accepted. “I do recall being a thirdclassis might. u Younger Americans are least apt to spend the holiday at home: 39 percent of those under age 30 will celebrate at home, 33 percent at someone else’s home, 13 percent at a bar or other venue. u. u. u Less conventional choices: 2 percent cite their pets, 3 percent God, Jesus or their religious congregation, and less than 1 percent said they wanted to ring it in with their coworkers. u Of course, some opt out altogether: 18 percent say they’re not planning to celebrate on New Year’s Eve, and 9 percent say there’s no one with whom they’d like to party, preferring instead their pillow, TiVo or their own thoughts. What mattered in news underway. It rose quickly, with 8 percent naming it as the most important news of the year, matching the share citing the federal government’s Miley Cyrus’s. u Among men, 64 percent called the debate on work-life balance sparked by the book Lean In and other writings forgettable. About half of women agreed. u About 1 in 5 younger Americans said the launch of original programming through streaming services like Netflix or Hulu was a memorable moment, about doubling the share among those age 50 and up. u-9 and involved online interviews with 1,367 adults. The survey has a margin of sampling error of plus or minus 3.5 percent. Jobless: Job growth in state remains flat compared to rest of U.S. Continued from Page A-1 Employment Law Project, said in a statement. “A lot of people are living on the edge.” Opponents claim the program was part of an emergency effort to help during the recession, not a permanent entitlement. The savings from ending the spending is needed to offset budget spending cuts elsewhere, such as the military, they argue. In New Mexico, the National Employment Law Project estimates the average weekly payment under the extended program is $302 for a 28-week period, with $106 million paid A further extension of benefits was left out of the federal budget agreement reached this month, though advocates point out that it takes the average job hunter almost eight months to get hired, compared to less than five months before the recession. over the past fiscal year. That money rippled through the New Mexico economy and created almost 1,000 jobs, according to an analysis by the National Employment Law Project. That organization also suggests that the impact extends well beyond the 5,000 to 6,000 now collecting the extended benefits in New Mexico — as another 9,700 people who more recently lost a job might benefit in the coming year. Forehand at Workforce Solutions put the number of unemployed receiving the extra help at 5,400 as of December and said the state is doing all it can to communicate with those who will be losing the assistance — the unemployment insurance call center is alerted to the situation, and the state will be posting the latest information on the Department of Workforce Solutions website. She added that Congress might come back in January and authorize back payments, but that won’t help those who won’t be getting benefits the first week of 2014. New Mexico’s unemployment rate stands at 6.4 percent, down from 6.7 percent a year ago. But New Mexico’s job growth is still slower than that in the rest of the United States when you look at the percentage of new jobs compared with the labor force. Between October 2012 and 2013 the state added 1,900 jobs, for instance, but that was just 0.2 percent of the total labor force and ranked 47th in job growth nationally, ahead of only Kentucky and Alabama, which had smaller gains, and Alaska and the District of Columbia, where jobs were lost, according to the federal Bureau of Labor Statistics. “The New Mexico economy has struggled to recover from the recent recession, and has lagged the nation in employment gains over the past four years,” according to a recent report from the Denver branch of the Federal Reserve Bank in Kansas City. The Washington Post contributed to this report. Contact Bruce Krasnow at brucek@sfnewmexican.com. NATION & WORLD Friday, December 27, 2013 THE NEW MEXICAN A-5 Insurance-cancellation reprieve met with relief Consumers happy to keep old policies despite rising costs By Emery P. Dalesio Associated Press RALEIGH, N.C. —. New Mexico decided to allow the continuation of older policies through 2014 even before the Obama administration encouraged it. One insurer that provides coverage to nearly 3,000 people opted against an extension. Older policies are being allowed to continue in 35 other North Carolina, Blue Cross and Blue Shield, which controls about 80 percent of the state’s market, reprieve, but I would still like a permanent fix because I don’t need abortion coverage, I don’t need maternity coverage,” Poley said.. Travel Bug U.S. missiles help Iraq fight war on terror S Y S T E M S 933 Baca Street 471-9036 Serving Northern NM since 1988 IMPORT BUY • SELL • TRADE PRECIOUS METALS 438-7112 SPECIALISTS Coins ~ Currency ~ Gold ~ Jewelry Santa Fe’s Local Source Since 1997 A 855A Cerrillos (next to Who’s Donuts) 505-989-7680 • M-F 10-5, Sat 11-4 & SER NO W SAT OPE N UR D 11a m-4 AY pm Think Chapman Homes. Free estimates! 983-8100 chapmanhomes.com 2721 Cerrillos Rd. Santa Fe, NM 87507 Building and remodeling homes since 1966 WE’RE CLOSED 855-270-7216 Now Makes an for New Year’s Day Wednesday, Jan. 1, 2013 Now servicing all makes & models 2 years or 24,000 mile warranty on parts & labor. The staining on your glassware & plumbing may not be hardness, but silica. Bring us your city or well water sample for FREE silica testing. PREMIER IR Sanbusco Center 989-4742 F I L T E R CE Holiday specials Silica Staining ERT AU REP WANT A GUEST HOUSE? Andrew Ropp Spanish - French - Italian Small Convesational Classes 839 Paseo de Peralta 992-0418 VI Custom Art & Picture Framing Since 1973! 473-1901 Sat December 28 5 pm EXP made use of the war in Syria, which borders Anbar, to rebuild its organization in Iraq. Hardline fighters are believed to shuttle between the two countries. According to U.N. estimates, more than 8,00 parent organization said. The Paris-based National Council of Resistance of Iran said in an emailed message that “dozens” of rockets killed two Nepal TO confirmed the missile shipment and also said that the United States was planning on sending BAGHDAD — The U.S. has ScanEagle drones. sent Hellfire air-to-ground mis“The United States is comsiles to Iraq’s air forces, which mitted to supporting Iraq in its are using them in an ongoing fight against terrorism through campaign against the country’s the Strategic Framework Agreebranch of al-Qaida, officials in ment,” she said, referring to Washington and Baghdad said a 2008 pact between the two Thursday. nations. “The recent delivery of Two Iraqi intelligence officers Hellfire missiles and an upcomand a military officer said that ing delivery of ScanEagles are 75 Hellfires arrived on Dec. 19 standard foreign military sales and more will be shipped in the cases that we have with Iraq to future. strengthen their capabilities to They said the missiles are combat this threat.” being used now by four Iraqi Hellfires are widely used by King Air propeller planes durU.S. forces in their campaign ing a large-scale military opera- against al-Qaida, often targeting tion in the western desert near militant hideouts or vehicles. the borders with Syria. An intelIraq launched its operation ligence official said that the mis- in the largely desert province siles were proven “successful” of Anbar followed the weekend and were used to destroy four killing of a senior military commilitant camps. mander, a colonel and five solJen Psaki, a spokeswoman diers in an ambush. for the U.S. State Department, Al-Qaida is believed to have By Qassim Abdul-Zahra The Associated Press Still, even before Obama’s announcement, a pathway existed for many to hang onto policies that didn’t conform to the ACA requirements, at least for a brief period of time. Many states allowed insurers to offer early renewals to nonconforming policies, but some of those will expire on March 31. Consumers Union health care reform analyst Lynn Quincy said staying with an existing policy is a natural starting point. But renewing an existing policy with a high deductible or excluding types of coverage needed later may not be for the best. “If your old coverage continued, that’s fine. But look at your other options before enrolling, because you can’t be turned down now” for pre-existing health conditions, she said. The offices of The New Mexican will be closed Wednesday, Jan. 1, and will reopen 8 a.m. Thursday, Jan. 2. While normal delivery will occur New Year’s day, Circulation Customer Service will be closed, and the call center will reopen at 6 a.m., Jan. 2. The newsroom can be reached at 986-3035. Have a fun and safe holiday! 5 Days of Savings! 2013YUKON4WD #40346 DEAL OF THE DAY 12-26-13 ONLY! 8am - 6pm ! D L SO 2013BUICK ENCLAVEAWD, LEATHER DEAL OF THE DAY Free 20 minute session on a BioMat with this Ad Featuring Amethyst BioMats & Belts State of the Art Water Filter Treatments: John of God Crystal Light Therapy Energy Medicine & Asian Body Work 839 Paseo de Peralta Open daily 10am-4pm Closed Sunday Call for appointment 670-3538 or 954-1002 12-28-13 ONLY! 8am - 6pm $49,885 $5,052 $5,250 SIERRA FURRY’S INTERNET PRICE DEAL OF THE DAY 12-29-13 ONLY! 8am - 6pm MSRP $45,130 Furry’s -$5,052 Internet Discount Rebates -$5,250 w/Trade Assist & Loyalty 12-30-13 ONLY! 8am - 6pm MSRP $25,810 Furry’s -$1,189 Internet Discount Rebates -$2,000 w/Trade Assist & Loyalty Rebates w/Trade 2014GMC Assist & Loyalty #40491 #40586 12-27-13 ONLY! 8am - 6pm FURRY’S MSRP INTERNET Furry’s Internet PRICE $35,840 Discount DEAL OF THE DAY THE DAY #40438 MSRP $47,090 Furry’s $5,000 Internet Discount Rebates $6,250 w/Trade Assist & Loyalty Gift Certificates Available 2014BUICKVERANO Over $2,870OFF MSRP DEAL OF $39,583 2014GMCTERRAIN AWD-SLE #40583 FURRY’S INTERNET PRICE $22,621 FURRY’S FUEL SAVER PACKAGE $39.95 Includes: Conventional Oil Change (value $29.95), Free Anti-Freeze Point Check (included in service), Free Alignment Check, FreeTechron Fuel Injector Treatment (value $9.99), Free 5 Gallons of Gas (Approx. value $17.45), Free CarWash (value $9.99), PackageValue Over $85.00 Locally Owned, Locally Operated, Locally Committed 2721 Cerrillos Road Toll Free 855-270-7216 *Synthetic & Diesel Are Extra Offer Expires January 6, 2014 TEST DRIVE ANY NEW BUICK OR GMC AND GET A COUPON FOR? MSRP Furry’s Internet Discount Rebates w/Trade Assist & Loyalty $29,155 -$2,155 -$1,000 FURRY’S INTERNET FURRY’S INTERNET PRICE $34,828 PRICE $26,000 $9.95 CONVENTIONAL OIL CHANGE * Up to 5 QTS. OIL PLUS OIL FILTER. SYNTHETIC & DIESEL EXTRA CHARGE. OFFER EXPIRES 12/31/2013 @ 6PM Home of the Lowest Prices for Buick and GMC In Northern New Mexico * All prices plus applicable sales tax. License and one-time dir transfer fee. 9.9% on approved credit. OAC. ALL prices quoted with ALL applicable Rebates Available from GM. Some photos may be file photos and may not represent actual unit. See dealer for full details. A-6 THE NEW MEXICAN Friday, December 27, 2013 Fourth-graders Heaven Jackson, left, and Precious Reed use blues lyrics in their studies at Tunica Elementary School in Tunica, Miss. PHOTOS BY ROGELIO V. SOLIS/THE ASSOCIATED PRESS Singing the blues at school Mississippi children learn through music By Emily Wagster Pettus The Associated Press TUNICA, Miss. n cotton country a couple ofolds. In 2006, scholars and tourism promoters started working together on the Mississippi Blues Trail, a series of highway markers that provide information about people, places and events significant in developing the hardscrabble, I TV 1 top picks 7 p.m. on CBS Undercover Boss “Undercover Boss: Epic Employees” catches up with some of the memorable workers from the show’s run to find out where they are now and how their encounters with their undercover bosses changed their lives. 7:31 p.m. on ABC The Neighbors Larry (Simon Templeman) learns about April Fools’ Day and can’t wait to play a prank on the Weavers (Jami Gertz, Lenny Venito). After Reggie’s (Tim Jo) Zabvronian “soul mate,” Jane (Megan Park) arrives on Earth, Reggie and Jackie (Toks Olagundoye) try to convince Amber (Clara Mamet) that he really isn’t interested in her. Ian Patrick also stars in “September Fools.” 8 p.m. on ABC Shark Tank Dr. Doofenshmirtz from the kids show Phineas and Ferb pays a visit to the Sharks in this episode, pitching one of his many “-inator” inventions. Among the serious pitches are an app that provides travelers with live translators, a premium dating site, a Today’s talk shows gourmet sandwich business and an 11-year-old boy’s line of all-natural dog treats. 8 p.m. on CBS Garth Brooks, Live From Las Vegas In this special, which first aired in November, the country singer wraps up a three-year engagement at the Wynn Las Vegas with a final performance. He takes the audience on a journey through the music that’s influenced his work and the musicians who made it — from Merle Haggard and George Jones to Otis Redding, James Taylor, and Simon and Garfunkel. 8 p.m. on CW Nikita The series ends its run with the appropriately titled finale “Canceled.” Nikita (Maggie Q) makes it her mission to destroy MDK, with Alex (Lyndsey Fonseca) in tow. They capture Jones (David S. Lee) and demand he reveal the names of the other MDK members, then Nikita heads down a dark path that could cost her everything. 2 4 3 5 3:00 p.m. KOAT The Ellen DeGeneres Show Jennifer Garner (Dallas Buyers Club); Derek Hough. KRQE Dr. Phil At 11 years old, Hope got pregnant with Bailey’s child. CNN The Situation Room FNC The Five MSNBC The Ed Show 4:00 p.m. KOAT The Dr. Oz Show Embarrassing personal questions; pancreatic cancer; calcium overload; protein powder. KASY The Steve Wilkos Show After paternity test results, Shana’s husband and his brother want her to choose between them. FNC Special Report With Bret Baier 5:00 p.m. KASA Steve Harvey Michael Bublé discusses his family and performs; a stay-at-home mom goes on strike. FNC On the Record With Greta Van Susteren 6:00 p.m. CNN Anderson Cooper 360 FNC The O’Reilly Factor 9:00 p.m. FNC The O’Reilly Factor 9:30 p.m. KCHF Life Today With James Robison James and Betty Robison. 10:00 p.m.KASA The Arsenio Hall Show Mike Tyson; Niecy Nash; Harley Morenstein; Nathan East performs. 10:35 p.m. KOB The Tonight Show With Jay Leno Quentin Tarantino; Jim Stacy; Luke Bryan performs. KRQE Late Show With David Letterman Tom Selleck; Michael Somerville; Albert Hammond Jr. 11:00 p.m. KNME Charlie Rose KOAT Jimmy Kimmel Live Actor Will Ferrell; actor Adam Scott; Ron Burgundy and Christopher Cross perform. 11:30 p.m. KASA Dish Nation Discussing Miley Cyrus, sober celebrities and Simon Cowell. 11:37 p.m. KRQE The Late Late Show With Craig Ferguson Actress Rosie Perez; comic Nick Cobb. 12:00 a.m. E! Chelsea Lately Chef Curtis Stone. 12:07 a.m. KOB Late Night With Jimmy Fallon Rashida Jones; Carrie Underwood; Ariana Grande. 12:30 a.m. E! E! News 1:00 a.m. KASY The Trisha Goddard Show Troubled teens Devin and LeeLee fight anyone who confronts them and make videos of the violence. FNC The O’Reilly Factor 1:07 a.m. KOB Last Call With Carson Daly Scott Cooper; Chvrches performs; Esther Povitsky.themed lyrics about drinking, carousing or working for the man, the curriculum presents age-appropriate themes. On a crisp December morning, Dixon’s classroom is toasty warm..” Tom Pearson, executive director of the Mississippi Arts Commission, said the Blues Curriculum gives children a sense of place. “I think it’s important that they understand their local history first — understand it and how it relates to the world,” Pearson said. Tunica Elementary Principal Eva McCool-O’Neil said she hopes to expand the Blues Trail Curriculum to other classrooms next year. “I see student engagement really, really, really high,” she said. Chevonne Dixon, a fourth-grade teacher at Tunica Elementary School in Tunica, Miss., leads her students in an exploration of blues music. The students are exploring the Delta’s homegrown music, a subtle way the new Mississippi Blues Trail Curriculum is being incorporated into lessons for science, math, social studies and English. Friday, December 27, 2013 THE NEW MEXICAN OPINIONS The West’s oldest newspaper, founded 1849 Robin M. Martin Owner COMMENTARY: RAMESH PONNURU Happiness — it’s more than a warm puppy T A-7 Robert M. McKinney Owner, 1949-2001 Inez Russell Gomez Editorial Page Editor Ray Rivera Editor OUR VIEW Holiday good will can linger in 2014age men without college degrees. It is not easy to see how any of these deep-seated cultural trends, which have been underway. LETTERS TO THE EDITOR Constitution doesn’t pick and choose with rights S o, state Sen. William Sharer has introduced a constitutional amendment to end the rights of gay couples to marry. While he’s at it, why doesn’t he introduce a constitutional amendment to prevent interracial couples from marrying or, for that matter, interreligious couples? And, while he’s at it, maybe he could introduce a constitutional amendment to override the U.S. Constitution’s First Amendment right of free speech. Obviously, Sen. Sharer is a person who believes that people’s rights should be deprived on a majority vote. I guess he doesn’t understand that the Constitution is meant to protect people’s rights against majority intrusion. Richard Shapiro Santa Fe South-side assessment The feature story, (“Immigrants drive boom in city’s ‘Little Chihuahua,’ ” Dec. 22) focused on the south-side businesses supporting a growing “largely insular” community of about 7,500 nonEnglish speaking Mexicans. The story pointedly avoids stating whether this community is made up of legal or undocumented immigrants, a fact of crucial interest to Santa Feans. I hope The New Mexican will provide fact-based coverage about this expanding immigrant community. What is the average educational level, employment rate, income and age of the residents? One person cites concerns about crime, but is this concern corroborated by police statistics? Is there a problem with gang violence or substance abuse? Immigrants bring cultural richness, creativity and economic growth to America. But isolated enclaves of immigrants who are here illegally also can bring problems and burden already stressed schools and social services. Please provide a balanced assessment of this community, so we can know what to expect of it. James Garland Santa Fe A job well-done Because Brian Byrnes will be leaving the Santa Fe Community Foundation at MAllARD FillMORE Section editor: Inez Russell Gomez, 986-3053, igomez@sfnewmexican.com, Twitter @inezrussell the end of June 2014, we write to express our appreciation for his very good work there. Mr. Brynes has overseen a significant increase in the foundation’s philanthropic assets, from $25 million in 2009 to almost $70 million now. During his tenure, the foundation has made grants totaling $16.5 million to nonprofit organizations in north-central New Mexico. Mr. Byrnes has engaged the foundation in several creative initiatives focusing on some of the most persistent problems in our communities, including education, access to healthy food, youth development and clean water. Finally, Mr. Byrnes has been willing to consider a broad range of approaches to community problems and has not shied away from engaging the foundation in controversial and cutting-edge efforts to address community issues. All of us in north-central New Mexico owe Mr. Byrnes our deep gratitude. Douglas Meiklejohn executive director New Mexico Environmental Law Center o much buildup — Christmas decorations up in October, commercials nonstop through November and December — and now, Christmas 2013 is one for the history books. Yet, before we move on from this holiday into the forced frivolity of New Year’s Eve, let’s savor the good feelings that are supposed to infuse this time of year. One new tradition we hope resurfaces next year took place around the Santa Fe Plaza (especially lovely this year with its lights and decorations). New were the live Christmas trees, wrapped in burlap and ready for planting some time next year in a city park. The trees, in addition to adding freshness and beauty, also were there for people to make a wish on. There could be the bigger-than-life wishes: peace on Earth, a trip to Europe, or even a smaller desire for one red bicycle. But the trees, up since early December, also became a place for wishes born from need — people who might require medical treatment, a holiday meal or toys for their children. Wishes were placed on the trees and then information about the wishes — with contact numbers — were left at Dressman’s Gifts. John Dressman, owner of the shop, explained that the Downtown Santa Fe Merchants Association wanted to help others for the holiday in a specific, individual way: “It makes it a little more personal.” The idea, Dressman said, came from Gunther Maier, owner of Charlotte Santa Fe and a member of the Downtown Santa Fe Merchants Association. Next spring, the 10 spruces the merchants are donating to the city of Santa Fe will be planted in the appropriate parks. That way, the gift of holiday good will and cheer will continue into a New Year. We appreciate, too, that the merchants reached out to city officials to make this project happen, and that the city responded. Considering that many recent interactions between downtown merchants and city officials have taken place in a courtroom in disputes over the use of the Santa Fe Plaza, a project to beautify the city and help our neighbors — brings all sides together to improve the city we love. The past 100 years From The Santa Fe New Mexican: Dec. 27, 1963: Albuquerque — Assistant state conservationist J.S. McCorkle has termed the 1964 water situation in New Mexico as generally critical. McCorkle said the lack of snowfall at higher elevations may bring about a severe drought next summer. Hardest hit will be farmers and ranchers. The New Mexico State Corporation Commission has entered a complaint before the Interstate Commerce Commission to keep trains running day and night across New Mexico. Two train companies — the Rock Island and Pacific Co. — had entered pleas with the ICC to discontinue operation of four passenger trains between Chicago and Los Angeles. The Rock Island operated between Chicago and Tucumcari, and the Southern Pacific Co. operates from Tucumcari to Los Angeles. Dec. 27, 1988: Santa Fe missed its white Christmas by a day when a fast-moving cold front passed through the state Monday morning leaving about an inch of snow in the city. Both Santa Fe Ski Area and Taos Ski Valley reported new snow Monday morning, though it did little to improve conditions at Santa Fe. About 20 percent of the area is open to skiing. The ski area has not been extremely busy and there are no lift lines. We welcome your letters Letters to the editor are among the best-read features of The New Mexican. We do our best to get every opinion in the paper. It doesn’t have to agree with ours. In fact, the wider the variety of ideas on the Opinion. DOONESBURy BREAKING NEWS AT A-8 THE NEW MEXICAN Friday, December 27, 2013 ANNIE’S MAILBOX TIME OUT Horoscope Crossword The stars show the kind of day you’ll have: 5-Dynamic; 4-Positive; 3-Average; 2-So-so; 1-Difficult HAPPY BIRTHDAY for Friday, Dec. 27, 2013: This year you focus on your long-term goals. The possibility of making one, if not more, a reality is reasonable. Scorpio can be intense, devious, insightful and full of resourceful information. ARIES (March 21-April 19) HHHH Note that people’s moods have changed. Make time for a partner or loved one with whom you often take off. Tonight: Dinner for two. TAURUS (April 20-May 20) HHHH Defer to others. You might want to escape the holiday fervor and do something completely unrelated. Tonight: Say “yes” to an invitation. GEMINI (May 21-June 20) HHH You have some important matters that demand your attention. You might sense that a parent or higher-up needs your time as well. Tonight: Get some much-needed rest. CANCER (June 21-July 22) HHHH Investigate the alternatives that surround a child or loved one. This person might want a change. Tonight: Enjoy those around you. LEO (July 23-Aug. 22) HHH Be more in touch with a family member’s needs. Your ability to visualize what someone else wants will help you please others. Tonight: Stay close to home. VIRGO (Aug. 23-Sept. 22) HHHHH You express your opinions honestly. You tend to put a partner on a pedestal. Be aware of how you are building this person up. Tonight: Favorite place, favorite people. Super Quiz Take this Super Quiz to a Ph.D. Score 1 point for each correct answer on the Freshman Level, 2 points on the Graduate Level and 3 points on the Ph.D. Level. Subject: BEST PICTURE OSCAR GRADUATE LEVEL 4. Marciano. WINNERS Answer________ Each answer is a film that won the Best Picture Oscar, and the 5. Jason’s ship. title is one word. (e.g., A group of Answer________ troops. Answer: Platoon.) 6. Spartacus, for example. Answer________ FRESHMAN LEVEL PH.D. LEVEL 1. The Windy City. 7. A Bronx butcher. Answer________ Answer________ 2. An anagram for “swing.” 8. White house. Answer________ Answer________ 3. April 15, 1912. 9. A middle name. Answer________ Answer________ ANSWERS: 1. Chicago. 2. Wings. 3. Titanic. 4. Rocky. 5. Argo. 6. Gladiator. 7. Marty. 8. Casablanca. 9. Amade. LIBRA (Sept. 23-Oct. 22) HHH Be more upbeat and positive in dealing with a financial matter. Listen to your inner voice, but pull back before acting. Tonight: Your treat. Her sister’s clothes smell like kitty litter Sheinwold’s bridge SCORPIO (Oct. 23-Nov. 21) HHHH Beam in more of what you want. Understand what is happening within your family and recognize what needs to be done. Tonight: Return a call from a relative. SAGITTARIUS (Nov. 22-Dec. 21) HHH Know what is happening behind the scenes, but understand that you might not be privy to all the conversations. Tonight: Get some extra sleep. CAPRICORN (Dec. 22-Jan. 19) HHHH Calls come in, and before you know it, you are off doing what you want. A neighbor or close relative will request some of your time. Tonight: Where the crowds are. AQUARIUS (Jan. 20-Feb. 18) HHH You might have to handle some work or manage a project that has been on the back burner for too long. Count your change. Tonight: Grab some munchies with a loved one. PISCES (Feb. 19-March 20) HHHHH Try to get an overview of a situation and determine which direction you want to head in. You might think that you have a more constructive solution. Tonight: Go for some exotic cuisine. Jacqueline Bigar Chess quiz WHITE HAS A CRUSHER Hint: Target the knight. Solution: 1. Qc7! (threatens Qc8ch followed by Qxd7ch, etc.) [Naiditsch-Yilmaz ’13]. Today in history Today. Hocus Focus Jumble Obituaries B-2 Police notes B-2 Sports B-5 sports,B-5 LOCAL NEWS FRIDAY, DECEMBER 27, 2013 THE NEW MEXICAN B Lady Horsemen break scoring record in win over Capital. Records gaps confuse man’s DWI history $100K Repeat offender, arrested seized Christmas Eve, had license reinstated in 2009 from firm goes to creditor By Chris Quintana The New Mexican By his own admission, Robert D. Ortiz had an extensive history of drunken driving when he persuaded a court in 2009 to allow him to get his driver’s license reinstated. Ortiz told the court that he had been sober since his last DWI conviction in 2002. Friends and family members wrote letters to the judge on Ortiz’s behalf, calling him respectful and courteous, and insisting they had not seen him touch a drop of alcohol in “the last four years,” as one neighbor put it. Prosecutors initially resisted, saying Ortiz had four previous DWI convictions in Santa Fe County dating back to 1987, when Ortiz was 25. But not included among those court documents was a 1986 DWI conviction in Bernalillo County’s Metropolitan Court, a case listed on the New Mexico Courts online records site. Whether that conviction would have made a difference in the court’s decision to let Ortiz drive again is unknown. But the Bernalillo verdict is part of a confusing trail of Robert D. Ortiz DWI records pieced together when Ortiz was arrested again on Christmas Eve. The Santa Fe Police Department charged Ortiz, 51, with aggravated DWI after he flipped his SUV in the ON THE WEB u For video of the arrest, go to www. santafenewmexican.com 1500 block of Pacheco Street. Officers noted in their report that it was his 11th drunken-driving charge. Police reports obtained Thursday show that when officers arrived on the scene of Ortiz’s crash, they found him wandering the street. According to the reports, he told officers that he had left work at Ventana de Vida, a senior housing complex, and then Please see DWi, Page B-4 Mayhem and dragons Author George R.R. Martin speaks at an April 23 news conference about the future of the Jean Cocteau Cinema. Starting Jan. 6, the cinema will be showing every episode of the HBO series Game of Thrones ahead of the show’s spring premiere of Season 4. NEW MEXICAN FILE PHOTO ‘Game of Thrones’ creator to host free episode screenings at Jean Cocteau Cinema Thrones is based, Martin is in a unique position to promote the show — which drew 5.4 million viewers for its third season finale. ans of the HBO series Game of Thrones Martin said that even before he opened his will have 12 weeks to see the entire televi- own cinema in August, he had been hoping to sion series so far on the silver screen at arrange these screenings so that fans can get the Jean Cocteau Cinema starting Jan. 6. the VIP experience of seeing it in a theater. The cinema — which author George R.R. “I’ve seen episodes on the big screen before Martin purchased and revamped this year — at the premieres,” Martin said, adding that the will be showing two to three episodes every idea came to him after he saw the third season week for free through March 24, ahead of this premiere at the TCL Chinese Theater in Holspring’s premiere of Game of Thrones’ fourth lywood. “The show just looked great on the season on the pay television channel. big screen, and I thought ‘You know, it’d be Audience members might also get a chance great if regular people … had the opportunity to ask questions of actors and others involved to see the show on the big screen.’ ” with production of the popular series. To Martin, the show’s epic scope — replete As the author of the best-selling A Song of Ice and Fire fantasy novels, on which Game of Please see mayHEm, Page B-4 David J. Salazar For The New Mexican F if yOu gO What: Screenings of the first three seasons of the HBO series Game of Thrones Where: Jean Cocteau Cinema, 418 Montezuma Ave. When: Jan. 6, 12 and 27; Feb. 3, 12, 19 and 28; and March 3, 10, 17 and 26. Admission: Screenings are unticketed, but admission is on a first-come, first-served basis. Additionally, saving seats won’t be allowed, due to the number of people expected to show up for a chance at one of the theater’s 120 seats. More information: Visit jean cocteaucinema.com. Advantage Asphalt owners charged with defrauding taxpayers By Phaedra Haywood The New Mexican More than $100,000 in cash seized from Advantage Asphalt has been released to a company creditor. Santa Fe County sheriff’s deputies seized $110,650 in cash from the home of Advantage Asphalt and Seal Coating owners Joseph Anthony Montoya and Marlene Montoya in a 2010 raid that was a result of allegations that the couple had defrauded Santa Fe County taxpayers. The Montoya and their company were charged with multiple counts of fraud, bribery and conspiracy, and those charges are still pending in state District Court. A trial in the case has been delayed pending an appeal related to the cash search and seizure. The couple have pleaded not guilty in the case and say they will be vindicated. Attorney Sam Bregman, who represents Joe Anthony Montoya in the case, said his client is looking forward to clearing his “good name” in court. “It’s really easy for the government to make a lot of charges and accusations,” Bregman told The New Mexican in March. “It’s going to be difficult to back that up in court. The jury is going to see this case for what it is and return a not-guilty verdict.” In August, Bregman filed a motion arguing charges against the couple should be dismissed because seizing their money and keeping it as evidence without proof that it was tied to the crimes deprived the couple of being able to use the money or collect interest, amounting to a preconviction punishment, essentially double jeopardy. That claim was dismissed by retired District Judge James Hall — who was appointed to hear the case. But the Montoyas have appealed that ruling to the state Court of Appeals, and the criminal cases have been put on hold while that is pending. Hall ordered the funds be deposited in a “court registry” pending an official determination of how they should be disbursed. Meanwhile, Community Bank filed a motion Dec. 10 asking the court to release the funds to cover a line of credit the Montoyas established at the bank in 2009, and from which they have drawn “substantial advances,” according to court documents. Court documents show the Montoyas agreed that the bank had a valid lien on the funds, and Hall ordered the funds be released to the bank to “reduce the outstanding debt” owed by the Montoyas. Advantage Asphalt and Seal Coating was awarded about $7 million worth of contracts from the county between 2008 and 2010. The company also had about $4 million worth of contracts with the city of Santa Game of Thrones’’ Tyrion Lannister, played by Peter Dinklage. Please see sEiZED, Page B-2 COURTESY HBO Pranzo Italian Grill selling restaurant to executive chef The New Mexican Michael O’Reilly, owner of Pranzo Italian Grill, is pictured in 2005 after he bought the restaurant. O’Reilly is selling Pranzo to the restaurant’s executive chef, Steven Lemon. NEW MEXICAN FILE PHOTO The owner of Pranzo Italian Grill in the Sanbusco Market Center announced Thursday that he has sold the 25-year-old business to the restaurant’s executive chef, Steven Lemon. Michael O’Reilly, who has owned the eatery for nearly eight years, said he expects to finalize the sale by Jan. 15 to Lemon, who was executive chef from 1989 to 1995 and returned to that position in April of this year. “He has developed a unique cuisine that blends Italian and Mediterranean history with his own creativity,” O’Reilly said. “He is an original who works with ‘heart and soul,’ which is evidenced in his menu. This bodes well for Pranzo’s future.” O’Reilly, who also had owned the O’Keeffe Café on Johnson Street before he closed that restaurant in 2011 amid a struggling economy, said in Thursday’s announcement that he plans to retire. “After 12 years as owner of the O’Keeffe Café and Pranzo — and 25 years of domestic and international wine sales and marketing — the time has come to slow down,” he said. O’Reilly said he and his wife, Section editor: Howard Houghton, 986-3015, hhoughton@sfnewmexican.com Design and headlines: Stephanie Proffer, sproffer@sfnewmexican.com Marjorie, are relocating from Santa Fe to Chapel Hill, N.C. “There comes a time to enjoy our adult children and grandchildren,” he said, “and that time is now.” Early in his career, Lemon worked in the kitchen of chef Jimmy Schmidt at the Rattlesnake Club in Denver. Before rejoining Pranzo, he owned O Eating House in Pojoaque. “Classically trained in French technique, Lemon has now achieved a creative approach to cooking,” Thursday’s announcement said. Pranzo, 540 Montezuma Ave., was started in mid-1989 by part- ners Rick Post, Tom White and Greg Atkins, who said in April 2005, when they sold the business, that they wanted to focus on their Albuquerque-based Il Vicino pizza restaurant chain. Pranzo currently has three dining rooms, including the upstairs Geist Cabaret, where David Geist weekly performs mostly Broadway tunes on a baby grand piano. In September, Lloyd Abrams, owner of Geronimo Restaurant on Canyon Road, announced plans to remodel the former O’Keeffe Café building next to the O’Keeffe Museum and reopen it as Georgia’s Museum Café. BREAKING NEWS AT B-2 LOCAL & REGION THE NEW MEXICAN Friday, December 27, 2013 Seized: Two other cases over have ended. Lujan pleaded guilty to of contracts with the city of demanding or receiving bribes Santa Fe when the firm became from Advantage Asphalt and the focus of an investigation by Seal Coating in August — the Santa Fe County Sheriff’s admitting he took bribes and Office. trips to Las Vegas, Nev., from The cases against two other Advantage Asphalt — and will defendants — former county be a state witness in the case Public Works director James against the Montoyas. He isn’t Lujan and former county expected to be sentenced until after that case goes to trial, but employee Denice Sanchez — Continued from Page B-1 the District Attorney’s Office has agreed not to try to send him to a state prison. The charges against Sanchez of making or permitting a false voucher and conspiracy to commit fraud were dismissed in September. Contact Phaedra Haywood at 986-3068 or phaywood@ sfnewmexican.com. Christmas tree fire burns Santa’s home in Vegas mall No one harmed in early-morning blaze to experience something like this,” said Town Square marketing director Jaimesen Mapes. “We’re just very grateful nobody was harmed during By Michelle Rindels the fire.” The Associated Press Clark County Deputy Fire LAS VEGAS, Nev. — One of Chief Jon Klassen said crews found flames reaching 100 feet Santa Claus’ Las Vegas homes was burned after a giant Christ- in the air when they arrived mas tree caught fire at an open- at the upscale shopping center. The spectacle was visible air mall early Wednesday, just enough that a visitor at a resort as children around the globe a mile south of the mall could were expecting St. Nick to see it and called 911, accorddeliver presents. ing to the Las Vegas ReviewNeither Santa nor anyone Journal. else was injured when the “Something that tall and that 45-foot-tall artificial tree at Town Square went up in flames shape, it’s going to be a big, gigantic matchstick,” Klassen about 2 a.m. on Christmas said. morning, about eight hours Firefighters were quickly after the mall closed. Little able to extinguish the flames, more than a metal skeleton Mapes said. While Klassen remained of the tree, although acknowledged the Christmas a scorched, 600-square-foot morning timing was ironic, cottage where Santa poses he said the fire appeared to for pictures with children be sparked by faulty wiring. A appeared to be the only buildfinal cause is still pending. ing affected, according to mall “It was such a total, cataofficials. strophic event, there wasn’t “Obviously you never want.” Low-income couple seek help buying propane for winter The New Mexican D iana and David were living on a low income and food stamps, and then David’s employer let him go from the job where he had worked for the past 15 years. David recently found a new job, but it pays only $60 a week. The couple, in their mid-50s, are asking for help to pay for $772 worth of propane. They also owe $233 in utility bills. Diana and David are among many members of the community asking for help through The New Mexican’s Empty Stocking Fund this holiday season. uuu The Empty Stocking Fund is a Empty stocking fund project of The Santa Fe New Mexican. The Santa Fe Community Foundation, the First National Bank of Santa Fe, The Salvation Army and Presbyterian Medical Services donate services to jointly administer the Empty Stocking Fund. Watch for daily stories featuring requests for assistance from local residents in The Santa Fe New Mexican. The names of the applicants have been changed to protect their privacy. The information from the initial application will be verified if the applicant is selected for assistance. To donate Make your tax-deductible donation online at stocking or mail a check to: The New Mexican’s Empty Stocking Fund c/o The Santa Fe Community Foundation, P.O. Box 1827, Santa Fe, NM 875041827. If you can provide a needed service such as roofing, car repairs or home repairs, contact Roberta at Presbyterian Medical Services, 983-8968. If you can contribute food, clothing, toys, housewares or furniture in good condition, or other items or services, please contact The Salvation Army, 988-8054. Police notes The Santa Fe Police Department is investigating the following reports: u A purse was stolen from a car parked at Cristo Rey Parish sometime Tuesday. u Police responded to the death of a 4-year-old in the 2300 block of Ruta Corta Street between 9:30 p.m. Tuesday and 7:51 a.m. Wednesday. The child had an underlying medical condition, and no foul play was suspected. u The owner of a business in the 1000 block of Siler Road reported that a vandal shot a window with a pellet gun between 9 p.m. Tuesday and 2 p.m. Wednesday. u A mother reported that her son stole her vehicle from the 200 block of Irvine Street at 5 p.m. Wednesday. u Two laptop computers worth $300 apiece and $200 in cash were taken from a home in the 900 block of Don Juan Street between 6:30 and 10 p.m. Tuesday. u An aggravated assault and battery was reported in the 1000 block of Avenida San Diego between 9:49 and 10:20 p.m. Wednesday. u Someone shot two large glass windows at Talin Market, 505 Cerrillos Road, between 11:21 and 11:29 p.m. Wednesday, possibly with a pellet gun. The windows were damaged but still in place. The Santa Fe County Sheriff’s Office is investigating the following reports: u A tablet was stolen from a home in the 1200 block of Calle Inez between 2 p.m. Tuesday and 4 p.m. Wednesday after someone damaged a slide lock and entered the home. The victim also reported that the intruder rummaged through the home. u County deputies responded to the death of a 67-year-old male at a Cibola Circle home sometime Thursday. No foul play was suspected. DWI arrest u Joseph Clarke, 61, 111 E. San Mateo Road, was arrested on a charge of aggravated drunken driving at 5:04 p.m. Wednesday in the 1500 block of Center Drive. Speed SUVs u The Santa Fe Police Department listed the following locations for mobile speed-enforcement vehicles: SUV No. 1 on Calle de Sebastian between Old Pecos Trail and Zia Road; SUV No. 2 on Old Santa Fe Trail between Sun Mountain Drive and Zia Road; SUV No. 3 on Cordova Road between Galisteo Street and Old Pecos Trail. Help lines Esperanza Shelter for Battered Families hotline: 800-473-5220 St. Elizabeth Shelter for men, women and children: 982-6611 Interfaith Community Shelter: 795-7494 New Mexico suicide prevention hotline: 866-435-7166 Solace Crisis Treatment Center: 986-9111, 800-7217273 or TTY 471-1624 Youth Emergency Shelter/ Youth Shelters: 438-0502 Police and fire emergency: 911 Graffiti hotline: 955-CALL (2255) Man charged with hate crime for alleged ‘knockout game’ By Michael Muskal In the current case, Conrad Alvin Barrett, 27, has been charged with a federal hate A Texas man has been crime, the U.S. Justice Departcharged with a federal hate ment announced Thursday. crime in connection with an The complaint alleges that assault of a 79-year-old black Barrett, of Katy, Texas, violated man that prosecutors allege was the federal Matthew Shepard part of the “knockout game.” and James Byrd Jr. Hate Crimes The knockout game, which Prevention Act when he alleghas been known by a variety edly attacked the elderly man of names since 1992, is based on Nov. 24. on a person attacking another Prosecutors allege that Barperson, trying to knock the vic- rett recorded himself on his tim out with a single blow and cellphone attacking the man usually recording the attack. and showed the video to othMany urban experts doubt such ers. The complaint says Barrett attacks are widespread, but the made several videos, one in recent wave of extensive public- which he identifies himself and ity has moved the game out of another in which he makes a the shadows. Many also believe racial slur. In addition, Barrett the publicity sparks copycat had been working up to playing crimes. the knockout game for approxiAssaults on random strangers mately a week. simply to knock them out have According to the complaint, been reported over the years in Barrett in the video says that St. Louis, New Jersey, New York, “the plan is to see if I were to Washington, D.C., and Chicago, hit a black person, would this be among other areas. An assault nationally televised?” attributed to the knockout game “Suspected crimes of this reportedly killed a Vietnamese nature will simply not be tolerimmigrant in 2011 in St. Louis. ated,” U.S. Attorney Kenneth At least one legislator in Illinois Magidson of the Southern Dishas called for tougher penalties. trict of Texas said in a prepared Los Angeles Times. Funeral services and memorials RUTH ELAINE COLEMAN 79, died peacefully at home in Santa Fe, on December 16, 2013. "Ruthe" (as she was known by her friends and family) is survived by her four sons and their spouses (Glen and Karyn, Scott and Melissa, Curtis, & David and Emily); and eight grandchildren (India, Joshua, Kalynne, Sarah, Chaya, Evan, Chance, and Story). Born and raised on Long Island, New York, Ruthe developed a lifelong passion for music and the arts. After graduating from Wellington C. Mepham High School, she attended the University of Florida. In 1954, a thread of adventure wove its way into her life. She relocated to Los Angeles, California and joined with her beloved husband, Ken. They were married for 58 years until his death in July, 2012. Ruthe’s life overflowed with purpose and fulfillment. She knew the value of each unique experience. From travel and adventure, to volunteerism, to the pursuit of beauty through visual and performing arts, to the deep appreciation of family and friends, she embraced life with gratitude, grace, and a beautiful smile. Indeed, Ruthe was much more than her associations, affiliations, or accomplishments. She breathed life into the moment and truly shared herself with the people she met. Ruthe was a member and patron of many communities including Los Angeles’ Leo Baeck Temple and the Concern Foundation for Cancer Research. Before she moved to New Mexico in 1999, Ruthe fed her passion for music through singing with the Los Angeles Master Chorale. As she did in L.A., Ruthe made many cultural contributions while in Santa Fe. She immediately fell in love with the Santa Fe Symphony Orchestra and was a regular at The Lensic and simulcast performances of the Metropolitan Opera. One of her favorite projects in recent years was "Fanfare" the Santa Fe Symphony’s effort to provide musical instruments, live performances, and music education experiences for public school children in the area. With her unique ability to grow and adapt throughout life, Ruthe was able to cherish both the present and the past. In the 80s and 90s she was an avid bicyclist, traveling all over the world by bicycle with her husband, Ken. While she enjoyed the "ride", Ruthe looked forward to meeting up with her friends and the personal connections she made along the way. Late in the 90s Ruthe took a shine to painting. Her interest bloomed into extraordinary talent, always experimenting with new mediums to express her love of still life and the Southwest. Right to the very end, Ruthe was a lifelong learner. She insisted on being taught how to use the technology that so eluded many of her generation. Her genuine desire to know how to surf the internet and operate remote controls, cell phones, and iPads was a testament to her love of learning. Simply put, she wanted to click the mouse for herself. Ruthe was an amazing wife, mother and friend who always maintained a welcoming and beautiful home. Her dinner and holiday parties were legendary and she often opened up her Santa Fe home to the Symphony and other community organizations. From early in her life, Ruthe developed a mother’s compassion and sought to give everyone around her the benefit of the doubt. Because of this, she was universally loved. There is not a single person in this world who met Ruthe who did not love and appreciate her. Ruthe Coleman was a rare and beautiful desert flower; strong against the elements, soothing to the senses, and lasting in the memory. She will be missed by all. A Celebration of Ruthe’s life will be held Saturday, December 28th. Please call 505-983-2835 for details. In lieu of flowers, in-memoriam donations can be made to: The Santa Fe Symphony and Chorus, Post Office Box 9692, Santa Fe, New Mexico 87504-9692, (800) 480-1319, TOM RIVERA ONE YEAR ANNIVERSARY Tom walked the path that was meant and made his earthly mark by his contributions as a kind and giving individual, a scientist, his love of New Mexico History and culture, his artistic talents, his love of music and playing the guitar, community involvement and dedication to academic accomplishments and mentorship. The difference he made in the lives of others and the love and life he shared with his wife and children are paramount. Every tear shed have been tears of love and reminders of the dynamic difference Tom had in our lives. Abundant memories grace each day. We wish to thank family and friends for the support throughout this year. We’ve grown through our journey of grief and learned many lessons. We are grateful for the special connections that Tom’s passing brought. Tom’s birthday was December 16, our anniversary December 19 and he was called home December 28. We celebrate Tom’s life everyday but most especially wish to share that honor with friends and family on December 28. Andréa, Tomas and I invite you to share in a celebration of Tom’s life at the Immaculate Heart of Mary Chapel, Mt Carmel Road at 11:00 am. You may email pictures or thoughts to riverawise@gmail.com. SINCERELY, LA FAMILIA DE TOM RIVERA, PhD NILA JARAMILLO HAUGHT November 11, 2013 Memorial Service Saturday December 28th 11:00 a.m. - 12:30 p.m. Rivera Family Funeral Home 417 East Rodeo Road Santa Fe When she shall die, Take her and cut her out in little stars, And she will make the face of heaven so fine That all the world will be in love with night And pay no worship to the garish sun. -Shakespeare Celebrate the memory of your loved one with a memorial in The Santa Fe New Mexican Call 986-3000 LOCAL & REGION Friday, December 27, 2013 THE NEW MEXICAN B-3 Women aim Utah holdouts now issuing licenses to block Idaho from fight for gay marriage GAY MARRIAGE By Paul Foy The Associated Press Chris Serrano, left, and Clifton Webb kiss after being married Dec. 20, as people wait in line to get licenses outside of the marriage division of the Salt Lake County Clerk’s Office in Salt Lake City. ASSOCIATED PRESS FILE PHOTO.” Calif. schools prepare for transgender law Ashton lobbied for the law last spring and with them. “We did strike a balance between the thinks his public activism helped persuade sensitivities associated with gender identity, Manteca High to acknowledge his gender SAN FRANCISCO — With a law that not only for those students who experience identity when school resumed in August. He spells out the rights of transgender students a change in their gender status but the stunow is allowed to use the boy’s restrooms in grades K-12 set to take effect in California, dents who would be in the same facilities, and locker rooms and to wear the junior school districts are reviewing locker room in the same classrooms and on the same ROTC uniform for male cadets. layouts, scheduling sensitivity training for teams,” General Counsel Keith Bray said. Similar adjustments have been made for coaches, assessing who will sleep where Parent Christy Musser said she plans to five transgender classmates. during overnight field trips and reconsider- take two of her three school age children out The law’s passage “showed them this is ing senior portrait dress codes. of public schools in SouthOK, this is going to be But administrators, counselors, teachers ern California. happening in a lot of other and school board members also are watchHer oldest son will places,” he said. “If it gets ing and waiting. The law, the nation’s first remain in the high school taken away, I’m kind of requiring public schools to let children use where he is a junior, but worried my school will be sex-segregated facilities and participate in Musser said her eighthlike, ‘Well, we don’t have to the gender-specific activities of their choice, grade daughter feels so do it anymore.” could end up suspended within days of its uncomfortable about a California’s law comes Jan. 1 launch if a referendum to repeal it transgender student comamid legal challenges qualifies for the November ballot. ing into the restroom or across the country involvTo obtain a public vote on the law, passed locker room that she dising transgender students by the legislature and signed by Gov. Jerry tributed flyers about the filing actions for the right Brown, a coalition of conservative groups General Counsel Keith Bray to referendum at school. use facilities that match called Privacy for All Students has collected “At this time in their their expressed identities. hundreds of thousands of signatures. Coun- lives, these kids are young, In June, the director ties have until Jan. 8 to verify them through innocent and are just learning about themof Colorado’s civil rights board ruled in random spot-checking. selves and their bodies, and they don’t need favor of a 6-year-old transgender girl who Depending on how many are found to be to worry about boys coming in the locker had been prevented from using the girl’s valid, the secretary of state will approve the room and looking at them, or vice versa,” bathroom at school. The next month, the referendum, determine that it failed or order she said. Arcadia Unified School District in California a review of every signature. San Diego school board president, Kevin agreed to train its staff on transgender issues “We don’t know what’s going to happen Beiser, said those fears are unfounded. In to settle a complaint brought by a student when kids come back from their holiday the absence of statewide guidance, schools prevented from staying with other boys durvacation,” said Republican state Sen. Steve have been dealing with this challenge “in a ing a school-sponsored overnight science Knight, who voted against the law. “Are very delicate, thoughtful and compassionate camp. there going to be 15-year-old girls talking in manner for many years,” he said. The San Francisco Unified School Disthe bathroom and in walks a boy? What are “This idea that schools will let a student trict has had a policy similar to the new law they going to do? Scream? Run out?” walk into whatever bathroom they want is since 2003. The Los Angeles Unified School The California School Boards Association baloney,” said Beiser, who works as a high District — the state’s largest — has had one is acting on the assumption that the law will school math teacher in a neighboring dissince 2005. This month, the school boards in stand and that, even if it does not, existing trict. Berkeley, Sacramento and Pacifica followed state and federal anti-discrimination laws, The possibility that the law could be suit. as well as year-old California Interscholastic overturned worries Ashton Lee, 16, a junior Namita Brown, an Oakland lawyer who Federation rules under which athletes may at Manteca High School in the San Joaquin represents school districts in Northern Calipetition to play on a sports team that does Valley. Born a girl, Ashton told his parents fornia, said educators are less concerned not correspond with their biological sex, and school administrators his sophomore about installing shower screens or having already compel schools to accommodate year that he was transgender. enough private restroom stalls than figuring transgender students. But he said school officials balked when out a way “to tone the fervor in the parent The association has advised schools to he asked to be transferred from an all-girls handle requests on a case-by-case basis and aerobics class to a team sports class for boys. community.” “The bottom line is districts are in this with parental input, if possible, but to be “They didn’t understand the seriousness of prepared to make private changing arrange- the issue I was dealing with,” he said. “They impossible place where our primary job is to offer quality education and we are suddenly ments both for transgender students and treated it like a normal thing, like I didn’t for classmates who might object to dressing like the class or was bored with the teacher.” facing some upset constituents,” Brown said. By Julie Watson and Lisa Leff The Associated Press We did strike a “ balance between the sensitivities associated with gender identity.” LAX shooting suspect pleads not guilty By Linda Deutsch The Associated Press RA NCHO CUCAMONGA, Calif. —, causing complication and delay,” she said. Meanwhile, Wasden BOISE, Idaho — Four counters Idaho has a strong couples challenging Idaho’s interest and right to defend gay-marriage ban this week its laws that come under asked a federal judge to constitutional attack — and block the state from interit’s his job to do it. vening in their lawsuit, “I have an obligation to arguing such a move would defend the Constitution unnecessarily add to their and the statutes of Idaho, workload and complicate and that’s what we intend the case. to do,” he said Thursday. They first filed their “The position of the govcomplaint in U.S. District ernor and the attorney Court in November against general will be very similar. Gov. C.L. “Butch” Otter and I don’t see how it’s going to Ada County Clerk Chris complicate the process.” Rich, contending Idaho’s Wasden also said the 2006 voter-backed law ban- federal courts’ decisions ning gay marriage violates — whether in Idaho, Utah, the U.S. Constitution’s Ohio or elsewhere — are equal protection and due almost certainly not going process guarantees. to be the last word in the Deborah Ferguson, matter of whether state gay the couples’ Boise-based marriage bans are legal. lawyer, contends allowing “The ultimate answer is Idaho Attorney General going to be issued by the Lawrence Wasden to inter- U.S. Supreme Court,” he vene on behalf of the state said. isn’t necessary, since Otter The Idaho women, repis already an adequate rep- resented by Ferguson as resentative of the state’s well as the National Center interests. for Lesbian Rights, have “It is unusual to have the adopted a legal strategy state intervene when its that’s been effective in interests are already repOhio, so far. resented through the govThey contend Idaho has ernor,” Ferguson said in an historically recognized interview with The Associ- marriages performed in ated Press on Thursday. other states that would This Idaho case is devel- have been considered illeoping just as judges in New gal under Idaho law, such Mexico, Ohio and Utah as marriages between first ruled in favor of same-sex cousins and common-law marriage recently. marriages, but has unconThe eight Idaho women stitutionally drawn the line who sued are Sue Latta at gay marriage. and Traci Ehlers, Lori and Among other things, the Sharene Watsen, Shelia women say they’re already Robertson and Andrea Alt- facing potential discriminamayer, and Amber Beierle tion as a result of Idaho’s and Rachael Robertson. ban: For instance, even Ferguson said Wasden’s though they’re allowed to bid to intervene didn’t iden- file joint federal tax returns tify any state interest that’s like other married couples, distinct from the interests they’re prohibited from of Otter or Rich, nor did the joint state tax filing status attorney general demonin Idaho, forcing them to do strate that state officers will extra work and potentially fail to adequately represent subjecting them to financial penalties. Idaho’s interests. Through his own attor“Inserting an additional neys, Rich, the Ada County party into this case with clerk, has said he had no interests identical to those objection to Wasden interof existing defendants vening on the state’s behalf. will prejudice plaintiffs by By John Miller The Associated Press- n. In brief Grand jury indicts man in armed robbery of game store Roberto Mendez, 25 — who was arrested last month on an armed robbery charge for allegedly robbing GameStop on Cerrillos Road — was indicted Dec. 20 by a Santa Fe grand jury. Mendez is suspected of robbing the gaming store Nov. 18 by handing the cashier a note that read: “Do not be stupid. I have a gun. Give me all the money in the register or I will shoot you,” according to a report. He allegedly made off with an undisclosed amount of cash but was arrested about a week later. He’s currently being held in the Santa Fe County jail in lieu of posting a $50,000 cash bond. Mendez, who has been arrested numerous times in the past few years, was shot in the face by Santa Fe Police officers in August after he refused a police order to exit a vehicle he had allegedly stolen from police. He was hospitalized in that case but never arrested. Santa Fe Police Department spokeswoman Celina Westervelt said police have completed their investigation in that case, and it has been forwarded to the District Attorney’s Office for possible prosecution. Santa Fe Police Department seeks help with new slogan The Santa Fe Police Department is seeking the public’s aid again, but this time it doesn’t need information on an armed robbery or runaway driver. No — this time it wants help coming up with a new slogan for the department. “The goal is to put into words what makes our department unique and special from others across the nation,” according to a department news release. Winners will receive recognition from the governing body as well as free entry to the department’s Citizen’s Academy. Those who want to participate can submit their ideas on the department’s Facebook page, facebook.com/santafepolice, the Twitter handle, @santafepolice, via email at ckwestervelt@santafenm.gov or by mail at: Attn: Branding SFPD 2515 Camino Entrada Santa Fe, NM 87507 The deadline for submissions is Jan. 10. Staff and wire reports B-4 THE NEW MEXICAN Friday, December 27, 2013 LOCAL & REGION DWI: Ortiz claimed he stayed Buyers of Taos hotel plan multimillion-dollar revamp sober between 2004 and 2010 By J.R. Logan The Taos News TAOS — Two California investors have bought the Sagebrush Inn and Comfort Suites from longtime owners Ken and Louise Blair. The deal closed Dec. 20, and terms were not disclosed. The buyers said they’re planning a “multimillion-dollar renovation” to update guest rooms, the dining area and the grounds of the property. “The idea is to bring the hotel into the 21st century without losing its early 20th-century appeal and charm,” said James Haimsohn, who bought the hotels with his business partner, Jared Steinberg. The pair are based in Southern California and bought the hotel through Sagebrush Management LLC. Once the renovations are complete, Haimsohn said, guests can expect to see a “modest increase” in room rates. Haimsohn said longtime clients won’t be priced out of the hotel. Haimsohn said there were no plans to reduce staffing at the hotel. The new owners are hiring a professional hotel management firm — Dallas-based Prism Hotels — to oversee the day-to-day operations. Haimsohn said he comes from a hotel management background and was attracted to Taos by its “dynamic market” that includes art, culture and outdoor activities. He said the unique feel of the Sagebrush Inn made it an attractive investment. “One of the primary things that attracted us to this property was the tremendous pride of ownership that the Blairs had demonstrated,” Haimsohn said. State records show that the liquor license for the hotel was sold for $400,000 Sept. 12. The sale of the Sagebrush property comes nearly 40 years after it was bought by Ken Blair. Blair, 84, told The Taos News that he bought the Sagebrush in 1975, and he said it was starting to show its age. “It’s beautiful architectural property, but when I got it, it was pretty sad,” Blair said. Blair undertook a series of renovations and expansions over the next several years, though he said his intention was never to change the feel of the property. “My aim was always to keep it what it was,” Blair said. Blair owned and operated the property for nearly four decades. He said the business wasn’t only good for him and his family, but for the hundreds of locals who’ve been employed there. “It’s been good for the town, good for the people, and everybody that’s worked here has taken pride in it,” Blair said. Blair said business between 2008 and 2012 was “pretty dry,” though he said things picked up in 2013. The hotel industry is projected to improve in the coming years — a fact that likely motivated the buyers, Blair said. Aside from a few hand-picked artworks — including some valuable Rory Wagner pieces — Blair said the bulk of the hotel’s art collection would remain in the building. The Blairs said they plan to stay in Taos. They still own and operate the Quality Inn. Mayhem: Actors might Skype in Continued from Page B-1 with dragons, armies of reanimated corpses and various battle scenes — lends itself to being seen on a screen larger than that of most television sets. The hope is that “the people able to get in will appreciate the production values,” he said. The theater’s general manager, Jon Bowman, said, “A lot of television shows now have budgets approaching what films do … and in a lot of ways, they’re superior” in terms of production value. The process of getting approval to screen the TV series lasted several months, according to Martin and Bowman. “The only big hang-up for us was that HBO gave us permission, but we can’t charge,” Bowman, said, attributing the requirement to contracts between HBO and the show’s stars. “Obviously, we’re hoping to do all right with the concession and sell some merchandise and books.” The cinema, which sells signed copies of Martin’s books at cover price, is hoping to sell more of the books, and Martin said he is working with HBO to be able to sell other merchandise, including seasons for home viewing on DVD and Blu-ray. Though it’s been open for a little over four months, the Jean Cocteau has managed to establish itself as an art house theater — with weekly late-night screenings, which included Game of Thrones’ Robb Stark, played by Richard Madden. COURTESY HBO The Rocky Horror Picture Show around Halloween — as well as an event space. The cinema played host to a panel on the John F. Kennedy assassination with filmmaker Dean Balsamo on Nov. 22, and author Michael Chabon was at the theater in September for a book signing and discussion with Martin. The 12 weeks of screenings will bring together both of these aspects of Jean Cocteau’s offerings. In addition to showing every episode of the series, the screenings will involve some question-and-answer sessions with actors and others involved in the show’s production, either through Skype or in person. Though Martin is still working out the specifics of who might be making appearances to answer audience questions, he has confirmed that showrunners David Benioff and D.B. Weiss will Skype into one of the screenings. “Once we have some definite commitments … we’ll be releasing that and letting people know,” Martin said, adding that the Q-and-A’s would likely take place on nights when only two episodes are shown. Martin, who is working on another book in his series, said he will try to be present at as many of the showings as possible, especially those involving guests appearing in person or via Skype. “It’ll be kind of a once-in-alifetime opportunity for people here to connect with the cast and the crew,” Bowman said. Contact David Salazar at davidjsalazar@gmail.com. Lea County sees economic boom thanks to oil, gas 29 percent compared to the same quarter of the previous HOBBS — The good news: year, while other retail and oil New studies show Lea County and natural gas gross receipts is continuing to experience a were down slightly from the boom thanks to oil and gas. same quarter of the previous The bad news: The southeast- year. ern New Mexico county is still In addition, $34 million was facing a housing, teacher and reported in building permit police officer shortage. valuations, which is the largest According to the latest Enerquarter on record. The next gyPlex economic index released highest quarter for building perlast week by the Economic mit valuations was in 2004, with Development Corporation of Lea County, the county showed $25 million. “High building permit valuaa 13th straight quarter of tion speak to both the economic improvement, the Hobbs Newsenvironment resulting in high Sun reports. levels of construction activity, as During the second quarter well as the stimulus to the local of 2013, Lea County’s economy economy provided by carrying grew by 7.9 percent over the same quarter in 2012. The index out those construction projects in terms of employment, puris a reflection of the general chase of building materials, utieconomy and indicates that lization of local contractors, and spending, taxable business so on,” Ingham said. receipts, construction and The state Taxation and Revemployment continue to rise. enue Department also reported Karr Ingham, an economist from Amarillo who prepares the a jump in gross receipts taxes EnergyPlex index, said employ- for Hobbs. But while the area continues ment in Lea County continues to see a boom, the county is still to register solid improvement and the county’s growth should struggling with finding enough housing for residents and continue into 2014. Vehicle sales are up by attracting and keeping teachers, The Associated Press During the second quarter of 2013, Lea County’s economy grew by 7.9 percent over the same quarter in 2012..” In a 2002 plea deal, Ortiz pleaded guilty to driving under realized he was driving the the influence and admitted to wrong direction. Ortiz said he three previous convictions, all attempted a U-turn, but accel- misdemeanors, in 1987, 1994 erated too fast and flipped his and 1995. But court documents vehicle onto its roof. Police in that case failed to mention said he was able to crawl out of the DWI conviction in 1986 in the SUV without injury. Bernalillo County. Ortiz told officers that he Documents in the 2002 case had consumed some Wild show that Ortiz’s license had Turkey bourbon before drivbeen revoked between 1996 ing that night, according to the and 2006. report, but he said he wasn’t District Court Judge Stefeeling drunk. But officers phen Pfeffer gave Ortiz an reported that Ortiz required 18-month sentence in the help standing and that he had Santa Fe County jail with six “a strong odor of alcohol” on months suspended. Ortiz also his breath. Dashboard camera got eight months of credit for video of the incident shows pre-sentencing confinement, Ortiz laughing and stumbling during field sobriety tests. The and after his release, he spent video also shows him disobey- six months on probation. His license revocation was ing an officer’s orders and extended to 2007. refusing to take the tests. During probation, Ortiz Officers wrote that Ortiz was not allowed to drink alcoagreed to a breath alcohol test, hol, and he was required to which showed blood alcohol content levels of 0.19 and 0.20, complete a “drug and alcohol more than twice the legal driv- screening and required treatment.” Additionally, he agreed ing limit of .08. Officers then to random drug tests and to took Ortiz to Christus St. Vinavoid bars. cent Regional Medical Center From 2004 to 2010, Ortiz for a blood draw. remained sober, according to As of Thursday, Ortiz was his repeated petitions to renew being held at the Santa Fe his driver’s license. He first County jail in lieu of a $15,000 asked the court to renew his cash bond. license in January 2009, stating City police did not provide that he had been convicted of details of the 10 previous three or more DWI convicdrunken-driving charges for tions, but he said it had been Ortiz that officers had noted in five years since his last DWI in their report. Celina Westervelt, 2002. He said he didn’t drink department spokeswoman, anymore, citing severe health said the arresting officer likely problems such as cirrhosis and got that information from the hepatitis C. National Crime Information Santa Fe County jail records Center. A reporter was unable don’t show additional DWI to verify this information arrests for Ortiz between 2002 Thursday. and 2010, but they do show A telephone message left he was arrested in 2004 on with Ortiz was not returned. Continued from Page B-1 charges of resisting an officer, possession of an open container of alcohol and engaging in a fight. And in 2005, he was arrested on charges of aggravated assault and disorderly conduct. It appears both cases were dismissed. Judge James Hall allowed Ortiz to drive again on the condition that he use an ignition interlock system for six months. Ortiz completed that requirement, and Hall initially reinstated his license. But Hall then changed his mind, citing Ortiz’s extensive drunken-driving history. The judge ordered that Ortiz spend another five months using the interlock, which Ortiz did. In 2010, former District Court Judge Barbara Vigil reinstated Ortiz’s license, stating that he “presented unambiguous and detailed evidence of complete sobriety,” and that he “has shown good cause for restoration of driving privileges.” Ortiz’s mother and several of his neighbors in the 800 block of Colombia Street had written letters on his behalf. While each letter is worded differently, the message in all of them was essentially the same: that Ortiz had stopped drinking, and that he wasn’t in any danger of starting anytime soon. “I no longer suffer the anguish of him consuming alcohol,” wrote his mother, Mary Ortiz. Contact Chris Quintana at 986-3093 or cquintana@ sfnewmexican.com. ATTENTION ADVERTISERS EARLY CHRISTMAS 2013 DEADLINES Publication Date Retail & Classified Display Tuesday, December 24 Wed. & Thu., December 25 & 26 Thursday, December 26 Pasatiempo, December 27 Friday, December 27 Deadline Friday, December 20, Noon Friday, December 20, 5 p.m. Monday, December 23, Noon Monday, December 23, Noon Tuesday, December 24, 5 p.m.. For Death Notices after the above deadlines, please phone The New Mexican’s Newsroom at 986-3022 through Tuesday, December 24.. ATTENTION ADVERTISERS EARLY NEW YEAR’S DAY 2014 DEADLINES Publication Date SPORTS B-5 Bidding war: Posting period begins for Japanese pitcher Tanaka. Page B-6 NFL Cowboys may find out what they can do without Romo QB not officially ruled out for Sunday’s game against Eagles season finale against an NFC East rival since 2008 — and their first elimination game IRVING, Texas — For without Romo in 10 years. years, Tony Romo’s defenders Dallas hasn’t ruled out the have answered his penchant star quarterback for Sunday for costly late-game mistakes night’s game against Philawith a rhetorical question: delphia, but all signs point to What would the Dallas Romo’s back injury pushing Cowboys do without him? Kyle Orton into the starting It appears they will find out role after two years of limited in their fourth playoffs-or-bust play as the backup. By Schuyler Dixon The Associated Press tions, challenges anyone to come up with a current quarterback who could do better Surely Orton’s name isn’t in Romo’s situation. And he’s the first that comes to mind not kidding. for fans wanting a change after years of damaging inter“Name whoever you want,” ceptions, fumbles or, most said White, who lost three infamously, the field goal flub straight NFC championship when Romo dropped the snap games in the 1980s and lost on a kick that could have won his job to Gary Hogeboom. “I his first playoff game in 2006. don’t care if it’s Tom Brady, Danny White, the last long- if it’s Peyton Manning, if time Dallas starter who failed Please see Romo, Page B-8 to meet Super Bowl expecta- Cowboys quarterback Tony Romo looks for an opening to pass during Sunday’s game against the Washington Redskins in Landover, Md. EVAN VUCCI THE ASSOCIATED PRESS LADY HORSEMEN CHRISTMAS TOURNAMENT ST. MICHAEL’S 73, CAPITAL 46 Loosening the reins Lady Horsemen break scoring record in win over Capital Miami Heat star beats Manning by 11 votes By Tim Reynolds The Associated Press By James Barron The New Mexican wedLeBron ding, a second NBA James- f orget crawling or walking. The St. Michael’s Lady Horsemen are trying to gallop. Or better yet, dare we say, “The Runnin’ Lady Horsemen?” For years, the girls basketball program seems to take offense to offense, but this season’s group is embracing it. On Thursday night, St. Michael’s was in a recordsetting mood as it scored the most points in eight seasons under head coach Martin Romero in beating Capital 73-46 in the opening round of the Lady Horsemen Christmas Tournament in Perez-Shelley Gymnasium. The Lady Horsemen (9-3) take on Pojoaque Valley in a rematch of last week’s Ben Luján semifinal at 6 p.m. on Friday, while Española plays District 2AAAA rival Bernalillo in the 4:30 p.m. semifinal. When Karen Veruete scored on a layup with 10 seconds left, the Lady Horsemen broke their previous high of 71 points, which they did on Jan. 23, 2008 against Raton. Romero didn’t hesitate to explain the change in tempo. “We have the personnel to be able to push it,” Romero said. “We’ve been working on it every day. We got speed. If you’d seen us two months ago, you’d have said there’s not way this team is running. But we work on it every day.” When the team hit the court for the start of practice, the biggest obstacle for the Lady Horsemen was their conditioning. It was not ideal for them to run for 32 minutes. Varsity assistant coach Joe Vigil helped whip St. Michael’s into shape. Aside from 33- and 32-point efforts in wins over Los Alamos and Pojoaque, the Lady Horsemen are averaging 51.4 points per game. “I think that is what is helping us,” said freshman wing Jocelyn Fernandez. “We’re getting back in transition defense and on press breaks. We’re sprinting down there and it’s easier to get the ball to us.” Fernandez has been one of the beneficiaries to the uptempo style. She had Please see Reins, Page B-7 Please see James, Page B-7 POINSETTIA BOWL Suite, Aggies beat Lynch, No. 24 NIU By Bernie Wilson The Associated Press St. Michael’s Christiana Gabaldon, left, dribbles around Capital’s Miquela Vigil in the first quarter of Thursday’s game during the St. Michael’s Lady Horsemen Christmas Tournament at Perez-Shelley Gymnasium. For more photos, go to tinyurl.com/12g5baj. JANE PHILLIPS/THE NEW MEXICAN 2013 in review: Quite a wild ride in prep sports T James wins AP Male Athlete of the Year is the season for end-of-year pitality room for the Lady Horsemen lists, so why not have one for Christmas Tournament on Friday. Northern New Mexico? And with that, on with the awards It has been quite an entertaining for this year: 2013, whether the action was on the Game of the year: This was hard field, in the gym — or in to choose. Both games the office. involve St. Michael’s, and You can’t say this year were playoff games. Unforhas been bereft of excitetunately, they were losses. ment, anticipation and So, how do you choose exasperation, which is what between the Class AAA makes prep sports so much state boys basketball chamfun, right? This list isn’t pionship game between St. necessarily the best of the Michael’s and Albuquerque best, but rather the most Hope Christian and the James Class AAA football quarterintriguing person (or perBarron final matchup between the sons) that made noise this Commentary Horsemen and Robertson? calendar year. Both teams that vanSo, sorry, St. Michael’s quished the Horsemen football. We can’t whitewere state champions (Yes, I know wash the AAA quarterfinal loss to the Hope game was for the champiLas Vegas Robertson with that AAA onship), but they were extraordinary championship in 2012. I missed out on that. I’ll pick up the tab at the hos- in their own way. Robertson avenged a 50-0 beatdown in the regular season, but Hope did something more dramatic: it invoked the spirit of Lenny Roybal by stalling. Tell me you saw that coming. Please. Coach of the year: Again, the easy pick would be St. Michael’s boys hoops coach Ron Geyer because he does more with less than anyone. Robertson’s Leroy Gonzalez took his team from 1-3 at the beginning of the football season and turned it into championship material. But my vote is Taos’ Daniel Trujillo. The coaches around the North and in the state laud his coaching acumen and his character. You need character to withstand losing your job, only to get it back within a week. Team of the year: There is only one program that has won eight state championships in the past five years. Of course, it helps that Los Alamos has a boys and girls cross country Sports information: James Barron, 986-3045, jbarron@sfnewmexican.com Design and headlines: Eric J. Hedlund, ehedlund@sfnewmexican.com program to do that. Still, any program that wins three straight AAAA titles on the boys and girls side is tops in my book. Administrator of the year: The folks at Santa Fe High and Capital whisper her name as if her spectre lingers, but Santa Fe Public Schools athletic director Kim Loomis made more noise than any administrator this year. Two wrong votes in an all-too-important classification and realignment referendum will do that to you. Then she took the fall for the ineligibility issues at Capital. You can’t say she won’t be forgotten — especially when the Santa Fe High activity bus turns off of I-25 at the Bernalillo exit, on its way to Rio Rancho next fall. Athlete of the year: Stand up and take a bow .... Wait a minute. We can’t have that discussion until the spring. See you then. SAN DIEGO — Safety Brian Suite intercepted a pass and recovered a fumble by Heisman Trophy finalist Jordan Lynch 21 Utah St. 21 to help Utah State beat No. 24 24 N. Illinois 14 Please see aGGies, Page B-8 inside u Washington to face Brigham Young. u Conner leads Pitt to win over Bowling Green. PaGe B-8 BREAKING NEWS AT B-6 THE NEW MEXICAN Friday, December 27, 2013 BASKETBALL BASKETBALL NBA Eastern Conference Atlantic Toronto Boston New York Brooklyn Philadelphia Southeast Miami Atlanta Charlotte Washington Orlando Central Indiana Detroit Chicago Cleveland Milwaukee W 11 12 9 9 8 W 22 16 14 12 8 W 23 14 11 10 6 L 15 17 19 19 20 L 6 13 15 13 20 L 5 16 16 18 22 Pct .423 .414 .321 .321 .286 Pct .786 .552 .483 .480 .286 Pct .821 .467 .407 .357 .214 Western Conference Rockets 100, Grizzlies 92 GB — 1/2 3 3 4 GB — 61/2 81/2 81/2 14 GB — 10 111/2 13 17 Southwest W L Pct GB San Antonio 23 7 .767 — Houston 20 11 .645 31/2 Dallas 16 13 .552 61/2 New Orleans 12 14 .462 9 Memphis 12 16 .429 10 Northwest W L Pct GB Portland 23 5 .821 — Oklahoma City 23 5 .821 — Denver 14 13 .519 81/2 Minnesota 13 15 .464 10 Utah 8 23 .258 161/2 Pacific W L Pct GB L.A. Clippers 20 10 .667 — Phoenix 17 10 .630 11/2 Golden State 17 13 .567 3 L.A. Lakers 13 16 .448 61/2 Sacramento 8 19 .296 101/2 Thursday’s Games Atlanta 127, Cleveland 125,2OT Houston 100, Memphis 92 San Antonio 116, Dallas 107 L.A. Clippers at Portland Wednesday’s Games Chicago 95, Brooklyn 78 Oklahoma City 123, New York 94 Miami 101, L.A. Lakers 95 Houston 111, San Antonio 98 Golden State 105, L.A. Clippers 103 Friday’s Games Detroit at Orlando, 5 p.m. Oklahoma City at Charlotte, 5 p.m. Toronto at New York, 5:30 p.m. Milwaukee at Brooklyn, 5:30 p.m. Washington at Minnesota, 6 p.m. Denver at New Orleans, 6 p.m. L.A. Lakers at Utah, 7 p.m. Miami at Sacramento, 8 p.m. Phoenix at Golden State, 8:30 p.m. Hawks 127, Cavaliers 125, 2OT ATLANTA (127) Carroll 3-7 1-2 8, Millsap 9-17 0-0 20, Horford 11-17 2-2 25, Teague 14-24 5-7 34, Korver 7-15 2-2 20, Brand 0-0 0-0 0, Williams 3-9 1-2 7, Mack 3-9 3-4 10, Schroder 0-0 0-0 0, Scott 0-2 0-0 0, Ayon 0-1 0-0 0, Antic 1-2 0-0 3. Totals 51-103 14-19 127. CLEVELAND (125) Clark 1-4 0-0 3, Thompson 8-13 6-8 22, Bynum 2-3 0-0 4, Irving 17-33 3-4 40, Miles 4-7 0-0 10, Waiters 9-14 1-2 20, Jack 2-5 5-8 9, Varejao 4-7 0-0 8, Dellavedova 2-6 4-4 9, Bennett 0-1 0-0 0, Zeller 0-1 0-0 0. Totals 49-94 19-26 125. Atlanta 26 24 26 19 1319—127 Cleveland 27 21 24 23 1317—125 3-Point Goals—Atlanta 11-34 (Korver 4-12, Millsap 2-4, Horford 1-1, Antic 1-1, Carroll 1-3, Mack 1-3, Teague 1-4, Scott 0-2, Williams 0-4), Cleveland 8-21 (Irving 3-8, Miles 2-3, Clark 1-1, Waiters 1-3, Dellavedova 1-4, Jack 0-1, Varejao 0-1). Fouled Out—None. Rebounds—Atlanta 56 (Millsap 11), Cleveland 53 (Varejao 17). Assists— Atlanta 33 (Teague 14), Cleveland 22 (Irving 9). Total Fouls—Atlanta 24, Cleveland 19. Technicals—Cleveland defensive three second. A—18,682 (20,562). MEMPHIS (92) Prince 4-7 0-0 9, Randolph 8-20 7-12 23, Koufos 2-5 1-2 5, Conley 4-14 1-2 11, Allen 4-11 0-0 8, Bayless 3-7 0-0 7, Johnson 5-8 1-2 12, Davis 2-6 0-0 4, Miller 3-9 1-2 7, Leuer 3-6 0-0 6. Totals 38-93 11-20 92. HOUSTON (100) Parsons 5-12 5-6 15, Jones 10-14 0-3 20, Howard 1-5 0-0 2, Lin 5-13 6-6 18, Harden 2-9 22-25 27, Brooks 3-7 0-0 6, Casspi 1-3 0-0 2, Garcia 2-4 0-0 6, Motiejunas 2-4 0-0 4. Totals 31-71 33-40 100. Memphis 23 30 19 20—92 Houston 26 19 21 34—100 3-Point Goals—Memphis 5-18 (Conley 2-4, Prince 1-2, Bayless 1-4, Johnson 1-4, Miller 0-2, Allen 0-2), Houston 5-24 (Garcia 2-4, Lin 2-4, Harden 1-5, Motiejunas 0-1, Casspi 0-1, Jones 0-2, Brooks 0-3, Parsons 0-4). Fouled Out—None. Rebounds—Memphis 61 (Randolph 17), Houston 50 (Parsons 11). Assists—Memphis 20 (Conley 6), Houston 17 (Harden, Parsons 5). Total Fouls—Memphis 30, Houston 19. Technicals—Randolph. A—18,201 (18,023). Spurs 116, Mavericks 107 SAN ANTONIO (116) Leonard 3-6 1-2 7, Duncan 7-16 7-8 21, Splitter 2-4 8-11 12, Parker 6-18 11-12 23, Belinelli 2-5 0-0 4, Diaw 5-6 0-0 10, Ginobili 2-7 3-4 8, Ayres 1-3 2-2 4, Mills 2-3 0-0 5, Green 7-7 3-3 22, Bonner 0-0 0-0 0. Totals 37-75 35-42 116. DALLAS (107) Marion 1-9 2-2 4, Nowitzki 10-17 4-4 25, Blair 6-8 2-3 14, Calderon 5-11 0-0 13, Ellis 9-19 5-7 23, Carter 4-12 11-11 20, Dalembert 4-7 0-0 8, Crowder 0-1 0-2 0, Mekel 0-0 0-2 0, Larkin 0-1 0-0 0, Ellington 0-0 0-0 0. Totals 39-85 24-31 107. San Antonio 27 31 26 32—116 Dallas 20 31 26 30—107 3-Point Goals—San Antonio 7-16 (Green 5-5, Mills 1-2, Ginobili 1-4, Leonard 0-2, Belinelli 0-3), Dallas 5-17 (Calderon 3-4, Nowitzki 1-2, Carter 1-4, Larkin 0-1, Crowder 0-1, Marion 0-2, Ellis 0-3). Fouled Out—None. Rebounds—San Antonio 53 (Duncan 13), Dallas 45 (Blair 11). Assists—San Antonio 22 (Diaw 5), Dallas 18 (Ellis 6). Total Fouls—San Antonio 25, Dallas 26. A—20,305 (19,200). NCAA Mens’ Top 25 Schedule Thursday’s Games No games scheduled. Friday’s Games No. 3 Ohio State vs. Louisiana-Monroe, 5 p.m. No. 19 North Carolina vs. Northern Kentucky, 5 p.m. No. 20 San Diego State vs. Saint Katherine, 8 p.m. Saturday’s Games No. 2 Syracuse vs. No. 8 Villanova, 12 p.m. No. 4 Wisconsin vs. Prairie View, 12 p.m. No. 5 Michigan State vs. New Orleans, 2:15 p.m. No. 6 Louisville at No. 18 Kentucky, 2 p.m. No. 9 Duke vs. Eastern Michigan, 12 p.m. No. 15 UConn vs. Eastern Washington at Webster Bank Arena, Bridgeport, Conn., 10 a.m. No. 17 Memphis vs. Jackson State, 10 a.m. No. 21 Colorado vs. Georgia, 8 p.m. No. 23 UMass vs. Providence, 4 p.m. No. 24 Gonzaga vs. Santa Clara, 6 p.m. No. 25 Missouri at N.C. State, 6 p.m. Women’s AP Top 25 Thursday’s Games No games scheduled. Friday’s Games No games scheduled. NATIONAL SCOREBOARD FOOTBALL FOOTBALL NFL American Conference East W y-New England11 Miami 8 N.Y. Jets 7 Buffalo 6 South W y-Indianapolis 10 Tennessee 6 Jacksonville 4 Houston 2 North W y-Cincinnati 10 Baltimore 8 Pittsburgh 7 Cleveland 4 West W y-Denver 12 x-Kansas City 11 San Diego 8 Oakland 4 L 4 7 8 9 L 5 9 11 13 L 5 7 8 11 L 3 4 7 11 T 0 0 0 0 T 0 0 0 0 T 0 0 0 0 T 0 0 0 0 Pct .733 .533 .467 .400 Pct .667 .400 .267 .133 Pct .667 .533 .467 .267 Pct .800 .733 .533 .267 PF PA 410 318 310 315 270 380 319 354 PF PA 361 326 346 371 237 419 266 412 PF PA 396 288 303 318 359 363 301 386 PF PA 572 385 406 278 369 324 308 419 National Conference East W L T Pct PF PA Philadelphia 9 6 0 .600 418 360 Dallas 8 7 0 .533 417 408 N.Y. Giants 6 9 0 .400 274 377 Washington 3 12 0 .200 328 458 South W L T Pct PF PA x-Carolina 11 4 0 .733 345 221 New Orleans 10 5 0 .667 372 287 Atlanta 4 11 0 .267 333 422 Tampa Bay 4 11 0 .267 271 347 North W L T Pct PF PA Chicago 8 7 0 .533 417 445 Green Bay 7 7 1 .500 384 400 Detroit 7 8 0 .467 382 362 Minnesota 4 10 1 .300 377 467 West W L T Pct PF PA x-Seattle 12 3 0 .800 390 222 x-San Fran. 11 4 0 .733 383 252 Arizona 10 5 0 .667 359 301 St. Louis 7 8 0 .467 339 337 x-clinched playoff spot y-clinched division WEEK SEVENTEEN Sunday, Dec. 29 Houston at Tennessee, 11 a.m. Detroit at Minnesota, 11 a.m. Carolina at Atlanta, 11 a.m. Cleveland at Pittsburgh, 11 a.m. Washington at N.Y. Giants, 11ap.m. Baltimore at Cincinnati, 11 a.m. Jacksonville at Indianapolis, 11 a.m. N.Y. Jets at Miami, 11 a.m. Denver at Oakland, 2:25 p.m. Kansas City at San Diego, 2:25 p.m. St. Louis at Seattle, 2:25 p.m. San Francisco at Arizona, 2:25 p.m. Green Bay at Chicago, 2:25 p.m. Tampa Bay at New Orleans, 2:25 p.m. Buffalo at New England, 2:25 p.m. Philadelphia at Dallas, 6:30 p.m. NCAA FBS Bowls Thursday, Dec. 26 Little Caesars Pizza Bowl At Detroit Pittsburgh 30, Bowling Green 27 Poinsettia Bowl At San Diego Utah State 21, Northern Illinois 14) BASEBALL Posting period begins for Japanese pitcher Tanaka The Associated Press Rakuten Golden Eagles pitcher Masahiro Tanaka speaks at a Dec. 17 news conference after a meeting with his club president, in Sendai, northern Japan. Tanaka’s team says it has decided to let him seek his career in the United States next season, reversing its earlier rejection. KYODO NEWS FILE PHOTOyear. Monday, Jan. 6 BCS National Championship At Pasadena, Calif. Florida State (13-0) vs. Auburn (12-1), 6:30 p.m. (ESPN) PITT. 30, BOWLING GREEN 27 Pittsburgh 7 10 3 10—30 Bowling Green 3 7 10 7—27 First Quarter BG—FG Tate 28, 4:26. Pitt—Conner 15 run (Blewitt kick), :58. Second Quarter Pitt—FG Blewitt 25, 8:29. Pitt—Boyd 54 punt return (Blewitt kick), 6:43. BG—Bayer 29 pass from Johnson (Tate kick), 1:28. Third Quarter BG—Gates 94 kickoff return (Tate kick), 14:49. BG—FG Tate 46, 9:52. Pitt—FG Blewitt 28, 5:59. Fourth Quarter Pitt—Voytik 5 run (Blewitt kick), 9:31. BG—Burbrink 15 pass from Johnson (Tate kick), 4:42. Pitt—FG Blewitt 39, 1:17. A—26,259. ——— Pitt BG First downs 21 18 Rushes-yards 39-255 34-10 Passing 232 279 Comp-Att-Int 13-22-0 21-33-0 Return Yards 69 0 Punts-Avg. 4-41.0 5-54.6 Fumbles-Lost 0-0 1-0 Penalties-Yards 4-50 4-36 Time of Possession 28:50 31:10 ——— INDIVIDUAL STATISTICS RUSHING—Pittsburgh, Conner 26-229, Voytik 2-24, Parrish 1-2, Bennett 5-2, Savage 4-0, Team 1-(minus 2). Bowling Green, Tra.Greene 18-39, Coppet 5-2, Johnson 11-(minus 31). PASSING—Pittsburgh, Savage 8-13-0124, Voytik 5-9-0-108. Bowling Green, Johnson 20-32-0-272, H.Jackson 1-1-0-7. RECEIVING—Pittsburgh, Boyd 8-173, Holtz 2-21, Garner 1-20, Wuestner 1-13, Bennett 1-5. Bowling Green, Joplin 6-86, H.Jackson 5-78, Bayer 3-57, Burbrink 3-44, Moore 2-12, Tra.Greene 2-10, Johnson 0-(minus 8). UTAH ST. 21, No. 24. A143, Marshall 6-40, Glover-Wright 1-3, Natson 5-3, Garretson 6-(minus 6), Team 4-(minus 15). N. Illinois, Lynch 18-39, Stingily 11-38, Maxwell 1-10, Spencer 2-6, D.Brown 3-5, Turner 1-1, Lewis 2-0. PASSING—Utah St., Garretson 17-282-121. N. Illinois, Lynch 20-35-1-216. RECEIVING—Utah St., Butler 4-33, Swindall 4-28, Natson 3-11, Van Leeuwen 2-23, Houston 1-11, DeMartino 1-8, Marshall 1-4, Andersen 1-3. N. Illinois, Lewis 6-55, D.Brown 4-63, Brescacin 3-30, Eakes 3-29, Maxwell 2-23, Spencer 1-10, Stingily 1-6. HOCKEY HOCKEY NHL Eastern Conference Atlantic GP Boston 37 Tampa Bay 37 Montreal 38 Detroit 39 Toronto 39 Ottawa 39 Florida 38 Buffalo 37 Metro GP Pittsburgh 39 Washington 37 Philadelphia 37 N.Y. Rangers 38 New Jersey 38 Columbus 37 Carolina 37 N.Y. Islanders 38 W 25 23 22 17 18 15 14 10 W 27 19 17 18 15 16 14 11 L OL Pts GF GA 10 2 52 106 77 11 3 49 106 87 13 3 47 96 84 13 9 43 99108 16 5 41 106 113 17 7 37 111 126 19 5 33 88123 24 3 23 66105 L OL Pts GFGA 11 1 55 121 88 14 4 42 117112 16 4 38 93104 18 2 38 88102 16 7 37 92 99 17 4 36 101106 15 8 36 86105 20 7 29 96129 Western Conference Central GP W L OL Pts GFGA Chicago 39 26 7 6 58 145107 St. Louis 36 24 7 5 53 128 85 Colorado 36 23 10 3 49 106 88 Minnesota 39 20 14 5 45 88 96 Dallas 36 18 12 6 42 106107 Winnipeg 39 16 18 5 37 103116 Nashville 37 16 17 4 36 85109 Pacific GP W L OL Pts GFGA Anaheim 39 27 7 5 59 127 98 Los Angeles 38 25 9 4 54 106 76 San Jose 37 23 8 6 52 121 94 Vancouver 39 22 11 6 50 106 93 Phoenix 36 19 10 7 45 111110 Calgary 37 14 17 6 34 95118 Edmonton 39 12 24 3 27 101135 Note: Two points are awarded for a win; one point for an overtime or shootout loss. Thursday’s Games No games scheduled. Friday’s Games Ottawa at Boston, 5 p.m. Buffalo at Toronto, 5 p.m. Columbus at New Jersey, 5 p.m. N.Y. Rangers at Washington, 5 p.m. Pittsburgh at Carolina, 5 p.m. Colorado at Chicago, 6 p.m. Minnesota at Winnipeg, 6 p.m. Nashville at Dallas, 6:30 p.m. Edmonton at Calgary, 7 p.m. San Jose at Phoenix, 7 p.m. Saturday’s Games Boston at Ottawa, 5 p.m. Montreal at Tampa Bay, 5 p.m. Detroit at Florida, 5 p.m. New Jersey at N.Y. Islanders, 5 p.m. Chicago at St. Louis, 6 p.m. Los Angeles at Nashville, 6 p.m. Phoenix at Anaheim, 6 p.m. Philadelphia at Edmonton, 8 p.m. Leaders Through Dec. 25 Scoring Sidney Crosby, Pit Patrick Kane, Chi Ryan Getzlaf, Anh N. Backstrom, Was A. Ovechkin, Was Corey Perry, Anh Evgeni Malkin, Pit Joe Thornton, SJ Chris Kunitz, Pit John Tavares, NYI Alex Steen, StL Tyler Seguin, Dal M. St. Louis, TB Erik Karlsson, Ott GP 39 39 36 37 35 39 32 37 39 38 35 34 37 39 G 20 22 19 9 30 22 9 5 20 13 24 19 16 10 A PTS 34 54 27 49 25 44 33 42 11 41 19 41 32 41 35 40 19 39 26 39 14 38 18 37 21 37 27 37 WINTER OLYMPICS Speedskaters start from zero at U.S. trials for Sochi Games But when the results are all in, we’ll be ready to take on the world in Sochi.” Everyone is starting from The long-track trials will scratch at the U.S. Olympic be held over five days (with speedskating trials. an off-day Monday), followed It doesn’t matter if you’re immediately by the U.S. short two-time gold medalist Shani track trials on the infield rink Davis or an obscure long shot at the same facility, a four-day — you have to earn your way meet that ends Jan. 5. onto the American team that The U.S. short track prowill be in Sochi. gram is rebuilding after the U.S. Speedskating officials retirements of 2010 stars are hoping the new format Apolo Anton Ohno and Kathwill lead to more interest in erine Reutter, as well as scanthe trials, which begin Friday dals and strife that led to a at the Olympic oval in suburmajor overhaul of the national ban Salt Lake City. governing body. For the athletes and coaches, But the traditional speedit raises the anxiety level. skating team, with medal contenders such as Davis, “I’m not a fan of the fact Heather Richardson and Britthat our top skaters weren’t tany Bowe, should be one of able to prequalify based on their World Cup results,” said the top countries in Sochi, continuing the strong U.S. tranational sprint team coach dition on the big oval. Ryan Shimabukuro, referring to the system used during preStart with Davis, who won vious Olympic cycles. “A lot gold in the 1,000 meters and of those decisions were based silver in the 1,500 at each of on television coverage. But the last two Olympics. He that makes it very difficult for leads the World Cup standus. We have a very hard travel ings in both events heading schedule. When you get to this into the trials, but hasn’t been time of year, you want to proquite as dominant as he was tect your medal contenders.” before the Vancouver Games four years ago. This time, the World Cup meets merely determined Shimabukuro said that’s by how many spots a country design. It’s all about peaking at got in each event. The trithe right time. als in Kearns, Utah — site of “Shani has taken a little speedskating during the 2002 different approach than he Winter Games — will decide took in 2010,” the coach said. which U.S. skaters actually fill “Though he has skated well those spots. in the fall, he’s not won every “It’s a tough qualification race. It’s all about timing. system for us,” Shimabukuro When you’re building toward said. “The trials will be pretty the games, sometimes it’s hard stressful for most competitors. to hold on to that top form. By Paul Newberry The Associated Press By Howie Rumberg NEW YORK — The bidding for Japanese star pitcher Masahiro Tanaka has begun. All 30 major league teams were notified that the 30-day period to sign the star 25-yearold right-hander began at 8 a.m. EST Thursday, according to MLB spokesman Michael Teevan. Clubs have until 5 p more Belk Bowl At Charlotte, N.C. Cincinnati (9-3) vs. North Carolina (6-6), 1:20 p.m. (ESPN) Russell Athletic Bowl At Orlando, Fla. Miami (9-3) vs. Louisville (11-1), 4:45 p.m. (ESPN) Buffalo Wild Wings Bowl At Tempe, Ariz. Kansas State (7-5) vs. Michigan (7-5), 8:15 p.m. (ESPN) Monday, Dec. 30 Armed Forces Bowl At Fort Worth, Texas Middle Tennessee (8-4) vs. Navy (8-4), 9:45 a.m. (ESPN) Music City Bowl At Nashville, Tenn. Mississippi (7-5) vs. Georgia Tech (7-5), 1:15 p.m. (ESPN) Alamo Bowl At San Antonio Oregon (10-2) vs. Texas (8-4), 4:45 p.m. (ESPN) Holiday Bowl At San Diego Arizona State (10-3) vs. Texas Tech (7-5), 8:15 p.m. (ESPN) Tuesday, Dec. 31 AdvoCare V100 Bowl At Shreveport, La. Arizona (7-5) vs. Boston College (7-5), 10:30 a.m. (ESPN) Sun Bowl At El Paso, Texas Virginia Tech (8-4) vs. UCLA (9-3), 12 p.m. (CBS) Liberty Bowl At Memphis, Tenn. Rice (9-3) vs. Mississippi State (6-6), 2), 10 a.m. (ESPNU) Gator Bowl At Jacksonville, Fla. Nebraska (8-4) vs. Georgia (8-4), 10 a.m. (ESPN2) Capital One Bowl At Orlando, Fla. Wisconsin (9-3) vs. South Carolina (10-2), 11 a.m. (ABC) Outback Bowl At Tampa, Fla. Iowa (8-4) vs. LSU (9-3), 11 a.m. (ESPN) Rose Bowl At Pasadena, Calif. Stanford (11-2) vs. Michigan State (12-1), 3 p.m. (ESPN) Fiesta Bowl At Glendale, Ariz. Baylor (11-1) vs. UCF (11-1), 6:30 p.m. (ESPN) Thursday, Jan. 2 Sugar Bowl At New Orleans Alabama (11-1) vs. Oklahoma (10-2), 6:30 p.m. (ESPN) Friday, Jan. 3 Orange Bowl At Miami Ohio State (12-1) vs. Clemson (10-2), 6 p.m. (ESPN) Cotton Bowl At Arlington, Texas Missouri (11-2) vs. Oklahoma State (10-2), 5:30 p.m. (FOX) Saturday, Jan. 4 BBVA Compass Bowl At Birmingham, Ala. Vanderbilt (8-4) vs. Houston (8-4), 11 a.m. (ESPN) Sunday, Jan. 5 GoDaddy.com Bowl At Mobile, Ala. Arkansas State (7-5) vs. Ball State (10-2), 7 p.m. (ESPN).” SPORTS NBA Teague’s clutch shot gives Hawks 2OT win The Associated Press CLEVELAND — Jeff Teague scored a career-high 34 points, including a tiebreaking 20-foot jumper at Hawks 127 the buzzer Cavaliers 125. ROCKETS 100, GRIZZLIES 92 In Houston, James Harden scored 11 of his 27 points in the fourth quarter, helping the Rockets rally for the victory.. SPURS 116, MAVERICKS 109 In Dallas, Tim Duncan had 21 points and 13 rebounds in his 10th double-double of the sea- son, helping San Antonio take advantage of the Mavericks’ weakened front court. The 6-foot-11 Duncan worked most of the game with 6-7 DeJuan Blair defending him. Dallas’. Friday, December 27, 2013 THE NEW MEXICAN B-7 Northern New Mexico SCOREBOARD Local results and schedules ON THE AIR Today on TV Schedule subject to change and/or blackouts. All times local. COLLEGE FOOTBALL 12:30 p.m. on ESPN — Military Bowl, Marshall vs. Maryland, in Annapolis, Md. 4 p.m. on ESPN — Texas Bowl, Syracuse vs. Minnesota, in Houston 7:30 p.m. on ESPN — Fight Hunger Bowl, BYU vs. Washington, in San Francisco MEN’S COLLEGE BASKETBALL 6 p.m. on FS1 — Lafayette at Seton Hall WINTER SPORTS Reins: 4 Capital starters benched at end POJOAqUE VALLEy 52, FARMINGTON 30 The Elkettes’ offensive execution had left something to be desired by head coach Ron Drake in consecutive losses to end the Ben Luján Tournament. ning St. Pius 53, Moriarty 36 Girls Basketball Pojoaque 50, Farmington 32 PREP SCHEDULE This week’s varsity schedule for Northern New Mexico high schools. For additions or changes, call 986-3060 or email sports@sfnewmexican.com. Today Boys Basketball — Stu Clark Tournament at New Mexico Highlands University in Las Vegas, semifinals: West Las Vegas vs. Phoenix (Ariz.) Central, 6 p.m.; Albuquerque Atrisco Heritage Academy vs. St. Pius, 8 p.m.; consolation bracket: Bernalillo vs. Central, 1 p.m.; Las Vegas Robertson vs. Moriarty, 3 p.m. Tri-Cities Invitational in Pecos, second round: Santa Rosa vs. McCurdy, 5 p.m.; Escalante vs. Tierra Encantada-Pecos winner, 7 p.m.; Wagon Mound vs. Mora, 1 p.m.; Monte del Sol vs. Tierra Encantada-Pecos loser, 3 p.m. Los Alamos at Poe Corn Invitational in Roswell: pairings TBA Milk Cow Classic in Clovis, second round: St. Michael’s vs. Hereford (Texas), time TBA Girls Basketball — Lady Horsemen Christmas Tournament at St. Michael’s, semifinals: Española Valley vs. Bernalillo, 4:30 p.m.; Pojoaque Valley vs. St. Michael’s, 6 p.m.; consolation, Farmington vs. Capital, 1:30 p.m.; Pecos vs. Taos, 3 p.m.; Saturday Boys basketball — Stu Clark Tournament at New Mexico Highlands University in Las Vegas: championship, 8 p.m.; third place, 6 p.m.; fifth place, 1 p.m.; seventh place, 11 a.m. Tri-Cities Invitational in Pecos, championship, 7 p.m.; third place, 5 p.m.; fifth place, 3 p.m.; seventh place, 1 p.m. Los Alamos at Poe Corn Invitational in Roswell, final round: pairings TBA St. Michael’s at the Milk Cow Classic in Clovis, final round: pairings TBA Girls Basketball — Lady Horsemen Christmas Tournament at St. Michael’s: championship, 6 p.m.; third place, 4:30 p.m.; fifth place, 3 p.m.; seventh place, 1:30 p.m. St. Michael’s Briona Vigil, left, tries to defend against Capital’s captain Adriana Ochoa in the first quarter of Thursday’s game during the St. Michael’s Lady Horsemen Christmas Tournament at Perez-Shelley Gymnasium. JANE PHILLIPS/THE NEW MEXICAN It was there from the outset, as Pojoaque (7-4) hit four 3-pointers in the first quarter to take a 27-7 lead and cruise to the semifinals. Drake liked the balance he saw in the scorebook. Leslie Gutierrez had a game-high 16 points, while Aalya Casados added 10. Ody Anoujo and Miranda Martinez each added nine. “Well-balanced, and that’s what we look for,” Ron Drake said. The Elkettes are still without the services of forward Gabby Gonzales, who injured both of her ankles. Drake said she is expected to miss the tournament. ESPAñOLA VALLEy 68, PECOS 54 The Lady Sundevils (6-2) struggled to put away the pesky Lady Panthers, but held Pecos to just 19 points in the second half. That allowed Española to expand a 42-35 lead and advance to the semifinals. “The girls came through and played some tough defense,” Española head coach Ray Romero said. Pecos (1-3) had no answer for Ashlynn Trujillo, who had 27 points to lead the Lady Sundevils. She scored eight of her team’s 16 fourth-quarter points. Still, the Lady Panthers showed they can press despite playing just four games this season, and it helped them stay within shouting distance of Española. Ida Valencia had 16 points to lead Pecos, and KeeAnna Trujillo added 15. “Our defense has been our strongest unit,” Lady Panthers head coach Leroy Barela said. “That, and our halfcourt sets. Those are really working well right now, and we are seeing some offense from our defense.” BERNALILLO 38, TAOS 35 Allea Candelaria had 15 points to lead the Lady Spartans past the struggling Lady Tigers, who dropped to 0-7 on the season. James: Seeks to be role model for youth Continued from Page B-5 PREP SCORES Boys Basketball Clovis 56, St. Michael’s 54 Escalante 75, Monte del Sol 69, 2OT Grants 80, Piedra Vista 72 Continued from Page B-5 15 points against Capital, with 10 coming in the fourth quarter as the Lady Horsemen turned a 49-39 lead into a rout. That happened at the free-throw line as St. Michael’s was 29-for-40 from the line overall and 11 of 12 in the final quarter as the Lady Jaguars dug deep into their bench. Four Capital starters were on the bench for the final 5 minutes, three by fouling out while Adriana Ochoa left the game after falling hard on her back in the third quarter. Lady Jaguars head coach Dale Lucero, who is completing his first full week with the team, said Ochoa’s injury sucked some of the energy out of them. “When she went down, their concern was with their teammate,” Lucero said. “I don’t think the focus was as sharp, and you could tell. We missed the simplest of assignments and made some easy turnovers and didn’t execute the offense. But, I’ve had these girls for four practices, and they are turning it around.” Until that point, Capital was playing unlike a team that was 1-8 and had gone through three coaches in a two-week span. Thanks to 16 points from freshman Gabby Ortiz, which included four 3-pointers, and 13 from senior Selena Gonzales, the Lady Jaguars stayed right on the heels of their opponents and even led at 19-18 and 21-20 in the second quarter. When Ochoa hit a baseline jumper with 3:06 left in the third quarter, the score was tied at 34. That’s when foul trouble and Ochoa’s absence kicked in. St. Michael’s went on a 15-5 run to end the quarter, then scored 11 of the first 13 points in the fourth to take a 60-41 lead. The Lady Horsemen hit five buckets in the paint, made 11 of 15 free throws in that stretch and capped the run with Briona Vigil’s 3 with 6:05 left for the 19-point lead. In other quarterfinal games: 6 p.m. on NBCSN — Olympic trials, speed skating: long track women’s 3,000 and men’s 5,000, at Kearns, Utah. PREP ROUNDUP Late turnover leads to McCurdy win over Mora then hit a go-ahead 3-pointer with :11 remaining to squash The bounces went the young Rangers’ chance of McCurdy’s way in the open- playing in the semifinals. ing day of the Tri-Cities Invi“Chris just came up with tational it,” McCurdy head coach McCurdy 57 on Thurs- Ruben Archuleta said. “The day. Mora 55 [Mora player] had an open A late- layup to the basket.” game turnover by Mora led The Bobcats (8-2) face to the Bobcats’ last-second Santa Rosa Friday in the heroics in a 57-55 Bobcats semifinals, leaving Mora to win in boys basketball tourplay Wagon Mound today at nament in Pecos’ Louis G. 1 p.m. in a consolation game. Sanchez Memorial GymnaWith a win just in their sium. grasp, Mora head coach After trailing the entire James Branch said his players game to McCurdy, the Rang- are not finishing games. ers (1-5) almost pulled out its “A lot of it comes down to second win of the season. mental mistakes,” he said. “It They were leading 55-54 would be nice to pull out a with only 19 seconds left victory against a good team to build our confidence.” and had possession when McCurdy’s Chris Serrano Padilla had 14 points to stole the ball before the lead the Bobcats while JerRangers could call a timeout emiah Olivas led the Rangers to run a play. Dennis Padilla with 17 points. The New Mexican Former Orioles star Paul. The Associated Press B-8 THE NEW MEXICAN Friday, December 27, 2013 SPORTS NFL Romo: QB has strong support Green Bay 2-5-1 since star QB was injured Romo, whose only playoff win was against it’s Aaron Rodgers. I Philadelphia in the 2009 can make an argument season, ruined the last for Tony getting better chance for a rally against results than anybody else the Redskins last season could get.” with an interception late Romo has the same in the fourth quarter. support from Cowboys “Everything we are and owner Jerry Jones on we have accomplished down, which is why the over the last few years, question of whether he’s that you believe in and going to play against the you hold on to, is because Eagles is the hottest topic of him,” said tight end of the week in the NFL Jason Witten, the frannow that the Packers chise leader in catches have said Rodgers will who came into the league return from an sevenwith Romo in 2003. game absence for a simi- “What he creates week in lar winner-take-all battle and week out, day in and for the NFC North title day out, I don’t think you against Chicago. look at a couple of plays Maybe the Cowboys and determine. I think are trying to keep the that would be foolish for Eagles guessing when anybody to do that.” it comes to Romo, who Jones’ unwavering supinjured his back during port for Romo — backed a 24-23 win over Washby the offseason signing ington that included a of a six-year, $108 million fourth-down touchdown contract extension with pass to DeMarco Murray more guaranteed money in the final 2 minutes. than Super Bowl winner Or maybe the CowJoe Flacco — could get boys just can’t bring a little tricky if Orton themselves to believe the leads an improbable win franchise leader in touch- against the Eagles. Philadown passes — ahead delphia jumped from a of Troy Aikman, White 2½-point favorite to a and Roger Staubach — is 6½-point pick after news going to miss the game of the Romo injury broke. that decides whether they The Cowboys obviget a playoff game at their ously aren’t worried $1.2 billion stadium or go about those implications home early for the fourth at the moment. They’re straight season. simply trying to tell the One thing’s for sure. world they can beat the The confidence of his high-scoring Eagles withteammates wasn’t shaken out the guy who carries after Romo’s latest crush- the label of the quarterback who can’t win the ing error — an intercepbig one, or keeps finding tion that let the Packers ways to lose it. finish a rally from a 23-point deficit in a 37-36 “Tony is our guy but win two weeks ago. we’ve got to move ahead Never mind that Romo and go from there,” receiver Dez Bryant said. is 1-6 in elimination “For us, we believe in our games — three losses in quarterbacks. I don’t think the playoffs and three it’s going to be much of a in season finales against big issue for us.” NFC East rivals with the division title and a playoff Romo didn’t practice spot on the line, including Wednesday or Thursday, the past two years against and coach Jason Garrett the New York Giants and said he wasn’t involved in Washington. many meetings either. Packers’ Rodgers back in saddle Continued from Page B-5 By Genaro C. Armas The Associated Press Packers quarterback Aaron Rodgers watches from the sidelines during the fourth quarter of a Nov. 28 game against the Detroit Lions at Ford Field in Detroit. Rodgers will return to start Sunday’s game for the NFC North title against the Chicago Bears. Coach Mike McCarthy announced Thursday that Rodgers will be back after missing seven games because of a left collarbone injury. ASSOCIATED PRESS FILE PHOTO has also. And now with Rodgers back, positive vibes are reverberating through the locker room. “It’s still going to be a tough game, we realize that. But having him back definitely helps us out as a team,” guard T.J. Lang said..” FIGHT HUNGER BOWL PIZZA BOWL Washington to face Brigham Young Conner leads By Josh Dubow The Associated Press SAN tack- les for loss, 1.5 sacks, one blocked kick, returned an interception for one touchdown and recovered a fumble for another. That performance gave him some welldeserved. Aggies: Heisman finalist Lynch fumbled pass Continued from Page B-5ahead,. Pitt to win over Bowling Green senior, helped thwart any last-ditch comeback with a sack deep in Bowling DETROIT — The way Green territory in the James Conner and Tyler final minute. Boyd played in their first “They were without postquestion the most physiPittsburgh 30 season cal team we faced all seagame, son,” said Adam Scheier, B. Green 27 it’s no Bowling Green’s interim wonder Pittsburgh coach coach. “The offensive Paul Chryst is excited line was tough, the runabout next season. ning back was obviously With a pair of fresha bear to tackle and the men leading the way — whole defensive line was and breaking some longdisruptive. We knew we standing school records had to keep Donald and in the process — the their other guys out of Panthers edged Bowling our backfield, but we Green 30-27 on Thursday couldn’t do it.” night in the Little CaeDorsett rushed for sars Pizza Bowl. Conner 202 yards in Pitt’s win rushed for 229 yards. over Georgia in the Sugar Boyd caught eight passes Bowl on Jan. 1, 1977. The for 173 yards and also school’s receiving record scored on a punt return. for a bowl came the next “We obviously have season. In a Gator Bowl some great young talent win over Clemson, Gorand that’s why we are don Jones had 163 yards so confident about the receiving. Both marks fell future of this program,” Thursday. Chryst said. “We think The 6-foot-2, 230we’re in great shape pound Conner rushed going forward.” for 165 yards in the secConner broke a Pittsond half, helping Pitt burgh bowl record for overcome the loss of yards rushing held by quarterback Tom SavTony Dorsett, and Chris Blewitt kicked a tiebreak- age, who didn’t play after halftime because of a rib ing field goal with 1:17 injury. Conner and the remaining. Panthers drove 51 yards Conner even played a in seven plays late in the handful of snaps on the defensive line. Boyd gave fourth quarter to set up Pitt (7-6) a boost with his a 39-yard kick by Blewitt, who had missed from the versatility as well. same distance earlier. One star the Panthers Then Conner was back will have to replace is on the field on defense, Aaron Donald, their helping the Panthers proAll-American on the tect the lead. defensive line. Donald, a By Noah Trister The Associated Press Classifieds C-2 Comics C-8 FRIDAY, DECEMBER 27, 2013 THE NEW MEXICAN SECTION C n o i t ra gen e All the wrong moves What’s behind the stupid things teens do? More than you think for and by teens COURTESY PHOTO MOVIES It’s not so much stupidity as it is brain development. The “ bottom line is that many things that people see as ‘stupid things’ that teenagers do are really based on a lack of judgment.” Don Fineberg, a practicing psychologist and psychology teacher at Santa Fe Prep PHOTO ILLUSTRATION BY KEIFER NACE “A kid might show up in my office and say, ‘Look, I was really tempted to go to this party this weekend,’ or ‘I was tempted to get drunk this weekend,’ or ‘I tried alcohol for the first time and absolutely hated it.’ “ ‘Well, what was that about?’ “ ‘I don’t know. Everybody was doing it and I just wanted to see what it was about.’ “ ‘And what were you left with after having done it?’ “And most of the time it’s like, ‘Well, I didn’t really like it. There was a sense of freedom in terms of not having to deal with what I’m going through at the present moment.’ ” Often times this behavior can be part of an exploration of the larger world. As Fineberg noted, “It’s not so much stupidity as it is brain development. The bottom line is that many things that people see as ‘stupid things’ that teenagers do are really based on a lack of judgment. One of the things we know from neuropsychology is that the place in your brain that formulates judgment is the prefrontal lobe — the last to develop. They actually make bad judgments rather than do stupid things.” Like all things, however, these questionable actions must originate somewhere. Schroeder cites home environments and the lack of cultural support on the whole as one of the root causes. “Teenagers are going through a lot,” he said. “High expectations. High pressure. High stress. A lot of depression. A lot of anxiety. All things that you see in school now that you didn’t see in school probably 25 years ago. … I think teenagers are looking to make sense of their environment and their experience. They don’t want to do stupid things, they don’t want to drive drunk, etc. But our culture really lacks guidance. … The predominance of our kids lack a parental unit that is consistent, honest and real. [The parents are] usually over- By Eliza Donahue and Eliza Harrison Generation Next T wo teens are drinking while going on a hike. They decide to go rock climbing without a rope. “We made it to the top and found a cave, which of course we decided to explore, and ended up lost for the entire day,” one of these teens told Generation Next. “I went back a month later and I realized it was pretty stupid because it was at Diablo Canyon.” Here’s another good one: According to yet another anonymous local teen, he was staying with his ski team in a hotel in Aspen, Colo., and they decided to hold a knife-throwing competition — using the hotel walls as targets. “We thought no one would notice, but they did, and we got in serious trouble,” he said. In a similar mindset, one teen nearly totaled a parent’s car drifting at 60 miles per hour, while another spoke of building explosives in his backyard. We can all probably relate to teenagers who do stupid things — some of which are dangerous. Parents are often left shaking their heads and asking how their teenage offspring can be so oblivious to the risks and consequences of their actions. Frequently, teens explain these actions through the stereotypical response, “I don’t know. I didn’t really think about it.” As Don Fineberg, a practicing psychologist and psychology teacher at Santa Fe Prep put it, “The very thing that leads to people saying, ‘How could you do that stupid thing?’ is something that they and their peers have done for years.” Michael Shroeder, a licensed psychotherapist who has his own practice and also serves as a counselor at Desert Academy, describes a typical situation: Evan Aubrey, Santa Fe High “Going on the interstate with minimal driving experience.” Verity Bornet, University of New Mexico “Running away from home when I was 7.” Eliza Donahue is a junior at Desert Academy. Contact her at elizaskis@gmail.com. Eliza Harrison is a junior at Santa Fe Prep. Contact her at echarrison@gmail.com. SPEAK OUT What is the dumbest thing you ever did? Alana Holland, Volcano Vista “Walked on stage during a choir performance without a mic.” whelmed, missing, chaotic.” Fineberg agrees that the cultural expectations placed on teens are so strict that they are difficult to follow, resulting in the expected belief that teenagers do “stupid things.” He said, “As a general idea in society, teenagers are intermediate in their development. That whole idea of the long extended period from childhood to adulthood is culturally determined. In America, with a complex society, we have a long time to adjust [to adulthood] through military service, college and even graduate school. Even our linguistic designation — because language is like poetry — teaches us about the culture. We call adolescents teenagers — meaning a person of teenage years. The fact is that in our culture, when you say that someone is a teenager, immediately, there is a whole socio-cultural association. Nobody thinks that this person is just between the ages of 13 and 20 — they may have a positive or a negative connotation with the word, but whatever it is, it is immediately imposed.” While parents can do their part to provide a consistent and safe environment and aid adolescents in making good choices, teens will make mistakes, and it is crucial for society to allow them to explore and discover the world on their own. After all, those teen years may be the only time that people can make such mistakes and not be punished for them. In the words of Fineberg, “While it’s true that poor judgment can sometimes lead to horrible and tragic results, it’s also true that for the most part, it’s part of growing up.” Sean Callin, MASTERS Program “Moving out of [the house] when I was 16.” Elijah Evans, Burbank, Calif. “I wasn’t paying attention and I clipped a mirror with my car.” Sebastian Roberts, Moreno Valley, Calif. “Steal money.” Elizabeth Abeyta, New Mexico School for the Arts “Not trying my best in school.” MY VIEW Technology keeps moving forward By Tilcara Webb Generation Next I am a child of the 21st century. Maybe I have little experience of how things were different in “the olden days,” but I’ve seen how technology has emerged from the beginning of this century. As a child, I used to watch VCR tapes of Blue’s Clues on a 2-foot-wide television set. Before that, my parents sat and watched a bit of black-and-white television before dinner. I have held both a VCR cassette and a DVD, and I’ve clicked my mouse pad and pressed “play” on Netflix. The world of music also has undergone incredible technological advances in my life span. In my parents’ time, there was the vinyl record. In my time, the cassette tape gave way to the CD, followed by the MP3 player, Pandora and YouTube videos. The computer itself has evolved, too, from a heavy monitor to a thin laptop to a tablet to the iPhone. And the phone was originally a landline in my infancy. I saw the first smartphone as a thick square device that had a special drawing program on it. Today I can use a smartphone to send a photo across the world in one touch of a finger. And the computer, once used to tabulate numbers for accounting purposes, has become our best friend. The Internet gives us an immense potential to access knowledge and other tools. It is also the device we rely on most these days. I can now talk to and give commands to a technological device. My father and I were exchanging emails the other day, and I came upon a few words that he used that I did not know. I asked what they meant, and he responded, “When I was but a young lad, we had to walk five miles through the snow to the little red schoolhouse in order to look up a word in the town’s only dictionary. Now you only have to right-click a word [on your computer] to look it up.” The words, by the way, were torpor and lassitude. We can sometimes forget, thanks to technology, that we used to have to expel some effort to learn. This century might be seen as what many people once imagined as “the future.” Many aspects of life once thought unimaginable are now at the tips of our fingers. Our electronic devices talk to us, our cars are beginning to drive us, and you can just point a technological device at an onscreen object and retrieve pages of information on it in an instant (mobile barcode scanning). As we head into 2014, emerging technologies promise an even more futuristic grasp at our world. But I’m a bit scared about how much further the world may end up evolving. So brace yourself for 2014. Tilcara Webb is a junior at New Mexico School for Arts. Contact her at ticlara.webb@gmail.com. Section editor: Robert Nott, 986-3021, rnott@sfnewmexican.com Design and headlines: Brian Barker, bbarker@sfnewmexican.com Disney does it again with ‘Saving Mr. Banks’ By Elizabeth Sanchez Generation Next “Winds in the east, mist coming in. Like somethin’ is brewin’ and ‘bout to begin. Can’t put me finger on what lies in store, but I fear what’s to happen all happened before.” — from Walt Disney’s 1964 film Mary Poppins. Walt Disney’s film version of author P.L. Travers’ Mary Poppins story was released in 1964, captivating millions. But it omitted the real story behind its creation. This month, a new film, Saving Mr. Banks, beautifully compensates for that as it illustrates the emotional fluster, strain and victory of both Walt Disney and P.L. Travers throughout the formulating process of creating the screenplay for that 1964 film. In Saving Mr. Banks, Disney (Tom Hanks) and his creative cohorts attempt to please the ever-reluctant P.L. Travers (Emma Thompson) as they fashion a film from her words — which pleased Disney’s own children. After struggling to contact the author for 20 long years, Disney finally drew her from her home in London to Hollywood, where both characters learn a bit about their individual shadows, masks and demons as they collaborate on the film. Along the way, the audience absorbs the significance of the character of Mary Poppins and understands that using a little bit of her spirit in everyday life may serve as a personal means of being “saved.” Each character in the film is partnered with a story, from P.L. Traver’s chauffeur’s (Paul Giamatti) life at home to Travers’ own upbringing. The film’s wondrously crafted flashback scenes indicate much of this as we see how her father Robert Goff (Colin Farrell), her mother Margaret Goff (Ruth Wilson) and her Aunt Ellie (Rachel Griffiths) shaped Travers’ childhood. Insightful filming angles and lighting — as witnessed in the beauty of white laundry sheets, sunny days, an ancient razor blade and childhood fantasies that come with the building of a fort — capture some of the picturesque moments in Travers’ early life. A delicately fierce script adds to the often amusing, awkward and at times heavy antics of these characters. “Forget ironic, it’s iconic!” proclaims a giddy Disney during one of the songwriter sessions for the film as he listens to the first playing of “A Spoon Full of Sugar” at his studio. This was no mistake. Much of the original Mary Poppins soundtrack is revived with fluidity and power as the joy of an imaginative youth is set free. In alignment with strategic storyboard planning of both characters and settings, the song choice and role-playing peppered throughout the film give it a heartfelt touch. Hanks is astounding in his cheerful take on Disney. Thompson may draw a smirk from audience members with her character’s cheeky stubbornness, as noted in Travers’ attempts to desperately keep the Banks spirit alive (in the Mary Poppins stories, the Banks character is the father figure). The trio of scriptwriters/songwriters (played by B.J. Novak, Jason Schwartzman and Bradley Whitford) allow viewers to take comfort in embracing the child embedded within every soul, no matter how old you are. Each character provides some sort of attachment in drawing in concern for their well-being as viewers learn that despite having a combative past, there is always a reason to live on. Congratulations, Disney — you’ve done it again. Elizabeth Sanchez is a junior at Santa Fe High School. Contact her at elizabethann97@hotmail.com. BREAKING NEWS AT C-2 THE NEW MEXICAN Friday, December 27, 2013 sfnm«classifieds to place an ad call 986-3000 or Toll Free (800) 873-3362 or email us at: classad@sfnewmexican.com »real estate« COMMERCIAL PROPERTY SANTA FE COMMERCIAL PROPERTY FOR SALE 202 E. Marcy Street, Santa Fe »rentals« LOTS & ACREAGE FARMS & RANCHES 146.17 AC. 1 hour from Albuquerque and Santa Fe. Electricity, views of Sangre De Cristo Mnts and Glorieta Mesa. $675, acre, 20 year owner financing. Toll Free 8 7 7 - 7 9 7 - 2 6 2 4 newmexicoranchland.net So can you with a classified ad WE GET RESULTS! CALL 986-3000 RETAIL SPACE 1607 ST. MICHAELS DRIVE LOTS & ACREAGE For Sale or Lease. 4000 square feet. Open space. Ample parking. $550,000. Lease $4000 monthly. 505-699-0639. SANTA FE Cozy Cottage In Pecos area, 3 beds, 1 bath on 6 treed acres. Panoramic views of Pecos Wilderness. Horses ok. Shared well. $199,000. JEFFERSON WELCH, 505-577-7001 Add a pic and sell it quick! Substantial Renovation in 2006. Zoned BCD (Business Capitol District) Approximately 29,511 square feet - East Marcy, East Palace Subdistrict. Using Larger Type will help your ad get noticed Now Showing Rancho Viejo Townhome $232,500 986-3000site parking across the street. BUILDINGS-WAREHOUSES 986-3000 360 degree views, Spectacular walking trails, Automated drip watering, Finished 2 car garage, 2 BDR, 2 ½ bath plus office. 575-694-5444 CONTACT JOHN HANCOCK 505-470-5604 JHancock@SantaFeRealEstate.com Have a product or service to offer? Let our small business experts help you grow your business. CALL 986-3000 FOR SALE OR LEASE- Great opportunity! 3 building Showroom, warehouse, office space. 7,000 to 27,480 SqFt. All or part. Fantastic location1591 Pacheco Street. Qualified HubZone, Zoned I-2. Contact David Oberstein: 505-986-0700 APARTMENTS FURNISHED MANUFACTURED HOMES RE (5) BRAND NEW 3 BEDROOM, 2 BATH, (3) 2.5 Acre Lots, Senda Artemisia, Old Galisteo Road, Close to town. Easy building sites. Views, utilities, shared well. Owner financing. No Mobile homes. $119,700- $129,700 each. Greg. 505-690-8503, Equity Real Estate. SINGLEWIDE MOBILE HOMES. SET-UP IN PARKS AND MOVE-IN READY EXCLUSIVE OFFER. BANK FINANCING, 4.5% INTEREST, PAYOFF HOME IN 10 YEARS. CALL TIM. AT J.C. SALES 505699-2955. SELL IT FOR $100 OR LESS AND PAY $10. Larger Quaint Southside Townhome Just Reduced! 3 beds, 2 baths, over 1,600 square feet, kiva fireplace, tile floors, large gameroom or office, convenient location, only $220,000. Jefferson Welch, 505-577-7001 Using, 1 bath, washer, dryer hookups, spacious. Off Siringo Road. $700 monthly plus uitiltites and deposit. NO Pets. 505-690-8502. 1 BEDROOM DOW NTOW N, Freshly remodeled classic Santa Fe adobe, private yard, brand new finishes. $749 month. One Month Free Rent, No Application Fees. Chamisa Management Corp. 988-5299 Typeeasy! It’s that RIVER RANCH PRIVATE RIVER FRONTAGE 1,000 Acres, High Ponderosa Pine Ridges. Well, utilities, rare opportunity to own this quality ranch. $1,599,000. Great New Mexico Properties. One hour from Santa Fe. 802-483-6060 Call Classifieds For Details Today!\santafetown house RARE 2.3 ACRE LOT. CountryConvenient to Town. Arroyo Hondo West. Spectacular Views. Hiking, Biking, and Riding Trail. $125,000. Jennifer, 505-204-6988. will help your ad 986-3000 get noticed COMMERCIAL PROPERTY OFFICE- STUDIO NEAR RAILYARD Can also be used as u n f u r n i s h e d a p a r t m e n t . $900 monthly. All utilities included. Reserved parking. Call 505-471-1238 additional details. Call Classifieds For Details Today! 986-3000 For Sale 202 E. MARCY STREET rights at Capitol for activists rally Immigrants, Locally owned and independent to task Gas Co. taken New Mexico lack of alert system over shortage, 2014 New Year’s Party said. bin turned Mexican CITATIONS, have The New on. Despite Please Wells with the exhibit Cady of during the officials dents who 5:30 Art suffered Gas Co. Mexico: The UNM Art Museum, Arts. for losses personal 162nd year, No. 596-440 Mexican a day of The New N Pasapick g homes: in freezin cracks’ Families h the ‘We fell throug sion sparks confu Shutdown workers may at tax agenc y SANTA FE Substantial Renovation in 2006. Zoned BCD (Business Capitol District) Approximately 29,511 square feet — East Marcy/East Palace Subdistrict. Join your friends and make some new ones at the Cowgirl BBQ! $10 cover 319 S. Guadalupe Street 982-2565 cowgirlsantafe.com-site parking across the street. JOHN HANCOCK 505-470-5604 JHancock@SantaFeRealEstate.com. So can you with a classified ad 505-316-6449. WE GET RESULTS! CALL 986-3000 FIREWOOD WE GET RESULTS! CALL 986-3000 MOVERS Free Kindling, Delivery & Stack. 140.00 pick up load. 505-983-2872, 505-470-4117 HANDYMAN PLASTERING 40 YEARS EXPERIENCE. Professional Plastering Specialist: Interior & Exterior. Also Re-Stuccos. Patching a specialty. Call Felix, 505-920-3853. Dry Pinon & Cedar CASEY’S TOP HAT CHIMNEY SWEEPS is committed to protecting your home. Creosote build-up in a fireplace or lint build-up in a dryer vent reduces efficiency and can pose a fire hazard. Call 505989-5775. Get prepared! So can you with a classified ad HANDYMAN AFFORDABLE HOME REPAIR Housecleaning, garage cleaning, hauling trash. Cutting Trees, Flagstone Patios, Driveways, Fencing, Yard Work, Stucco, Tile.. Greg, Nina, 920-0493. Locally owned TRINO’S AFFORDABLE Construction all phases of construction, and home repairs. Licensed. 505-9207583 REPAIRS, MAINTENANCE, PRO-PANEL ROOFS, PAINTING, FENCING, YARDWORK. MINOR PLUMBING & ELECTRICAL. 25 years experience. Consulting. Licensed. References. Free estimates. (505)470-5877 and independent Tuesday, February 8, 2011 Local news, A-8 50¢ mexican.com for rs waiting 16,000 customeservice, heat crews to restore to task Gas Co. taken New Mexico lack of alert system over shortage, originated Others Page A-9 bin said. CITATIONS, Please see The New Aardvark DISCOUNT M O VERS serving our customers with oldfashioned respect and care since 1976. John, 505-473-4881. So can you with a classified ad CALL 986-3000 Today ROOFING A-12 up Some ‘essential’ for not showing get docked ALL-IN-ONE ROOF LEAKING REPAIR & MAINTENANCE. Complete Landscaping. Yard Cleaning & Maintenance. Gravel Driveway. New & Old Roofs. Painting. Torch Down, Stucco. Reasonable Prices! References Available. Free Estimates. 505-603-3182. Managing WE GET RESULTS! Pasapick g homes: in freezin cracks’ Families h the ‘We fell throug sion sparks confu Shutdown workers may Index YOUR HEALTH MATTERS. We use natural products. 20 years exper ence, Residential & offices. Reliable. Excellent references. Licensed & Bonded. Eva, 505-919-9230. Elena. 505-946-7655 rights at Capitol for activists rally Immigrants, Friday, December 27, 2013 THE NEW MEXICAN sfnm«classifieds APARTMENTS UNFURNISHED GUESTHOUSES 2 BEDROOM, 1 BATH RANCHO SIRINGO ROAD, fenced yard, fireplace, laundry facility on-site. $725 month. One Month Free Rent, No Application Fees. EASTSIDE, WALK TO CANYON ROAD! Furnished, short-term vacation home. Walled .5 acre, mountain views, fireplace, 2 bedroom, washer, dryer. Private. Pets okay. Large yard. 970-626-5936. Chamisa Management Corp. 988-5299 2 BEDROOM, 1 bath. Tile floors, washer, dryer. In town country setting. Off West Alameda. $795 monthly plus utilities. 575-430-1269 2 STUDIO APARTMENTS near 10,000 Waves. 1,000 sq.ft. Tile floor, kiva fireplace, newly remodled, large fenced yard, covered patio, washer, dryer. $925 monthly. 750 sq.ft. Tile floors, fenced yard with covered patio. $730 monthly. Deposit required, 6 month lease. Tenant pays propane. 505-983-6681. COZY STUDIO, $750 monthly, $500 deposit, includes utilities, washer, dryer. Saltillo tile, great views. No Smoking or Pets. CALL 505-231-0010. Ring in the New Year with extra cash in your pocket! Las Palomas Apartments offers affordable, spacious 2 Bedrooms & Studios that make your hard-earned dollars go farther. Come see the changes we’ve made! Call 888-4828216 today for a tour. Se habla español. CHECK THIS OUT!! $420 MOVES YOU IN A 1 Bedroom Apt. $0 Security Deposit For Qualified Applicants & No deposit required for Utilities, Ask me How!! SAN MIGUEL COURT APARTMENTS 2029 CALLE LORCA (January move in , 12 Mo. Lease, required for special) 505-471-8325 COMMERCIAL SPACE 1,900 squ.ft. Warehouse, 600 squ.ft Office Space, reception area, two offices, kitchen, security, fenced yard, On-site parking. $1,500 plus utilities. 505-982-2511. 805 EARLY Street. 2700 sq.ft. architecturally designed space, high ceilings, open floor plan along with conventional space. Property can be divided into two spaces. Good for hair salon, art or yoga studio, retail, or office. Call Phillip 984-7343 Owner NMREB. MEDICAL DENTAL RETAIL OFFICE. 5716 sq.ft. Allegro Center, 2008 St. Michaels Drive, Unit B. George Jimenez, owner-broker. 505-470-3346 CONDOSTOWNHOMES DOS SANTOS, one bedroom, one bath, upper level, upgraded, reserve parking. $800 Western Equities, 505-982-4201 LEASE & OWN. ZERO DOWN! PAY EXACTLY WHAT OWNER PAYS: $1200 includes mortgage, taxes, insurance, maintenance (HOA). ZIA VISTA’S LARGEST 2 BEDROOM, 2 BATH CONDO. Save thousands. Incredible "Sangre" views. 505-204-2210 RANCHO SANTOS, 2 bedroom, 2 bath, pretty unit, 2nd story, 1 car garage. $1000. Western Equities, 505-982-4201. WALKING TRAILS, dog park, water, trash PU pd. 2 story, 2 bedroom 1 1/2 bath, kiva FP, laundry room 1340 SF +2 car gar. $1350. mo. Small pet? 505-757-2133 HOUSES PART FURNISHED 2 BEDROOM, 1 bath in Pecos. Off the grid. 4-wheel a must. First, last, $500 monthly, $250 Deposit. 505-670-1615, 505-757-8493. HOUSES UNFURNISHED 2BR, 1BA newly remodeled, quaint adobe home in private compound. Available now. Washer, dryer, off street parking. Columbia St. $1050 monthly. 505-983-9722. to place your ad, call NEAR ZIA & YUCCA, 3 bedroom, 2 bath. Garage, yard, new carpet. $1215, deposit $1000. Non-smoking. 505-473-0013 LIVE IN STUDIOS LIVE-IN STUDIOS S kylights, overhead doors, 2500 square feet, $975. 4100 square feet, 3 phase electric, $1175. La Mesilla. No dogs. 505-753-5906 LOT FOR RENT 505-992-1205 valdezandassociates.com PRIME DOWNTOWN LOCATION 2 bedroom, 2 bath, wood floors, vigas, small enclosed yard, washer, dryer, 2 car garage, $1700 plus utilities COZY CONDO WITH MANY UPGRADES 2 bedroom, 1 bath, kiva fireplace, washer, dryer, granite counters $850 plus utilities TESUQUE TRAILER VILLAGE OFFICES 505-989-9133 VACANCY 1/2 OFF FIRST MONTH Please call (505)983-9646. RETAIL SPACE AN EXTRA LARGE UNIT BLOWOUT SPECIAL. Airport Cerrillos Storage. UHaul. Cargo Van. 505-474-4330. airportcerrillos.com The Leukemia Lymphoma Society (LLS) is pleased to announce our partnership with Palliative Care Services of Santa Fe in offering a new Blood Cancer Support Group in the Santa Fe area. The group is scheduled to start January 2014 and will meet on the 2nd and 4th Tuesdays of the month from 2:003:30pm. Our first group meeting is scheduled to take place on January 14th. This group is facilitated by Eileen Joyce, Palliative Care Services Director and Caregiver, Hudson Institute Certified Coach, and Certified Grief Recovery Specialist. For location or more information about the group please contact Eileen at (505) 428-0670. A-Poco Self Storage 2235 Henry Lynch Rd Santa Fe, NM 87507 505-471-1122 12x24 for Only $195.00. Call to reserve yours Today!!! LLS is the world’s largest voluntary health organization dedicated to funding blood cancer research and providing education and patient services. We offer a wide variety of programs and services in support of our mission: Cure leukemia, lymphoma, Hodgkin’s disease and myeloma, and improve the quality of life of patients and their families. SEASONAL PLAZA RETAIL Month-Month Call Southwest Asset Management, 505-988-5792. STORAGE SPACE »announcements« OFFICES LOCATED AT THE LOFTS ON CERRILLOS This live & work studio offers high ceilings, kitchenette, bathroom with shower, 2 separate entrances, ground, corner unit with lots of natural lighting. $1000 plus utilities GREAT LOCATIONS. SINGLE OFFICES TO INCLUSIVE SUITES. LANDLORD WILL REMODEL TO SUIT. CALL PAM 505-986-0700 X10. GREAT RETAIL SPACE! Water Street Store Front Brokers Welcome. Call Southwest Asset Management, 505-988-5792. »jobs« PUBLIC NOTICES Great location and parking! $500 monthly includes utilities, cleaning, taxes and amenities. Move in incentives! Single & Double Wide Spaces $975 PLUS UTILITIES, OFFICE SUITE, GALISTEO CENTER . Two bright, private offices plus reception area, kitchenette, bathroom. Hospital proximity. 518-672-7370 Have a product or service to offer? Call our small business experts today! PROFESSIONAL OFFICE SPACE AVAILABLE "A PLACE TO CALL HOME" DESIRABLE NAVA ADE COMMUNITY 3 bedroom, plus library, 2.5 bath, 2 car garage, washer, dryer, enclosed backyard, 2 wood burning fireplaces, $1600 plus utilities CHARMING AND CENTRALLY LOCATED 3 bedroom, 1 bath, wood & tile floors, enclosed backyard, additional storage on property $1050 plus utilities 986-3000 C-3 LLS provides the following services at no cost to patients and families: -Patient Financial Aid Grant -Co-Pay Assistance Program -Peer-to-Peer Support -Family Support Groups -Local Education Programs -Trish Greene Back to School Program -Free Education Materials -Online Chats & Discussion Boards -Web Seminar/Teleconferences For more information about these services, please contact our Patient Access, Education Advocacy Manager, Ana Portillo, at (505) 8720141 or at Ana.Portillo@lls.org. Sell Your Stuff! PERSONALS Eyewitness: vehicle VS pedestrian accident. Sunday August 25 2013; US 84 near MM 204. Looking for couple traveling north. Statementnames provided that day not in police report. Contact: hsdesertwoman@gmail.com ADMINISTRATIVE RECEPTIONIST FOR 2014 TAX SEASON. Must have computer skills and willing to work on Saturdays. C a ll Directax 505-473-4700. SANTA FE RETAILER of home goods looking for a PURCHASING, LOGISTICS COORDINATOR. Basic functions include heavy MS Excel work, placement and maintenance of purchase orders, tracking of suppliers ship dates, and item set up. Only degreed and detailoriented candidates with strong computer and organizational skills need apply. Salary is DOE. Benefits include Medical, Dental, 401k. Fax resume to 505-819-0146. SECRETARY SENIOR PRIMARY P U R P O S E : Performs a variety of secretarial duties for the Teen Court of Santa Fe County Program which requires exercising independent judgment. Relieves supervisory officials of routine administrative details. Salar $12.5962 hourly - $18.8943 hourly. For a complete job description go to santafecountynm.gov or call 505-9889880. Position closes December 31, 2013. TEEN COURT COORDINATOR Primary Purpose: Responsible for coordinating and enhancing the Teen Court Program for Santa Fe County. Salary: $16.1240 hourly - $24.1860 hourly. For a complete job description go to santafecounty.org or Contact 505-992-9880. Position closes: December 30, 2013 DRIVERS Call and talk to one of our friendly Ad-visors today! 986-3000 TOW TRUCK DRIVER NEEDED for Santa Fe area. Call 505-992-3460 EXQUISITE SANTA FE COMPOUND PROPERTY situated on 5 acres, boasts majestic mountain views, 6200 sqft of living space, 8 bedrooms, 7 baths, 2 car garage. $3500 plus utilities. Call for personal showing QUIET AND FRIENDLY NEIGHBORHOOD 3 bedroom, 2 bath, fireplace, AC, 2 car garage, enclosed backyard, washer, dryer, $1200 plus utilities WALKING DISTANCE TO SHOPPING 2 bedroom, plus loft, 1 bath, granite counter tops, upgraded washer, dryer, 2 car garage $1200 plus utilities CHARMING CONDO 2 bedroom, 2 bath, granite counters, washer, dryer, upgraded appliances, access to all amenities $975 plus utilities SPACIOUS HOME IN DESIRABLE NEIGHBORHOOD 3 bedroom, 2 bath, fireplace, washer, dryer hook-up, large fenced in backyard, 2 car garage $1200 plus utilities 5 PLEX CONVENIENTLY LOCATED ON CAMINO CAPITAN this unit is a one bedroom loft, fireplace, and fenced back yard $650 plus utilities $580. 2 SMALL BEDROOMS. V e r y clean, quiet, safe. Off Agua Fria. Has gas heating. Pay only electric. No pets. 505-473-0278 813 CAMINO DE MONTE REY: Live-in Studio. Full kitchen, bath. $680, gas, water paid. 1425 PASEO DE PERALTA, 1 bedroom, full kitchen, bath. Free laundry. $735 utilities paid. 4 3 0 4 CALLE ANDREW: 2 Bedroom, 2 Bath, Radiant Heat, All Appliances, $900 plus utilities. No Pets! 505-471-4405 Your morning fix. Sign up today for daily email headlines from santafenewmexican.com and Fridays from pasatiempomagazine.com. Your morning Your morning fix. sign up today for daily email headlines from santafenewmexican.com and fridays from pasatiempomagazine.com. santafenewmexican.com /newsletters You turn to us. santafenewmexican.com /newsletters sign up today for daily email headlines from santafenewmexican.com and fridays from pasatiempomagazine.com. C-4 THE NEW MEXICAN Friday, December 27, 2013 sfnm«classifieds PART-TIME HOME DELIVERY ASSISTANT Hours are 5 to 10 a.m. Friday through Sunday. Pay rate is $10.51 per hour. No benefits. Selected candidates must pass a drug screen. Submit references and job application or resume by Thursday, January 2, 2014, to: Human Resources The Santa Fe New Mexican 202 East Marcy Street Santa Fe, NM 87501-2021 Or email to: gbudenholzer@sfnewmexican. com Job application may be obtained at above address or 1 New Mexican Plaza, off the 1-25 frontage road. EOE Using Larger Type No Prior Machine Experience Required.. Other full time positions also available in the department for qualified candidates with a mechanical or manufacturing background. Shawn’s Chimney Sweep Accepting applications for Chimney cleaning and installers.Clean driving record, Experience a plus. 505-474-5857. ART MEDICAL BILLING CLERK Would you like to deliver newspapers as an independent contractor for the Santa Fe New Mexican? Operate your own business with potential profits of $1,600 a month. Call 505-986-3010 to make an appointment. Toy Box Too Full? CAR STORAGE FACILITY Airport Road and 599 505-660-3039 4X4s Using 2 TONE Blue Side Table. Salt Cedar Colorful willows, 12x34x42, $300 Firm. Pine CD Cabinets, Lime-Blue 4’hx5.5’Wx6.5’D, $50 each. Hand Carving $900 obo. 505-982-4926 Larger Type It’s that easy! POODLE PUPPIES- TEACUP: Cream Female, $450; TOYS: Cream Female & Male, $400. Docked tails, 2nd shots. SHIH-TZU PUPPY, female, $450. 505901-2094 will help your ad get noticed 986-3000 PUREBRED GERMAN Shepherd, CKC Registered. 4 pups. 8 weeks old, $300 each. First shots. Sire & Dame on site. 505-681-3244 BEDROOM SUITE: example pictures. King bed, armoire, night stands. Many drawers, marble tops. 2006 Kia Sportage AWD Call Classifieds For Details Today! 986-3000 15 YEARS in business in Santa Fe with a great client base for the future. Past sales years have gross sales up to 4 million with close to 500K net. Please email twtrv@sbcglobal.net for more info on the company. We are not on market yet so confidentially is important for our continued operation. Have an empty house or apartment you need to rent? Another sweet one owner, all wheel drive Kia. Only 75k original miles, V6, automatic, CD, new tires on alloy rims. Ashtray’s never been used. Excellent condition inside and out. $8,746. Price includes 3 month, 3000 mile limited warranty. 505-954-1054. sweetmotorsales.com ASSETS FOR sale including patents, full-scale designs, molds, prototypes, national lab fluid dynamics modeling. Key staffers available. Contact info at, or call 505-310-2294. ATTENTION ADVERTISERS EARLY CHRISTMAS 2013 DEADLINES Deadline R.C. GORMAN - "Earth Child St. II" Lithograph. 1979, signed and numbered. excellent condition. Current apprasal value is $7,680. One owner. Asking $4,700. 505-988-4343. Retail & Classified Display Tuesday, December 24 Wed. & Thu., December 25 & 26 Thursday, December 26 Pasatiempo, December 27 Friday, December 27 BUILDING MATERIALS. Steel Building Allocated Bargains 40x60 on up We do deals Source# 18X 505-349-0493 CREDENZA: Burl in doors, natural wood. A collector. COMPUTERS Call 505-424-4311 for viewing prices. Leave message. & AirPort Extreme 802.11n (5th Generation) sold "as is" in excellent condition. $70. Please call, 505-470-4371 after 6 p.m. rights at Capitol for activists rally Immigrants, Locally owned and independent Tuesday, February 8, 2011 Local news, A-8 Others originated Page A-9 bin said. CITATIONS, Please see The New By Staci The New Matlock and Anne Constable Ellen Cava- Mexican and his housemate, their fireplacetheir in front of John Hubbard Near huddled stay warm. plea to naugh, were trying to morning away Monday they’ve posted a handwritten do not go front gate, saying, “Please the gas company,us with no gas.” 75, live in Pajaleave both again and San Ildefonso and Cavanaugh, Hubbard small inholding on a rito Village, west of the Rio Grande. Pueblo just CALL 986-3010 FIREWOOD-FUEL Today Opinion A-12 up Some ‘essential’ for not showing get docked Index Managing Calendar editor: Rob A-2 Classifieds Dean, 986-3033, B-9 Comics B-14 Lotteries A-2 Design and headlines: Cynthia Miller, Publication Date Art lecture in North16,000 people without natural among the were still They are days of Mexico whohomes, despite five expected ern New their snow With more than 20 pergas for heating less temperatures. relit freezing a fourth of Taos and had been today, only Arriba County villages Gas Co. put cent of Rio Monday. New Mexico and pipefiton plumbers by noon to licensed on meters. out a message them turn ters to help Lucia Sanchez, public-information Page A-10 Meanwhile, FAMILIES, Please see at tax agenc EARLY NEW YEAR’S DAY 2014 DEADLINES Pasapick g homes: in freezin cracks’ Families h the ���We fell throug sion sparks confu Shutdown workers may m cmiller@sfnewmexican.co rdean@sfnewmexican.com ELABORATE WOOL PERSIAN TRIBAL RUG. Very plush. 5’3"x13’10". $999 OBO. 808-346-3635. KIDS STUFF FIREWOOD FOR SALE Mostly cottonwood. Split and cut into Stove lengths. Good for fireplaces too. Load your own in Nambe. $150 for a full-measured cord. 505-455-2562. For Death Notices after the above deadlines, please phone The New Mexican’s Newsroom at 986-3022 through Tuesday, December 24. ATTENTION ADVERTISERS 50¢ mexican.com for rs waiting 16,000 customeservice, heat crews to restore to task Gas Co. taken New Mexico lack of alert system over shortage, Friday, December 20, Noon Friday, December 20, 5 p.m. Monday, December 23, Noon Monday, December 23, Noon Tuesday, December 24, 5 p.m.. BOB SPORT UTILITY STROLLER. LIKE NEW. Fast, two step folding for stow and go portability. Perfect for running, walking, trails. $250 505-6993731 MISCELLANEOUS KALCO VINE over island kitchen pot hanger, light with pot hooks. Each fixture is individually made. $700+ new. $400 505-699-3731 MISCELLANEOUS JOBS Business Opportunity CLASSIC CARS Publication Date GENERAL DENTIST (Multiple Openings) FOR BUSY HOME CARE OFFICE. FULLTIME, MONDAY - FRIDAY, 8AM- 5 PM WITH BENEFITS PACKAGE. SALARY DEPENDING ON EXPERIENCE. FAX RESUME: 505-989-3672 OR EMAIL TO KAREN.SCHMELING@PHHC-NM.COM QUESTIONS: Call Brian, 505-982-8581. BUSINESS OPPORTUNITY P O M E R A N I A N PUPPIESTEACUP: White Male, $800; Black Female, $700; TOY: Silver- Black male, $800. Registered. CHRISTMAS PRESENT! WEB CONTENT - Social Media Coordinator for established business to develop maintain outstanding global online presence. 3-years experience. Email resume: alina@patina-gallery.com PROFESSIONAL HOME HEALTH CARE SEEKING EXPERIENCED PETS SUPPLIES BEAUTIFUL COUCH WITH LOVELY ACCENTS. FROM A SMOKE AND PET FREE HOME. $350. PLEASE CALL, 505-238-5711 TO SCHEDULE A VIEWING. GALLERIES Dental Clinics seek General Dentist at the following locations: Familia Dental ROS LLC (Roswell, NM), Familia Dental Clovis LLC (Clovis, NM), Familia Dental HOB LLC (Hobbs, NM) to diagnose and treat diseases, injuries and malformations of teeth and gums and provide preventative and corrective services. Dental License Required. Multiple Open Positions. Please send hard copy Resume and cover letter to Familia Development LLC - ATTN: Vito Losuriello, 2050 East Algonquin Road, Ste. 601, Schaumburg, IL 60173. Please include the office location you wish to apply for in the cover letter. »cars & trucks« Read the WANT TO RENT column for prospective tenants. EDUCATION 986-3000 MEDICAL DENTAL »finance« Add a pic and sell it quick! »merchandise« Call Classifieds For Details Today! For specifics, visit job postings at or call (505)426-2315 »animals« Successful completion of a drug test will be required prior to employment offer. 986-3000 WEST LAS VEGAS SCHOOLS 2014-15 S.Y. HEAD FOOTBALL & VOLLEYBALL COACHES Have a product or service to offer? Call our small business experts today! Submit application to: Tim Cramer 1 New Mexican Plaza No Phone Calls please. will help your ad get noticed COMMUNITIES IN SCHOOLS of NM (CISNM) is seeking Full-Time SITE C O O R D I N A T O R S to help redress student dropout in Santa Fe Public Schools through the nationally recognized Communities In Schools integrated student services framework. Working in partnership with a school principal, the CISNM Site Coordinator is responsible for the overall planning and management of CISNM operations at their assigned CISNM school site. Bilingual SpanishEnglish required. Experience working with children and or youth in an educational setting, strong interpersonal and organization skills are essential. Education requirements: Bachelor’s degree and demonstrated relevant equivalent experience in education, social work or related field. Please submit cover letter, resume and 3 references to bergenj@cisnewmexico.org by January 1, 2014 986-3000 PART TIME MACHINE ATTENDANT TRADES Add a pic and sell it quick! FURNITURE PART TIME DRIVERS The Santa Fe New Mexican has the perfect position for an early bird who likes to get the day started at the crack of dawn! We are seeking a part-time Home Delivery Assistant to deliver newspaper routes and replacement newspapers to customers, and resolve customer complaints. Must have valid NM drivers’ license, impeccable driving record and be able to operate a vehicle with manual transmission. Must be able to toss newspapers, lift up to 25-50 lbs; climb in and out of vehicle, bend, climb stairs and reach above shoulder. Have hearing and vision within normal ranges. to place your ad, call CLASSIFIEDS GETS RESULTS. Call to place an ad 986-3000 YOU LIKE THESE RESULTS. sfnm«classifieds 4X4s IMPORTS 2010 Audi Q7 Premium AWD. Pristine recent trade-in, low miles, new tires, recently serviced, clean CarFax $33,781. Call 505-216-3800. 2000 Jeep Cherokee Classic RWD Another sweet one owner, low mileage Cherokee. Only 91k miles, accident free, smoke free, well maintained Cherokee Classic looks new. 4.0L 6 cylinder, automatic, new tires and brakes for your safety. Excellent condition inside and out. Final reduction $5,995! Price includes 3 month, 3000 mile limited warranty. 505-954-1054. to place your ad, call 986-3000 2006 BMW Z4 M One owner, accident free, M series. Only 25k well maintained miles from new. 6 speed manual, high performance model. Pristine condition throughout. Winter sale priced $24,995. Price includes 3 month, 3000 mile limited warranty. 505-954-1054. sweetmotorsales.com Have a product or service to offer? Call our small business experts today! PICKUP TRUCKS IMPORTS IMPORTS IMPORTS 2006 FORD-F150 CREW CAB-XLT 4X4 2008 TOYOTA SEQUOIA 4X4 PLATINUM CHRISTMAS SPECIAL 2002 Porsche Boxster S Accident free with only 65k original miles. 6 speed manual, high horsepower 3.2 motor, tan leather with heated seats. Perfect electric top with glass rear window. 4 Michelin Pilots on alloy rims. Winter sale priced at $13,888. Price includes 3 month, 3000 mile limited warranty. 505954-1054. Another One Owner, Carfax, Service Records, Garaged, NonSmoker, Navigation, Rear Entertainment, Third Row Seat, Leather. Pristine $24,250. WE PAY TOP DOLLAR FOR YOUR VEHICLE! sweetmotorsales.com sweetmotorsales.com C-5 Two Owner, Local, Carfax, Vehicle Brought up To Date With Services, Drive Ready, Most Options, Working, Transport Crew Truck, Affordable $13,750, WE PAY TOP DOLLAR FOR YOUR VEHICLE! VIEW VEHICLE VIEW VEHICLE www .santafeautoshowcase.com Paul 505-983-4945 Paul 505-983-4945 2010 BMW 535Xi AWD. Recent trade-in, factory CERTIFIED with warranty & maintenance until 3/2016, fully loaded, clean CarFax $25,741. Call 505-216-3800. CLASSIFIEDS Where treasures are found daily 2004 FORD-F150 SUPERCAB 4X4 Place an ad Today! CALL 986-3000 2010 Honda CR-V LX - AWD, only 37k miles! 1 owner clean CarFax, new tires & freshly serviced $18,231. Call 505-216-3800. 2007 Toyota Camry Hybrid. Another 1-owner Lexus trade-in! Super clean, recently serviced, clean CarFax $13,781. Call 505-216-3800. 1962 MERCEDES Unimog 404 . 23,000 original miles. Completely rebuilt. Gas engine. $16,000 OBO. 505-982-2511 or 505-670-7862 2010 BMW X5 30i. One owner, 74,001 miles. Premium Package, Cold Weather Package, Third Row Seating. No Accidents. $27,995. Call 505-474-0888. WE PAY TOP DOLLAR FOR YOUR VEHICLE 2007 Subaru Forester Premium 2013 Land Rover LR2. 4,485 miles. Retired Service Loaner. Climate Comfort Package, HD and Sirius Radio. Showroom condition! $36,995. 505-474-0888. Two Owner Local, Carfax, Service Records, Manuals, Garaged, NonSmoker, Manuals, Most Options, Working Mans Affordable Truck. Needs Nothing, Pristine $12,950. Ultra clean, all wheel drive Forester. Premium package has heated seats, panoramic moon roof, power windows, locks and driver’s seat, cruise control and more. Get a sweet deal on this Subie. Only $10,949. Price includes 3 month, 3000 mile limited warranty. 505954-1054. VIEW VEHICLE Paul 505-983-4945 sweetmotorsales.com 2006 Toyota Prius III. Only 45k miles! Hybrid, back-up camera, great fuel economy, immacualte, clean CarFax. $12,871. Call 505-2163800. 2010 Toyota RAV4 AWD Sport Another sweet one owner, low mileage RAV 4. Only 41k miles from new. Automatic, all wheel drive, power windows and locks, CD. Roof rack, alloy wheels and more. Pristine condition, no accidents, clean title and CarFax. Only $17,950. Price includes 3 month, 3000 mile limited warranty. 505954-1054. Add a pic and sell it quick! sweetmotorsales.com 2008 BMW 535-XI WAGON AUTOMATiC Local Owner, Carfax, Service Records, Garaged, Non-Smoker, XKeys, Manuals, All Wheel Drive, Heated Steering, Navigation, So Many Options, Totally Pristine Soooo Beautiful $23,750. 2005 TOYOTA Tacoma 4x4 SR5 Access Cab Off Road, Towing, Sport packages, Bed cover, liner, Security system, ABS brakes. 131,000 miles. $17,200 699-3731 WE PAY TOP DOLLAR FOR YOUR VEHICLE! VIEW VEHICLE Paul 505-983-4945 2005 SUBARU OUTBACK2.5XT LIMITED 2005 Lexus GX 470 - Only 55k miles! 1 owner clean CarFax, every option, Navigation, Levinson sound, DVD, kinetic suspension, KBB over $30,000! now $25,972. Call 505-2163800. GET NOTICED! Another One Owner, Carfax, Service Records, X-Keys, Manuals, New Tires, Most Options, Bed Liner, Hard Tonneau Cover, Working Mans Truck, Affordable $14,250. Using Local Owner ,Carfax, Garaged, NonSmoker, 103,000 Miles, Loaded, New Tires, X-Remotes, Manuals, Every Service Maintenance Required Completed, Affordable $12,250. WE PAY TOP DOLLAR FOR YOUR VEHICE! Larger Type WE PAY TOP DOLLAR FOR YOUR VEHICLE! VIEW VEHICLE VIEW VEHICLE Paul 505-983-4945 will help your ad get noticed Paul 505-983-4945 BOLD YOUR TEXT to make your ad stand out Call our helpfull Ad-Visors for details 2005 TOYOTA TUNDRASR5 4x4 986-3000 CALL 986-3000 SUVs IMPORTS Call Classifieds For Details Today! 2008 BMW X5 3.0si AWD. Pristine recent trade-in, factory CERTIFIED with warranty & maintenance until 9/2014, low miles, clean CarFax $25,871. Call 505-216-3800. 2010 Toyota Venza V6 AWD. Fully loaded with leather & panoramic roof, AWD, 1 owner clean CarFax, luxurious, practical & reliable! $24,371. Call 505-216-3800. 2006 ACURA RSX - Low miles, recent trade-in, clean CarFax, leather & moonroof, immaculate! $12,972. Call 505-216-3800. 2012 Audi A3 TDI. DIESEL! Fun with amazing fuel economy! Wellequipped, 1 owner clean CarFax $25,871. Call 505-216-3800. 2010 Land Rover LR2 HSE SUV. Climate Comfort Package, Bluetooth and Sirius Radio. One owner. 10,178 miles. Showroom condition! $26,995. 505-474-0888. Notice is hereby given that the New Mexico State Armory Board will hold its regularly scheduled quarterly meeting on: Date: Wednesday, January 08, 2014 Time: 10:00 a.m. Continued... LEGALS LEGALS Alvarado, State ArPlace: mory Board AdminisSanta Fe Readiness trator at (505) 474Center 1877 for further infor7001 Huey Road mation. Thank you. Santa Fe, New Mexico Legal #96130 87507 Published in The Santa Fe New Mexican on An agenda will be December 27 2013 available before the meeting. Please contact Elizabeth A. Continued... To place a Legal ad Call 986-3000 2013 Volkswagen Golf TDI - DIESEL!!! just 12k miles, 1 owner clean CarFax, save thousands from NEW at $21,951. Call 505-216-3800. 2007 Chevrolet Tahoe LTZ - Recent trade-in, loaded, leather, buckets, moonroof, DVD, new tires & brakes, super clean! $17,851. Call 505-216-3800. SELL IT, BUY IT, OR FIND IT... 2012 P o rs ch e Cayenne S. 9,323 miles. Leather, Navigation, Heated Seats, and much more. One Owner, No Accidents. $66,995. 505-4740888. Using Larger Type Only in the the SFNM Classifieds! 2009 Toyota Corolla LE. Only 53k miles! Another 1 owner clean CarFax trade-in! Super nice, fully serviced $12,961. Call 505-216-3800. sfnm«classifieds LEGALS 986-3000 2011 Nissan Rogue S AWD. Fresh trade-in, good miles, service up-todate, very nice, clean CarFax $15,211. Call 505-216-3800. to place legals, call LEGALS 986-3000 LEGALS y g President’s Conference Room #108, 6401 LEGAL NOTICE IS Richards Ave., Santa HEREBY GIVEN that Fe, NM 87508. the Governing Board of Santa Fe Communi- Board meetings are ty College (SFCC) will open to the public. If hold a Special Board you are an individual Meeting on Tuesday, with a disability who January 7, 2013 at is in need of any form 3:00 p.m. at Santa Fe of auxiliary aid, servCommunity College, ice or special assisNotice of Meeting Continued... Continued... 2009 Volkswagen Tiguan SEL AWD Turbo. Navigation, panoramic roof, NICE, clean CarFax. $16,271. Call 505-216-3800. LEGALS p tance to attend or participate in the meeting, please contact the President’s Office at 428-1148 at least 24 hours before the meeting. An agenda will be available from the President’s Office 72 hours prior to the meeting. Legal#96232 Published in the Santa Fe New Mexican December 27, 2013 will help your ad 986-3000 get noticed Call Classifieds For Details Today! 986-3000 toll free: 800.873.3362 email: legal@sfnewmexican.com LEGALS LEGALS THE POJOAQUE VALLEY SCHOOLS Student Services Office has initiated the process for destruction of records. Students who were in attendance from 2004-2008 who received Special Education services may pick up their y p p Special Education records at: Student Services, at Pablo Roybal Elementary, Room A1, 1574 State Road 502, Santa Fe, NM 87506, M-F, 8-4. Please call 455-0801 with any questions. Final destruction of records will occur on Continued... Continued... LEGALS January 17, 2014. Legal #96126 Published in The Santa Fe New Mexican on December 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 30, 31 2013 You can view your legal ad online at sfnmclassifieds.com C-6 THE NEW MEXICAN Friday, December 27, 2013 sfnm«classifieds LEGALS STATE OF NEW MEXICO COUNTY OF SANTA FE FIRST JUDICIAL DISTRICT Case No. 2012-03064 D-101-CV- JPMORGAN CHASE BANK, NATIONAL ASSOCIATION, Plaintiff, v. LEGALS LEGALS LEGALS p p p y fixture. p y ment. g g held by the above Plaintiff and wherein Plaintiff was adjudged to have a lien against the above-described real estate in the sum of $368,756.30 plus interest from April 22, 2013. CARMEN T. STONE AND THE UNKNOWN SPOUSE OF CARMEN Jeffrey Lake Special Master T. STONE, IF ANY, Southwest Support Group Defendant(s). 5011 Indian School Road NE Albuquerque, NM NOTICE OF SALE 87110 NOTICE IS HEREBY 505-767-9444 GIVEN that the under- NM00-03447_FC01 signed Special Master will on January 8, Legal#96154 2014 at 11:30 AM, at Published in the Santhe front entrance of ta Fe New Mexican the First Judicial Dis- December 13, 20, 27, trict Court, 225 Mon- 2013, January 3, 2014 tezuma, Santa Fe, New Mexico, sell and STATE OF convey to the highest NEW MEXICO bidder for cash all the COUNTY OF right, title, and interSANTA FE est of the aboveFIRST JUDICIAL named defendants in DISTRICT and to the following described real estate No. D-101-CV-2008located in said Coun- 02917 ty and State: Lot numbered Thir- BANK OF AMERICA, teen (13), Block Fifty- N.A., SUCCESSOR BY four (54), Unit Three MERGER TO BAC (3), ELDORADO AT HOME LOANS SERVICSANTA FE, as the ING, LP FKA COUNsame is shown and TRYWIDE HOME designated on the LOANS SERVICING LP, plat thereof (known as Sheet 16), filed Ju- Plaintiff, ly 22, 1974 as Document No. 366,746 and v. recorded in Eldorado Plat Book 5, pages 1- GUS GONZALES, AN4; as amended and NA GONZALES, MIDfiled May 25, 1994 as LAND CREDIT MANDocument No. 864,112 AGEMENT, INC., ASand recorded in Plat SIGNEE OF CITIBANK, Book 275, Page 025, UNKNOWN MANUFACrecords of Santa Fe TURED HOME OWNCounty, New Mexico. ERS, UNKNOWN MANUFACTURED HOME The address of the re- LIENHOLDERS AND al property is 80 THE STATE OF NEW Condesa Rd. #1S, MEXICO DEPARTMENT Santa Fe, NM 87508- OF TAXATION & REVE2154. Plaintiff does NUE, not represent or warrant that the stated Defendant(s). street address is the street address of the described property; if NOTICE OF SALE the street address does not match the NOTICE IS HEREBY legal description, GIVEN that the underthen the property be- signed Special Masing sold herein is the ter will on January 8, property more partic- 2014 at 11:30 AM, at ularly described the front entrance of above, not the prop- the First Judicial Diserty located at the trict Court, 225 Monstreet address; any tezuma, Santa Fe, prospective purchas- New Mexico, sell and er at the sale is given convey to the highest notice that it should bidder for cash all the verify the location right, title, and interand address of the est of the aboveproperty being sold. named defendants in Said sale will be and to the following made pursuant to the described real estate judgment entered on located in said CounOctober 17, 2013 in ty and State: the above entitled Lot Ten (10), Valle and numbered cause, Vista Subdivision, which was a suit to Phase II, as shown on foreclose a mortgage the plat filed in the held by the above Office of the County Plaintiff and wherein Clerk, Santa Fe CounPlaintiff was ty, New Mexico on adjudged to have a April 15, 1974 in Plat lien against the Book 35 at page 9, as above-described real Document No. estate in the sum of 363,726. $365,070.31 plus interest from April 30, 2013 The address of the reto the date of sale at al property is 21 Valle the rate of 6.250% per Vista Boulevard, Sanannum, the costs of ta Fe, NM 87505. sale, including the Plaintiff does not repSpecial Master’s fee, resent or warrant publication costs, that the stated street and Plaintiff’s costs address is the street expended for taxes, address of the descriinsurance, and keep- bed property; if the ing the property in street address does good repair. Plaintiff not match the legal has the right to bid at description, then the such sale and submit property being sold its bid verbally or in herein is the property writing. The Plaintiff more particularly demay apply all or any scribed above, not part of its judgment the property located to the purchase price at the street address; in lieu of cash. any prospective purAt the date and time chaser at the sale is stated above, the given notice that it Special Master may should verify the lopostpone the sale to cation and address of such later date and the property being time as the Special sold. Said sale will be Master may specify. made pursuant to the NOTICE IS FURTHER judgment entered on GIVEN that this sale September 9, 2013 in may be subject to a the above entitled bankruptcy filing, a and numbered cause, pay off, a reinstate- which was a suit to ment or any other foreclose a mortgage condition that would held by the above cause the cancella- Plaintiff and wherein tion of this sale. Fur- Plaintiff was ther, if any of these adjudged to have a conditions exist, at lien against the the time of sale, this above-described real sale will be null and estate in the sum of void, the successful $159,900.04 plus interbidder’s funds shall est from August 23, be returned, and the 2013 to the date of Special Master and sale at the rate of the mortgagee giving 7.250% per annum, this notice shall not the costs of sale, inbe liable to the suc- cluding the Special cessful bidder for any Master’s fee, publicadamages. tion costs, and PlainNOTICE IS FURTHER tiff’s costs expended GIVEN that the real for taxes, insurance, property and im- and keeping the provements con- property in good recerned with herein pair. Plaintiff has the will be sold subject to right to bid at such any and all patent sale and submit its reservations, ease- bid verbally or in ments, all recorded writing. The Plaintiff and unrecorded liens may apply all or any not foreclosed herein, part of its judgment and all recorded and to the purchase price unrecorded special in lieu of cash. assessments and tax- At the date and time es that may be due. stated above, the Plaintiff and its attor- Special Master may neys disclaim all re- postpone the sale to sponsibility for, and such later date and the purchaser at the time as the Special sale takes the prop- Master may specify. erty subject to, the NOTICE IS FURTHER valuation of the prop- GIVEN that this sale erty by the County may be subject to a Assessor as real or bankruptcy filing, a personal property, af- pay off, a reinstate- Continued... to place legals, call Continued... Jeffrey Lake Special Master Southwest Support Group 5011 Indian School Road NE Albuquerque, NM 87110 505-767-9444 NM00-04236_FC01 Legal#96154 Published in the Santa Fe New Mexican December 13, 20, 27, 2013, January 3, 2014 STATE OF NEW MEXICO COUNTY OF SANTA FE FIRST JUDICIAL DISTRICT No. 02442 D-101-CV-2009- WELLS FARGO BANK, N.A., Plaintiff, v. PHILLIP C. CHAVEZ, MARCELLA MARTINEZ, MORAYA J. MARTINEZ, HOGAN GROUP INC., THE UNKNOWN SPOUSE OF PHILLIP C. CHAVEZ, IF ANY, THE UNKNOWN SPOUSE OF MARCELLA MARTINEZ, IF ANY, THE UNKNOWN SPOUSE OF MORAYA J. MARTINEZ, IF ANY AND OCCUPANTS, WHOSE TRUE NAMES ARE UNKNOWN,: ALL OF LOT 57 AS SHOWN ON PLAT OF SURVEY ENTITLED "TURQUOISE TRAIL SUBDIVISION SOUTH PHASE", FILED FOR RECORD AS DOCUMENT NUMBER 1428730, APPEARING IN PLAT BOOK 620 AT PAGE 26, RECORDS OF SANTE FE COUNTY, NEW MEXICO. The address of the real property is 160 Carson Valley Way, 16, 2013 in the above entitled and numbered cause, which was a suit to foreclose a mortgage Continued... Jeffrey Lake Special Master Southwest Support Group 5011 Indian School Road NE Albuquerque, NM 87110 505-767-9444 NM00-00960_FC01 Legal#96151 Published in the Santa Fe New Mexican December 13, 20, 27, 2013, January 3, 2014 STATE OF NEW MEXICO COUNTY OF SANTA FE FIRST JUDICIAL DISTRICT No. 02574 D-101-CV-2012- UNITED STATES OF AMERICA, ACTING THROUGH RURAL HOUSING SERVICE, Plaintiff, v. JEANETTE QUINTANA, IF LIVING, IF DECEASED, THE UNKNOWN HEIRS, DEVISEES, OR LEGATEES OF JEANETTE QUINTANA, DECEASED AND THE UNKNOWN SURVIVING SPOUSE OF JEANETTE QUINTANA,: A portion of Lot 1 Revised Plat of La Vista Del Rio, Espanola, New Mexico as shown and delineated on "Plat of Survey for Jeanette Quintana, Portion of Lot 1, La Vista Del Rio, 1897 Shadowood Continued... 986-3000 LEGALS Lane, Espanola, Santa Fe County, State of New Mexico", prepared by Morris A. Apodaca, P.L.S. No. 5300, date September 4, 1996, filed September 11, 1996 as Document No. 958,492, and recorded in Plat Book 344, Page 35, in the records of Santa Fe County, New Mexico, and being more particularly described as follows: Beginning at the Southeast corner of the property herein described, from whence a Sanitary Sewer Manhole at intersection of Shadowood Lane and Canada Court bears S. 83°46’58" E., 86.22 feet; thence from the point and place of beginning, S. 80°32’36" W., 39 feet; thence N. 09°27’24" W., 100 feet; thence N. 80°32’36" E., 39 feet; thence S. 09°27’24" E., 100 feet to the point and place of beginning. LEGALS _ Legal#96148 Published in the Santa Fe New Mexican December 13, 20, 27, 2013, January 3, 2014 STATE OF NEW MEXICO COUNTY OF SANTA FE FIRST JUDICIAL DISTRICT No. 03100 D-101-CV-2012- WELLS FARGO BANK, N.A., Plaintiff, v. THE UNKNOWN HEIRS, DEVISEES, OR LEGATEES OF MICHAEL J. MONTGOMERY, DECEASED, MAVIS J. MONTGOMERY, UNITED STATES OF AMERICA BY AND THROUGH THE SECRETARY OF HOUSING AND URBAN DEVELOPMENT AND THE UNKNOWN SPOUSE OF The address of the re- MAVIS J. MONTGOMal property is 1897 E. ERY, IF ANY, Shadowood Lane, Espanola, NM 87532- Defendant(s). 2919. Plaintiff does not represent or warrant that the stated NOTICE OF SALE street address is the street address of the NOTICE IS HEREBY described property; if GIVEN that the underthe street address signed Special Masdoes not match the ter will on January 8, legal description, 2014 at 11:30 AM, at then the property be- the front entrance of ing sold herein is the the First Judicial Disproperty more partic- trict Court, 225 Monularly described tezuma, Santa Fe, above, not the prop- New Mexico, sell and erty located at the convey to the highest street address; any bidder for cash all the prospective purchas- right, title, and interer at the sale is given est of the abovenotice that it should named defendants in verify the location and to the following and address of the described real estate property being sold. located in said CounSaid sale will be ty and State: made pursuant to the Tract "1A" Replat of judgment entered on Tract "1" of the Land October 23, 2013 in division plat of Jace the above entitled and Terry Eden in the and numbered cause, N 1/2 NW 1/4 SE 1/4 which was a suit to SW 1/4 Section 28, foreclose a mortgage T10N, R7E, N.M.P.M., held by the above Santa Fe County New Plaintiff and wherein Mexico, as the same Plaintiff was is shown and desigadjudged to have a nated on the replat, lien against the thereof filed in the ofabove-described real fice of the County estate in the sum of Clerk of Santa Fe $122,708.94 plus inter- County, New Mexico, est from July 29, 2013 on May 20, 1987, to the date of sale at Document No. 622, the rate of 7.250% per 769 in plat Book 173, annum, the costs of Page 34. sale, including the Special Master’s fee, The address of the republication costs, al property is 26 Timand Plaintiff’s costs ber Lane, Edgewood, expended for taxes, NM 87015. Plaintiff insurance, and keep- does not represent or ing the property in warrant that the statgood repair. Plaintiff ed street address is has the right to bid at the street address of such sale and submit the described properits bid verbally or in ty; if the street adwriting. The Plaintiff dress does not match may apply all or any the legal description, part of its judgment then the property beto the purchase price ing sold herein is the in lieu of cash. property more particAt the date and time ularly described stated above, the above, not the propSpecial Master may erty located at the postpone the sale to street address; any such later date and prospective purchastime as the Special er at the sale is given Master may specify. notice that it should NOTICE IS FURTHER verify the location GIVEN that this sale and address of the may be subject to a property being sold. bankruptcy filing, a Said sale will be pay off, a reinstate- made pursuant to the ment or any other judgment entered on condition that would October 6, 2013 in the cause the cancella- above entitled and tion of this sale. Fur- numbered cause, ther, if any of these which was a suit to conditions exist, at foreclose a mortgage the time of sale, this held by the above sale will be null and Plaintiff and wherein void, the successful Plaintiff was bidder’s funds shall adjudged to have a be returned, and the lien against the Special Master and above-described real the mortgagee giving estate in the sum of this notice shall not $151,774.44 plus inbe liable to the suc- terest from to the cessful bidder for any date of sale at a varidamages. able rate per annum, NOTICE IS FURTHER the costs of sale, inGIVEN that the real cluding the Special property and im- Master’s fee, publicaprovements con- tion costs, and Plaincerned with herein tiff’s costs expended will be sold subject to for taxes, insurance, any and all patent and keeping the reservations, ease- property in good rements, all recorded pair. Plaintiff has the and unrecorded liens right to bid at such not foreclosed herein, sale and submit its and all recorded and bid verbally or in unrecorded special writing. The Plaintiff assessments and tax- may apply all or any es that may be due. part of its judgment Plaintiff and its attor- to the purchase price neys disclaim all re- in lieu of cash. sponsibility for, and At the date and time the purchaser at the stated above, the sale takes the prop- Special Master may erty subject to, the postpone the sale to valuation of the prop- such later date and erty by the County time as the Special Assessor as real or Master may specify. personal property, af- NOTICE IS FURTHER fixture of any mobile GIVEN that this sale or manufactured may be subject to a home to the land, de- bankruptcy filing, a activation of title to a pay off, a reinstatemobile or manufac- ment or any other tured home on the condition that would property, if any, envi- cause the cancellaronmental contami- tion of this sale. Furnation on the proper- ther, if any of these ty, if any, and zoning conditions exist, at violations concerning the time of sale, this the property, if any. sale will be null and NOTICE IS FURTHER void, the successful GIVEN that the pur- bidder’s funds shall chaser at such sale be returned, and the shall take title to the Special Master and above-described real the mortgagee giving property subject to this notice shall not rights of redemption. be liable to the successful bidder for any Jeffrey Lake damages. Special Master NOTICE IS FURTHER Southwest Support GIVEN that the real Group property and im5011 Indian School provements conRoad NE cerned with herein Albuquerque, NM will be sold subject to 87110 any and all patent 505-767-9444 reservations, easeNM12-00198_FC01 ments, all recorded and unrecorded liens Continued... toll free: 800.873.3362 email: legal@sfnewmexican.com Continued... LEGALS LEGALS12-02355_FC01 Legal#96152 Published in the Santa Fe New Mexican December 13, 20, 27, 2013, January 3, 2014 STATE OF NEW MEXICO COUNTY OF SANTA FE FIRST JUDICIAL DISTRICT No. 03473 D-101-CV-2012- WELLS FARGO BANK, NA, Plaintiff, v. JAMES G. BENDALL, SUSAN W. BENDALL AND PUEBLOS DE RODEO ROAD OWNERS ASSOCIATION,: Lot 95, Pueblos De Rodeo Road, Area 1, Santa Fe New Mexico, as shown on plat filed in the Office of the County Clerk, Santa Fe County, New Mexico on September 2, 1977, recorded in Plat Book 56, Page 23, as Document No. 407,797 and amended in plat filed December 16, 1977, recorded in Plat Book 59, Page 13, as Document No. 412,849. The address of the real property is 2826 Vereda Oriente, Santa Fe, NM 87507. 2, 2013 in the above entitled and numbered cause, which was a suit to foreclose a mortgage held by the above Plaintiff and wherein Plaintiff was adjudged to have a lien against the above-described real estate in the sum of $270,415.85 plus interest from September 23, 2013 to the date of sale at the rate of 5.375% Continued... Jeffrey Lake Special Master Southwest Support Group 5011 Indian School Road NE Albuquerque, NM 87110 505-767-9444 NM12-03021_FC01 Legal#96153 Published in the Santa Fe New Mexican December 13, 20, 27, 2013, January 3, 2014 STATE OF NEW MEXICO COUNTY OF SANTA FE FIRST JUDICIAL DISTRICT No. 03250 D-101-CV-2011- FIDELITY BANK, Plaintiff, v. DANUTA J. ALYASSIN, DAVID ALYASSIN AND THE STATE OF NEW MEXICO DEPARTMENT OF TAXATION AND REVENUE, Defendant(s). NOTICE OF SALE NOTICE IS HEREBY GIVEN that the undersigned Special Master will on January 15,: Tract 2, as shown and delineated on that certain plat of survey entitled, "Plat of Survey and Lot Line Adjustment for Bernard F. and Laraine F. Ely... Section 24, T16N, R9E, NMPM...", filed in the Office of the County Clerk, Santa Fe County, New Mexico on February 23, 1994 in Plat Book 266, page 048 as Document No. 851,334. The address of the real property is 105 Leaping Powder Road, May 22, 2013 in the above entitled and numbered cause, which was a suit to foreclose a mortgage Continued... LEGALS g g held by the above Plaintiff and wherein Plaintiff was adjudged to have a lien against the above-described real estate in the sum of $775,855.20 plus interest from June 29, 2012 to the date of sale at the rate of 6.625%11-00475_FC01 Legal#96165 Published in the Santa Fe New Mexican December 20, 27, 2013 January 3, 10, 2014 REQUEST FOR PROPOSALS MCCURDY CHARTER SCHOOL STUDENT NUTRITION FOOD SERVICE MANAGEMENT COMPANY RFP 1314-1 1. Sealed proposals will be received until 11:00 A.M. January 13, 2014 at the McCurdy Charter School Business Office, Española, New Mexico. Mail proposals in a sealed envelope, with proposal number written on the outside to the McCurdy Charter School P.O. Box 2250, Española, New Mexico 87532; Attention: Business Manager or hand deliver proposals to 362 S. McCurdy Road, Espanola, NM 87532. 2 . Copies of proposals will be available on the McCurdy School website:. 3. The McCurdy Charter School Governing Board reserves the right to reject any and or all items on bid/proposal. Legal#96234 Published in the Santa Fe New Mexican December 27, 2013 You can view your legal ad online at: sfnmclassifieds. com Friday, December 27, 2013 THE NEW MEXICAN sfnm«classifieds LEGALS LEGALS activation of title to a mobile or manufactured home on the property, if any, environmental contamination on the property, if any, and zoning Case No. D-101-CV- violations concerning the property, if any. 2013-00673 NOTICE IS FURTHER JPMORGAN CHASE GIVEN that the purBANK, NATIONAL AS- chaser at such sale shall take title to the SOCIATION, above-described real property subject to Plaintiff, rights of redemption. v. Jeffrey Lake BERTHA M. Special Master Support SANDOVAL, IF LIVING, Southwest IF DECEASED, THE UN- Group 5011 Indian School KNOWN HEIRS, DEVISEES, OR Road NE NM LEGATEES OF BERTHA Albuquerque, M. SANDOVAL, DE- 87110 CEASED AND THE UN- 505-767-9444 KNOWN SPOUSE OF NM12-01640_FC01 BERTHA M. Legal#96147 SANDOVAL, IF ANY, Published in the Santa Fe New Mexican Defendant(s). December 13, 20, 27, 2013, January 3, 2014 NOTICE OF SALE STATE OF NEW MEXICO NOTICE IS HEREBY COUNTY OF GIVEN that the underSANTA FE signed Special MasFIRST JUDICIAL ter will on January 8, DISTRICT 2014 at 11:30 AM, at the front entrance of D-101-CVthe First Judicial Dis- No. trict Court, 225 Mon- 200800162 tezuma, Santa Fe, New Mexico, sell and BANK OF AMERICA, convey to the highest N.A., SUCCESSOR BY TO BAC bidder for cash all the MERGER right, title, and inter- HOME LOANS SERVICest of the above- ING LP, FKA COUNHOME named defendants in TRYWIDE and to the following LOANS SERVICING LP, described real estate located in said Coun- Plaintiff, ty and State: Lot Sixty-Two (62), of v. Nueva Vista Subdivision, as shown on JENNIFER WEST AKA TORRES, plat filed in the office JENNIFER of the County Clerk, POSITIVE FINANCING RETIREMENT Santa Fe County, New LLC, AND LOS Mexico, on May 22, PLAN NATIONAL 1992 in Plat Book 235, ALAMOS Page 034 as Docu- BANK, ment No. 774,030. Defendant(s). The address of the real property is 1085 Calle Nueva Vista, NOTICE OF SALE Santa Fe, NM 87505. Plaintiff does not rep- NOTICE IS HEREBY resent or warrant GIVEN that the underthat the stated street signed Special Masaddress is the street ter will on January 8, address of the descri- 2014 at 11:30 AM, at bed property; if the the front entrance of street address does the First Judicial Disnot match the legal trict Court, 225 Mondescription, then the tezuma, Santa Fe, property being sold New Mexico, sell and herein is the property convey to the highest more particularly de- bidder for cash all the scribed above, not right, title, and interthe property located est of the aboveat the street address; named defendants in any prospective pur- and to the following chaser at the sale is described real estate given notice that it located in said Counshould verify the lo- ty and State: cation and address of TRACT C-2 OF WEST AS the property being SUBDIVISION, sold. Said sale will be SHOWN ON PLAT EN"FAMILY made pursuant to the TITLED judgment entered on TRANSFER LAND DIVIOctober 23, 2013 in SION SURVEY PREthe above entitled PARED FOR ELIZAGIBALA OF and numbered cause, BETH which was a suit to TRACT C", LOCATED foreclose a mortgage WITHIN THE SW 1/4 held by the above OF SECTION 25, T.15 Plaintiff and wherein N., R 8 E., N.M.P.M., Plaintiff was FILED IN THE OFFICE THE COUNTY adjudged to have a OF SANTA FE lien against the CLERK, above-described real COUNTY, NEW MEXIestate in the sum of CO, ON DECEMBER 9, $30,062.82 plus inter- 2003, AS DOCUMENT est from August 16, NO. 1304-786. 2013 to the date of sale at the rate of The address of the re8.000% per annum, al property is 26 Rusthe costs of sale, in- sell Road, Santa Fe, Plaintiff cluding the Special NM 87508. Master’s fee, publica- does not represent or tion costs, and Plain- warrant that the stattiff’s costs expended ed street address is for taxes, insurance, the street address of and keeping the the described properproperty in good re- ty; if the street adpair. Plaintiff has the dress does not match right to bid at such the legal description, sale and submit its then the property bebid verbally or in ing sold herein is the writing. The Plaintiff property more particdescribed may apply all or any ularly part of its judgment above, not the propto the purchase price erty located at the street address; any in lieu of cash. At the date and time prospective purchasstated above, the er at the sale is given Special Master may notice that it should postpone the sale to verify the location such later date and and address of the time as the Special property being sold. Said sale will be Master may specify. NOTICE IS FURTHER made pursuant to the GIVEN that this sale judgment entered on may be subject to a September 12, 2013 in bankruptcy filing, a the above entitled pay off, a reinstate- and numbered cause, ment or any other which was a suit to condition that would foreclose a mortgage cause the cancella- held by the above tion of this sale. Fur- Plaintiff and wherein was ther, if any of these Plaintiff conditions exist, at adjudged to have a against the the time of sale, this lien sale will be null and above-described real void, the successful estate in the sum of bidder’s funds shall $594,563.02 plus interbe returned, and the est from August 16, Special Master and 2013 to the date of the mortgagee giving sale at the rate of this notice shall not 7.500% per annum, be liable to the suc- the costs of sale, incessful bidder for any cluding the Special Master’s fee, publicadamages. NOTICE IS FURTHER tion costs, and PlainGIVEN that the real tiff’s costs expended property and im- for taxes, insurance, keeping the provements con- and cerned with herein property in good rewill be sold subject to pair. Plaintiff has the any and all patent right to bid at such reservations, ease- sale and submit its ments, all recorded bid verbally or in and unrecorded liens writing. The Plaintiff not foreclosed herein, may apply all or any and all recorded and part of its judgment unrecorded special to the purchase price assessments and tax- in lieu of cash. es that may be due. At the date and time above, the Plaintiff and its attor- stated neys disclaim all re- Special Master may sponsibility for, and postpone the sale to the purchaser at the such later date and sale takes the prop- time as the Special erty subject to, the Master may specify. valuation of the prop- NOTICE IS FURTHER erty by the County GIVEN that this sale Assessor as real or may be subject to a personal property, af- bankruptcy filing, a fixture of any mobile pay off, a reinstateor manufactured ment or any other home to the land, de- condition that would STATE OF NEW MEXICO COUNTY OF SANTA FE FIRST JUDICIAL DISTRICT Continued... Continued... to place legals, call 986-3000 toll free: 800.873.3362 email: legal@sfnewmexican.com LEGALS LEGALS LEGALS LEGALS LEGALS. $241,567.87 plus interest from March 14, 2012. By: /s/Thomas D. Walker Thomas D. Walker 500 Marquette NW, Suite 650 Albuquerque, NM 87102 (505) 766-9272 (505) 766-9287 (fax) Attorneys for Debtor (PSSC) is not allowed during the advertisement period. Contact with the Project Development Engineer for the project(s) is allowed until January 23, 2014. g Professional Services Contract Management NMDOT Room 207 P.O. Box 1149 Santa Fe, New Mexico 87504-1149 Suzanne.salazar@sta te.nm.us Jeffrey Lake Special Master Southwest Support Group 5011 Indian School Road NE Albuquerque, NM 87110 505-767-9444 NM00-02474_FC01 Legal#96150 Published in the Santa Fe New Mexican December 13, 20, 27, 2013, January 3, 2014 STATE OF NEW MEXICO COUNTY OF SANTA FE FIRST JUDICIAL DISTRICT No. 200903677 D-101-CV- WELLS FARGO BANK, N.A., AS TRUSTEE FOR T H E CERTIFICATEHOLDERS OF BANC OF AMERICA ALTERNATIVE LOAN TRUST 2005-8 MORTGAGE PASS-THROUGH CERTIFICATES SERIES Jeffrey Lake 2005-8, Special Master Southwest Support Plaintiff, Group 5011 Indian School v. Road NE NM LANCE B. DRAKE, Albuquerque, BANK OF AMERICA, 87110 N.A. AND THE UN- 505-767-9444 KNOWN SPOUSE OF NM00-05682_FC01 LANCE B DRAKE, IF Legal#96149 ANY, Published in the Santa Fe New Mexican Defendant(s). December 13, 20, 27, 2013, January 3, 2014 NOTICE OF SALE EXHIBIT A IN THE NOTICE IS HEREBY UNITED STATES BANKGIVEN that the under- RUPTCY COURT DISsigned Special Mas- TRICT OF NEW MEXIter will on January 8, CO 2014 at 11:30 AM, at In Re: the front entrance of COLLEGE OF THE the First Judicial Dis- CHRISTIAN BROTHERS trict Court, 225 Mon- OF NEW MEXICO, tezuma, Santa Fe, Case No. 12-11195 j7 New Mexico, sell and Chapter 7 Debtor. convey to the highest NOTICE OF DEADLINE bidder for cash all the TO RESPOND TO MOright, title, and inter- TION FOR ORDER DEest of the above- CLARING FUNDS UNnamed defendants in RESTRICTED and to the following On October 10, 2013, described real estate the College of the located in said Coun- Christian Brothers of ty and State: New Mexico (“DebtoLot 34-A, Block 20, of r”), filed a Motion for "Vista Del Sol, Unit an Order Declaring 10", as shown on plat Funds Unrestricted there of recorded on (the “Motion”). In the April 5, 1973 in Plat Motion, the Debtor Book 28, at page 7 as requests that the Document No. Court enter an order 352,796, records of declaring funds of the Santa Fe County, New Debtor unrestricted, Mexico. declaring that the funds may be used to The address of the re- satisfy the general al property is 2818 debts of the Debtor, Calle de Sonoro, San- and declaring that ta Fe, NM 87507. any surplus funds Plaintiff does not rep- distributed by the resent or warrant Trustee to the Debtor that the stated street are unrestricted. address is the street Responses to the Moaddress of the descri- tion must be filed bed property; if the with the Clerk of the street address does Bankruptcy Court, not match the legal Federal Building and description, then the United States Courtproperty being sold house, 500 Gold Ave. herein is the property SW., Tenth Floor, Almore particularly de- buquerque, N.M. scribed above, not 87102 (or P.O. Box the property located 546, Albuquerque, at the street address; N.M. 87103), within 21 any prospective pur- days after the date of chaser at the sale is publication of this nogiven notice that it tice and served on should verify the lo- Thomas D. Walker cation and address of (address given bethe property being low). If any responses sold. Said sale will be are timely filed, a made pursuant to the hearing will be held judgment entered on on notice only to Mr. June 14, 2013 in the Walker and objecting above entitled and parties. If no objecnumbered cause, tions are timely filed, which was a suit to an order granting the foreclose a mortgage Objection will be preheld by the above sented for entry withPlaintiff and wherein out a hearing or furPlaintiff was ther notice. adjudged to have a WALKER & ASSOCIlien against the ATES, above-described real a Professional Corpoestate in the sum of ration Continued... Continued... Legal#96190 Published in the Santa Fe New Mexican on: December 27, 2013 LEGAL NOTICE PROFESSIONAL SERVICES RFP’s 14-18, 14-19, 1420, 14-21 The New Mexico Department of Transportation (NMDOT), hereinafter referred to as "Department," is soliciting qualified firms for Professional Services for the following project(s): RFP: 14-18 CN: 9900280 PN: 9900280 Statewide On-Call General Engineering Services RFP: 14-19 CN: 9900091 PN: 9900091 Statewide On-Call Materials Laboratory Testing And Field Exploration For Pavement Design Applications RFP: 14-20 CN: 9900270 PN: 9900270 Statewide On-Call Drainage Engineering Services RFP 14-21 For the RFP, selection process or project specific contractual services requirements submit written requests to: Suzanne Salazar Manager NMDOT An Equal Opportunity Employer Legal#96198 Published in the Santa Fe New Mexican on: December 27, 2013 Continued... NOTICE OF INVITATION FOR BIDS (UPDAT-ED) NEW MEXICO DEPARTMENT OF TRANSPORTATION BIDS CALLED FOR – January 17, 2014 SANTA FE, NEW MEXICO Notice is hereby given that SEALED BIDS WILL BE RECEIVED UNTIL 11:00 A.M. (National Institute of Standards and Tech-nology (NIST), atomic clock) on January 17, 2014, 223, PO Box 1149, Santa Fe, New Mexico 87504 1149, 505.827.6800. The plans and contract documents may also be examined at the District Offices: District 1, 2912 East Pine Deming, NM Trent Doolittle 575.544.6620 District 2, 4505 West 2nd Street Roswell, NM Ralph Meeks - 575.637.7200 District 3, 7500 East Frontage Road Albuquerque, NM Timothy Parker 505.841.2739 District 4, South Highway 85 Las Vegas, NM David Trujillo 505.454.3695 Requests for Proposal (RFP) packages are available at the following: District 5, 7315 Cerrillos Road Santa Fe, NM Miguel Gabaldon 505.476.4201 District 6, 1919 Piñon Street Milan, NM Larry G. Maynard 505.285.3200 Quick-Link: Request for Proposal OR The following may be obtained from the P. S. & E. Bureau, New Mexico Department of Transportation, Room 223, 1120 Cerrillos Road, PO Box 1149, Santa Fe, NM 87504-1149, telephone 505.827.5500, FAX 505.827.5290: 2.By written request via mail or fax to the following address: • Contract books, that include bidding documents, technical specifications and bid forms, with a deposit of $15.00 per Contract Book. NMDOT Contract Administration Section • Complete sets of reduced plans with a deposit of $0.30 per sheet. Attn: Vanessa Ytuarte Room 103 1120 Cerrillos Road Santa Fe, NM 875041149 Telephone: (505) 827-5492 FAX: (505) 827-5555 Completed proposals must be received by the NMDOT Contract Administration Section, 1120 Cerrillos Road (Room 103), Santa Fe, NM 875041149, NO LATER THAN 2:00 PM, local prevailing time, on January 28, 2014. A pre-proposal meeting will be held for this project on January 9, 2014 at 1:30 p.m. at the NMDOT D3 Auditorium, Albuquerque, New Mexico. DISADVANTAGED BUSINESS ENTERPRISE (DBE) PROGRAM AND POLICY In accordance with Title 49 Code of Federal Regulations Part 26 (49 CFR 26) and all revisions, the Potential Offeror shall agree to abide by and take all necessary and reasonable steps to comply with the Department’s DBE Program. NMDOT has established a DBE Goal on a tri-annual basis. The approved FFY 2012-2014 DBE goal is established at 11.91% for federal-aid highway construction and design of which 7.69% will be attained through race neutral measures for additional information, contact the Department’s Office OEOP at the following address: NMDOT Office of Equal Opportunity Programs (OEOP) Aspen Plaza, Suite 107 1596 Pacheco Street Santa Fe, NM 87505 505-827-1774 or 1-800-544-0936 The Request for Proposals may be canceled and any and all proposals may be rejected in whole or in part when it is in the best interest of the State of New Mexico; and the NMDOT. Questions Regarding Request for Proposal: Please Note: Contact with the members of the Professional Services Selection Committee Continued... LEGALS LEGALS You can view your legal ad online at sfnmclassifieds.com To place a Legal ad Call 986-3000 CN: A300280 PN: A300280 I-25 & Rio Bravo Interchange 1.Via the Internet at the following address: ate.nm.us C-7 (. com). Electronic bid bonds integrated by Surety 2000 and Insure Vision will be the only electronic bid bonds accepted for NMDOT highway construction pro-jects. Plans and Contract Books in electronic format are also available in Bid Express. (1) 1100641 CN 1100641 TERMINI: I-25, MP 115.000 to MP 131.000 for 16.000 miles COUNTY: Socorro (District 1) TYPE OF WORK: Roadway Rehabilitation CONTRACT TIME: 130) (2) A301341 CN A301341 TERMINI: I-25, MP 224.798 to MP 224.955 for 0.157 miles COUNTY: Bernalillo (District 3) TYPE OF WORK: Bridge Rehabilitation CONTRACT TIME: 15: (GF-2 or GF-98) (3) 1100520 CN 1100520 TERMINI: I-10, MP 0.000 to MP 10.000 for 10.000 miles COUNTY: Hidalgo (District 1) TYPE OF WORK: Roadway Rehabilitation CONTRACT TIME:) (4) 1100470 CN 1100470 TERMINI: US 70, MP 148.318 to MP 149.277 for 0.959 miles COUNTY: Dona Ana (District 1) TYPE OF WORK: Roadway Reconstruction, Lighting, Signalization CONTRACT TIME: 360 calendar days DBE GOAL: At this time NMDOT will meet the State DBE on Federally assisted projects through a combination of race- neutral and race-conscious measures. This project is subject to race-conscious measures. The established DBE goal for this project is 3.00%. LICENSES: (GA-1 or GA-98) and (EE-98) (5) 1100930 CN 1100930 TERMINI: US 70, MP 150.632 to MP 152.138 for 1.506 miles COUNTY: Dona Ana (District 1) TYPE OF WORK: Safety (Roadway Median Paving), Bridge Rehabilitation, Lighting CONTRACT TIME: 100 calendar), (GF-2 or GF98) and (EE-98) (6) 6100770 CN 6100770 TERMINI: US 550/NM 197 Intersection for 0.010 miles COUNTY: Sandoval (District 6) TYPE OF WORK: Lighting CONTRACT TIME: 30: (EE-98) (7) 6100294 CN 6100294 TERMINI: Various Locations in District 6 for miles COUNTIES: San Juan, Cibola, McKinley and Sandoval (District 6) TYPE OF WORK: Stockpiling CONTRACT TIME: 75: No Licensing Required (8) 6100297 CN 6100297 TERMINI: Various Locations in District 6 for miles COUNTIES: McKinley, Cibola and Catron (District 6) TYPE OF WORK: Roadway Rehabilitation (Crack Sealing) CONTRACT TIME:-2 or GA-98) (9) M600333 CN M600333 TERMINI: I-40 at MP 80.009 and MP 102.185 and US 550 at MP 11.792 for 0.150 miles COUNTY: Cibola and Sandoval (District 6) TYPE OF WORK: Bridge Rehabilitation CONTRACT TIME: 45 working days LICENSES: (GF-2 or GF-98) (10) A300921 CN A300921 TERMINI: NM 556 (Tramway Boulevard), MP 12.250 to MP 12.300 for 0.050 miles COUNTY: Bernalillo (District 3) TYPE OF WORK: Bridge Rehabilitation (Pedestrian) CONTRACT TIME: Physical Completion date of April 11, 2014 LICENSES: (GF-2 or GF-98) (11) SP-5-14(350) CN M500718 TERMINI: NM 516, MP 7.424 to MP 13.921 and US 550, MP 159.900 to MP 161.207 for 7.803 miles COUNTY: San Juan (District 5) TYPE OF WORK: Safety (Roadway Median Paving) CONTRACT TIME: 40 working days LICENSES: (GA-1 or GA-98) Advertisement dates: December 27, 2013 and January 3 and 10, 2014. Tom Church, Cabinet Secretary Designate New Mexico Department of Transportation Santa Fe, New Mexico Legal no. 96225 Published in the Santa Fe New Mexican December 20, 27, 2013 & January 3, 10, 2014 C-8 THE NEW MEXICAN Friday, December 27, 2013 WITHOUT RESERVATIONS THE ARGYLE SWEATER PEANUTS LA CUCARACHA TUNDRA RETAIL STONE SOUP KNIGHT LIFE DILBERT PICKLES PEARLS BEFORE SWINE BABY BLUES LUANN ZITS BALDO GET FUZZY MUTTS ROSE IS ROSE PARDON MY PLANET NON SEQUITUR
https://issuu.com/sfnewmexican/docs/sfnm_dec._27__2013_3f719190663f83
CC-MAIN-2017-09
refinedweb
38,410
63.59
Caches textures, ensuring no texture is loaded twice. More... #include <StelTextureCache.hpp> Caches textures, ensuring no texture is loaded twice. StelTextureCache is templated by the textured backend used. This way e.g. StelQGLRenderer can have a texture cache storing StelQGLTextureBackend. The template argument class must have a member function called startAsynchronousLoading() which is called to start loading when a texture created with lazy loading mode is requested again with asynchronous or normal loading mode. Textures are identified by their name, that is full filesystem path or URL. Generated textures without a name can't be cached. The cache keeps pointers to all textures with reference counts; when a texture with the same name is requested more than once, pointer to the previously created texture is returned and the reference count is incremented. If a texture was created already with asynchronous/lazy loading mode is requested with normal loading mode, and isn't fully loaded yet, the cache waits until the texture loads and then returns it. Similarly, if the texture was created with lazy loading mode, is requested with asynchronous mode and didn't start loading yet, loading is started and then the texture is returned. Definition at line 53 of file StelTextureCache.hpp. Add a texture to the cache (setting its reference count to 1). Only a texture that is not yet in cache can be added, use get() to get a texture and increase its reference count. Definition at line 129 of file StelTextureCache.hpp. Get a pointer to a cached texture or NULL if not yet in cache. If the texture is already in cache, its reference count is incremented when returing the pointer. Definition at line 83 of file StelTextureCache.hpp. Remove a texture from the cache. Decrements the reference count. The texture is only actually removed (destroyed) when its reference count hits zero. Definition at line 145 of file StelTextureCache.hpp.
http://www.stellarium.org/doc/0.12.4/classStelTextureCache.html
CC-MAIN-2015-32
refinedweb
316
57.37
git-remote − Manage set of tracked repositories git remote [−v | −−verbose] git remote add [−t <branch>] [−m <master>] [−f] [−−[no−]tags] [−−mirror=<fetch|push>] <name> <url> git remote rename <old> <new> git remote remove <name> git remote set−head <name> (−a | −−auto | −d | −−delete | <branch>) git remote set−branches [−−add] <name> <branch>... git remote get−url [−−push] [−−all] <name> git remote set−url [−−push] <name> <newurl> [<oldurl>] git remote set−url −−add [−−push] <name> <newurl> git remote set−url −−delete [−−push] <name> <url> git remote [−v | −−verbose] show [−n] <name>... git remote prune [−n | −−dry−run] <name>... git remote [−v | −−verbose] update [−p | −−prune] [(<group> | <remote>)...] Manage the set of repositories ("remotes") whose branches you track. −v, −−verbose Be a little more verbose and show remote url after name. NOTE: This must be placed between remote and subcommand. With no arguments, shows a list of existing remotes. Several subcommands are available to perform operations on the remotes. add Adds a remote named <name> for the repository at <url>. The command git fetch <name> can then be used to create and update remote−tracking branches <name>/<branch>. With −f option, git fetch <name> is run immediately after the remote information is set up. With −−tags option, git fetch <name> imports every tag from the remote repository. With −−no−tags option, git fetch <name> does not import tags from the remote repository. By default, only tags on fetched branches are imported (see git-fetch(1)). With −t <branch> option, instead of the default glob refspec for the remote to track all branches under the refs/remotes/<name>/ namespace, a refspec to track only <branch> is created. You can give more than one −t <branch> to track multiple branches without grabbing all branches. With −m <master> option, a symbolic−ref refs/remotes/<name>/HEAD is set up to point at remote’s <master> branch. See also the set−head command. When a fetch mirror is created with −−mirror −−mirror=push, then git push will always behave as if −−mirror was passed. rename Rename the remote named <old> to <new>. All remote−tracking branches and configuration settings for the remote are updated. In case <old> and <new> are the same, and <old> is a file under $GIT_DIR/remotes or $GIT_DIR/branches, the remote is converted to the configuration file format. remove, rm Remove the remote named <name>. All remote−tracking branches and configuration settings for the remote are removed. set−head Sets or deletes the default branch (i.e. the target of the symbolic−ref refs −d or −−delete, the symbolic ref refs/remotes/<name>/HEAD is deleted. With −a or −−auto, the remote is queried to determine its HEAD, then the symbolic−ref refs/remotes/<name>/HEAD is set to the same branch. e.g., if the remote HEAD is pointed at next, "git remote set−head origin −a" will set the symbolic−ref refs/remotes/origin/HEAD to refs/remotes/origin/next. This will only work if refs/remotes/origin/next already exists; if not it must be fetched first. Use <branch> to set the symbolic−ref refs/remotes/<name>/HEAD explicitly. e.g., "git remote set−head origin master" will set the symbolic−ref refs/remotes/origin/HEAD to refs/remotes/origin/master. This will only work if refs/remotes/origin/master already exists; if not it must be fetched first. set−branches Changes the list of branches tracked by the named remote. This can be used to track a subset of the available remote branches after the initial setup for a remote. The named branches will be interpreted as if specified with the −t option on the git remote add command line. With −−add, instead of replacing the list of currently tracked branches, adds to that list. get−url Retrieves the URLs for a remote. Configurations for insteadOf and pushInsteadOf are expanded here. By default, only the first URL is listed. With −−push, push URLs are queried rather than fetch URLs. With −−all, all URLs for the remote will be listed. set−url Changes URLs for the remote. Sets first URL for remote <name> that matches regex <oldurl> (first URL if no <oldurl> is given) to <newurl>. If <oldurl> doesn’t match any URL, an error occurs and nothing is changed. With −−push, push URLs are manipulated instead of fetch URLs. With −−add, instead of changing existing URLs, new URL is added. With −−delete, instead of changing existing URLs, all URLs matching regex <url> are deleted for remote <name>. Trying to delete all non−push −n option, the remote heads are not queried first with git ls−remote <name>; cached information is used instead. prune Deletes all stale remote−tracking branches under <name>. These stale branches have already been removed from the remote repository referenced by <name>, but are still locally available in "remotes/<name>". With −−dry−run −−prune option, prune all the remotes that are updated. The remote configuration is achieved using the remote.origin.url and remote.origin.fetch configuration variables. (See git-config(1)). • Add a new remote, fetch, and check out a branch from it $ git remote origin $ git branch −r origin/HEAD −> origin/master origin/master $ git remote add staging git://git.kernel.org/.../gregkh/staging.git $ git remote origin staging $ git fetch staging ... From git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging * [new branch] master −> staging/master * [new branch] staging−linus −> staging/staging−linus * [new branch] staging−next −> staging/staging−next $ git branch −r origin/HEAD −> origin/master origin/master staging/master staging/staging−linus staging/staging−next $ git checkout −b staging staging/master ... • Imitate git clone but track only selected branches $ mkdir project.git $ cd project.git $ git init $ git remote add −f −t master −m master origin git://example.com/git.git/ $ git merge origin git-fetch(1) git-branch(1) git-config(1) Part of the git(1) suite
http://man.sourcentral.org/MGA6/1+git-remote
CC-MAIN-2019-13
refinedweb
981
57.57
Actors¶ Note This is an experimental feature and is subject to change without notice Note This is an advanced feature and may not be suitable for beginning users. It is rarely necessary for common workloads. Actors enable stateful computations within a Dask workflow. They are useful for some rare algorithms that require additional performance and are willing to sacrifice resilience. An actor is a pointer to a user-defined-object living on a remote worker. Anyone with that actor can call methods on that remote object. Example¶ Here we create a simple Counter class, instantiate that class on one worker, and then call methods on that class remotely. class Counter: """ A simple class to manage an incrementing counter """ n = 0 def __init__(self): self.n = 0 def increment(self): self.n += 1 return self.n def add(self, x): self.n += x return self.n from dask.distributed import Client # Start a Dask Client client = Client() future = client.submit(Counter, actor=True) # Create a Counter on a worker counter = future.result() # Get back a pointer to that object counter # <Actor: Counter, key=Counter-1234abcd> future = counter.increment() # Call remote method future.result() # Get back result # 1 future = counter.add(10) # Call remote method future.result() # Get back result # 11 Motivation¶ Actors are motivated by some of the challenges of using pure task graphs. Normal Dask computations are composed of a graph of functions. This approach has a few limitations that are good for resilience, but can negatively affect performance: - State: The functions should not mutate their inputs in-place or rely on global state. They should instead operate in a pure-functional manner, consuming inputs and producing separate outputs. - Central Overhead: The execution location and order is determined by the centralized scheduler. Because the scheduler is involved in every decision it can sometimes create a central bottleneck. Some workloads may need to update state directly, or may involve more tiny tasks than the scheduler can handle (the scheduler can coordinate about 4000 tasks per second). Actors side-step both of these limitations: - State: Actors can hold on to and mutate state. They are allowed to update their state in-place. - Overhead: Operations on actors do not inform the central scheduler, and so do not contribute to the 4000 task/second overhead. They also avoid an extra network hop and so have lower latencies. Create an Actor¶ You create an actor by submitting a Class to run on a worker using normal Dask computation functions like submit, map, compute, or persist, and using the actors= keyword (or actor= on submit). future = client.submit(Counter, actors=True) You can use all other keywords to these functions like workers=, resources=, and so on to control where this actor ends up. This creates a normal Dask future on which you can call .result() to get the Actor once it has successfully run on a worker. >>> counter = future.result() >>> counter <Actor: Counter, key=...> A Counter object has been instantiated on one of the workers, and this Actor object serves as our proxy to that remote object. It has the same methods and attributes. >>> dir(counter) ['add', 'increment', 'n'] Call Remote Methods¶ However accessing an attribute or calling a method will trigger a communication to the remote worker, run the method on the remote worker in a separate thread pool, and then communicate the result back to the calling side. For attribute access these operations block and return when finished, for method calls they return an ActorFuture immediately. >>> future = counter.increment() # Immediately returns an ActorFuture >>> future.result() # Block until finished and result arrives 1 ActorFuture are similar to normal Dask Future objects, but not as fully featured. They curently only support the result method and nothing else. They don’t currently work with any other Dask functions that expect futures, like as_completed, wait, or client.gather. They can’t be placed into additional submit or map calls to form dependencies. They communicate their results immediately (rather than waiting for result to be called) and cache the result on the future itself. Access Attributes¶ If you define an attribute at the class level then that attribute will be accessible to the actor. class Counter: n = 0 # Recall that we defined our class with `n` as a class variable ... >>> counter.n # Blocks until finished 1 Attribute access blocks automatically. It’s as though you called .result(). Execution on the Worker¶ When you call a method on an actor, your arguments get serialized and sent to the worker that owns the actor’s object. If you do this from a worker this communication is direct. If you do this from a Client then this will be direct if the Client has direct access to the workers (create a client with Client(..., direct_to_workers=True) if direct connections are possible) or by proxying through the scheduler if direct connections from the client to the workers are not possible. The appropriate method of the Actor’s object is then called in a separate thread, the result captured, and then sent back to the calling side. Currently workers have only a single thread for actors, but this may change in the future. The result is sent back immediately to the calling side, and is not stored on the worker with the actor. It is cached on the ActorFuture object. Calling from coroutines and async/await¶ If you use actors within a coroutine or async/await function then actor methods and attrbute access will return Tornado futures async def f(): counter = await client.submit(Counter, actor=True) await counter.increment() n = await counter.n Coroutines and async/await on the Actor¶ If you define an async def function on the actor class then that method will run on the Worker’s event loop thread rather than a separate thread. def Waiter: def __init__(self): self.event = asyncio.Event() async def set(self): self.event.set() async def wait(self): await self.event.wait() waiter = client.submit(Waiter, actor=True).result() waiter.wait().result() # waits until set, without consuming a worker thread Performance¶ Worker operations currently have about 1ms of latency, on top of any network latency that may exist. However other activity in a worker may easily increase these latencies if enough other activities are present. Limitations¶ Actors offer advanced capabilities, but with some cost: - No Resilience: No effort is made to make actor workloads resilient to worker failure. If the worker dies while holding an actor that actor is lost forever. - No Diagnostics: Because the scheduler is not informed about actor computations no diagnostics are available about these computations. - No Load balancing: Actors are allocated onto workers evenly, without serious consideration given to avoiding communication. - Experimental: Actors are a new feature and subject to change without warning
https://distributed.dask.org/en/latest/actors.html
CC-MAIN-2021-17
refinedweb
1,124
56.55
- Author: - phxx - Posted: - June 12, 2008 - Language: - Python - Version: - .96 - settings conf app - Score: - 1 (after 3 ratings) Save this as conf.py in the app's directory. Now you can do from myapp.conf import settings. You can access from the imported object every item of your settings.py including the default settings of myapp. Though you don't have to define every setting in settings.py you use in your app. Now you can ommit annoying try...except statements to define defaults directly in the code. What about: It doesn't seemed annoying to me... # This snippet does have the advantage that all your default settings are defined in one place, instead of scattered throughout the application code. Makes it easier for someone picking up the app to see what settings they can define for it. # It is right what carljm says. First I always used one settings.py file in every app for its default values with: getattr(django_settings, 'MYDEFAULT_SETTING', app_settings.MYDEFAULT_SETTING)But that was to verbose for me. Though now i just import ONE settings module and have all settings in one place including default values. # Please login first before commenting.
https://djangosnippets.org/snippets/796/
CC-MAIN-2019-13
refinedweb
195
70.6
Random musings in code If you are hosting a control in the browser and have given it elevated permissions (we will use FullTrust for this example) you might notice that you are still getting security exceptions when you try to call protected APIs. Here's what is going on. When Internet Explorer creates an AppDomain to host your control it does so without any consideration to the strong name permissions on your assembly. This is perfectly sensible because the strong name evidence doesn't apply to the AppDomain, only to those assemblies which are signed. The AppDomain will be created based on Zone and Url evidence which is available. Usually this means that the AppDomain will be granted either the Internet or LocalIntranet PermissionSet. Later when your assembly is loaded into the domain, it will be granted the permissions that were assigned to the strong name. At this point your AppDomain looks something like this: +------------------------------------------------------------+ | AppDomain: PermissionSet=Internet | | | | +-------------------+ +----------------+ +----------+ | | | YourAssembly | | System.dll | | ... | | | | FullTrust | | FullTrust | +----------+ | | | Strong Name | | Strong Name | | | +-------------------+ +----------------+ | | | +------------------------------------------------------------+ (excuse the ASCII diagram) When you call an API which has a security demand on it, you can imagine your call stack looks something like this: System.Diagnostics.Process.Start() FullTrust <-- Demand MyControl.button1_Click(...) FullTrust Demand succeeds System.Windows.Forms.Stuff FullTrust Demand succeeds AppDomain Internet zone Demand FAILS How do you fix this? You have two choices. The better option is to explicitly Assert each permission before using it (this is what I did in the event sample before calling the JavaScript code on the hosting page). The call stack would look like this instead System.Diagnostics.Process.Start() FullTrust <-- Demand MyControl.button1_Click(...) FullTrust <-- ASSERT Demand SUCCEEDS System.Windows.Forms.Stuff FullTrust Not evaluated AppDomain Internet zone Not evaluated The other option would be to change security policy for the zone or URL instead of strong name. I don't recommend this because you are weakening the security policy on the machine for your convenience. If you have a control hosted in the browser and you try to strong name it, you may find that it stops working. Looking at the IEHostLog () you might see something like this: As the error message implies, you need to add the AllowPartiallyTrustedCallers attribute to your assembly. This happens if the AppDomain hosting the control is partially trusted. See for more discussion. Controls hosted in the browser can often be difficult to debug. If anything goes wrong with loading the dll or constructing the control instance, you will get nothing but the standard IE "something is wrong" image (the small icon in the top-left with colored shapes). Here's how I recommend diagnosing these issues: 1. Turn on the debug log for IEHost Earlier we talked about adding properties and methods to a managed control so that the page hosting the control can interact directly with the managed control programmatically. This time we will add events which is a little bit more difficult. To really understand how this works, you have to understand the COM event model (Eric Lippert started a series talking about how this works particularly as it relates to script languages here:). At a very high level, COM events work by allowing someone who wants to listen to events to implement an interface where each method on the interface represents an event that could be fired. The implementation of this COM interface is then provided to the event source which can call any one of the provided methods when an event is "fired". .NET has built in support for a more flexible event model based on delegates, but it does provide support for COM-style events through the System.Runtime.InteropServices.ComSourceInterfacesAttribute. To take advantage of this in a control in the browser, we just need to define a COM interface that contains the signature of each event that we want to expose. It would look something like this: The interface has a single method/event "ButtonClicked". To get our to use this COM event, we just need to add the System.Runtime.InteropServices.ComSourceInterfacesAttribute. I expanded on the control we had earlier to add a button to the control in the browser which fires a "ButtonClicked" event which is handled by script in the hosting page. Host.html SimpleControl.cs using System;using System.Drawing;using System.Security;using System.Security.Permissions;using System.Windows.Forms;using System.Runtime.InteropServices; { new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Assert(); { [DispId(1)]//Each event must have a unique DispId void ButtonClicked();} NOTE: firing the ButtonClickedEvent requires UnmanagedCode permissions (essentially FullTrust) to execute. This is because you are causing script code to execute which is not part of the managed CAS system and therefore considered unmanaged. In order to get this sample to work, you will need to "trust" the assembly hosting your managed control. I did this for mine by adding my site to the "trusted sites zone" in internet explorer and with the command line: caspol -m -ag 1.5 -url* FullTrust Now that we have a simple control hosted in the WebBrowser, it would be nice to be able to interact with it from the page. Using JavaScript, we can call methods on the managed control, and also get/set properties (which are essentially just method calls themselves). We'll expand our simple control from before to include a property "ThemedBackgroundColor" and a method "SayHello" and then call them from JavaScript on the page. A couple of things to notice about my sample implementation. 1. I have introduced new properties and methods for my interactions even when the ones defined on System.Windows.Forms.Control might suffice. I do this so that I can explicitly control the interactions between script and my control. Soon, we will restrict all interactions to a defined interface to make this more explicit. 2. I have used the string type for my color property rather than the System.Drawing.Color type. I do this because JavaScript is a "stringy" language and I want to provide properties and methods that are as friendly as possible to the script world. (Internally I use the System.Drawing.ColorTranslator to convert between these strings and the managed Color instances that I want). Here is where we stand right now: <html> <head><title>Simple control host</title></head><body> <H1>Simple control host page</H1> <object id=simpleControl width=200 height=200</object> <br> <a href="javascript:simpleControl.SayHello();">Say Hello</a> <br> <input type=text id=colorName<input type=button</body></html> using System;using System.Drawing;using System.Windows.Forms; public class SimpleControl : Control { public SimpleControl() { this.BackColor = Color.Green; } Notice now that after you deploy this control, you can click on the link "Say Hello" to cause a Windows Forms MessageBox to appear, and that entering an HTML color into the text box and clicking the button next to it changes the color of the managed control Recently I have been hearing from more and more people who are embedding Windows Forms controls into webpages and I thought that I would put together a series of blog posts on this technique. Since the original release of .NET Windows Forms has supported hosting controls inside of a web browser (Internet Explorer). The control would be loaded inside the internet explorer process and would be visually represented inline with the other contents of the html page. Here's how it works. First we'll create a really simple control: File: SimpleControl.cs public class GreenControl:Control { public RedControl() { this.BackColor = Color.Green; }} And a really simple web page to host it: File: Host.html <html> <head><title>Simple control host</title></head><body> <H1>Simple control host page</H1> <object width=20 height=20</object></body></html> Then compile the control with the command line: csc /target:library SimpleControl.cs I now have 3 files (SimpleControl.cs Host.html and SimpleControl.dll) in a directory. I copy the last two files (.html and .dll) to a web server somewhere and navigate to the html file to see a completely uninteresting web page with a small green square of managed. I know that everyone and their uncle has blogged about their Dispose pattern flavor of the week, but I feel the need to add my 2 cents to the discussion. I’d like to start with Andrew’s Cardinal Rule of Disposable objects. “If your object has a Dispose method, call it as soon as you are done with the object.” If you follow this simple rule with the Disposable objects that you use in your application, then you will always be ensured that system resources are released as promptly as possible. You can rest easily tonight. If you are like me however, just being told to call Dispose isn’t satisfying. I want to know exactly what is going on “behind the curtain” and more importantly, I want to know why. When the CLR and managed code came onto the scene, there was a great deal of noise made about the Garbage Collector (GC) and how it was going to solve all of the world’s problems (similar musings have been made about other GC languages including Java). Simple fact of the matter is that the Garbage Collector is very good at what it is designed to do, collecting memory and only memory. For the host of other resource allocation challenges, the runtime’s GC does not do this for you magically. What it does do is define a set of patterns to make this as easy for you to manage yourself as possible. The basic “problem” with the GC in this sense, is that it has no knowledge whatsoever of what resources are held by any object beyond the memory space it consumes. Consider the canonical example which reads in a file with an integer value on each line, adds it to a list of integers, sorts them and then outputs the sorted list to the same file: const string FILEPATH = @"c:\foo.txt"; List<int> data = new List<int>(); StreamReader reader = new StreamReader(FILEPATH); while (!reader.EndOfStream) int temp; if (int.TryParse(reader.ReadLine(), out temp)) { data.Add(temp); } data.Sort(); StreamWriter writer = new StreamWriter(FILEPATH); foreach (int i in data) { writer.WriteLine(i); } If you try to run this on your machine it is very likely that you will get an exception on the line: The problem is that you already opened that file earlier for read access (the new StreamReader(FILEPATH);) part) and never released it back to the operating system. When you try to open it again, the OS denies the request because the file is already opened by someone else. We know that the garbage collector is designed to clean up memory when it is no longer used, so it should be able to close the file automatically each time we are done with it (both when we are done reading it in, and when we are done writing it out). But it doesn’t seem to do that. Why? For very good performance reasons (Rico’s article explains these quite well) the GC is “lazy” which means that it won’t clean up memory until it realizes that there is some advantage to doing so. When you are done with the StreamReader, and trying to open up the StreamWriter to output, there is still plenty of memory available on your machine which is available to your app, so the GC sees no advantage in taking the time to clean up right away. We could force the GC to clean everything up if we wanted to, but that’s a very costly (i.e. time-consuming) process and there are much better ways.); Note: for this to work as you might expect,. This causes the garbage collector to free up all available memory, wait for any finalizers which were triggered by the process (more on this later) and then collect again to get rid of the memory space taken by the finalized objects. In the process when the garbage collector gets to the StreamReader it closes the file which is then available to be written to. The key point to take away from this is that the GC, because it only tracks memory resources didn’t identify that there was any advantage to cleaning up the StreamReader right away (because there was plenty of memory available) and thus didn’t get around to it. That’s why it’s possible (though quite unlikely) that if you ran the sample above it would work (if for some unrelated reason the GC decided to collect at an opportune moment for you, say while data.Sort() was executing). So how do we fix the problem? With Dispose of course. Changing the above sample to this: reader.Dispose();//<<<<<<<<< writer.Dispose();//<<<<<<<<< Lets us explicitly say we are done with the file each time and ensures that it is available to be re-opened by the StreamWriter. In C# there is shortcut syntax for this, the using statement: using (StreamReader reader = new StreamReader(FILEPATH)) while (!reader.EndOfStream) int temp; if (int.TryParse(reader.ReadLine(), out temp)) { data.Add(temp); textBox1.Text += temp.ToString() + "\r\n"; } }//reader is disposed here automatically using (StreamWriter writer = new StreamWriter(FILEPATH)) foreach (int i in data) writer.WriteLine(i); textBox2.Text += i.ToString() + "\r\n"; }//writer is disposed here automatically The using statement ensures that the Disposable object created inside the statement will be disposed upon leaving the code block (delimited by the curly braces) regardless of any exceptions which may be thrown. This makes it yet more robust than the code which explicitly calls dispose. Simple isn’t it? Next post it will get more complicated, as I will talk about defining a disposable object itself (the other side of the curtain). As is customary in the world of computers, I had to start with a Hello World. Linked is a collection of Hello World programs written in a variety of languages Here's a simple example of what you could do with the Windows Forms and C# in the 2.0 release (compatible with the publicly released beta) using System; using System.Windows.Forms; namespace HelloWhidbey class HelloForm:Form [STAThread]static void Main() { Application.Run(new HelloForm()); } public HelloForm() Text = "Hello, World!" + new string(' ', 20); Timer t = new Timer(); t.Tick += delegate { Text = Text.Substring(1) + Text.Substring(0, 1); }; t.Start();
http://blogs.msdn.com/andrewdownum/
crawl-002
refinedweb
2,396
61.46
Hi Andreas, Advertising Thanks for fixing my pool English, will update in next version. Thanks, - Kever On 04/19/2017 09:00 PM, Andreas Färber wrote: Hi Kever, Some grammar nits below: Am 19.04.2017 um 08:42 schrieb Kever Yang:There are 3 region used by rk3399 ATF:"regions"- bl31 code, locate at 0x10000; - cortex-m0 code and data, locate at 0xff8c0000; - bl31 data, locate at 0xff8c1000 ~ 0xff8c4000;3x "located"SPL_TEXT_BASE starts from 0xff8c2000, we need to reserve memory for ATF data, or else there will have memory corrupt after SPL"there will be" or "we will have"load ATF image."loads the" / "loaded the"More detail about cortex-M0 code in ATF: 8382e17c4c6bffd15119dfce1ee4372e3c1a7890Interesting!Signed-off-by: Kever Yang <kever.y...@rock-chips.com> --- Changes in v2: - use Kconfig for the reserved memory size arch/arm/include/asm/arch-rockchip/boot0.h | 4 ++++ arch/arm/mach-rockchip/Kconfig | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/arch/arm/include/asm/arch-rockchip/boot0.h b/arch/arm/include/asm/arch-rockchip/boot0.h index 8d7bc9a..7346876 100644 --- a/arch/arm/include/asm/arch-rockchip/boot0.h +++ b/arch/arm/include/asm/arch-rockchip/boot0.h @@ -16,3 +16,7 @@ .space 0x4 /* space for the 'RK33' */ #endif b reset + +#if defined(CONFIG_ROCKCHIP_RK3399) && defined(CONFIG_SPL_BUILD) + .space CONFIG_ROCKCHIP_SPL_RESERVE_IRAM /* space for the ATF data */ +#endif diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index af0796d..979b48e 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -72,6 +72,14 @@ config ROCKCHIP_SPL_BACK_TO_BROM SPL will return to the boot rom, which will then load the U-Boot binary to keep going on.+config ROCKCHIP_SPL_RESERVE_IRAM+ hex "Size of IRAM reserved in SPL" + default 0x4000 + help + SPL may need reserve memory for firmware load by SPL, which load + address is in IRAM and may overlay with SPL text area if not + reserved."SPL may need to reserve memory for firmware loaded by SPL, whose load address is in IRAM and may overlap with SPL text area if not reserved."+ config ROCKCHIP_BROM_HELPER boolRegards, Andreas _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de
https://www.mail-archive.com/u-boot@lists.denx.de/msg246109.html
CC-MAIN-2017-34
refinedweb
358
55.24
. Another difference to our first asset pricing lecture is that the state space and shock will be continuous rather than discrete. Let’s start with some imports import numpy as np from interpolation import interp from numba import njit, prange from scipy.stats import lognorm import matplotlib.pyplot as plt %matplotlib inline$$ y_{t+1} = G(y_t, \xi_{t+1}) $$ $$ \mathbb{E} \sum_{t=0}^\infty \beta^t u(c_t) \tag{1} $$ Here - $ \beta \in (0,1) $ is a fixed discount factor. - $ u $ is a strictly increasing, strictly concave, continuously differentiable period utility function. - $ \mathbb{E} $$$ c_t + \pi_{t+1} p_t \leq \pi_t y_t + \pi_t p equilibrium models. Using the assumption that price is a given function $ p $ of $ y $, we write the value function and constraint as$$ v(\pi, y) = \max_{c, \pi'} \left\{ u(c) + \beta \int v(\pi', G(y, z)) \phi(dz) \right\} $$ subject to $$ c + \pi' p(y) \leq \pi y + \pi p(y) \tag{2} $$ We can invoke the fact that utility is increasing to claim equality in (2) and hence eliminate the constraint, obtaining $$ v(\pi, y) = \max_{\pi'} \left\{ u[\pi (y + p(y)) - \pi' p(y) ] + \beta \int v(\pi', G(y, z)) \phi(dz) \right\} \tag{3} $$$$ u'(c) p(y) = \beta \int v_1'(\pi', G(y, z)) \phi(dz) $$ where $ v'_1 $ is the derivative of $ v $ with respect to its first argument. To obtain $ v'_1 $ we can simply differentiate the right-hand side of (3) with respect to $ \pi $, yielding$$ v'_1(\pi, y) = u'(c) (y + p(y)) $$ Next, we impose the equilibrium constraints while combining the last two equations to get $$ p(y) = \beta \int \frac{u'[G(y, z)]}{u'(y)} [G(y, z) + p(G(y, z))] \phi(dz) \tag{4} $$ In sequential rather than functional notation, we can also write this as $$ p_t = \mathbb{E}_t \left[ \beta \frac{u'(c_{t+1})}{u'(c_t)} ( y_{t+1} + p_{t+1} ) \right] \tag{5} $$ This is the famous consumption-based asset pricing equation. Before discussing it further we want to solve out for prices. Setting up the Problem¶ Instead of solving for it directly we’ll follow Lucas’ indirect approach, first setting $$ f(y) := u'(y) p(y) \tag{6} $$ $$ f(y) = h(y) + \beta \int f[G(y, z)] \phi(dz) \tag{7} $$ $$ (Tf)(y) = h(y) + \beta \int f[G(y, z)] \phi(dz) \tag{8} $$ In what follows, we refer to $ T $ as the Lucas operator.\mathbb{R}_+ $ be the set of continuous bounded functions $ f \colon \mathbb{R}_+ \to \mathbb{R}_+ $. We now show that - $ T $ has exactly one fixed point $ f^* $ in $ cb\mathbb{R}_+ $. - For any $ f \in cb\mathbb{R}_+ $, $$ \| Tf - Tg \| \leq \alpha \| f - g \|, \qquad \forall \, f, g \in cb\mathbb{R}_+ \tag{9} $$ Here $ \|h\| := \sup_{x \in \mathbb{R}_+} |h(x)| $. To see that (9) is valid, pick any $ f,g \in cb\mathbb{R}_+ $ and any $ y \in \mathbb{R}_+ $. Observe that, since integrals get larger when absolute values are moved to the inside,$$ \begin{aligned} |Tf(y) - Tg(y)| & = \left| \beta \int f[G(y, z)] \phi(dz) -\beta \int g[G(y, z)] \phi(dz) \right| \\ & \leq \beta \int \left| f[G(y, z)] - g[G(y, z)] \right| \phi(dz) \\ & \leq \beta \int \| f - g \| \phi(dz) \\ & = \beta \| f - g \| \end{aligned} $$ Since the right-hand side is an upper bound, taking the sup over all $ y $ on the left-hand side gives (9) with $ \alpha := \beta $. Computation – An Example¶ The preceding discussion tells that we can compute $ f^* $ by picking any arbitrary $ f \in cb\mathbb{R}_+ $. We will set up a LucasTree class to hold parameters of the model class LucasTree: """ Class to store parameters of the Lucas tree model. """ def __init__(self, γ=2, # CRRA utility parameter β=0.95, # Discount factor α=0.90, # Correlation coefficient σ=0.1, # Volatility coefficient grid_size=100): self.γ, self.β, self.α, self.σ = γ, β, α, σ # == Set the grid interval to contain most of the mass of the # stationary distribution of the consumption endowment == # ssd = self.σ / np.sqrt(1 - self.α**2) grid_min, grid_max = np.exp(-4 * ssd), np.exp(4 * ssd) self.grid = np.linspace(grid_min, grid_max, grid_size) self.grid_size = grid_size # == set up distribution for shocks == # self.ϕ = lognorm(σ) self.draws = self.ϕ.rvs(500) # == h(y) = β * int G(y,z)^(1-γ) ϕ(dz) == # self.h = np.empty(self.grid_size) for i, y in enumerate(self.grid): self.h[i] = β * np.mean((y**α * self.draws)**(1 - γ)) The following function takes an instance of the LucasTree and generates a jitted version of the Lucas operator def operator_factory(tree, parallel_flag=True): """ Returns approximate Lucas operator, which computes and returns the updated function Tf on the grid points. tree is an instance of the LucasTree class """ grid, h = tree.grid, tree.h α, β = tree.α, tree.β z_vec = tree.draws @njit(parallel=parallel_flag) def T(f): """ The Lucas operator """ # == turn f into a function == # Af = lambda x: interp(grid, f, x) Tf = np.empty_like(f) # == Apply the T operator to f using Monte Carlo integration == # for i in prange(len(grid)): y = grid[i] Tf[i] = h[i] + β * np.mean(Af(y**α * z_vec)) return Tf return T To solve the model, we write a function that iterates using the Lucas operator to find the fixed point. def solve_model(tree, tol=1e-6, max_iter=500): """ Compute the equilibrium price function associated with Lucas tree * tree is an instance of LucasTree """ # == simplify notation == # grid, grid_size = tree.grid, tree.grid_size γ = tree.γ T = operator_factory(tree) i = 0 f = np.ones_like(grid) # Initial guess of f error = tol + 1 while error > tol and i < max_iter: Tf = T(f) error = np.max(np.abs(Tf - f)) f = Tf i += 1 price = f * grid**γ # Back out price vector return price Solving the model and plotting the resulting price function tree = LucasTree() price_vals = solve_model(tree) fig, ax = plt.subplots(figsize=(10, 6)) ax.plot(tree.grid, price_vals, label='$p*(y)$') ax.set_xlabel('$y$') ax.set_ylabel('price') ax.legend() plt.show() We see that orange line corresponds to the previous parameters and the green line is price when $ \beta = 0.98 $. We see that when consumers are more patient the asset becomes more valuable, and the price of the Lucas tree shifts up. Exercise 1 asks you to replicate this figure. fig, ax = plt.subplots(figsize=(10, 6)) for β in (.95, 0.98): tree = LucasTree(β=β) grid = tree.grid price_vals = solve_model(tree) label = rf'$\beta = {β}$' ax.plot(grid, price_vals, lw=2, alpha=0.7, label=label) ax.legend(loc='upper left') ax.set(xlabel='$y$', ylabel='price', xlim=(min(grid), max(grid))) plt.show()
https://lectures.quantecon.org/py/lucas_model.html
CC-MAIN-2019-35
refinedweb
1,145
55.64
References to memory mapped registers Hello, I just tried to uprade to 4.9 and ran into a problem because it enforces the standard more strictly. With 4.8 following construct compiled nicely and did what I intended it to: [code] template< typename T, unsigned intaddress > struct reference { static constexpr T& value = *reinterpret_ }; [/code] With 4.9 this does not compile, since reinterpret_cast is not a const expression according to standard. So all I can do is use a static const member with out-of-class initialization (ie. runtime initialization etc.). Is there any extension in place in this compiler port that could make the old code work again? I basically only want to map registers to references in a C++-way. I am totally aware that this is platform dependent, but the addresses are anyways so I don't see why one shouldn't be able to do this. Best regards Question information - Language: - English Edit question - Status: - Expired - Assignee: - No assignee Edit question - Last query: - 2014-12-16 - Last reply: - 2014-12-31 Hello, thank you for trying, I'm currently confused why this works for you. I'm currently thinking that because "value" is not referenced, the constexpr expression is not evaluated? Can you give "reference<int, 0x1000000>::value = 5;" or "auto& ref = reference<int, 0x1000000000> Okay I'm at my machine again, I'm trying to collect all relevant info. [source code source.cpp] template< typename T, unsigned int address > struct reference { constexpr static T& value = *reinterpret_ }; auto& ref = reference< int, 0x43 >::value; [/source code] [command line] D:\gnu_ source.cpp: In instantiation of 'constexpr int& reference<int, 67u>::value': source.cpp:8:37: required from here source.cpp:5:22: error: reinterpret_cast from integer to pointer constexpr static T& value = *reinterpret_ [/command line] [version] D:\Projekte\ Using built-in specs. COLLECT_ ........ gcc version 4.9.3 20141119 (release) [ARM/embedded- [/version] I admit I may be missing something. What is wrong with a templated function? I can see how the templated structure might be convenient if it could be statically initialized. I wasn't successful in doing so. The following templated function works OK for me. Also know that I'm doing the same thing you are in defining structures to access register files. [code] template <typename T_, uint32_t address> constexpr T_& ioref () { return *reinterpret_ [/code] I checked the assembled code and it's optimal. There is no function call made. I just realized that I should show it in use: [code] auto p = ioref<IOSTRUCT, p.x = 2; ioref< [/code] Hello Marc, thank you for hopping in! What I'm trying to do is giving a named reference a compile time static target address. I'm trying to avoid macros where possible. The way you suggest is in my eyes pretty close to the reinterpret_ My use-case with 4.8 is: [code] static auto& some_register = reference< [/code] From then on I can use "some_register" as a short identifier that respects namespaces and everything (actually it will be more like a struct for multiple registers). So right now I have the option to stick with 4.8 or accomplish it with custom symbol tables for the linker (since I started to auto-generate the headers from a register meta-file, the latter will actually not be sooo super bad). But since this port of the compiler is targetted at a microcontroller and hardware access is bread&butter I thought there may be extensions in place that could make it possible to achieve this within the language. Kind regards Michael, I've been thinking more about this as well. I agree that the function template is more like the macro than we'd like. As a constexpr, it should avoid a runtime penalty. As I wrote before, I checked (some) of the assembler output and found that it was doing what we'd hope with a simple address load from the constant pool. That said, I'd like what you are talking about and then some. I'd really like to be able to write: using SATA = iostruct< ... SATA::p.config = 10; // Of course, I'd like to be able to drop the ::p and use SATA.config ... using UARTx = iostruct< using UART1 = UARTx<0xa0020000>; ... I'm currently using a macro to bridge the gap which satisfies the code readability, but isn't as C++ as I'd like. The form you are using makes me think it may allocate RAM for each register to hold some_register. Have you verified that there is no RAM/ROM impact per instance? From http:// A value of any integral or enumeration type can be converted to a pointer type. A pointer converted to an integer of sufficient size and back to the same pointer type is guaranteed to have its original value, otherwise the resulting pointer cannot be dereferenced safely. The null pointer constant NULL or integer zero is not guaranteed to yield the null pointer value of the target type; static_cast or implicit conversion should be used for this purpose. So, I'm inclined to believe this is a bug. FWIW, I spent some time attempting to coerce [sic] the behavior we're looking for without any luck. Cheers Well, you're right, I'm still relying on the optimizer to optimize away the store for the reference (although that is not so improbable), but since I specify internal linkage, the compiler has all rights to eliminate it in my eyes, as it does with function-local alias-references. I cannot quote from the standard, but the definition of constexpr actively and namely excludes reinterpret_cast in valid constexpr expressions. The only solution that is supported by standard would be to declare the symbols "extern "C" register_type myregister;" and let the linker supply placement through symbol files "-Wl symbols.sym". symbols.sym then contains many "myregister = 0xFooFoo;". Kind regards Michael, I looked at the compiler output for the following: template <typename T_, uint32_t address> constexpr T_& ioref () { return *reinterpret_ template <typename T_, uint32_t address> struct iostruct { static constexpr T_& p = *(T_*) ((void*)address); }; static auto& p1 = iostruct< static auto& p2 = ioref<STM32: void testing () { p1.cr = 1; p2.cr = 1; } The compiler output is identical for both p1 and p2 with the 4.8 compiler. Unfortunately, the 4.9 compiler creates a static datum for the p2 form. Darn it. my hunch is that t would do the same for the p1 form if were willing to accept it. IMHO, the creating of a static datum makes the static object unusable. Cheers Yes indeed, since the 4.9 compiler rejects thinking that a reinterpret_cast can be a constant expression (following the standard, which I think is too strict in this point) there seems to be no "constant propagation" or how one could call that... It's a shame really. This question was expired because it remained in the 'Open' state without activity for the last 15 days. I failed to reproduce your issue, below small case works fine to me, seems no compiler error about this from 4.9 release: terguo01@ terry-pc01: tmp$ cat x.cpp cast<T* >(address) ; template< typename T, unsigned int address > struct reference { static constexpr T& value = *reinterpret_ }; void foo () { struct reference<int, 0x10000000> x; } arm-none-eabi-g++ -mthumb -mcpu=cortex-m3 -O0 -S x.cpp -std=c++11
https://answers.launchpad.net/gcc-arm-embedded/+question/259010
CC-MAIN-2020-05
refinedweb
1,227
54.73
README virtual-scrollvirtual-scroll A 2kb gzipped low-level library to create custom scrollers with touch and keyboard support. This is heavily inspired by Bartek Drozdz VirtualScroll util. See his article for reference. FeaturesFeatures - Can create multiple instances with different elements as targets - Let you do the actual scrolling logic: use CSS Transforms, WebGL animation or anything you like - Native arrow keys support and shift/space support mimicking default browser behaviour For high-level libraries based off virtual-scroll, check locomotive-scroll or smooth-scrolling. InstallationInstallation npm i virtual-scroll -S Usage & APIUsage & API ConstructorConstructor new VirtualScroll(options) el: the target element for mobile touch events. Defaults to window. mouseMultiplier: General multiplier for all mousewheel (including Firefox). Default to 1. touchMultiplier: Mutiply the touch action by this modifier to make scroll faster than finger movement. Defaults to 2. firefoxMultiplier: Firefox on Windows needs a boost, since scrolling is very slow. Defaults to 15. keyStep: How many pixels to move with each key press. Defaults to 120. preventTouch: If true, automatically call e.preventDefaulton touchMove. Defaults to false. unpreventTouchClass: Elements with this class won't preventDefaulton touchMove. For instance, useful for a scrolling text inside a VirtualScroll-controled element. Defaults to vs-touchmove-allowed. passive: if used, will use passive events declaration for the wheel and touch listeners. Can be true or false. Defaults to undefined. useKeyboard: if true, allows to use arrows to navigate, and space to jump from one screen. Defaults to true useTouch: if true, uses touch events to simulate scrolling. Defaults to true MethodsMethods instance.on(callback, context)Listen to the scroll event using the specified callback and optional context. instance.off(callback, context)Remove the listener. instance.destroy()Remove all events and unbind the DOM listeners. Events note: Each instance will listen only once to any DOM listener. These listener are enabled/disabled automatically. However, it's a good practice to always call destroy() on your VirtualScroll instance, especially if you are working with a SPA. EventEvent When a scroll event happens, all the listeners attached with instance.on(callback, context) will get triggered with the following event: { x, // total distance scrolled on the x axis y, // total distance scrolled on the y axis deltaX, // distance scrolled since the last event on the x axis deltaY, // distance scrolled since the last event on the y axis originalEvent // the native event triggered by the pointer device or keyboard } ExampleExample import VirtualScroll from 'virtual-scroll' const scroller = new VirtualScroll() scroller.on(event => { wrapper.style.transform = `translateY(${event.y}px)` }) LicenseLicense MIT.
https://www.skypack.dev/view/virtual-scroll
CC-MAIN-2021-43
refinedweb
423
51.44
Making a Magento website live is not child’s play. If you are a Magento developer you know that this a daunting task for even a seasoned developer. It's the final step of a long and stressful journey, and this makes it even more stressful. In this tutorial, I'll keep it simple by giving you a pre-launch checklist, and a brief explanation of each point. Let's start with a few key points that you need to get right before going live. Before making your Magento website live (or moving it), you should update the base URLs of your website. Otherwise your URLs will redirect visitors to your development website. To access the store pages, you need the base URLs. This can be edited in the store view. The base URL can be modified in two ways: through the back end, or by applying a SQL query. To modify the base URL from the back end, go to the Magento Admin Area. Then modify the option of Base URL like System > Configuration > Web > Unsecure > Base URL to System > Configuration > Web > Secure > Base URL. Do not forget to include trailing forward slashes. If you are unable to access the back end because of some erroneous update of the Base URL then you need to update it directly in the database table. These URLs are stored inside the table core_config_data of MySQL database. Change the field values of the web/unsecure/base_url and web/secure/base_url paths: Flush the Magento cache under the directory of var/cache to apply the changes. Before launching your Magento website, you should create Favicons. This minor point is often overlooked. Most often users keep open multiple tabs while browsing. For ease of browsing, do not forget to include Favicons for your website. This also reinforces visual branding. The path for the favicon is as follows: /skin/frontend/default/favicon.ico. Change the original setting of the HTML head for better SEO purposes. Change the ‘Title’, and set Meta descriptions and keywords. The path for these changes is System > Configuration > General > Design. Placeholder images are default images set for your site if products do not have their own images. By default Magento has a nice light grey set of default placeholder images, but for the purpose of branding, you can create a set of your own by going to System > Configuration > Catalog > Product Image Placeholders. For customizing the Contact Us page, first of all enable it from System > Configuration > General > Contacts. To create a little advanced contact us page, remove the link at the default Contact Us Page. If your theme doesn't already have a local.xml file, then create a new file of local.xml in your current theme’s layout folder. The content of the file will be as follows: <?xml version="1.0"?> <layout version="0.1.0"> <default> <reference name="footer_links"> <action method="removeLinkByUrl"><url></url> </action> </reference> </default> </layout> If your theme file already has a local.xml file, then add the following code under the <default> handle: <reference name="footer_links"> <action method="removeLinkByUrl"><url></url> </action> </reference> Replace the path with the current URL. Now save this file and clear the cache. Then you should create form template. The next step is to place it into your current theme’s Template folder. The path is as follows: app/design/frontend/your_namespace/your_theme/template/contact-us/contact-us-form.phtml. Next, paste this code into the file and save it. <form action="<?php echo Mage::getUrl('contacts/index/post'); ?>" id="contactForm" method="post"> <div class="fieldset"> <h2 class="legend"><?php echo Mage::helper('contacts')->__('Contact Information') ?></h2> <ul class="form-list"> " /> </div> </div> <div class="field"> <label for="email" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Email') ?></label> <div class="input-box"> <input name="email" id="email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserEmail()) ?>" class="input-text required-entry validate-email" type="text" /> </div> </div> </li> <li> <label for="telephone"><?php echo Mage::helper('contacts')->__('Telephone') ?></label> <div class="input-box"> <input name="telephone" id="telephone" title="<?php echo Mage::helper('contacts')->__('Telephone') ?>" value="" class="input-text" type="text" /> </div> </li> <li class="wide"> <label for="comment" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Comment') ?></label> <div class="input-box"> <textarea name="comment" id="comment" title="<?php echo Mage::helper('contacts')->__('Comment') ?>" class="required-entry input-text" cols="5" rows="3"></textarea> </div> </li> </ul> </div> > </form> <script type="text/javascript"> //<![CDATA[ var contactForm = new VarienForm('contactForm', true); //]]> </script> The next step is to create a CMS page, and the path is CMS > Pages > Add new page. To display your Contact Us page in the desired place, paste the following code: {{block type='core/template' name='contactForm' template='contact-us/contact-us-form.phtml'}} After this, save this page and add the link to the footer of your web page. To edit the Contact Information, update your form.phtml and save the file. It is essential that your copyright information in the footer is correct and up-to-date, as it will be displayed on all pages. You can change/reconfigure your copyright information by following this path: System > Configuration > General > Design > Footer > Copyright. Make sure that your store logo's file path is correct, and that it has the right alt text and Welcome text configured. To view these logo details, go to System > Configuration > Design > Header. Also make sure that all store information and business mail addresses are correctly set. The required path for configuring these email addresses is System > Configuration > General > Store Email Addresses. In addition the transactional emails often use different logos. Save that logo as logo_email.gif in your current theme directory. This performance checklist will improve your store’s speed and responsiveness, and ensure that your eCommerce store will be able to withstand high traffic pressure without crashing. Magento indexes data for faster access. To update a product in your store, you should re-index it so that it will be displayed on the front-end. To update the indexes follow the path: System > Index Management. The indexes that need re-indexing will be displayed in red font and Reindex Required will flash. Otherwise up to date indexes will display Ready status in green font. Until you re-index the data, the sample products will not be displayed on the front end of your website. Full page caching has an immense impact upon the performance of your store. A Magento store runs blocks of codes for determining which HTML to run on the client browser. Full page caching stores emitted HTMLs and resends them for every subsequent request. This cache feature ensures variations of dynamic contents (Welcome message, cart count, etc.) from customer to customer. Make sure that before launch, all your caches are enabled, by going to System > Cache Management. To keep down the loading time of your Magento web page, system compilation proves extremely helpful. Page loading speed is increased up to 50% after you apply this step. The correct way to use it is through the back-end of your website, and the path is System > Tools > Compilation. When a customer requests a page, the server spends a considerable amount of time locating the exact files. This leads to higher I/O operations that may create bottlenecks during high traffic cases. The compilation process stores codes in one folder and compiles them into a smaller number of files on the disk. The compiled code should be refreshed for a single code deployment. Log cleaning is a part of database maintenance. Magento is an excellent CMS platform but its default database maintenance ability is not up to the mark. A big database can make your site sluggish. The site latency and performance can be dramatically improved through log cleaning. Frequently compared products and customer access data are stored in these files. Enable this feature. The easiest way to do this is through the back-end. The path is System > Configuration > Advanced > System > Log cleaning. Then set Enable Log Cleaning to Yes. You can manually clean the log via PhpMyAdmin. The log cleaning function of Magento manages the following tables. Select your required table from PhpMyAdmin and then click Operations. Then click Empty the table (Truncate). Then go to Structure on the top menu and click on Optimize in the With Selected option. Minified versions of JS and CSS will again help you speed up the loading speed of your website. For this the easiest way is from your back end. The path is System > Configuration > Advanced > Developer. First go to the JavaScript settings and click Yes to Merge JavaScript Files. Do the same with the CSS settings. You can also install User Interface Optimization for JS and CSS minification. A web page may undergo maintenance processes. You must keep a default error page design and a default structure of "page not found" to provide better user satisfaction. The 404 page is a great place to advertise special offers, coupons and points to be generated by users. Change the ‘Magento Store’ reference on the default 404 page, which can be found at CMS > Pages. Use a different theme design to display your 404 not found page. Change the action of ‘print’ into ‘email’ in the errors/local.xml file. Otherwise customers will view the default logo and theme. This function will help you to keep a personalized communication with your customers. Admin can dynamically change the content of the email. Transactional emails use a different logo to the default one. Make sure that the image that you want to use is saved in your theme directory as logo_email.gif. Make sure that your newsletter settings are correct and updated. You can access them at System > Configuration > Customers > Newsletter > Subscription Options. Check out a more detailed article on correctly configuring a Magento newsletter. Make sure that your product shipment, payment settings and tax settings are up-to-date and in accordance with the laws of your country. You can modify/view your tax settings at the following path in the Magento admin panel: System > Configuration > Sales > Tax > Tax Classes > Tax Class for shipping. Then choose between the Taxable Goods, Shipping and None options. Set the shipping settings for the Country, Region/State, and Zip/Postal Code for your local or global eCommerce website from System > Configuration > Sales > Shipping Settings. Rates for shipping can be enabled through System > Configuration > Sales > Shipping Methods > Shipping Table Rates and many other available options. You can include them to enhance your store’s shipping functionality. You may choose different payment gateways for your online store like PayPal, Authorize.Net, Stripe, etc. through this path: System > Configuration > Sales > Payment Methods. You can also set the mode of payment from here. To optimize the web pages for different Search Engine Results, make sure that your Google sitemap and Analytics are properly set up in your Magento store. Search engines crawl the pages using the xml file. The spiders read sitemap.xml and this improves your visibility and ranking in SERPs. The path for setting up an XML sitemap in Magento is Catalog > Google Sitemap > Add new sitemap. There you can set the File Name (in xml extension) and Path for your xml file. Google Analytics helps you analyze the traffic of your website. For setting up Google Analytics in Magento, you can set up an account with Google Analytics and then place it in the Analytics account ID. The path is: System > Configuration > Sales > Google API > Google Analytics. Website owners often underestimate this checklist. But this is an important feature to include, for keeping your business out of legal entanglements. You can generate a privacy policy for your online store by installing iubenda. It is a professional way to add one. A privacy policy is must for every website. Some countries like the U.K. legally require you to show a privacy policy on your website if you are storing users' information on your server, as is the case most of the time. Just after setting up your website, you can generate the Policy attached as a badge to the lower border. After installation, an email will be forwarded to you explaining how to integrate it and customize it as you need. If your store includes its own terms and conditions and your visitors need to accept them to book an order, you can set that up from the admin panel. The path is: Sales > Terms and Conditions > Add New Condition. After you click Add New Content the following window will open. In order to agree with the terms and conditions you need to provide a checkbox. In the Checkbox Text you can add text to be displayed beside the checkbox like ‘I Agree’, etc. Put in the exact Terms and Conditions as text in the ‘Content’ field. In the ‘Content Height (CSS)’ you can set the height of the text area in the front end in pixels. After specifying all the conditions, click Save Condition. You may also require setting up the Order Review for the Checkout process. The path is System > Configuration > Sales > Checkout. Then in the Checkout Options, set Enable Terms and Conditions to Yes. You can add a CMS page for setting the ‘Return Policy’ of the website, and you could also use an extension like Magento RMA Extension. Using this extension you can smoothly set up the Return Management Authorization policies. After clients accept them, they can create requests for RMA. The easy method for RMA Tracking helps you to take precautions against fraudulent returns. Using this extension you can set up different ‘Request Types’ beyond the default types of refund or replacement. For example you can add credit, repair or any other request type. For every status and request type you can also specify the store view. In this way the extension supports multistore view. The shipping info page can be created as a separate CMS page from CMS > Pages > Manage Pages > Add New Page. If you want, you may also use an extension like Custom Shipping Options. The primary function of this extension is to enable your customers to have their personal shipping accounts at the time of checkout. You can create an option for Custom Shipping to be displayed on the Shipping Method portion of the checkout page. Using this extension you can demand a surcharge for shipping. The rate of surcharge will either be per order, or will be based on the number of items. In this article, I've listed important points to be checked before launching your online Magento based store. In addition to these points, you should also carefully check the functionality of all pages and extensions before launch. A small bug or extension incompatibility can create a bad user experience. This may also cause valuable loss to your business in the long run. Did you like the article? Please let me know in your comments and your feedback for this…
https://www.4elements.com/blog/read/magento_pre-launch_checklist
CC-MAIN-2018-43
refinedweb
2,514
58.58
Technology Optimizing Video For Measurement And High quality — Smashing Journal Over the previous couple of years, an increasing number of tasks are utilizing video as an integral a part of the applying. It is a nice route, as movies are extra participating than nonetheless images (movies can double conversion fee and enhance time spent on web site), and as such, can actually draw clients to discover particulars about services. Nevertheless, all of it goes sideways when there are points associated to the video playback. Video playback points are immediately associated to the dimensions and bitrate of the video. A video with giant dimensions or a excessive bitrate will take longer to obtain and would require the next velocity community to play again easily. This results in longer startup instances, and if the community can’t provide the video quick sufficient, the video will stall throughout video playback. There’s a resolution although! By operating primary optimizations of our movies earlier than including them to our web sites, we are able to stop these points from occurring for good — nicely, most of them. All we actually must do is make the file smaller — in a technique or one other. So, now the trick is: how will we make the file smaller with out decreasing high quality? On this article, we’ll stroll by way of the instruments and a number of the steps you possibly can take to optimize your movies for playback — all of it to keep away from stalls and impress your treasured clients! Actual-World Knowledge It’s not unusual to search out web sites with extraordinarily giant movies — for instance, used used as hero background movies. In my analysis, I used to be trying into websites discovered within the December 2020 cellular HTTPArchive, and it wasn’t tough to identify a great variety of websites loading large video information by default, each on cellular and on desktop. It’s after all uncertain that it is possible for you to to realize the identical financial savings that I’ll be exhibiting right here, however you’ll get some helpful pointers and recommendations on issues to bear in mind when coping with movies. In reality, it is rather straightforward to by chance place extraordinarily giant movies in your web site if you’re not cautious, leading to them being virtually unusable for many of your clients. The Pumpkin Patch Story Think about that it’s mid-October, and also you’re searching for a pumpkin patch and a corn maze to spend a weekend afternoon with your loved ones. Within the consolation of your desktop machine, you search the online for a close-by location and discover the proper one. The web site seems to be beautiful, with a ravishing drone 4K video of the fields taking part in on the high of the web page. You choose the URL and ship it to your self and your family members so that you just collectively can proceed exploring this feature on the go. However whenever you open the web page in your cellphone, you discover a glitch: the video is desperately attempting to play in your cellphone, however sadly fails to take action. The video retains stalling and restarting again and again, being way more disruptive and annoying than it was in your laptop. Ultimately you progress on, bookmark the URL, and transfer on along with your each day routine. After a enjoyable muddy day (nicely, I’ve just lately lived in Seattle and the UK, so pumpkin patches are muddy), you’re again in your laptop: maybe you suppose but once more about that video and also you surprise why it wasn’t taking part in nicely in your cellphone. Properly, let’s diagnose what’s going on. You would possibly begin by opening DevTools in your browser. As soon as the web page is loaded, we are able to transfer to the Community tab, and filter by “media” to see all of the video information: We see that an MP4 file is being downloaded. The file doesn’t come by way of the community as a standalone file; relatively, the streaming service have to be breaking apart the file into a number of segments, so that you would possibly see a number of 206 (partial content material) requests for a similar file. Wanting on the response headers for this file, we are able to spot some particulars: accept-ranges: bytes access-control-allow-headers: x-test-header, Origin, X-Requested-With, Content material-Kind, Settle for access-control-allow-methods: GET, POST, PUT, DELETE, OPTIONS Content material-Size: 87690242 Content material-Vary: bytes 70025216-157715457/157715458 content-type: video/mp4 date: Fri, 22 Jan 2021 15:27:26 GMT last-modified: Mon, 24 Jun 2019 05:13:04 GMT server: Apache Now, a few of these numbers are barely scare as they’re barely giant. In reality, they’re typically so giant that I’ve discovered myself moving into the behavior of including commas, so I can get an concept of how giant the information truly are. On this case, the partial obtain is 87 MB, and your entire file is 157,715,457 bytes. Sure, that’s proper, this video is 157MB, and it (tried) to load on my cellphone earlier in the present day! No surprise it didn’t succeed. So What’s Up With This Video? Let’s dive a little bit bit deeper. Apparently, the video is means too giant to play easily on a cell phone with a decrease reminiscence and a slower community. However what do we have to repair it? To determine what precisely is the issue, we are able to use FFMPEG, which is open supply and free, and proves to be one of the crucial dependable instruments to optimize movies. We may endlessly tweak the configuration in FFMPEG, however let’s simply contact on a number of necessary ones on this article. So, let’s begin with the analysis software referred to as FFprobe. FFprobe gathers data from multimedia streams, and gives you with the main points about how the video is encoded and the way it will play. It’s part of the FFMPEG bundle, and really fairly straightforward to make use of. Even higher: in case your video is on-line already, there’s an on-line model of ffprobe that we are able to leap to immediately. So, let’s simply enter the URL into the shape, and get the main points in regards to the video in return (e.g. video dimensions, bitrate, and fairly a little bit of metadata). Once I add the MP4 URL from the pumpkin farm, we instantly see one of many points. The show_format response from ffprobe returns a abstract: apparently, there are 2 streams, and it’s 62s lengthy (which all sounds regular sufficient to not elevate any suspicions). However after we get to the measurement and bitrate, we instantly see the place the video is failing. As talked about above, it is perhaps a good suggestion to get used to including commas to those giant numbers. Because it seems, certainly the drone footage flying over the sector is 157MB, and has a bitrate of 20 MB per second! It implies that for the video to play seamlessly, the community should be capable to stream the video at a fee quicker than 20 MBPS, which is precisely why it was stalling on the cellphone. What’s the excellent playback bitrate? To keep away from stall, we have to stream the video at an acceptable fee. That’s the place bitrate turns into necessary. Bitrate is the playback velocity of the video. For the browser to play the video easily, the video must be downloading quicker than it performs again — which means that the video will solely play again easily if the community velocity is over 20 MBPS. Once I consider community speeds, I are likely to depend on WebPageTest’s visitors profiles: As we are able to inform from the overview abouve, the video would possibly play nicely on the “Native Connection”, and on the ultra-fast optic cable FIOS connection (20 MBPS is precisely the velocity required, so hopefully nothing else must be downloaded within the background). Nevertheless, all the opposite connections have a downlink velocity that’s considerably decrease than 20 MBPS. If the video is loading at these speeds, the participant will try and eat the video quicker than it may be downloaded, and the video will completely stall. The bitrate of your video units the minimal community velocity that your clients can use. Normally, the bitrate of your video ought to be about 80% of the accessible throughput on the community. So a 20 MBPS video actually wants 24 MBPS community throughput to play the video seamlessly. Everybody on a slower connection can have a fairly poor expertise and is more likely to not be capable to watch the video in any respect. Extra particularly, which means for us to play easily and silky on 4G, the bitrate has to remain beneath 7.2 MBPS. Can We Decrease This Video’s Bitrate? Sure! Let’s have a look at a number of the configurations we are able to use to cut back this video’s bitrate. However first, let’s have a look at the info we get from FFprobe. One factor that’s fairly noticeable is the r_frame_rate worth, which is the variety of frames per second within the video. Its worth is 60000/1001. It implies that the body fee for the video is 60 frames per second. Nevertheless, typical body charges on the net are 25–30, so the very first thing we are able to do is to re-encode the video with a decrease bitrate. One other factor to bear in mind is Fixed Fee Issue. In FFMPEG, the principal high quality/measurement benchmark is the Fixed Fee Issue (CRF) compression, with values starting from 0 (no compression) to 50 (excessive compression). The default worth for CRF in FFMPEG is 23 (for those who miss the CRF parameter, your video is with that worth). In my private expertise, values from 23-28 nonetheless produce high-quality movies, trying good on the net and tremendously decreased in file measurement. So let’s begin at 30fps and a CRF of 23. The Terminal command will seem like this: ffmpeg -i enter.mp4 -vcodec h264 -acodec aac -crf 23 -strict -2 :v fps=fps=30 output.mp4 Voilà! This leads to an 81.5 MB video — already a 48% enchancment. However the video remains to be very giant, with a ten MBPS bitrate. If we set CRF to twenty-eight, the file drops to 35.4MB, with a bitrate of 4.5 MBPS which is more likely to play nicely on a 4G connection. That is a five-time enchancment over the unique video. To make this video much more accessible, we are able to resize the video to make it smaller. That’s one thing we’ll talk about within the streaming part beneath. The Hungry For Pizza Story Think about that you just’re in Los Angeles, maybe visiting from overseas and roaming in your cellphone, and naturally interested by grabbing a slice of pizza. You discover a exceptional pizza place in your cellphone, and resolve to go there. You might have seen a number of movies and hero photographs on the web page, however actually, each pizza place sort of seems to be the identical, so that you didn’t hassle to look at the video. You head and seize a slice or two earlier than heading again to your lodge. That evening, you get a textual content out of your provider that you just used much more knowledge than you imagined (and positively far more than you initially deliberate!). A few cabs, and the pizza web site — how costly was the pizza web site once more? You pop the pizza web site into WebPageTest and test it on a cellular connection: 44 MB of video. The place is it coming from? Even past that, after we study the supply and the waterfall in a bit extra element, we are able to see that there are literally two movies! Luckily (or sadly?), neither managed to be downloaded fully: This raises a number of considerations and some questions. First, why was a lot video downloaded when it wasn’t autoplaying? We haven’t managed to click on something simply but, however already used virtually 40 MB of information. The reply, as at all times, lies within the supply. Properly, “view supply”, that’s. <video id="u457537-video" class="video-js vjs-big-play-centered" controls <supply src="" kind="video/mp4"> <supply src="property/house.webm" kind="video/webm"> <p class="vjs-no-js">To view this video please allow JavaScript, and contemplate upgrading to an online browser that <a href="" goal="_blank">helps HTML5 video</a></p> </video> Off the bat, we see no less than two points: - preload=“auto” After we set preload="auto", we’re overriding the browser’s default setting, implementing video obtain — whether or not or not your buyer has pressed “Play”. The default preloadattribute is metadata, and would have resulted in a number of 100KB downloaded. Admittedly, it’s a a lot better consequence for web site guests who won’t ever watch this video. - Video Order You probably have a number of variations of the video (on this case: h264 .mp4 and VP8 .webm encoded movies), the browser will select the first video it is aware of how one can play. Now, each fashionable browser helps mp4, whereas most fashionable browsers additionally help webm (95.4% international help, in response to CanIUse). One trick that I like to make use of is to insert the suitable video supply line with Javascript. That means, for those who so select to not serve video on sure screens, you simply have an empty <video> tag — and no video could be downloaded. window.onload = addAutoplay(); var videoLocation = doc.getElementById("hero-video"); operate addAutoplay() { if(window.innerWidth > 992){ videoLocation.setAttribute("autoplay",""); }; } If we now run an ffprobe on these two movies, we’ll uncover vital variations in sizes: The webm is 90% smaller, and but has 0 views, since each browser helps the mp4. These two movies are each 640×360, and 140s lengthy. Operating the ffmpeg command from above on the mp4 leads to a 12.4 MB video, so it’s seemingly that builders adopted an identical course of to compress and encode the .webm variant as nicely. Maybe having preload="auto" for 12.5 MB wouldn’t be so unhealthy in any case. The second video (drone footage contained in the restaurant) is filmed in Full HD (1080p), however equally will get compressed from 140MB to 35 MB. So, 120s with FFMPEG may cut back the video weight on this web page from 160 MB to 57 MB. Flipping the webm/mp4 order would save an extra few MB for 95% of the browsers that may help that format. What if we needed to do even higher, maybe make the movies responsive to numerous sized screens? Properly, let’s get even smaller movies — with responsive movies! The <video> tag doesn’t help media queries to serve totally different video information to totally different screens, so we’d like a distinct means to supply movies sized for the system display. The simplest technique to obtain that’s through the use of video streaming. It will add some Javascript and different property for the video participant that can be required, however the video financial savings will certainly make up for this further knowledge. We will create video streams with FFMPEG (I’ve used bash scripts like this prior to now), however this requires us to know all of the sizes and settings we’d like to make use of (and as talked about earlier than, FFMPEG has a number of settings!). To make it simpler to stream video, there are APIs (e.g. api.video and Mux) the place you add your video, and the instruments create video streams and host your video for you. For full disclouse, I do work on the former one, so to simplify my video processing pipeline, I’ll use api.video, to transcode and host my movies. With the add API, I can add any video, and the software will create a streaming model at many alternative dimensions and bitrates (presently 240p, 360p, 480p, 720p, 1080p and 4K). The bitrates for the smaller movies are tremendously decreased, as the size of the video lower. Because of this the video would require much less community capability on smaller screens and can play on slower networks. For brevity, we’ll take a look at solely the Pumpkin patch video. I’ve obtained comparable outcomes with the drone video (the opposite pizza video is simply 360p, so it doesn’t tremendously profit from smaller sizes). Word: Please recall that this video is presently a 1080p mp4 video at 60fps, and weighs 157 MB for all guests. With some optimizations (CRF 28 and decreasing the framerate to 30fps), the video was decreased to 35.7 MB. Utilizing DevTools, we are able to emulate units to see how a lot knowledge is used for video playback of streaming video on totally different sized screens. The desk beneath is exhibiting the whole quantity of visitors used. With HLS video, there’s a JavaScript participant, CSS, fonts, and so forth. that add about 1 MB of further overhead. That is included within the totals beneath: At 1080p, there’s about 4MB further property downloaded for the stream, however for each different measurement, there are vital knowledge financial savings with no loss in video high quality. Not solely will the video be sized correctly for the units, however it’s a lot much less more likely to stall, because the bitrate is decreased for the units most definitely to be on slower cellular connections. Video streaming takes care of framerate, video measurement and high quality considerations — guaranteeing quick playback on any measurement display, and any velocity community. One other benefit to video streaming: if the community is gradual (or all of the sudden turns into slower), the participant can modify the video being proven, and play a decrease high quality model of the video — guaranteeing playback on the system — even in poor community circumstances. (You may take a look at the totally different movies with StreamOrNot, a little bit open supply undertaking that I’ve launched some time again. Now, isn’t it a little bit bit an excessive amount of overhead? Couldn’t we do the identical (simply a lot quicker) with YouTube or Vimeo? We absolutely may, however then we wouldn’t be capable to utterly take away the branding or promoting from the video, to not point out the overhead of scripts loaded throughout the video participant iframe. Plus, generally you would possibly need to use the video as a background video in your product web page, and keep away from any sort of exterior branding in any respect. Conclusion We don’t deploy photographs from our digital camera on to the online, however we compress and resize them to steadiness high quality and internet efficiency. The identical ought to be achieved for video information as nicely. Smaller movies begin taking part in quicker and stall much less typically, bettering the consumer expertise of the web site. On this article, we’ve walked by way of a number of easy steps to optimize our movies, e.g. by decreasing the standard and its framerate. We additionally checked out how video streaming can permit us to construct a extra responsive video expertise for the online — routinely serving movies which might be correctly sized for the display of the system. Thanks for studying, and for those who’d wish to be taught extra, it’s possible you’ll need to learn extra on video finest practices right here, on Smashing Journal, and on my weblog: ><<
https://gsensenews.com/optimizing-video-for-size-and-quality-smashing-magazine/
CC-MAIN-2021-31
refinedweb
3,356
59.94
A developer dropped me a line having found my previous blog posts around Project Prague; Project Prague in the Cognitive Services Labs They’d noticed that it seemed really easy and powerful to define and monitor for gestures with Project Prague but wanted to know where the support was for tracking lower level data such as hand positions and movement. I’ve a suspicion that they are looking for something similar to what the Kinect SDK offers which was out-of-the-box support for treating a user’s hand as a pointer and being able to drive an on-screen UI with it. As usual, I hadn’t the foggiest clue about how this might be done and so I thought I’d better take a quick look at it and this post is the result of a few minutes looking at the APIs and the documentation. If you haven’t seen Prague at all then I did write a couple of other posts; and so feel free to have a read of those if you want the background on what I’m posting here and I’ll attempt to avoid repeating what I wrote in those posts. Project Prague and the UWP Since I last looked at Project Prague, “significant things” have happened in that the Windows 10 Fall Creators Update has been released and, along with it, support for .NET Standard 2.0 in UWP apps which I just wrote about an hour or two ago in this post; UWP and .NET Standard 2.0–Remembering the ‘Forgotten’ APIs –) These changes mean that I now seem to be free to use Project Prague from inside a UWP app (targeting .NET Standard 2.0 on Windows 16299+) although I’m unsure about whether this is a supported scenario yet or what it might mean for an app that wanted to go into Store but, technically, it seems that I can make use of the Prague SDK from a UWP app and so that’s what I did. Project Prague and Skeleton Tracking I revisited the Project Prague documentation and scanned over this one page which covers a lot of ground but it mostly focuses on how to get gestures working and doesn’t drop to the lower level details. However, there’s a response to a comment further down the page which does talk in terms of; “The SDK provides both the high level abstraction of the gestures as they are described in the overview above and also the raw skeleton we produce. The skeleton we produce is ‘light-weight’ namely it exposes the palm & fingertips’ locations and directions vectors (palm also has an orientation vector). In the slingshot example above, you would want to register to the skeleton event once the slingshot gesture reaches the Pinch state and then track the motion instead of simply expecting a (non negligible) motion backwards as defined above. Depending on your needs, you could either user the simplistic gesture-states-only approach or weave in the use of raw skeleton stream. We will followup soon with a code sample in that will show how to utilize the skeleton stream” and that led me back to the sample; which looks to essentially use gestures as a start/stop mechanism in between which it makes use of the API; GesturesServiceEndpoint.RegisterToSkeleton in order to get raw hand-tracking data including the position of the palm and digits and so it felt like this was the API that I might want to take a look at – it seemed that this might be the key to the question that I got asked. Alongside discovering this API I also had a look through the document which is targeted at Unity but generally useful; because it talks about the co-ordinate system that positions, directions etc. are offered in by the SDK and also units; “The hand-skeleton is provided in units of millimeters, in the following left-handed coordinate system” although what wasn’t clear to me from the docs was whether I had to think in terms of different ranges for distances based on the different cameras that the SDK supports. I was using a RealSense SR300 as it is easier to plug in than a Kinect and one of my out-standing questions remains what sort of range of motion in the horizontal and vertical planes I should expect the SDK to be able to track for the camera. Regardless, I set about trying to put together a simple UWP app that let me move something around on the screen using my hand and the Prague SDK. Experimenting in a UWP App I made a new UWP project (targeting 16299) and I referenced the Prague SDK assemblies (see previous post for details of where to find them); and then added a small piece of XAML UI with a green dot which I want to move around purely by dragging my index finger in front of the screen; <Page x: <Grid> <Canvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" SizeChanged="CanvasSizeChanged"> <Ellipse Width="10" Height="10" Fill="Green" x: </Canvas> <TextBlock FontSize="24" x: </Grid> </Page> With that in place, I added some code behind which attempts to permanently be tracking the user’s right hand and linking it to movement of this green dot. The code’s fairly self-explanatory I think with the exception that I limited the hand range to be –200mm to 200mm on the X axis and –90mm to +90mm on the Y axis based on experimentation. I’m unsure of whether this is “right” or not at the time of writing. I did experiment with normalising the vectors and trying to use those to drive my UI but that didn’t work out well for me as I never seemed to be able to get more than around +/- 0.7 units along the X or Y axis. using Microsoft.Gestures; using Microsoft.Gestures.Endpoint; using Microsoft.Gestures.Samples.Camera3D; using System; using System.Linq; using Windows.Foundation; using Windows.UI.Core; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; namespace App2 { public sealed partial class MainPage : Page { public MainPage() { this.InitializeComponent(); this.Loaded += OnLoaded; } async void OnLoaded(object sender, RoutedEventArgs e) { this.gestureService = GesturesServiceEndpointFactory.Create(); await this.gestureService.ConnectAsync(); this.smoother = new IndexSmoother(); this.smoother.SmoothedPositionChanged += OnSmoothedPositionChanged; await this.gestureService.RegisterToSkeleton(this.OnSkeletonDataReceived); } void CanvasSizeChanged(object sender, SizeChangedEventArgs e) { this.canvasSize = e.NewSize; } void OnSkeletonDataReceived(object sender, HandSkeletonsReadyEventArgs e) { var right = e.HandSkeletons.FirstOrDefault(h => h.Handedness == Hand.RightHand); if (right != null) { this.smoother.Smooth(right); } } async void OnSmoothedPositionChanged(object sender, SmoothedPositionChangeEventArgs e) { // AFAIK, the positions here are defined in terms of millimetres and range // -ve to +ve with 0 at the centre. // I'm unsure what range the different cameras have in terms of X,Y,Z and // so I've made up my own range which is X from -200 to 200 and Y from // -90 to 90 and that seems to let me get "full scale" on my hand // movements. // I'm sure there's a better way. X is also reversed for my needs so I // went with a * -1. var xPos = Math.Clamp(e.SmoothedPosition.X * - 1.0, 0 - XRANGE, XRANGE); var yPos = Math.Clamp(e.SmoothedPosition.Y, 0 - YRANGE, YRANGE); xPos = (xPos + XRANGE) / (2.0d * XRANGE); yPos = (yPos + YRANGE) / (2.0d * YRANGE); await this.Dispatcher.RunAsync( CoreDispatcherPriority.Normal, () => { this.marker.Visibility = Visibility.Visible; var left = (xPos * this.canvasSize.Width); var top = (yPos * this.canvasSize.Height); Canvas.SetLeft(this.marker, left - (this.marker.Width / 2.0)); Canvas.SetTop(this.marker, top - (this.marker.Height / 2.0)); this.txtDebug.Text = $"{left:N1},{top:N1}"; } ); } static readonly double XRANGE = 200; static readonly double YRANGE = 90; Size canvasSize; GesturesServiceEndpoint gestureService; IndexSmoother smoother; } } As part of writing that code, I modified the PalmSmoother class from the 3D sample provided to become an IndexSmoother class which essentially performs the same function but on a different piece of data and with some different parameters. It looks like a place where something like the Reactive Extensions might be a good thing to use instead of writing these custom classes but I went with it for speed/ease. Wrapping Up This was just a quick experiment but I learned something from it. The code’s here if it’s of use to anyone else glancing at Project Prague and, as always, feed back if I’ve messed this up – I’m very new to using Project Prague. Can you please tell where we can find those four dlls ? I tried to build your code but I am getting error on those dlls and a file called App.g.i.cs ? What is this file ?
https://mtaulty.com/2017/11/30/a-follow-on-prague-experiment-with-skeletons/
CC-MAIN-2022-05
refinedweb
1,453
58.42
So I have the following code which iterates over a list and uses the data to populate a dict. self.data = [["name1.co.uk", "123", "A", "1.2.3.4"],["name2.com", "122", "NS", "ns1.google.com"]] for each_list in self.data: self.terrarecord[each_list[0].replace('.', '')] = { "zone_id": self.zone_id, "name": each_list[0] + self.url, # not sure if I need to do this "type": each_list[2], "ttl": each_list[1], "records": [each_list[3].replace('\n', '')] } self.terrarecord[each_list[0].replace('.', '')] = { "key123" { # <-- This is the key that needs a random number "id": "id", "name": "key.co.uk", "type": "SOA", "records": ["1234 etc"] } data How about something like this: import random ... rand_key = random.randint(1, 100) self.terrarecord[each_list[0].replace('.', '') + str(rand_key)] = { ... } You can adjust the range you want the random number to be chosen from with the arguments to randint(). Not that this will make it difficult to access the values from this dict however. Also, there is a potential with this method for having data overwritten if each_list[0].replace('.', '') and rand_key happen to have the same value as a previous key. If this is not an issue, then this method should work for you. If it is, you could generate your "random" number with a timestamp: from datetime import datetime rand_key = datetime.now().strftime('%Y%m%d%s%f') Which should give you a unique key unless the same value for each_list[0].replace('.', '') comes up twice in the same microsecond. See for an explanation of the format codes passed to strftime().
https://codedump.io/share/ifCmaQg2DaJb/1/change-a-dictionary-value-whilst-iterating-over-it
CC-MAIN-2017-30
refinedweb
253
76.82
Transcript Probst: Let me start by stating something that I've seen, by talking to many of our customers. What do companies care about? They care about delivering their products to their customers, ideally, as quickly as possible, so velocity, and ideally, with as little costs as possible. These are themes that I see over and over, and people choose tools and infrastructure that help them achieve these goals. What I'm going to be talking about here today is how Kubernetes and, in particular, multi-tenancy in Kubernetes, can be one of the tools in your toolbox that you can look at in order to help you achieve these goals. Let me introduce myself briefly. My name is Katharina Probst, I'm a Senior Engineering Manager at Google. You can find me on LinkedIn if you'd like. I will also share the slides, so you're welcome to take pictures, but you can also download them later. Why Multitenancy Let's start with why you might want to take a closer look at multi-tenancy. Do any of you run multi-tenant Kubernetes clusters? A couple, great, I'd love to hear your experiences too, maybe you can share with the room later. Why would you care about multi-tenancy? When you start out with Kubernetes, usually what happens at a very high level is, you have a user, and the user interacts via a command-line tool or the API, or UI with a master. The master, as we just heard, runs the API server and the scheduler, and the controller. This master is responsible for orchestrating and controlling the actual cluster. The cluster consists of multiple nodes that you schedule your pods on, Let's say these nodes are machines or virtual machines, or whatever the case may be. Usually, you have one logical master that controls one single cluster. Looks relatively straightforward. When you have one user and one cluster, that's what it is. Now, what happens when you start having multiple users? Let's say your company decides to use Kubernetes for a variety of maybe internal applications, and so you have one developer over here, creating their Kubernetes cluster, and you have another one over here creating their Kubernetes cluster, and your poor administrators now have to manage two of them. This is starting to get a little bit more interesting. Now you have two completely separate deployments of Kubernetes with two completely separate masters and sets of nodes. Then, before you know it, you have something that looks more like this. You have a sprawl of clusters. You get more and more clusters that you now have to work with. What happens now, some people call this cube sprawl, this is actually a pretty well-understood phenomenon at this point. What happens now is, I will ask you two questions of how does this scale? Let's think a little bit about how this model scales financially. How much does it cost you to run these clusters? The first thing that might stand out is that you now have all of these masters hanging out. Now you have to run all these masters. In general, it is best practice, not to run just one master node, but three or six, so that you get better high availability. If one of them fails, the other ones can take over. When you look at all these masters here, they're not one single node normally per master, they're usually three. This is starting to look a little bit more expensive. That's number one. Then number two, one of the things that we see a lot is, we see the customers that say, "I have all of these applications, and some of them run during the day, and they take user traffic." They need a lot of resources during the day, but they really lie idle at night. They don't really do anything at night, but you have all these nodes. Then you have some applications that are batch applications, maybe back processing of logs or whatever the case may be, and you can run them at any time you want. You could run them at night, you could have this model where some applications run during the day and then the other applications run at night, and uses the same nodes. That seems reasonable. With this model, where you have completely separate clusters on completely separate nodes, now, you've just made that much harder for yourself. That's one consideration. Another consideration that people bring up a lot is operational overhead, meaning how hard it is to operate all of these clusters. If you've been in a situation like this before, maybe not even with Kubernetes, what you will have noticed is that oftentimes what happens is that all of these clusters look very similar at the beginning, maybe they run very different applications, but the Kubernetes cluster, like the masters are all at the same version of Kubernetes, and so forth, but over time, they tend to drift. They tend to become all of these special snowflakes. The more you have these special snowflakes, the harder it is to operate them. You get alerts all the time, and you don't know, is it like a specific version, and you have to do a bunch of work. Now we have tens or hundreds of sets of dashboards to look at, to figure out what's going on. This now becomes operationally very difficult and actually ends up slowing you down. Now, with all of that being said, there is a model that is actually a very appropriate model under some circumstances. Lots of people choose this model, maybe not for hundreds or thousands, but lots of people choose this model of having completely separate clusters because it has some advantages, such as being easier to reason about and having very tight security boundaries. Let's say you're in this situation, and you have hundreds of clusters, and it's becoming just this huge pain. One thing you can consider is what we call multi-tenancy in Kubernetes. There are many definitions of multi-tenancy. When you read things on the internet about multi-tenancy in Kubernetes, you have to dig a little bit deeper to understand which model we're talking about. Usually though, what people talk about is this model that you see up on the slide here. What this model is, is you have many users that interact via the command line, and the API, and the UI, with one logical master. You have one master running, and that master now controls a large cluster - because for small clusters, it doesn't make that much sense, maybe - but a large cluster and that cluster is divided up into namespaces. There's this concept that we just heard about in Kubernetes that's called namespaces. What namespaces are, it's very important to understand that they are virtual clusters. You have one physical cluster, but then you divide that cluster up into namespaces. That does not mean that these two nodes belong to this namespace and these three nodes belong to the next namespace. The nodes are actually shared among the namespaces, but the namespace provides a boundary that creates this universe for you. Then you can run different applications in these namespaces but still share the resources. Let's dig into this a little bit. Usually, when you run Kubernetes, you have different roles and different kinds of users of this cluster. If you have a multi-tenant cluster, what you can have, more than likely is, you're going to have a cluster administrator. That cluster administrator, essentially, has a lot of access to all the cluster. They're the ones that set up the namespaces, they set up the resource limits, as we will see later in the talk, and they make sure that there's consistency across the namespaces in the cluster so you don't end up with this divergence and all of these different snowflakes. Of course, oftentimes, they're responsible for operating the cluster, responding to incidents and making sure everything runs smoothly. Now, we have a new role that really only applies to this model of multi-tenancy, and that is the namespace administrator. The namespace administrator now does not necessarily have access to our control over the entire cluster, but only one namespace, maybe multiple, but not the entire cluster, so only admin rights to specific namespaces. Then finally, you have the cluster user, and the cluster user, just like it was before, runs their applications on the cluster. Now, in this multi-tenant model, it's a little bit different because the cluster user now has access only to certain namespaces, maybe even only to one. It is their responsibility to understand their own namespaces, to run their apps in their namespaces, make sure they understand the resource limits, and make sure they don't trample on other tenants. We'll get more into more detail about this further on in the slides. Essentially, what you're going to have is you're going to have different roles, cluster administrator, namespace administrator, and user that you will typically see in these kinds of deployments. Hard Multitenancy When people talk about multi-tenancy, they often talk - if you go to, for instance, the open-source Kubernetes community, the working group for multi-tenancy - they talk about this concept of hard multi-tenancy and soft multi-tenancy. I'm going to talk about hard multi-tenancy first, but let me just give you a brief overview of what this means. On the one end, hard multi-tenancy means that you have tenants that you don't trust and they don't trust each other, so there is zero trust. That might be random people uploading code and running it, or it might be different companies that compete with each other. It could be anything, but it's very much on the end of the spectrum where there's zero trust. On the other side is soft multi-tenancy, and I'll talk more about this later today. When we're talking about soft multi-tenancy, there's more trust established between the tenants. One thing that's important to understand is that people often talk about hard versus soft multi-tenancy. In reality, it's really a spectrum, because how much you trust your tenants is not a binary, it's usually a spectrum. Which kinds of use cases work for you, you have to think for yourself and for your specific use case. Let's talk a little bit more about hard multi-tenancy. Again, that is the case where there is no trust. Hard multi-tenancy, for a variety of reasons, is not yet widely used in production. Essentially, what it boils down to is the security boundaries and making sure that tenants don't step on each other. It is not yet widely used in production. There is ongoing work in the Kubernetes community to strengthen and make changes to Kubernetes so that we get closer and closer to a point where that is a very viable thing to do. Let's talk a little bit about what it would take to have that. Think about this a little bit. You have now one cluster with a bunch of nodes and these nodes are shared by potentially malicious tenants. What do you need to do to make sure that this actually works smoothly? You need to make sure that there is great security isolation, that's the second bullet here. Tenants cannot see or access each other's stuff, they cannot intercept networks requests. They cannot get to the host kernel and escalate their privileges. All of that needs to be made sure so that you can have tenants that you cannot trust. The other thing is that you need to make sure that tenants essentially don't DoS each other, meaning they don't impact each other's access to the other's resources. We'll talk about this a little bit more later on in the talk, but think about this. You have a bunch of nodes that are now shared, and you have to make sure that everybody essentially gets their fair share. That's one thing it would take. Another thing you have to make sure is that when you have resources, so, for instance, there's this concept of custom controllers and custom resource definitions, that's a way to extend Kubernetes. If you now have all of these different tenants, and they extend, they add their own API's, their own CRD controllers, you have to make sure that they don't conflict, so that one person over here doesn't create an API that conflicts with something over here. You have to make sure that they're very nicely isolated. Then finally, much of what we talk about is about what we call the data plane, which is the cluster where the nodes are. The same questions apply to the master, which we call the control plane. We have to make sure that the control plane resources are also shared fairly. As we're on this journey towards making hard multi-tenancy more and more valuable, and more and more practical, and used in production, those are the kinds of questions that we need to answer. We're going along this journey towards more and more hard multi-tenancy. Right now, what people do a lot is they use multi-tenancy in a context where there is trust between the tenants. The use cases, for instance, that are very common or pretty common are different teams within the same company. Within one company, you say we share one big pool of resources and different teams share them. The different teams really have good incentive and good reason to behave nicely. They're not assumed to be malicious, they trust each other and accidents happen, and that's what you try to protect from, but you don't assume that they're completely not trusted. In that model, as you may by now have guessed, different teams will typically get different namespaces to share in one cluster. As I already said, this is used in production. Oftentimes, what happens is that multi-tenancy is still something that requires a little bit of setup or maybe a lot of setup. There are a bunch of knobs that you need to turn, we'll talk about that in a little bit. Often, or several times, what I've seen is, that companies use multi-tenancy, but then they actually have a few people that are dedicated to making sure the policies are applied correctly and network is set up consistently, and so forth for these shared clusters. Multitenancy Primitives There are a number of primitives that exist in Kubernetes, that will help you get a multi-tenant cluster set up and administrated properly. I already mentioned namespaces. The good thing about namespaces is that they were built in very early on in Kubernetes and they're very fundamental concepts, so they're actually implemented everywhere and pretty much all the components understand namespaces. That's good, but namespaces alone are not good enough. There’s a number of things you need to do in order to set up your multi-tenant cluster in a way that protects tenants from each other's accidents, for instance. We're going to talk about three things in a little bit more detail. One is access control, which means who can access what. One is isolation, which means how do I make sure not everybody can see each other's stuff. Then the last thing, going back to our hard multi-tenancy goals, is fair sharing. What already exists in Kubernetes that lets you ensure fair sharing among tenants. Let's talk a little bit about access control. That's our first primitive that we're going to talk about here. We already heard a little bit about RBAC, it was mentioned in the previous talk. RBAC is role-based access control in Kubernetes. RBAC is essentially, a tool that's built into Kubernetes that lets you control who can access what. Basically, the way it works is that you set up these roles and in these roles, you describe, "I'm going to have my administrator role, and this administrator can do all of these different things," There are two kinds of roles. There's ClusterRoles, those are roles that apply to the entire cluster, it makes sense. Then they are just Roles, and those roles are namespace-scoped, meaning they apply to specific namespaces, whichever ones you list. Kubernetes already comes with some default roles that you can use, but then you can create your own and you probably will want to. You create your own roles that say exactly who can access what pods, what namespaces, what secrets, and all of that stuff. You've now created those roles, and so now you get a new employee. Now, you need to make sure that this employee is assigned these roles. The way you do that is with ClusterRoleBinding or RoleBinding. ClusterRoleBbinding lets you bind groups of people or service accounts, or individuals, to ClusterRoles - again, that are cluster-wide - and RoleBindings let you bind individuals or groups, or service accounts to namespace-scoped roles. You will use this extensively. As very concrete example, you will use this extensively to achieve this isolation that you want. Very concrete example is Secrets. Secrets is a way that Kubernetes provides that lets you store things like passwords if you need them. The way it's done is, they're stored in SCD, so in the master. You have to make sure that they're encrypted, but also you have to make sure that only the correct people that have access to the correct namespaces can access those secrets. Even if you're in a place where you all trust each other, more or less, you should make sure that secrets are pretty well-protected. RBAC is this mechanism that you're going to use extensively to make sure that you essentially create this universe, this virtual cluster out of this concept that's called a namespace. There are other things that Kubernetes provides that lets you become more granular in your security controls. One of them is Pod Security Policy, it's similar in that it lets you set security policies. It basically lets you say, "For a specific pod, I will only allow pods into a specific namespace if that pod is not running as privileged," for instance. So, you can set up a pod security policy, and then, again, apply that to the cluster and to the namespaces so that you have better security. One of the things that happens, we heard a little bit about network policies. Let me just touch on that in the context of multi-tenancy. When you have a multi-tenant cluster, you have a cluster that is carved up into these namespaces. The namespaces are virtual clusters, so the nodes are shared between all of the namespaces. Now, the pods get scheduled on these nodes, so it's entirely possible and likely that you will have a node that will have pods from different namespaces on the node. If you've ever worked on a large distributed systems with many different components, you will have experienced that it is a very good idea to be very thoughtful about specifying who can talk to who. I've worked on systems where we did not do that at the beginning, and then, three years in, we're like, "That was a very bad idea," because now everybody can talk to everybody, and we can't reason about anything, and we have no idea what's going on. In a namespace in a multi-tenant Kubernetes cluster, it is very recommended that you're very thoughtful about setting network policies. What those network policies let you do is, they let you set ingress and egress, so for specific pods, they let you say, "This pod can talk to this pod, but not to these other pods," so you can reason better about the topology of your deployments. Another best practice is to make custom resource definition namespace-scoped. They can be, and arguably they should be. There are some use cases where that might not be the right thing to do, but in general, when you have these custom resource definitions - which are extensions, so you might have different teams writing extensions to Kubernetes and their own custom controllers - in many cases, it makes sense to make them namespace-scoped so they don't conflict with whatever other people are doing because you might not be interested in other people's extensions, and you might not like the side effects that they might have. The final thing I want to touch on in terms of isolation is Sandboxes. People now go around saying containers don't contain, so they're not great security boundaries. What that means in practice is if you run your containers on a node, then there are certain security considerations that you have to think about. For instance, you have to make sure that when that pod runs on the node, the pod cannot easily access the host kernel, and then hack into the host kernel and escalate privileges, and then get access to everything else that is running in the cluster. Sandboxes put a tighter security boundary around each pod, and so you can just launch all your pods in Sandboxes. Then there are several different ones, gVisor is one of them that's been developed. It's actually open-source, but Google is investing very heavily in it, so I know a little bit more about it. The way it works is, it puts the security boundary and isolates the pods more. The goal is to make sure that information is not leaked between tenants, and tenants can't break out accidentally or maliciously and mess everybody up, and stop everybody else's containers. That's something to consider. There are a lot of details here, but what I want you to take away from this part of the presentation is that when you have a large e multi-tenant cluster, you assign namespaces, and that is really the first step. What you then do is, you set up all of the security and isolation mechanisms so that in essence you create a more tightly controlled universe for each namespace. Let's talk a little bit about fair sharing. What I'm going to be talking about on this slide is fair sharing in what we call the data plane, which is the cluster of nodes, so fair sharing of resources. The reason I'm talking here about the data plane is because there are different mechanisms on the data plane, and it's actually better developed than it is on the control plane on the master. I'll talk about the master in the next part of the presentation. Let's talk about the data plane a little bit. When you have all of your different teams running your applications, I have experienced this, maybe some of you have too, even when you want to behave nicely and you're incentivized to behave nicely, what happens sometimes is that all of a sudden, you get a lot of traffic. Then your autoscaler kicks in and that's wonderful, and your application still runs, but now others cannot run. You have to make sure that you have the mechanisms in place so that tenants don't trample on each other and don't crowd each other out. The most important or maybe the most fundamental way to do this in a multi-tenant Kubernetes cluster is with something called Resource Quotas. Resource Quotas are meant to allow you to set resource limits for each namespace, which makes sense because you have a number of nodes, and you need to make sure that you carve up the resources among the namespaces. There's something called LimitRanger, which lets you set defaults for all the namespaces. Essentially, what you're going to want to do is you're going to want to think about how many resources does everybody get for CPU, for memory, and also for things like object counts. How many persistent volume claims can I have per namespace? Because there are limits on how many volumes you can mount on each virtual machine, depending on where you run them. You have to also make sure that those are shared fairly as well. Resource Quotas let you do that. Then there are things that let you put priorities and Quality of Service Classes on the parts. There are related concepts, and what I want you to take away is that there are ways that you can control the little bit, what pods run at higher priority than others. You're probably familiar with this concept of priority, even if it's not from Kubernetes, from other systems like Linux. It essentially lets you control them. Quality of Service Classes are another twist to this because they let you also say, "This is how many resources I need, but I can burst out of them potentially," or I can say, "I need absolute guarantee that these pods will run." Then finally, the last two bullet items here, node and pod. Those are mechanisms that lets you influence the scheduler. The scheduler is a complicated complex piece of technology that is not always easy to reason about. Your pods are scheduled and you're not really all that sure why they ended up where they did. It's complicated to reason about oftentimes, but there are mechanisms that let you influence the scheduler. We heard a little bit about Affinity and Pod Anti-affinity before. What that means is you can say these two pods shouldn't be scheduled together. In the context of multi-tenancy, that might mean that applications in two different namespaces should not end up on the same pod. Maybe you have namespaces that run financial applications that you want to keep separate from other things. One interesting concept that I'd like to call out here is this concept of taints and tolerations, and that's really interesting in the context of multi-tenancy. What it does, the way it works, is that you say, for a node, you give it a taint, and you just give it a label. You say, "green," and then only pods that have a toleration that matches that get scheduled on it. Only parts that have that same toleration, green, will get scheduled on that node. What that means for us in the context of multi-tenancy is, it's a way for you to control if there is a need to have nodes that only schedule parts from a specific namespace. That's how you get it done. Control Plane Multitenancy Let's talk a little bit more about control plane. Control plane, again, is the master. The API server and the scheduler, that's what's most important in our context here. Much of what we talked about were the nodes, so let's talk a little bit about the master. One of the things you will notice, as we're going through this, we're sharing the cluster that's on the right, so all of these applications are sharing the cluster, but the other thing we're sharing is the master. We're still, all together, sharing that one master. There’s one thing I should point out. Remember how I said at the beginning when people say multi-tenancy, they sometimes mean different [inaudible] not able to do that. We're definitely in this mode of one master controlling one cluster. That's fine. All tenants share the master, and that includes things like secrets. Remember what we talked about, you need to protect your secrets with RBAC. One of the things that the master, in particular, the API server, is not really great at right now is preventing tenants from DDoSing it or DoSing each other and crowding each other out. You have this master running, and the master takes in these requests from users, Imagine you have one user that all of a sudden just sends all of these requests. Then the API server is, "I don't know what to do with all these requests." Then the API server gets behind and other tenants don't get a word, their requests get rejected. It's actually worse than that because the API server could also drop things like garbage collection and other things that get dropped. There is work underway that you can check out, it's going on right now in the open-source community that will enable better fair sharing on the API server. The way this will work is, it's sort of a redesign of this concept of max inflight requests. Max inflight requests is a concept in the API server that essentially says, "Here is how many requests I can handle at any one given time and the rest, I just reject." In this proposal that is currently underway, you can read this in the slide, but what it will do is, it will generalize max inflight request handling in the API server to make more distinctions among requests, and provide prioritization and fairness among the categories of requests. That is long, you can afterwards read that again in the slides, but let me just explain a little bit what that means for us in the context of multi-tenancy. In this new way of doing things, when different tenants have requests coming in, there will be different priority levels, so the system ones will take the highest priority level, as you might guess, and then different tenants can be perhaps at the same priority level, and different tenants will likely have different cues and then they will compete evenly for the API server. What Companies Care About Before I conclude, I've given you a number of different things to look at and things to think about how you set this up. Now, let me get back to the beginning of the presentation, and talk a little bit, bring home the point of why multi-tenancy can help you with velocity and cost. You may walk out of this presentation saying, "That's really complicated," but when you really get down to it, when you have a shared cluster, you do have the ability now to have policies across the cluster, to have the same network settings across the cluster, and control things more tightly. In my experience, that will really help you long-term with your velocity, with your speed of getting things out faster, so you don't have to look in 100 places. Then just going back to the point about cost. Cost is something that you can save by sharing the master, but then also sharing the resources to underlying nodes between all the namespaces. Key Take Aways What I want you to take away from this presentation is, think about multi-tenancy as one of the tools in your toolbox if you want better resource efficiency, costs, and operations. We talked about velocity and costs. Think about it, and see if it applies to your use cases. When you read a little bit more about multi-tenancy, you will hear people talk about hard and soft. Remember that it's a spectrum, Hard means you don't trust the tenants at all, soft means you trust them completely. The truth is usually somewhere in the middle because even if you trust the tenants completely, they might make stupid mistakes and you still want to protect yourself against them, to some extent. We're on this road towards making hard multi-tenancy really viable. There is ongoing work, which is really encouraging to me and it's very exciting. Right now, what we see is that quite a number of companies use soft multi-tenancy in production, and as you saw in this presentation, there's still some setup required and some knobs you have to turn to make sure that it works well for you. It is definitely something that can work out very well. When I share the slides, I will have a few links at the end that link out to some of the open-source work that I was talking about here, so you can read a little bit more. See more presentations with transcripts Community comments
https://www.infoq.com/presentations/multi-tenancy-kubernetes/?itm_source=presentations_about_qcon-sao-paulo-2019&itm_medium=link&itm_campaign=qcon-sao-paulo-2019
CC-MAIN-2020-29
refinedweb
5,505
67.99
Vue.js is becoming one of the most popular and loved web frameworks, and its CLI 3.0 makes creating and working with Vue.js applications easier than ever. However, when it comes to the official SPA templates provided by ASP.NET Core, you might have noticed they only support Angular and React out-of-the-box. Figure 1, SPA templates included in ASP.NET Core out of the box What about Vue.js then? Microsoft has so far declined(at least for the moment) to include support for the Vue CLI, so it is up to the community to fill the gap in their SPA templates. In this article we will discuss several options for integrating ASP.NET Core and the Vue CLI, one of them already available in NuGet, thanks to Software Ateliers. If you have chosen Vue.js and ASP.NET Core as your web stack, I hope this article will help you understand how both fit together, and at the same time, help you get started. You can find the companion source code in GitHub. Things move fast in the web development world. I wrote about a year and a half ago a similar article , describing a template which can now be considered obsolete. This is mostly due to the rise of the Vue CLI 3.0 and the newer webpack versions! Writing web applications using a modern framework like Vue.js isn’t a simple enterprise. The Vue.js application code is composed of a mixture of vue files, .js/.ts, .css/.sass/.less files and some static files like images or fonts. For stitching everything together there is tooling like Babel and webpack, which will combine all the different source files into a final set of JavaScript and CSS files that browsers can interpret. This means a Vue.js application (and applications in most other modern frameworks like Angular or React for that matter) needs to be bundled before it can be run in a browser. You can consider the bundling process the equivalent of compiling a .NET application. The need to bundle the application introduces friction during the development process, since bundles need to be regenerated after making changes to the source files before you can execute the updated code in the browser. The way Vue.js deals with this (and again, so do other modern frameworks) is to provide a development web server as part of its tooling. This web server generates the bundles on startup and keeps watching for file changes, automatically regenerating the bundles and even pushing the changes to the browser. If you and/or your team is working on a full-stack, as soon as you add a traditional web server framework like ASP.NET Core providing the backend API, the development cycle of your application suddenly increases in complexity. You now have two servers to get started during development: The following diagram explains this situation: Figure 2, developing with a Vue.js application and an ASP.NET Core application This approach requires no special templates or support from either Vue.js or ASP.NET Core. You will be able to use the best tool to write/debug each application, but you will have to manually coordinate starting/stopping them. This can work great with bigger teams that split frontend and backend responsibilities or with experienced developers who can switch between each side and understand the different tooling involved in both. An alternative approach is the one followed by the Angular and React SPA templates provided by ASP.NET Core. These templates use ASP.NET Core server as the main web server, with all the browser traffic directed to it. During startup, the Vue.js development server is launched as a child process, and traffic other than the one for API controllers, is proxied to it: Figure 3, Using ASP.NET Core as the main server, proxying requests to the Vue.js development server This approach lets you keep frontend and backend together during the development cycle, reducing the friction to run and debug the application on your local machine. With a single Start or F5 command, you get both servers started, while the Build command builds everything into a single package ready to be deployed. There is a third option which inverts the roles of both servers. Since the Vue.js development server is nothing but a webpack development server, we can use its proxying capabilities to invert the situation: Figure 4, Using Vue.js development server as the main server, proxying requests to the ASP.NET Core server While this option might seem redundant, there are certain advantages compared to the previous scenario: The previous discussion focused on how to run your application during development, reducing the friction between making changes to your code and running them. When it comes to deploying to production, things are different. During build time, your Vue.js application is bundled by webpack into a set of static HTML/JS/CSS files, while your ASP.NET Core application is compiled into dll/exe files. The simplest approach is to host everything together in an ASP.NET Core web server that serves both the static files and the requests to the API controllers: Figure 5, Hosting together the bundled Vue.js application and the ASP.NET Core server More advanced options are available, hosting the generated bundles and the ASP.NET Core application separately. While this is a more complicated model, it certainly has its advantages, letting you scale each independently and use hosting options that suit each of them. (For example, taking advantage of CDNs for your bundles.) With the development and build cycle being the same, we will leave this outside of the scope of the article, but I encourage you to do some research if interested. The next sections discuss the three different options we saw to organize your project during development. You can find the source code on GitHub. Although this is the simplest of the solutions, it is a powerful one and will be very frequently chosen by big and/or experienced teams. It decouples frontend from backend, making it easier to adopt different tooling, development process, etc. You will typically create two folders or even two repos, usually following some naming convention like backend/frontend or client/server. In one of them, simply create a new ASP.NET Core web application using the Web API template. You can use either the Visual Studio new application wizard or run in the command line dotnet new webapi . In the other folder, create a new Vue.js application using the Vue CLI by running vue create from the command line. Then select the options that you want to enable for your Vue application (Vuex, Router, TypeScript, Linting, Testing, etc.) At the end of this process, you should have a project structure like the following one, with the ASP.NET Core and Vue.js applications in separate folders: Figure 6, folder structure with separate frontend and backend projects There is one thing you need to do before you can start both applications. Since each will run on its own web server (Vue.js typically on localhost:8080 and ASP.NET Core on localhost:5000 with Kestrel or an address like localhost:49960 with IISExpress) you will need to enable communication between the two processes. You can enable CORS by adding the following line to the ConfigureServices method of the Startup class: services.AddCors(); Next you need to specify which CORS policy should be used. Update the Configure method of the Startup class to use a wide policy in case of development: if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseCors(policy => policy .AllowAnyHeader() .AllowAnyMethod() .WithOrigins("") .AllowCredentials()); } This way when you send a request to the ASP.NET Core backend application from your Vue.js application running on localhost:8080, the browser won’t block the request. An alternative approach is to send requests from the Vue.js application as if the backend was hosted in the same location as the Vue.js application (i.e., send a request to localhost:8080/api/SampleData/WeatherForecast rather than localhost:5000/api/SampleData/WeatherForecast). For this approach you will need to enable the proxy in the Vue.js web development server, pointing it to the ASP.NET Core application. The Vue.js development server will then send to the ASP.NET Core those application requests that it cannot solve itself. Simply add a vue.config.js file to the root of the Vue.js application with these contents: module.exports = { // The URL where the .NET Core app will be listening. // Specific port depends on whether IISExpress/Kestrel and HTTP/HTTPS are used devServer: { proxy: '' }, } Let’s verify if it all works. Open two separate terminals and run dotnet run in one and npm run serve in the other. They should start the ASP.NET Core and Vue.js applications respectively, and they will print on which specific HTTP(S) port each is listening. Figure 7, Running separately the frontend and backend with “dotnet run” and “npm run serve” The Vue development server will typically start on. If you open that URL in the browser, you should see the default home page. Try changing the message in the Home.vue component and you should immediately see it changing in the browser – thanks to the hot reload capabilities of the Vue.js dev server. Now let’s try to fetch the sample values returned by the ValuesController. We need to send a request to the location where the ASP.NET Core application is running, in my case since I had HTTPS enabled (You should see this address in the command line where you run dotnet run or in the Visual Studio output if running from Visual Studio). Execute the following in the browser dev tools and you should see the values logged to the console: window.fetch('') .then(res => res.json()) .then(console.log) Figure 8, Accessing the ASP.NET Core backend from the Vue.js application You now have a project made of a separate Vue.js frontend application and an ASP.NET Core backend application! This is the simplest approach for integrating Vue.js and ASP.NET Core, using out-of-the-box tooling in each case, but that doesn’t mean this isn’t a good approach! Quite the contrary, you can now fully embrace the different tooling and development process for each. For example: It certainly introduces an additional layer of complexity in your project, but using the right tool for the job might be worth the steeper learning curve. If you have been following the DNC magazine, you might have recognized this approach in articles like the one integrating SignalR with Vue.js. The next two sections discuss approaches aiming to provide an integrated experience for the entire project. If you would rather keep a more integrated development experience for both projects, simplifying the tooling involved and avoiding the need to run frontend and backend separately, you are probably looking at the official SPA templates included with ASP.NET Core. These templates essentially add some middleware to the ASP.NET Core application so: We saw a diagram of this approach in the initial section: Figure 9, SPA template where ASP.NET Core proxies the Vue.js development server Now the problem you will find is that ASP.NET Core only provides SPA templates for Angular and React, with Vue.js sadly missing and officially unsupported by Microsoft (at least for the moment). The good news is that it isn’t hard to adapt one of the existing templates, since it is mostly a matter of executing a different npm script during startup. The bad news is that the utilities needed to run an npm script during startup and to wait for the Vue.js development server to be started are internal to Microsoft’s SPAServices.Extensions package, so you will need to manually copy their source code into your project. Adapting the React template is exactly what Software Ateliers has done, so you can now install their template and generate a Vue.js SPA application using this approach. In the rest of this section I will show you how you would manually create such a template, so you understand how it works. Start by creating a new ASP.NET Core application, selecting the React template. Either use the new project wizard in Visual Studio or run dotnet new react from the command line. Once generated, the first thing we need to do is to replace the contents of the /ClientApp folder with a Vue application. To do so, take the following steps: With these three sub-steps, we have fully replaced the React frontend app with a Vue.js frontend app. Here comes the most complicated part! If you look at the Configure method of the Startup class, you will notice the following piece of code: app.UseSpa(spa => { spa.Options.SourcePath = "ClientApp"; if (env.IsDevelopment()) { spa.UseReactDevelopmentServer(npmScript: "start"); } }); This code is using the methods UseSpa and UseReactDevelopmentServer that are part of the Microsoft.AspNetCore.SpaServices.Extensions NuGet package. With UseReactDevelopmentServer, the development server gets started on a free port, and any request waits for it to be started before continuing. With UseSpa, a proxy between the ASP.NET Core server and the development server is established, redirecting unknown requests to said development server. The problem comes from the fact that although UseReactDevelopmentServer allows you to specify which npm script should be run (since with Vue.js we need to run npm run serve rather than npm start), it has internal hardcoded logic specific to React: Since these two points are different in the case of a Vue.js application, and UseReactDevelopmentServer does not provide any options to change its behavior, we will need to create our own middleware that knows how to start the Vue.js development server. The process will be a little more involved than expected since it relies on utilities which are internal to the Microsoft.AspNetCore.SpaServices.Extensions package, but it won’t be too hard. 1. Start by creating a new Middleware folder in you project, and manually copy the Util folder from Microsoft’s source (do not remove the license attribution!). 2. Next, you will also need to add to the Util folder the NpmScriptRunner class. 3. Finally copy the React middleware and extension classes into your project’s Middleware folder, and rename them as VueDevelopmentServerMiddleware and VueDevelopmentServerMiddlewareExtensions respectively. The end result should look like this: Figure 10, Adapting the React development server middleware for Vue.js You can ignore the classes in the Util folder since we will use them as-is, the problem is that they are internal classes to the Microsoft.AspNetCore.SpaServices.Extensions package, so we couldn’t access them. Simply rename their namespace, and you are free to concentrate on the middleware and extension classes. Open the middleware class, which is the sole place where we actually need to make the changes! Rename the StartCreateReactAppServerAsync method to StartVueDevServerAsync. Remove the environment variables and replace the creation of the NpmScriptRunner with: var npmScriptRunner = new NpmScriptRunner( sourcePath, npmScriptName, $"--port {portNumber} --host localhost", null); This is just updating the way the port is provided to the Vue.js development server. Now replace the WaitForMatch line so it waits for the Vue.js development server to print “DONE”: startDevelopmentServerLine = await npmScriptRunner.StdOut.WaitForMatch( new Regex("DONE", RegexOptions.None, RegexMatchTimeout)); Then rename the method UseReactDevelopmentServer in the middleware extension class to UseVueDevelopmentServer. Once renamed, update the Configure method of the Startup class to call app.UseVueDevelopmentServer with the npm run serve script: app.UseSpa(spa => { spa.Options.SourcePath = "ClientApp"; if (env.IsDevelopment()) { spa.UseVueDevelopmentServer(npmScript: "serve"); } }); Once you are done, you should be able to start the project from Visual Studio or from the command line. The middleware will start the Vue.js development server and will wait for it to be initialized before loading the home page. You should eventually see the Vue.js home page, but notice it is getting loaded from the port of the ASP.NET Core server rather than the Vue.js development server. Try modifying the message in the Home.vue file and notice how the browser immediately reloads the changes. That’s great, it means the hot reload functionality keeps working even after we introduced the SPA proxy. Now you can also try and load the sample forecast data without the need to specify the host since everything is running from the ASP.NET Core server: Figure 11, Running the ASP.NET Core template If you look at the output from your ASP.NET Core application, you will be able to see the port where the Vue.js development server has started (Remember our middleware is finding a free port and explicitly telling the Vue.js development server to use it, so it can later proxy requests to such known port). This means you can open the Vue.js home page in the browser both by using the ASP.NET Core address and the Vue.js development server address! What the ASP.NET Core middleware is doing behind the scenes is proxying the requests to the Vue.js development server. Figure 12, ASP.NET Core (left) proxes requests to the Vue.js development server (right) At this point, it is worth mentioning you will see some errors in the console. This is caused by a known issue with ASP.NET Core trying to proxy all requests to the Vue.js development server and the web sockets used for hot reload. While hot reload will still work, you will see those errors during development. Note: The alternative SPA template we will see later does not have this problem. Another issue worth mentioning is that if you start the application from Visual Studio using the IISExpress profile, the npm process is not closed upon stopping the application! This means the Vue.js development server is left running (if you get the port the development server was started, you will be able to still load it on the browser, like in Figure 12) until you manually kill that process from the Task Manager. This does not happen when starting with dotnet run, so you might want to keep using the alternate launch profile rather than IISExpress. While everything will work since every time you start the server, a new free port is assigned to the Vue.js development server, the amount of running processes can become quite a burden after a few debugging sessions. It is possible to debug C# and JavaScript code at the same time from both Visual Studio and Visual Studio Code. But before we can do so, we need to update the generated source maps so their path is from the root of the project folder and not just from the ClientApp folder. Fortunately for us, this is something relatively easy to do with the webpack development server used by Vue.js, with Vue.js giving us a hook to update the webpack configuration in the form of the vue.config.js file. You just need to create such a file with the following contents: module.exports = { configureWebpack: { // Using source-map allows VS Code to correctly debug inside vue files devtool: 'source-map', // Breakpoints in VS and VSCode won’t work since the source maps // consider ClientApp the project root, rather than its parent folder output: { devtoolModuleFilenameTemplate: info => { const resourcePath = info.resourcePath.replace('./src', './ClientApp/src') return `webpack:///${resourcePath}?${info.loaders}` } } } } Once created, make sure you have enabled Script debugging in Visual Studio and start debugging. Set a breakpoint in the ClientApp/src/router.js file and reload the page, notice the breakpoint is hit in Visual Studio and that Chrome shows it is stopped by a debugger! Figure 13, enabling script debugging in Visual Studio Figure 14, Debugging Vue’s JavaScript code from Visual Studio on F5 Debugging in Visual Studio Code requires you to install the C# extension as well as the Debugger for Chrome extension. When opening the project for the first time after adding the extensions, accept the suggestion to add common .NET Core tasks, which should add a tasks.json file. Then add launch configurations to start the ASP.NET Core application (without starting the browser) and another to launch the Chrome debugger (this one starts the browser). Finally add a compound task to launch both. The tasks should look similar to this: { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: "version": "0.2.0", "compounds": [ { "name": ".NET+Browser", "configurations": [ ".NET Core Launch (console)", "Launch Chrome" ] } ], "configurations": [ { "type": "chrome", "request": "launch", "name": "Launch Chrome", "url": "", "webRoot": "${workspaceFolder}/ClientApp/src", "sourceMaps": true, }, { "name": ".NET Core Launch (console)", "type": "coreclr", "request": "launch", "preLaunchTask": "build", "program": "${workspaceFolder}/bin/Debug/netcoreapp3.0/VueSPATemplate.dll", "args": [], "cwd": "${workspaceFolder}", "stopAtEntry": false, "launchBrowser": { "enabled": false }, "env": { "ASPNETCORE_ENVIRONMENT": "Development" }, }, { "name": ".NET Core Launch (web)", "type": "coreclr", "request": "launch", "preLaunchTask": "build", "program": "${workspaceFolder}/bin/Debug/netcoreapp3.0/VueSPATemplate.dll", "args": [], "cwd": "${workspaceFolder}", "stopAtEntry": false, "launchBrowser": { "enabled": true }, "env": { "ASPNETCORE_ENVIRONMENT": "Development" }, "sourceFileMap": { "/Views": "${workspaceFolder}/Views" } }, { "name": ".NET Core Attach", "type": "coreclr", "request": "attach", "processId": "${command:pickProcess}" } ] } You should now be able to launch the debugger selecting the “.NET+Browser” option, and setup breakpoints in both .NET and JavaScript code: Figure 15, Debugging Vue’s JavaScript code from Visual Studio Code It is important to raise a big caveat when debugging JavaScript in Visual Studio (but not in Visual Studio Code). This is the fact that Visual Studio doesn’t understand .vue files, forcing you to keep separate js/ts files if you really want to debug Vue components from Visual Studio. As said this limitation doesn’t apply to Visual Studio Code as long as you install the Vetur extension. Although in my opinion you are better off debugging in Chrome with the Vue dev tools extension, using the right tool for the job! When the Vue.js application bundles are generated with npm run build, these are generated into the ClientApp/dist folder. This is different from where the React template expects the generated bundles, so we will need to adapt the template for the bundles to be included in the published output and for the ASP.NET Core server to be able to serve them when deployed. First update the RootPath property in the call to AddSpaStaticFiles found in the ConfigureServices method of the Startup class: // In production, the Vue files will be served from this directory services.AddSpaStaticFiles(configuration => { configuration.RootPath = "ClientApp/dist"; }); Next update the csproj files, so the section that copies the generated bundles into the output looks in the ClientApp/dist folder: <DistFiles Include="$(SpaRoot)dist\**" /> That’s all, you will now correctly generate the Vue.js bundles and include them into the published output inside the ClientApp/dist folder, which the ASP.NET Core server is configured to serve as static files. As mentioned at the beginning of the section, Software Ateliers has already published a template following this approach. You can just install their template and use it when generating a new project, rather than manually going through the steps described above! (Although it is good for you to understand what’s going on under the covers.) The only thing you might want to add is the vue.config.js file with the source map rewrite that enables debugging from Visual Studio and Visual Studio Code. Although in my opinion, and as already mentioned earlier, you are better off debugging in Chrome with the Vue.js devtools extension, using the right tool for the job! The next section discusses a variant of this template that inverts the proxying role between the ASP.NET Core and Vue.js development servers. All of the official SPA templates plus the Vue.js SPA community template has taken the same approach. The ASP.NET Core application acts as the main server and proxies requests to a React/Angular/Vue.js development server launched during application startup. We can easily modify the middleware we created in the previous section so we invert the roles of the servers. We can keep launching everything when starting the ASP.NET Core application, launching the npm script during its Startup. However, we can then redirect the browser to the Vue.js development server and have this one proxying API requests to the ASP.NET Core application. Figure 16, Inverting the server roles during development. Vue.js development server now proxies to ASP.NET Core This will align every server closely to the role they actually play in the system. Keeping the Vue.js development server closer to the browser is a great idea for avoiding issues with its hot reload functionality. Instead of ASP.NET Core setting up a SPA proxy to the Vue.js development server, we will setup the Vue.js development server proxy to the ASP.NET Core application. We will also request the browser to initially load the root page “/” from Vue.js development server. This way the browser will initially load the Vue.js home page from the Vue.js development server, while any requests for an /api endpoint will be sent to the ASP.NET Core server by the Vue.js development server proxy. We will use the previous template as the starting point, since most of the changes we made to the official React template are still needed. If you are starting from scratch, it will be useful to go through the Manually adapting the template section of the earlier template, bearing in mind most of the changes will be located in the VueDevelopmentServerMiddleware. Feel free to download the code from GitHub if that helps. The first change we will make to the previous template is located in the vue.config.js file. We will use its dev server proxy option to send any requests towards the ASP.NET Core server that it cannot solve itself. Rather than hardcoding a URL, we will read its value from an environment variable ASPNET_URL that will be set by the VueDevelopmentServerMiddleware before starting the Vue dev server: module.exports = { configureWebpack: { // The URL where the .NET Core app will be listening. // Read the ASPNET_URL environment variable, injected by VueDevelopmentServerMiddleware devServer: { // When running in IISExpress, the env variable won’t be provided. // Hardcode a fallback here based on your launchSettings.json proxy: process.env.ASPNET_URL || '' }, // … devtool and output are same as in the earlier template … } } It is important to note the hardcoded fallback in case you run the project with IISExpress. The startup code does not know the public URL used by IISExpress and can’t inject the environment variable, so you need to hardcode the value here based on the contents of your launchSettings.json! Next, we will modify the StartVueDevServerAsync function of the VueDevelopmentServerMiddleware so it injects the ASPNET_URL environment variable. The value can be found by getting IServerAddressesFeature service: private static async Task<int> StartVueDevServerAsync( IApplicationBuilder appBuilder, string sourcePath, string npmScriptName, ILogger logger) { var portNumber = TcpPortFinder.FindAvailablePort(); logger.LogInformation($"Starting Vue dev server on port {portNumber}..."); // Inject address of .NET app as the ASPNET_URL env variable // which will be read it in vue.config.js from process.env // NOTE: When running with IISExpress this will be empty, // so you need to hardcode the URL in IISExpress as a fallback var addresses = appBuilder.ServerFeatures.Get<IServerAddressesFeature>().Addresses; var envVars = new Dictionary<string, string> { { "ASPNET_URL", addresses.Count > 0 ? addresses.First() : "" }, }; var npmScriptRunner = new NpmScriptRunner( sourcePath, npmScriptName, $"--port {portNumber} --host localhost", envVars); npmScriptRunner.AttachToLogger(logger); // the rest of the method remains unchanged, waiting to see “DONE” // in the script output and returning the portNumber } The biggest change will be made in the Attach method. Instead of calling SpaProxyingExtensions.UseProxyToSpaDevelopmentServer we will add middleware to: The Attach method will then look like: public static void Attach( IApplicationBuilder appBuilder, string sourcePath, string npmScriptName) { if (string.IsNullOrEmpty(sourcePath)) { throw new ArgumentException("Cannot be null or empty", nameof(sourcePath)); } if (string.IsNullOrEmpty(npmScriptName)) { throw new ArgumentException("Cannot be null or empty", nameof(npmScriptName)); } var logger = LoggerFinder.GetOrCreateLogger(appBuilder, LogCategoryName); // Start Vue development server var portTask = StartVueDevServerAsync(appBuilder, sourcePath, npmScriptName, logger); var targetUriTask = portTask.ContinueWith( task => new UriBuilder("http", "localhost", task.Result).Uri); // Add middleware that waits for the Vue development server to start // before calling the next middleware on the chain appBuilder.Use(async (context, next) => { // On each request gets its own timeout. That way, even if // the first request times out, subsequent requests could still work. var timeout = TimeSpan.FromSeconds(30); await targetUriTask.WithTimeout(timeout, $"The vue development server did not start listening for requests " + $"within the timeout period of {timeout.Seconds} seconds. " + $"Check the log output for error information."); await next(); }); // Redirect all requests for root towards the Vue development server, // using the resolved targetUriTask appBuilder.Use(async (context, next) => { if (context.Request.Path == "/") { var devServerUri = await targetUriTask; context.Response.Redirect(devServerUri.ToString()); } else { await next(); } }); } Now we need to update the UseVueDevelopmentServer method of the extension class. We no longer need to pass an ISpaBuilder, just pass both the IApplicationBuilder and sourcePath as parameters: public static void UseVueDevelopmentServer( this IApplicationBuilder appBuilder, string sourcePath = "ClientApp", string npmScript = "serve") { if (appBuilder == null) { throw new ArgumentNullException(nameof(appBuilder)); } VueDevelopmentServerMiddleware.Attach(appBuilder, sourcePath, npmScript); } Finally we replace the call to app.UseSpa at the end of the Configure method of the Startup class with this simple call: if (env.IsDevelopment()) { app.UseVueDevelopmentServer(); } Once you are done with these changes, you should now be able to start and debug the application the same way as before, including JavaScript code. Make sure you completed steps 1, 3 and 4 of the Manually adapting the template section since they are still relevant! Figure 17, Debugging with the alternate template from Visual Studio Code Figure 18, Debugging the alternate template with Visual Studio Vue.js is one of the fastest growing and most loved web frameworks. Just to name a couple of recent events, it was chosen both as the second most loved and second most wanted web framework in the 2019 Stack Overflow survey, and surpassed React in the number of GitHub stars during 2018. In my personal experience, most of the developers who have worked with Vue.js find it very attractive, intuitive and a pleasure to work with. Tooling like the Vue CLI, the Chrome Dev tools or the VS Code plugin Vetur make it even easier to work with it and develop web applications, while its plugin model and library ecosystem, makes it a very extensible and adaptable framework. It is a shame that it isn’t one of the frameworks with an official SPA template out of the box in ASP.NET Core. As of today, only React and Angular are officially supported. While things might change in the future, for now it is up to the community to fill the gap. In this tutorial, we have seen several approaches in which you can integrate Vue.js with ASP.NET Core, all of them using Vue.js applications generated by the Vue CLI. While the first approach is the obvious one of treating the Vue.js and ASP.NET Core applications as separate projects, we have also seen two other approaches in which they can be more tightly integrated for those who prefer that approach. One of these tightly integrated ways is a straight port of the React template and is already published as a NuGet package by Software Ateliers. The lack of an official template is unfortunate, but I hope this article gives you enough information to fill in the missing piece! Download the entire source code from GitHub.!
https://www.dotnetcurry.com/aspnet-core/1500/aspnet-core-vuejs-template
CC-MAIN-2022-27
refinedweb
5,276
57.47
In the previous article, “Getting Started with Microsoft Orleans 2.0 in .NET Core“, we saw how to quickly set up a minimal Orleans 2.0 silo and client (in the same application) and run it on Linux thanks to .NET Core. However, if you’re serious about using Microsoft Orleans in a production environment, your setup won’t be this simple. You’ll need to create an appropriate project structure, introduce reliability, and add certain optimisations. We’ll be covering these in this article. You’ll also want to look into things like clustering providers which are out of scope here. The source code for this article is the Orleans2GettingOrganised folder in the Gigi Labs BitBucket repository. General Architecture Before we go on, it is important to understand what the typical components in an Orleans solution look like. An Orleans cluster consists of a number of Note: You can run a single-silo cluster, but that would be a single point of failure. You need multiple silos to achieve high availability. A single-silo cluster is typically only used for development and testing. An Orleans client is used as a gateway between the Orleans cluster and the outside world. The name is actually misleading, because while it is a client to the Orleans cluster, it is typically also a server to external requests. For example, the Orleans client could be a REST API that accepts HTTP requests and interacts with grains in the Orleans cluster accordingly. Or it could be a Console App running as a Windows service with Topshelf. The project type is arbitrary. Project Structure The projects in an Orleans 2.0 solution should look something like this: Instead of clicking through Visual Studio to set this all up every time, we can use the dotnet command to automate this setup. This not only allows us to build this project structure quickly next time, but allows us to set this up on other platforms (e.g. Linux) in an IDE-agnostic manner. We’ll use the --no-restore switch to prevent restoring packages with every command, which would take ages. We can do a separate dotnet restore at the end once everything is set up. First, let’s make a folder for the solution: mkdir Orleans2 cd Orleans2 Set up the Contracts project, which will hold our grain interfaces: dotnet new classlib --name Contracts --no-restore dotnet add Contracts/Contracts.csproj package Microsoft.Orleans.Core.Abstractions --no-restore dotnet add Contracts/Contracts.csproj package Microsoft.Orleans.OrleansCodeGenerator.Build --no-restore Set up the Grains project: dotnet new classlib --name Grains --no-restore dotnet add Grains/Grains.csproj package Microsoft.Orleans.Core.Abstractions --no-restore dotnet add Grains/Grains.csproj package Microsoft.Orleans.OrleansCodeGenerator.Build --no-restore dotnet add Grains/Grains.csproj reference Contracts/Contracts.csproj Set up the Silo project: dotnet new console --name Silo --no-restore dotnet add Silo/Silo.csproj package Microsoft.Orleans.Server --no-restore dotnet add Silo/Silo.csproj package Microsoft.Extensions.Logging.Console --no-restore dotnet add Silo/Silo.csproj package OrleansDashboard --no-restore dotnet add Silo/Silo.csproj reference Contracts/Contracts.csproj dotnet add Silo/Silo.csproj reference Grains/Grains.csproj Set up the Client project: dotnet new webapi --name Client --no-restore dotnet add Client/Client.csproj package Microsoft.Orleans.Client --no-restore dotnet add Client/Client.csproj package Microsoft.Extensions.Logging.Console --no-restore dotnet add Client/Client.csproj reference Contracts/Contracts.csproj Finally, create a solution that includes all the above projects: dotnet new sln --name Orleans2 dotnet sln Orleans2.sln add Contracts/Contracts.csproj dotnet sln Orleans2.sln add Grains/Grains.csproj dotnet sln Orleans2.sln add Silo/Silo.csproj dotnet sln Orleans2.sln add Client/Client.csproj Before we proceed, let’s build this solution to make sure it actually works. dotnet build restores packages as part of the build so there’s no need to do a dotnet restore separately. dotnet build It will take a little while to go through the restore, build and codegen steps, but it should work: And there’s no reason why it shouldn’t work on Linux as well: Setting Up an Example Before proceeding with other things we need in a proper Orleans 2.0 solution, let’s set up a little example we can work with. This time, we’ll have a GameGrain that keeps track of players in a game. It will support three operations: Join, Leave, and List Players. To keep things simple, the grain will maintain the list of players in memory. This means that the player list won’t survive any failures or grain reactivations. In the Contracts project, add a grain interface: public interface IGameGrain : IGrainWithIntegerKey { Task JoinAsync(string playerName); Task LeaveAsync(string playerName); Task<List<string>> ListPlayersAsync(); } In the Grains project, add the grain itself: public class GameGrain : Grain, IGameGrain { private HashSet<string> players; public GameGrain() => this.players = new HashSet<string>(); public Task JoinAsync(string playerName) { this.players.Add(playerName); return Task.CompletedTask; } public Task LeaveAsync(string playerName) { this.players.Remove(playerName); return Task.CompletedTask; } public Task<List<string>> ListPlayersAsync() => Task.FromResult(this.players.ToList()); } In the Silo project, our silo startup code will be pretty much the same as in the previous article: public static async Task Main(string[] args) { var siloBuilder = new SiloHostBuilder() .UseLocalhostClustering() .UseDashboard(options => { }) .Configure<ClusterOptions>(options => { options.ClusterId = "dev"; options.ServiceId = "Orleans2GettingOrganised"; }) .Configure<EndpointOptions>(options => options.AdvertisedIPAddress = IPAddress.Loopback) .ConfigureLogging(logging => logging.AddConsole()); using (var host = siloBuilder.Build()) { await host.StartAsync(); Console.ReadLine(); } } Remember that we need at least C# 7.1 to allow async/ await in Main(). If you’re targeting Windows, you may want to add Topshelf to make a Windows service out of your silo. However, since this is application-specific, we won’t be covering it here. The way we set up our Orleans client in the Client project is going to be a bit different from what we did in our previous article, because now we’re dealing with an ASP .NET Core Web API. We can put the basic client connection code in a new helper method within the Startup class: private IClusterClient CreateOrleansClient() { var clientBuilder = new ClientBuilder() .UseLocalhostClustering() .Configure<ClusterOptions>(options => { options.ClusterId = "dev"; options.ServiceId = "Orleans2GettingOrganised"; }) .ConfigureLogging(logging => logging.AddConsole()); var client = clientBuilder.Build(); client.Connect().Wait(); return client; } Note how we’re calling the blocking Wait() instead of doing the usually recommended await when connecting. This is because we’re going to be calling this from the methods in the Startup class, which are synchronous. Not only is there no way to do async in there, but it actually makes sense not to. You want to wait until your services are fully configured before beginning to accept requests. We can then register the client in the ASP .NET Core IoC container, by adding the following code to the ConfigureServices() method: // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { var orleansClient = CreateOrleansClient(); services.AddSingleton<IClusterClient>(orleansClient); services.AddMvc(); } We now need to add a controller that can accept requests and use the Orleans client to interact with the cluster: [Produces("application/json")] [Route("api/Games")] public class GamesController : Controller { private IClusterClient orleansClient; public GamesController(IClusterClient orleansClient) { this.orleansClient = orleansClient; } [HttpGet] public Task<List<string>> Get(int gameId) { var grain = this.orleansClient.GetGrain<IGameGrain>(gameId); return grain.ListPlayersAsync(); } [HttpPut] public async Task Put(int gameId, string playerName) { var grain = this.orleansClient.GetGrain<IGameGrain>(gameId); await grain.JoinAsync(playerName); } [HttpDelete] public async Task Delete(int gameId, string playerName) { var grain = this.orleansClient.GetGrain<IGameGrain>(gameId); await grain.LeaveAsync(playerName); } } In order to test this, we need to make sure that the silo has fully started before we start the client. We also need a way to interact with the API. We can add Swagger to the Web API, or use some other tool such as Postman, Fiddler or curl. It should work nicely: Client Retries This is all well and good, but having to wait for the silo to be up before starting the client is silly. This can be tedious and brittle when debugging locally or during deployments. Ideally the client should keep trying to connect to the silo until it is available. We can do that by putting the client creation and connection code within a loop: private IClusterClient CreateOrleansClient() { while (true) // keep trying to connect until silo is available { try { var clientBuilder = new ClientBuilder() .UseLocalhostClustering() .Configure<ClusterOptions>(options => { options.ClusterId = "dev"; options.ServiceId = "Orleans2GettingOrganised"; }) .ConfigureLogging(logging => logging.AddConsole()); var client = clientBuilder.Build(); client.Connect().Wait(); return client; } catch (Exception) { Thread.Sleep(3000); // log a warning or something } } } Now it might seem super weird that we’re going through the hassle of recreating the ClientBuilder, building that into a client, and doing the reconnect, every time. And it is. By some strange design decision, these APIs don’t let you call ClientBuilder.Build() more than once, nor do they let you call Connect() on a client that has already failed. This means that you have to recreate everything with each connection attempt, which is tedious and inefficient. Also, connection failures result in an OrleansException, which doesn’t really distinguish between different kinds of failures. If you want to distinguish between an intermittent connection failure and some catastrophic event… good luck with that. client.Connect(async ex => { // replace Console with actual logging Console.WriteLine(ex); Console.WriteLine("Retrying..."); await Task.Delay(3000); return true; }).Wait(); Server Garbage Collection The Orleans documentation recommends configuring .NET garbage collection as an optimisation to get better performance from your silos. In a .NET Core project, this means adding the following two settings to the .csproj file (in the full .NET Framework it’s different): <ServerGarbageCollection>true</ServerGarbageCollection> <ConcurrentGarbageCollection>true</ConcurrentGarbageCollection> This should in theory fix the following warnings: Unfortunately, this doesn’t work at the time of writing this article. Hopefully they’ll fix it sometime soon. Application Parts In Orleans 1.x, complaints about silo start times were common. Orleans would scan all the assemblies in the executable’s folder looking for grains, leading to long start times for larger projects. It still does this in Orleans 2.0 by default, but now you can be more explicit and tell it where to look if you want. Orleans 2.0 introduces something called application parts (based on ASP .NET Core naming, apparently), which is just a really bad way of saying “places from where to load grains”. I’ve already expressed concerns over how unintuitive this part of the API is to work with. Thankfully, it’s not something you’ll need all the time. You can usually ignore the existence of this feature, and use it only when you notice slow startup times and want to optimise them. Summary In this article, we’ve seen a number of things that take us closer towards having a production-ready Orleans setup. These include: - A better project structure. - A Web API serving as a client to the Orleans cluster. - Client retries. - Server garbage collection. - Application parts (grain sources). As part of all this, we’ve also seen how to automate creation of our Orleans 2.0 solution and projects, and how to interact with an Orleans cluster via a REST API. We haven’t, however, covered everything you’d typically have in a full solution. Some enhancements you may also need (which are beyond the scope of this article) include: - Using Topshelf to install the Client/API as a Windows service (if deploying on Windows). This can also be done for the Silo, if it’s not going to be run under IIS. - Configuring actual endpoints rather than using localhost. - Adding Swagger to the Client/API (the source code for this article does include it, but we haven’t covered it since I have a separate article on that). - Setting up dependency injection. - Setting up Orleans clustering (and running multiple silos). 2 thoughts on “Getting Organised With Microsoft Orleans 2.0 in .NET Core” Hi, there! I think the new link for Graceful Shutdown has changed to this: Best regards!
http://gigi.nullneuron.net/gigilabs/getting-organised-with-microsoft-orleans-2-0-in-net-core/
CC-MAIN-2020-05
refinedweb
2,020
50.94
Signature _____________________ CSE 11 Name ________________________ Quiz 3 cs11f ____ Fall 2009 Student ID ____________________ This quiz is to be taken by yourself with closed books, closed notes, no calculators. What is the output produced by this program? (Hint: Draw Stack Frames!) public class Mystery { public static void main( String[] args ) { Mystery ref = new Mystery(); System.out.println( ref.mystery( 5 ) ); } private int mystery( int a ) { int b = a + 3; if ( b >= 6 ) { System.out.println( b ); b = a + mystery( a - 1 ); System.out.println( a ); } else { System.out.println( "Whoa!" ); b = a; System.out.println( a ); } return b; } } (over) Output View Full Document This preview has intentionally blurred sections. Given the following definitions: And the following variable definitions: private Puppy puppy; private Kitty kitty; private Speakable speakable; Indicate which are valid Java statements. Consider each statement executed sequentially in the order it appears. - Spring '10 - CS - public String speak, private Kitty kitty Click to edit the document details
https://www.coursehero.com/file/6066178/Quiz3fa09/
CC-MAIN-2017-51
refinedweb
159
58.99
Oct 10, 2017 06:42 AM|SkyDriving|LINK Hi, newBie here, I did the following. Problem: When I open the SQL Server Object explorer from Menu in VS2017, I didnot find my database call UserRegistryDB. Please help. 1) I have installed SQLServer 2016 EXPRESS 2) a) add EntityFramework to reference in the project. b) I have created a Class : UserDBContext.cs in Model-Folder public class UserDBContext : DbContext { public DbSet<User> Users { get; set; } } 3) I have added a model class in Model-Folder public class User { public int Id { get; set; } public string emailID { get; set; } public string AppName { get; set; } public string SessionToken { get; set; } } 4) I have added below : in Web.Config <connectionStrings> <add name="UserDBContext" connectionString="server=.; database= UserRegistryDB; integrated security = true;" providerName ="System.Data.SqlClient"/> </connectionStrings> 5) Build and run no compilation error, build success. I need help with the Question: What are the differences in ConnectionString that using server =. , server=(local) ? or server=(localdb) a) connectionString="server=. ; database= UserRegistryDB; integrated security = true;" b) connectionString="Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=TestDatabase;Integrated Security=True" Thanks Oct 10, 2017 01:55 PM|mgebhard|LINK The dot and (local) are your machine name. (localdb) is usually SQL Express. It depends on how you setup SQL Express and if you installed other versions of SQL. You can figure out what to have by looking at the SQL services you have running. Other than that, I think you should take a look at the Web API code first tutorials for step-by-step assistance. Or see the MVC code first tutorials. Oct 10, 2017 03:22 PM|SkyDriving|LINK @ mgebhard I have read the links you have provided. I still dont find the solution. I did the following: 1) in Services: I have turned on the SQLEXPRESS and SQL Server Browser 2) In VS Menu : I check on SQL server Object Explorer ---> Nothing I check Server Explorer--> Nothing 3) I check my System, I have the following Microsoft SQL server 2016 (64-bits) Microsoft SQL Server 2016 LocalDB Microsoft SQL Server 2017 RC1 What else I missed out? Thanks Oct 10, 2017 06:27 PM|mgebhard|LINK I'm not sure what problem you are trying to solve. I assume you need to figure out what SQL instance to have running. Try the follow doc which shows how to browser SQL instances. If you are having creating the DB using code first, then it is not clear if enabled or created migrations. Perhaps you are not on that step yet? Anyway, the previous docs explain how to enable migrations. Oct 11, 2017 01:48 AM|SkyDriving|LINK I downloaded SQLServer Express 2016 and installed by default installation ( no user's own instance created). 1)I have checked the settings using Mixed Windows and QL Server authentication. 2) Turn on SQLEXPRESS and SQL Server Browser 3) Have enable NamedPipe and TCP/IP. So, I would like to know it is EntiryFramework Code First is not working? Thanks All-Star 44701 Points Microsoft Oct 11, 2017 09:00 AM|Zhi Lv - MSFT|LINK Hi SkyDriving, You can try below connection string: <add name="UserDBContext" connectionString="Data Source=(localdb)\MSSQLLocalDB; Initial Catalog= UserRegistryDB; Integrated Security=True;" providerName ="System.Data.SqlClient"/> Then, rebuild and run the application, the result as below: If still not working, I suggest you could create a database first, then, refer to the following articles to add SQL DataBase connection from Server Explorer: And, when using EF code first, you could assign the database connection string. code as below: public partial class UserDBContext: DbContext { public UserDBContext() : base("name=UserDBContext") // connection string name { } Then, using Migration to generate the data tables. Best regards, Dillion Oct 11, 2017 10:19 AM|SkyDriving|LINK @Zhi Lv I will try your approach soon. I have changed to use other method : 1) Create DB and table in SSMS . BTW, Your Image show: (X ) UserDBContext(APIEF) 1) If I use SSMS to view , will this UserRegistryDB as Database appear there? If It is there, this means this DB is not residing in VS2017, right? 2) Your Image show (X ) UserDBContext(APIEF), is this DB residing in VS2017 or in MS SQL Server? 3) Why there is a X ? Is that means I have to Click to connect the DB? It will Not Connect automatically? Thanks Oct 11, 2017 11:07 AM|mgebhard|LINK SkyDriving3) Why there is a X ? Is that means I have to Click to connect the DB? It will Not Connect automatically? Yes, you must create a connection just like SSMS. Or you can read my last post which explains how to search you local system for SQL instances. Sincer you connected with SSMS, simply use the same connection in VS 2017. All-Star 44701 Points Microsoft Oct 12, 2017 07:57 AM|Zhi Lv - MSFT|LINK Hi SkyDriving, SkyDrivingWhy there is a X ? Is that means I have to Click to connect the DB? It will Not Connect automatically The "X" means the connect not open, you could right click the connection name and refresh the connection. Then, the result as below: After refresh the connection, if the connection still not open, you could refer to my previous reply or mgebhard's post to re-connect the database. Besides, I suggest you could also try to add the SQL Server DataBase from Visual Studio 2017. Please refer to the following steps: Right click your project--> select "Add"--> select "New Item"--> on the Data tap, select "SQL Server DataBase". screenshot as below: Then, the connection string in web.config file as below: <connectionStrings> <add name="ConnectionString" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings> Best regards, Dillion 9 replies Last post Oct 12, 2017 07:57 AM by Zhi Lv - MSFT
https://forums.asp.net/t/2130092.aspx?How+to+create+a+Database+with+table+in+WebApi+with+Code+First+approach+
CC-MAIN-2018-30
refinedweb
969
55.44
Articles Index Version 5 of the Java Platform, Enterprise Edition (Java EE, formerly referred to as J2EE), has arrived. Its streamlined features offer added convenience, improved performance, and reduced development time, all of which enable developers to bring products to market faster. To get an update on the Java EE 5 platform, we met with Java EE specification lead Bill Shannon, a Distinguished Engineer at Sun Microsystems. Shannon has been with Sun since 1982 and previously worked on the JavaMail API, the HotJava Views product, the Common Desktop Environment (CDE), the Solaris Operating Environment, and all versions of SunOS. He graduated from Case Western Reserve University with an MS in Computer Engineering. Can you give developers some specific ways that Java EE 5 will reduce the amount of code they need to write? There are so many ways we've made life simpler for developers, it's hard to know where to start. To some extent, the amount of improvement you'll see is based on the tools you use. I think one of the biggest improvements is that, in most cases, you no longer need to use deployment descriptors. Even something as simple as combining modules together into an "ear" file used to require a deployment descriptor to list where the modules were. Now all you need to do is to put the modules in the ear file in an obvious way, follow some simple conventions like putting all your shared libraries in the "lib" directory, and that's it. Here's a simple programming example. Previously, to create a web service, you needed to write a Java interface that describes the web service API, a Java class that implements the web service, a deployment descriptor that tells the container about the web service, and a configuration file that tells the web service runtime how to map Java classes to web service operations. Much of this was boilerplate that changed little from application to application. In Java EE 5 all of this can be done by writing a single Java source file -- the class that implements the web service. The rest is taken care of for you by the container, based on annotations you include in your source code, and based on default rules for what to do when no annotations are present. Here's the complete source code for a simple web service: package endpoint; import javax.jws.WebService; @WebService public class Hello { public String sayHello(String param) { return "Hello " + param; } } Can you estimate how much time a developer would save in developing an enterprise application with Java EE 5 compared with J2EE 1.4? Of course that's difficult to measure and depends a lot on the type of application you're developing. For a relatively simple app, the time to develop the application may be proportional to the number of lines of code in the app. For simple apps, we've probably reduced the number of lines of code you need by half. And if you factor in the reduction in the number of concepts you need to understand in order to write such apps, the time to develop the application is even less. For larger enterprise class apps, the bulk of the application is likely to be the actual business logic of the app, and the reduction in lines of code won't be as great. But the reduction in the number of concepts you need to learn will help, and the overall simplification will reduce the drudgery of creating such an app. You really can focus all your attention on your business logic. Take us through the importance of annotations in Java EE 5. Java EE has always promoted a declarative approach for many aspects of enterprise application development. Without support in the Java language for this style of programming, we used external files -- deployment descriptors -- to hold this declarative information. The use of annotations allows us to move this information into the source code, which is where it belongs in most cases. So, instead of calling an API to request the container to do something for you, and instead of writing a deployment descriptor that has to be synchronized with the code you're writing, you can put your request for the container right in the code. You can say "please expose this class as a web service" or "please start a transaction when this method is called". Of course, this new capability in no way removes or interferes with older capabilities. There are cases in which a deployment descriptor is the right approach, and you can continue to use them when desired. If you could speak to an audience of 1000 talented developers who were on the fence, and considering moving to Java EE 5, what would you say to them? This is not your father's J2EE! If you were scared off of J2EE because it seemed too complex, it's time to take another look. If you've been attracted to alternative technologies such as Spring and Hibernate, you'll find many of the good ideas from those technologies in Java EE 5. Take a look at Java EE 5, you'll be amazed at how easy it is. Tell us how the EJB programming model has been simplified in EJB 3.0. How does the use of Plain Old Java Objects (POJOs) in EJB 3.0 make programming easier? First, it's important to understand that the thing people have been calling "EJB 3.0" is really two separate things. The core of EJB 3.0 is a great simplification of the classic EJB programming model. But probably the most exciting work done by the EJB expert group is the new Java Persistence API. Java Persistence is in many ways a replacement for EJB CMP (Container Manager Persistence), although CMP is still fully supported. Java Persistence is a much simpler approach to mapping Java objects to relational databases, and benefits greatly from work done in other products and technologies such as Hibernate, TopLink, and Java Data Objects (JDO). The lessons we've learned from them, and from years of using EJB CMP, led us to create Java Persistence. Java Persistence is a significant departure from EJB CMP, and more resembles those other technologies. Java Persistence is based on POJOs with annotations. Java Persistence is available both as part of Java EE, and for use outside Java EE in a Java SE environment. In addition, we've greatly simplified the basic EJB programming model. It is much easier to write a stateless or stateful component that takes full advantage of the transactional capabilities of the EJB container. EJB components can be written as POJOs with, for example, a simple @Stateless annotation. By default, the public methods of the component will be exposed to clients and will run in a transaction. Additional annotations can be used to control security requirements for methods and transaction requirements. @Stateless How does the addition of JavaServer Faces (JSF) make web application design more convenient? JSF makes web application development more convenient both in the ease with which you can write web application code, and in the code that you never have to write at all. There is a large third-party component market for JSF, which means the developer has the option to leverage high quality commercial off-the-shelf components in their application. JSF is a Java Community Process (JCP) standard that already has broad adoption from major vendors such as IBM, Oracle, BEA, JBoss, and Borland. With such market penetration, you can be sure that your investment in JSF will be preserved. The technical convenience of JSF stems from its component model, which allows page authors to compose their user-interface at a higher level of abstraction than previous technologies. JSF presents a Swing-like event model for web applications that works very well with tools. Lastly, JSF is very adaptable and extensible. Existing popular technologies such as Spring and Hibernate have included JSF adapters to allow their use with JSF. Naturally, because JSF is a part of Java EE 5, it integrates very well with Java Persistence and EJB 3.0. Let's talk about Service-Oriented Architecture (SOA), which is regarded by many as the next big thing. Java EE 5 includes simplified web services support and the latest web services APIs, making it an ideal implementation platform for SOA. Tell us about this. The web services support in Java EE 5 is based on the JAX-WS (Java API for XML Web Services) and JAXB (Java API for XML Binding) APIs, and the web services metadata support defined by JSR 181. JAX-WS is mostly based on JAX-RPC (Java API for XML-based Remote Procedure Calls), but has been improved to better support the latest web service standards and programming styles. JAXB 2.0 is a significant improvement over JAXB 1.0, which adds full support for W3C XML schemas. JAXB is used to map Java classes to XML data and is used by JAX-WS to encode and decode data that is sent in web services calls. Once again, the use of annotations makes it much easier to create and use web services. JSR 181 defines the annotations that are used with JAX-WS to define web services. In the simplest case a POJO is annotated with the @WebService annotation to make it a web service, as I previously described. JAXB also uses annotations to control the mapping to XML. Both JAX-WS and JAXB provide useful defaults so that it's often not necessary to use most of the annotations they provide. The simple cases "just work" and the more complex cases are made easy through the use of annotations. Why should a developer who has never before used Java technology try Java EE 5? The many improvements in Java EE 5 make it much more user-friendly for first-time Java developers, most of whom will want to start with an integrated development environment such as NetBeans or Sun Java Studio Creator. The IDE can help take you through the steps of creating a Java EE application. You'll find that many applications can easily be created without detailed knowledge of Java programming. As we talked about earlier, JSF is a key to creating simple web user interfaces using off-the-shelf components. But an IDE is not necessary to create Java EE applications. Some first time Java EE developers might prefer to start by writing simple JSP pages, making use of the JSP expression language, and never need to learn the Java language at all. What should developers understand about the Sun Java System Application Server PE 9.0? The Sun Java System Application Server, Platform Edition 9.0 -- that's a mouthful! -- is Sun's product version of the GlassFish code that serves as the reference implementation for Java EE 5. The PE application server is suitable for development and small scale deployment. Sun will also make available an EE (Enterprise Edition) version of the application server that will include more advanced features such as five nines availability. The PE application server, built from the GlassFish code, is the application server included in the Java EE 5 SDK, as well as our development tools such as NetBeans and Java Studio Creator. What is the significance of Glassfish and the open source community? And what should the open source community understand about Java EE 5? The GlassFish community is building a free, open source application server that implements all of Java EE 5. GlassFish includes both Sun and non-Sun contributors. For instance, the Java Persistence implementation in GlassFish is contributed by Oracle. GlassFish really is a community effort. If you're interested in helping to build the reference implementation of the Java EE spec, GlassFish is the place to be. GlassFish is free, and it is open source. I repeat: GlassFish is free, and it is open source. GlassFish uses the OSI-certified CDDL license. How can developers contribute to the future of Java EE? There are many ways to contribute to the future of Java EE 5. Perhaps the best approach is to go to the Java EE hub page, read the tutorial, download the SDK, try it out, and send us feedback! Developers who are interested in understanding "how it all works" will definitely want to explore GlassFish. The GlassFish site also includes tips and examples that will be useful to developers. Developers who want to get involved in contributing to the GlassFish project will find instructions there. Finally, developers who want to contribute directly to the development of future Java EE specs should become JCP members, review draft specs, and consider participating in future expert groups to develop specs. If you were pressed to name the single most important thing to know about Java EE 5, what would it be? It's hard to name just one thing. Certainly the thing that pervades all of Java EE 5 and is key to the simplified programming model is annotations. We've used annotations to make it much easier to deal with persistence, web services, transactions, security, and all the other powerful capabilities of Java EE. We expect that developers will quickly understand and embrace the annotation approach to application development and will then move on to explore the improved persistence and web service capabilities in Java EE 5.
http://java.sun.com/developer/technicalArticles/Interviews/shannon_qa.html
crawl-002
refinedweb
2,236
52.6
I am working on a web application which works on SQL sever back end as well as Sybase ASE 12.5.4 EA server. Our project main focus was to move everything to sybase backend. Earlier there were 2 databases, the app was connecting to - db1 on sql server, and db2 on sybase. Now we have created a separate namespace within db2 in sybase. So application only connects with db2, but with different users and in separate schemas. Application is in java and connecting to db server using jcon3 driver library. It is using SybXADataSource driver class (provided by jcon3 jar) to connect to the server. Till last week application was able to connect to the server, everything was working fine (though I must say that code is still not optimized to use connection pools etc., I am opening a connection, and closing it for every request). For sometime, I have been facing an issue from the server- login failed, try again. In the server error logs I found it was throwing an error- "Error 1601 Severity 17 state 3: no user connections available to run the process" I checked for available connections (using sp_configure), allowed connections are 900, and total active connection at the time this error shows up is typically between 30- 100 (using sp_monitorconfig). Seems like this is well within limits. Also yesterday, I did one more exercise, I restarted the server and logged in as sa from isql console only. Logged out and logged in again afimeter 20 minutes (no application connection was made), and isql login again gave this error. So I am inclined to think that something could be wrong with server configuration as well. Server is on linux red hat. I have searched all the db forums and SCN website as well, and all of these refer to one resolution of increasing the number of connections, but as from my observation regarding that, I do not think it is an issue. Any help would be greatly appreciated!!
https://answers.sap.com/questions/10917779/sybase-ase-1254-ebf-14124-esd4-running-out-of-conn.html
CC-MAIN-2022-33
refinedweb
334
62.17
Newb to Python and Pythonista when I create a script named 'mymodule' with class named 'myclass' in the Pythonista editor I can import that module from the console, instantiate the the class and test from the console. However when I make changes in the editor, and repeat that procedure my changes are not reflected in the console. I have tried 'reload' but that fails with an exception saying that module doesn't exist. I assume this due to my Python ignorance. Version 1.5 which I have, should be saving and reloading my script file containing the changes. But no go. If I restart Pythonista it then works. What am I doing wrong? The code seems to be correct and we are talking hello world level here. Kithara Try: import mymodule ; reload(mymodule) You can also tap and hold on the clearbutton at the top right of the console window to restart Pythonista. @Kithara I usually just double tab the home button, close, then reopen Pythonista. Clear seems to take longer. I havent tried @ccc 's trick. Did you try executing the modified script (by tapping the "play" button) before importing it from the console?
https://forum.omz-software.com/topic/1307/newb-to-python-and-pythonista
CC-MAIN-2021-43
refinedweb
195
74.49
Can I use more than 1 computer to transcode a video file using ffmpeg at the same time? or is there any free software on ubuntu that allows such a thing? i have ubuntu 18.04 32 bit running on my laptop. So if i get another laptop (say running the same ubuntu version) would such a thing be possible? Thank You + Reply to Thread Results 1 to 7 of 7 Thread - - Haven't tried it, but first thing google throws at me when searching for "distributed encoding ffmpeg" is and there are other results which look like they might do what you want. -> did you try any of them?users currently on my ignore list: deadrats, Stears555 - - I think this would work well for you. This script breaks a video file into chunks that each system works on (distributing the task of encoding). You can tweak the codecs that ffmpeg uses or leave it as-is. You need 2 or more systems running Linux with ffmpeg installed. The system with the script should have access to the other ones, so you should run ssh-keygen first on all of the systems and then on the system with the script, run ssh-copy-id [server] from the system with the script against all other systems. Be sure to replace [server] with the server name of the other systems. Update the "SERVERS" variable in the script with the names of the servers that will be processing the video. Use the script to run a benchmark and it will automatically figure out how to divide the load so that your file is processed in the fastest way possible. If the processors are equal, then the 2nd node will cut your processing time in half. When all is done, you have to join the fragments by running the script with the join command. Last edited by mediaencoder; 31st Dec 2018 at 11:55. Similar Threads Can I force ffmpeg to transcode 59.94 frames to display at 25 frames per seBy oduodui in forum EditingReplies: 4Last Post: 28th Apr 2018, 10:24 FFmpeg transcode .m3u8 return (401 Unauthorized authorization failed)By qoraiche in forum Video Streaming DownloadingReplies: 3Last Post: 9th Nov 2017, 20:42 [Seeking Devs] Cloud Transcode: Distributed FFMpeg in the CloudBy koxon in forum ProgrammingReplies: 31Last Post: 24th Feb 2017, 04:24 I cannot download a video file by using ffmpegBy neroman00 in forum Video Streaming DownloadingReplies: 4Last Post: 26th Jun 2016, 14:28 Cloud Transcode: Distributed FFMpeg in the CloudBy koxon in forum Video ConversionReplies: 2Last Post: 9th Mar 2014, 22:41
https://forum.videohelp.com/threads/390525-Can-is-use-more-than-1-computer-to-transcode-a-video-file-using-ffmpeg-at-t?s=8559abb3f02c755320f268a821d25589
CC-MAIN-2020-16
refinedweb
432
76.66
#include <time.h> time_t mktime(struct tm *timeptr); −1 means 1 hour before midnight, tm_mday of 0 means the day preceding the current month, and tm_mon of −2 original). If the calendar time can be represented in an object of type time_t, mktime() returns the specified calendar time without changing errno. If the calendar time cannot be represented, the function returns the value (time_t)−1 −1 can be a valid return value for the time that is one second before the Epoch. The user should clear errno before calling mktime(). If mktime() then returns −1, the user should check errno to determine whether or not an error actually occurred. The mktime() function assumes Gregorian dates. Times before the adoption of the Gregorian calendar will not match historical records. = −1; if (mktime(&time_str)== −1) time_str.tm_wday=7; printf("%s\n", wday[time_str.tm_wday]); See attributes(5) for descriptions of the following attributes: ctime(3C), getenv(3C), TIMEZONE(4), attributes(5), standards(5)
http://docs.oracle.com/cd/E36784_01/html/E36874/mktime-3c.html
CC-MAIN-2015-18
refinedweb
161
56.76
by Nathan Sebhastian How to set up & deploy your React app from scratch using Webpack and Babel So you’ve been using create-react-app a.k.a CRA for a while now. It’s great and you can get straight to coding. But when do you need to eject from create-react-app and start configuring your own React application? There will be a time when we have to let go of the safety check and start venturing out on our own. This guide will cover the most simple React configuration that I’ve personally used for almost all of my React projects. By the end of this tutorial we will have our own personal boilerplate and learn some configurations from it. Table of Contents - Why create your own configuration? - Configuring webpack 4 - Configuring Babel 7 - Adding Prettier - Adding source map for better error logs - Setting up ESLint - I found errors! What do I do? - Adding CSS LESS processor - Deploying React app to Netlify - Conclusion Why create your own configuration? There are certain reasons that make creating your own React configuration make sense. You are likely good with React and you want to learn how to use tools like webpack and Babel on your own. These build tools are powerful, and if you have some extra time, it’s always good to learn about them. Developers are naturally curious people, so if you feel you’d like to know how things work and which part does what, then let me help you with it. Furthermore, hiding React configuration by create-react-app is meant for developers starting to learn React, as configuration should not stand in the way of getting started. But when things get serious, of course you need more tools to integrate in your project. Think about: - Adding webpack loaders for less, sass - Doing server side rendering - Using new ES versions - Adding MobX and Redux - Making your own configuration just for learning sake If you look around the Internet, there are some hacks to get around CRA limitations like create-react-app rewired. But really, why not just learn React configuration on your own? I will help you get there. Step by step. Now that you’re convinced to learn some configuration, let’s start by initializing a React project from scratch. Open up the command line or Git bash and create a new directory mkdir react-config-tutorial && cd react-config-tutorial Initialize NPM project by running: npm init -y Now install react npm install react react-dom Also, you can view the source code on GitHub while reading this tutorial for explanations about the settings. Configuring webpack 4 Our first stop will be the webpack. It’s a very popular and powerful tool for configuring not only React, but almost all front-end projects. The core function of webpack is that it takes a bunch of JavaScript files we write in our project and turns them into a single, minified file, so that it will be quick to serve. Starting from webpack 4, we aren’t required to write a configuration file at all to use it, but in this tutorial we will write one so that we can understand it better. First, let’s do some installation npm install --save-dev webpack webpack-dev-server webpack-cli This will install: - webpack module — which include all core webpack functionality - webpack-dev-server — this development server automatically rerun webpack when our file is changed - webpack-cli — enable running webpack from the command line Let’s try to run webpack by adding the following script to package.json "scripts": { "start": "webpack-dev-server --mode development",}, Now create an index.html file in your root project with the following content: <!DOCTYPE html><html> <head> <title>My React Configuration Setup</title> </head> <body> <div id="root"></div> <script src="./dist/bundle.js"></script> </body></html> Create a new directory named src and inside it, create a new index.js file mkdir src && cd src && touch index.js Then write a React component into the file: import React from "react";import ReactDOM from "react-dom"; class Welcome extends React.Component { render() { return <h1>Hello World from React boilerplate</h1>; }} ReactDOM.render(<Welcome />, document.getElementById("root")); Run the webpack by using npm run start … And an error will be triggered. You may need an appropriate loader to handle this file type Configuring Babel 7 The React component we wrote above used the class syntax, which is a feature of ES6. Webpack needs Babel to process ES6 into ES5 syntaxes in order for this class to work. Let’s install Babel into our project npm install --save-dev @babel/core @babel/preset-env \@babel/preset-react babel-loader Why do we need these packages? - @babel/core is the main dependency that includes babel transform script. - @babel/preset-env is the default Babel preset used to transform ES6+ into valid ES5 code. Optionally configures browser polyfills automatically. - @babel/preset-react is used for transforming JSX and React class syntax into valid JavaScript code. - babel-loader is a webpack loader that hooks Babel into webpack. We will run Babel from webpack with this package. To hook Babel into our webpack, we need to create a webpack configuration file. Let’s write a webpack.config.js file: module.exports = { entry: './src/index.js', output: { path: __dirname + '/dist', publicPath: '/', filename: 'bundle.js' }, devServer: { contentBase: './dist', }, module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: ['babel-loader'] } ] },}; This webpack config is basically saying that the entry point of our application is from index.js, so pull everything that’s needed by that file, then put the output of the bundling process into the dist directory, named bundle.js. Oh, if we’re running on webpack-dev-server, then tell the server to serve content from contentBase config, which is the same directory this config is in. For all .js or .jsx files, use babel-loader to transpile all of them. In order to use Babel presets, create a new .babelrc file touch .babelrc Write the following content: { "presets": [ "@babel/preset-env", "@babel/preset-react" ]} Now run npm run start again. This time it will work. Adding Prettier To further speed up development, let’s make our code formatter using Prettier. Install the dependency locally and use the — save-exact argument since Prettier introduces stylistic changes in patch releases. npm install --save-dev --save-exact prettier Now we need to write the .prettierrc configuration file: { "semi": true, "singleQuote": true, "trailingComma": "es5"} The rules means that we want to add semicolon for the end of every statement, use a single quote whenever appropriate and put trailing commas for multi-line ES5 code like objects or arrays. You can run Prettier from the command line with: npx prettier --write "src/**/*.js" Or add a new script to our package.json file: "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "webpack-dev-server --mode development", "format": "prettier --write \"src/**/*.js\""}, Now we can run Prettier using npm run format. Additionally, if you’re using VSCode for development, you can install the Prettier extension and run it every time you save your changes by adding this setting: "editor.formatOnSave": true Adding source map for better error logs Since webpack bundles the code, source maps are mandatory to get a reference to the original file that raised an error. For example, if you bundle three source files ( a.js, b.js, and c.js) into one bundle ( bundler.js) and one of the source files contains an error, the stack trace will simply point to bundle.js. This is problematic as you probably want to know exactly if it’s the a, b, or c file that is causing an error. You can tell webpack to generate source maps using the devtool property of the configuration: module.exports = { devtool: 'inline-source-map', // … the rest of the config}; Although it will cause a slower build, it has no effect on production. Sourcemaps are only downloaded if you open the browser DevTools. Setting up ESLint Linter is a program that checks our code for any error or warning that can cause bugs. JavaScript’s linter, ESLint, is a very flexible linting program that can be configured in many ways. But before we get ahead, let’s install ESLint into our project: npm --save-dev install eslint eslint-loader babel-eslint eslint-config-react eslint-plugin-react - eslint is the core dependency for all functionalities, while eslint-loader enables us to hook eslint into webpack. Now since React used ES6+ syntax, we will add babel-eslint — a parser that enables eslint to lint all valid ES6+ codes. - eslint-config-react and eslint-plugin-react are both used to enable ESLint to use pre-made rules. Since we already have webpack, we only have to modify the config slightly: module.exports = { // modify the module module: { rules: [{ test: /\.(js|jsx)$/, exclude: /node_modules/, use: ['babel-loader', 'eslint-loader'] // include eslint-loader }] },}; Then create an eslint config file named .eslintrc with this content: { "parser": "babel-eslint", "extends": "react", "env": { "browser": true, "node": true }, "settings": { "react": { "version": "detect" } }} The config is basically saying, “Hey ESLint, please parse the code using babel-eslint before you check it, and when you’re checking it, please check if all the rules from our React rules config is passed. Take global variables from the environment of browser and node. Oh, and if it’s React code, take the version from the module itself. That way the user won’t have to specify the version manually.” Rather than specifying our own rules manually, we simply extend react rules which were made available by eslint-config-react and eslint-plugin-react. I found errors! What do I do? Unfortunately the only way to really figure out how to fix ESLint errors is by looking at the documentation for rules. There’s a quick way to fix ESLint errors by using eslint--fix, and it’s actually good for a quick fix. Let’s add a script on our package.json file: "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "webpack-dev-server --mode development", "format": "prettier --write \"src/**/*.js\"", "eslint-fix": “eslint --fix \"src/**/*.js\"", // the eslint script "build": "webpack --mode production"}, Then run it with npm run eslint-fix. Don’t worry if you’re still fuzzy about ESLint for now. You will learn more about ESLint as you use it. Adding CSS LESS processor In order to add the LESS processor into our React application, we will require both less and loader packages from webpack: npm install --save-dev less less-loader css-loader style-loader less-loader will compile our less file into css, while css-loader will resolve css syntax like import or url(). The style-loader will get our compiled css and load it up into <style> tag in our bundle. This is great for development because it lets us update our style on the fly, without needing to refresh the browser. Now let’s add some css files to create a new style directory in src/style cd src && mkdir style && touch header.less && touch main.less header.less content: .header { background-color: #3d3d;} main.less content: @import "header.less";@color: #f5adad;body { background-color: @color;} Now import our main.less file from index.js: import "./style/main.less"; Then update our webpack configuration module property: module: { rules: [{ test: /\.(js|jsx)$/, exclude: /node_modules/, use: ['babel-loader', 'eslint-loader'] }, { test: /\.less$/, use: [ 'style-loader', 'css-loader', 'less-loader', ], }, ]}, Run the start script and we’re good to go! Deploying React app to Netlify All applications need to be deployed for the last step, and for React applications, deployment is very easy. First, let’s change the build output and development contentBase from dist to build in our Webpack config. module.exports = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'build'), // change this publicPath: '/', filename: 'bundle.js' }, devServer: { contentBase: "./build", },//… Now let’s install a new Webpack plugin named HtmlWebpackPlugin npm install html-webpack-plugin -D This plugin will generate index.html file in the same directory where our bundle.js is created by Webpack. In this case, the build directory. Why do we need this plugin? Because Netlify requires a single directory to be made the root directory, so we can’t use index.html in our root directory using Netlify. You need to update your webpack config to look like this: const path = require('path');const HtmlWebpackPlugin = require('html-webpack-plugin');module.exports = { entry: //… output: { //… }, devServer: { contentBase: "./build", }, module: { //… }, plugins: [ new HtmlWebpackPlugin({ template: path.resolve('./index.html'), }), ]}; And please remove the script tag from your index.html: <!DOCTYPE html><html> <head> <title>My React Configuration Setup</title> </head> <body> <div id="root"></div> </body></html> Now you can test the config with npm run build command. Once it’s done, push your boilerplate into a GitHub repo. It’s time to deploy our application! Now let’s register a Netlify account. If you haven’t heard of Netlify before, it’s an amazing static site hosting that provides all the tools you need to deploy a static site for free. What’s a static site? It’s a website created from a collection of static HTML pages, without any backend. Our React boilerplate as it is now counts as a static site, because we have no backend configured and its just HTML and JavaScript. After sign up, select new site from Git and Choose GitHub as your Git provider: You need to grant permissions for Netlify, and then select your React boilerplate repo. Now you need to enter the build command and publishing directory. As you can see, this is why we need HtmlWebpackPlugin, because we need to serve everything from one directory only. Rather than manually updating our root index.html file for changes, we just generate it using the plugin. Make sure you have the same command as the screenshot above, or your app might not run. Once the deploys status turns to published (number 2 above), you can go to the random site name Netlify has assigned for your application (number 1). Your React application is deployed. Awesome! Conclusion You’ve just created your very own React project boilerplate and deploy it live to Netlify. Congratulations! Granted, I didn’t go very deep on webpack configurations, because this boilerplate is meant to be a generic starter. In some cases where we need advanced features like server side rendering, we need to tweak the configuration again. But relax! You’ve come this far, which means you already understand what webpack, Babel, Prettier and ESLint do. Webpack has many powerful loaders that can help you with many cases you’ll frequently counter when building a web application. Also, I’m currently writing a book to help software developers learn about React, so you might wanna check it out! More React tutorials at sebhastian.com
https://www.freecodecamp.org/news/how-to-set-up-deploy-your-react-app-from-scratch-using-webpack-and-babel-a669891033d4/
CC-MAIN-2019-26
refinedweb
2,488
56.35
foulglory + 9 comments If you're getting timeout: The whole thing can actually be solved in one loop. Initialize sumtotal to 0. Run the loop m times/while input exists whatever you choose, take input one by one in list/array whatever you use. Input is of the form: a,b,candy do sumtotal = sumtotal + (b-a+1)x(candy) for each input average = sumtotal/n dejava + 1 comment Correct! No array of jars needed. No looping of filling needed. Test cases have huge numbers. RSTHW + 2 comments I did that, but it just works in tests 1-4 :( Im using java. I dont know what is wrong. RSTHW + 3 comments I already did it, my problem was that I was using nextInt instead of nextLong. lol edumor + 1 comment You don't need to use BigInteger, the maximum value for this challenge according to the constraints is 1,00E+18 while a long can hold a number up to 9,22E+18, more than nine times of what you need. Note that an int will only give the correct answer for sums that don't go over 231-1. DevikaShanbhag + 0 comments According to the input constraints, input can be an integer so nextInt() should be fine. Just typecast appropriately to (long) where an operation might result in an overflow. eg: (long)(b - a + 1) * k mayurnagdev123 + 0 comments In the problem it is specified that a and b will be in the 10^7 range .However ,the test cases do not follow this and have enormous values that exceed this range.That's why using 'int' instead of 'long' fails most of the test cases.The problem needs to be updated. Mridul20rawat + 0 comments Look dude the only thing required is knowing how many jars are to be filled and multiplying them with capacity given. And then keep on adding the result for as many operations is given. At last find the average. Hope it helps. while(o>0) { scanf("%ld%ld%ld",&st,&en,&cap); res = res + ((en-st)+1)*cap; o--; } fin = floor(res/n); john_canessa + 0 comments Good suggestion. Tried the array. Timeouts. Removed array and switched to BigInteger. Thanks. arnav_kumar903 + 0 comments Thanks dude,you're awesome. Was struggling from past 3days. #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main(){ unsigned long long int n,m; cin>>n>>m; unsigned long long int jar[n]; unsigned long long int sum=0; while(m--){ unsigned long long int a,b,k; cin>>a>>b>>k; sum+=(b-a+1)*k; } unsigned long long int avg=sum/n; cout<<avg<<endl; return 0; } sarathy_v_krish1 + 0 comments C++ solution : long long solve(int n, vector<vector<long>> operations) { long long sum=0; for (int i=0;i<operations.size();i++) sum+=operations[i][2]*(operations[i][1]-operations[i][0]+1); sum/=n; return sum; } j_singh_logan + 1 comment me too, did you use a moving average formula? robertdyke + 0 comments Make sure that you change the return value from you function from int to long long. That was my problem. Masters_Abh + 0 comments suv_codemode + 2 comments Hi guys, my code is passing the first 3, failing the next 3 and passing the rest of them. Is there anything special about testcase #4,#5,#6? It keeps saying I have wrong answer. Rest of the test case pass though. anmoluppal + 4 comments I dont think there is any special thing in those test cases, However you can always download the test cases at the cost of 5 hackos , Try finding it by yourself and have a look at the given constraints in the problem statement, It may be helpful... :) leopragi + 2 comments yep me too having same prob......i downloaded the testcase and i run it in custom input.....it shows me input cannot exceed 50 kb vatsalchanana + 0 comments You can run it on your own machine. You cannot run custom tests for inputs with size > 50KB on the site. hackboy21121996 + 0 comments import java.io.; import java.math.; import java.text.; import java.util.; import java.util.regex.*; public class Solution { // Complete the solve function below. static BigInteger solve(int n, int[][] operations) { long arr[]=new long[n]; BigInteger temp=new BigInteger("0"); BigInteger sum=new BigInteger("0"); for(int i=0;i<operations.length;i++) { long a=operations[i][0]-1; long b=operations[i][1]-1; long c=operations[i][2]; long num=b-a+1; temp=BigInteger.valueOf(num); temp=temp.multiply(BigInteger.valueOf(c)); sum=sum.add(temp); } /* for(int i=0;i<arr.length;i++) sum+=arr[i];*/ BigInteger avg=sum.divide(BigInteger.valueOf(n)); return avg; } private static final Scanner scanner = new Scanner(System.in); public static void main(String[] args) throws IOException { BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH"))); String[] nm = scanner.nextLine().split(" "); int n = Integer.parseInt(nm[0]); int m = Integer.parseInt(nm[1]); int[][] operations = new int[m][3]; for (int operationsRowItr = 0; operationsRowItr < m; operationsRowItr++) { String[] operationsRowItems = scanner.nextLine().split(" "); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); for (int operationsColumnItr = 0; operationsColumnItr < 3; operationsColumnItr++) { int operationsItem = Integer.parseInt(operationsRowItems[operationsColumnItr]); operations[operationsRowItr][operationsColumnItr] = operationsItem; } } BigInteger result = solve(n, operations); bufferedWriter.write(String.valueOf(result)); bufferedWriter.newLine(); bufferedWriter.close(); scanner.close(); } } //Just changed return type to BigInteger and all test cases passed. qwrtyuiuytres + 0 comments #include <bits/stdc++.h> using namespace std; int main(){ long n,m,a,b,c; cin>>n>>m; long int count=0; for(int i=0; i<m; i++){ cin>>a>>b>>c; count += (b - a+1) * c; } cout<< count/n; return 0; } iamlazycoder + 0 comments #include<iostream> using namespace std; int main(){ long n,q,sum=0; cin>>n>>q; for(int i=0;i<q;i++){ long a,b,c; cin>>a>>b>>c; sum+=(b-a+1)*c; } cout<<sum/n; return 0; } TheCodeHere + 0 comments Here's my code in C++. there's no need to use arrays. I hope you find it useful. int main() { int n,m; cin >> n >> m; int a,b; long long k,result = 0; while(m--) { cin >> a >> b >> k; result += (b-a+1)*k; } cout << result/n << endl; return 0; } delamath + 1 comment Crazy 2-liner in Python 3. :D n, m = map(int, input().split()) print(sum(map(lambda x, y, t: t * (y - x + 1), *zip(*(map(int, input().split()) for _ in range(m))))) // n) brianmvance + 0 comments N,M = map(int,input().split()) candies = 0 for _ in range(M): start, end, candies_per = map(int,input().split()) candies += (end-start+1)*candies_per print(candies//N) Sort 135 Discussions, By: Please Login in order to post a comment
https://www.hackerrank.com/challenges/filling-jars/forum
CC-MAIN-2019-43
refinedweb
1,122
57.87
Forum Index On Thursday, 18 November 2021 at 13:38:58 UTC, Atila Neves wrote: On Wednesday, 17 November 2021 at 21:59:51 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 17 November 2021 at 21:46:45 UTC, Atila Neves? Off the top of my head: The main issue is that beyond the trivial examples destruction order matters and you need to keep objects alive to get the correct cleanup of resources. Think database/transaction, GPU/texture, etc. So if you assume RAII for aggregates, then aggregates written for those won't work with GC. Though you could support both by adding finalizer handlers, then you could deny GC allocation of objects with destructor and no finalizer handler. (just one possibility) Performance of GC collection will be faster if you have no destructors. Especially if you move to local GC heap (per actor). Then you can just release the whole heap and do no scanning when the actor is done. If the average actor's lifespan is short and you have plenty of memory, the GC overhead will drop from "O(N)" to "O(1)" (average). Might be other issues. On Thursday, 18 November 2021 at 13:56:00 UTC, Atila Neves wrote: And those feature would be...? I personally would like to see C++ compatible exceptions, lambdas, and coroutines (and build a D actor on top of that), but I am not saying it is critical or important. Those are just my personal instincts. Others might have other preferences that might be equally valid. I haven't thought a lot about the consequences, as I don't think it will happen anytime; } On Thursday, 18 November 2021 at 14:12:36 UTC, Ola Fosheim Grøstad wrote: I don't know if C++ compatibility is a good direction. Most modern languages try to distance themselves from C/C++ and only offer C ABI interop for legacy software and popular libraries. D always felt like trying to start from a clean slate and minimize the dependencies on C/C++. By adding C++ compatibility, whether we like it or not we will also inherit negative things that are related with C++. D should stand on its own as a language, rather than be a GC sidekick to make code that works with C++. (ironically, languages which don't care about c++ interop at all seem to have better bindings work with popular C++ projects such as Qt or Bullet). On Thursday, 18 November 2021 at 13:37:28 UTC, Atila Neves wrote: On Thursday, 18 November 2021 at 04:24:56 UTC, rumbu wrote: As you've mentioned, we're not going to agree. I don't think this is failing to evolve either since it's by design. Let's agree to disagree. For me, it's a failure. Inheritance (subtyping) and value types don't mix. A struct can inherit 2 things: This doesn't involve boxing for structs, just the compiler generating a templated function when encounters the interface as a parametter. At least this is how it is done in BeefLang. interface I { void foo(); } void bar(I i) { i: foo; } class C: I { void foo() {} } struct S: I { void foo() {} } C c = new C(); S s = new S(); void callMe(I i) { i.foo } callMe(c); // compiler will call callMe as usual callMe(s); // compiler will generate and call a specialized callMe(S i) Could you please explain what these mean? explicit interface implementations interface I1 { void foo(); } interface I2 { void foo(); } class C : I1, I2 { void foo() { writeln ("I am I1's and I silently hide I2's foo"); } void I1.foo() {writeln("I am I1's foo"); } //this doesn't work void I2.foo() {writeln("I am I2's foo"); } //this doesn't work } class destructuring I already explain it, controlled decomposing of classes or structs; //if tuple syntax was built-in (item1, item2, ....) struct Coordinate { int x, y, z; void opDeconstruct(out x, out y) { return (x, y) } void opDeconstruct(out x, out y) { return (x, y, z) } } Coordinate co; (x,y) = co; (x,y,z) = co; What's missing? A better syntax? Compiler generated backing fields? The fact they are not working as advertised? class C { int _fld; int prop() {return _fld;} void prop(int x) { _fld = x; } } C c = new C(); c.prop += 42; ///oops!? switch (JSONValue) { case JSONNumber n: writeln ("I have a number %s", n); case JSONString s when s.Length > 100 : writeln("long string"); case JSONString s: writeln("short string"); } On Thursday, 18 November 2021 at 14:56:40 UTC, rumbu wrote: Isn't that just std.sumtype/tagged union? On Thursday, 18 November 2021 at 14:54:31 UTC, JN wrote: Yes, but then the current C++ interop strategy should be unwound, otherwise you end up in that uncanny-valley situation where you are neither this nor that. You end up with the disadvantages of tracking C++ with limited benefits. Same for importC. You have to go all in to be taken seriously, not just dip your toes. It is a difficult choice to make. Coroutines are going to be more common over time in C++ code. Exceptions are less of a burden for libraries in C++ than it used to be. So, long term strategic planning should say: do it, or pull out completely? On Thursday, 18 November 2021 at 14:31:36 UTC, Nick Treleaven; > } As I said, you are digging outside the language spec with Array and equal and with the overloaded operators opOpAssign and opSlice, even they are not obvious. Preallocating global exceptions with standard messages is not a good idea. On Thursday, 18 November 2021 at 15:00:22 UTC, JN wrote: Yes, it is, but the question was about oop evolution in D and keeping the pace with other languages, not about "here you have another lib for this". On Thu, Nov 18, 2021 at 03:19:39PM +0000, Rumbu via Digitalmars-d wrote: > On Thursday, 18 November 2021 at 15:00:22 UTC, JN wrote: > > On Thursday, 18 November 2021 at 14:56:40 UTC, rumbu wrote: > > > > > * pattern matching on fields/properties > > > > > > > > How would this work? > > > > > > > > > ```d > > > switch (JSONValue) > > > { > > > case JSONNumber n: writeln ("I have a number %s", n); > > > case JSONString s when s.Length > 100 : writeln("long string"); > > > case JSONString s: writeln("short string"); > > > } > > > > > > ``` > > > > Isn't that just std.sumtype/tagged union? > > Yes, it is, but the question was about oop evolution in D and keeping the pace with other languages, not about "here you have another lib for this". [...] IMO, this is actually a strength of D: it is powerful enough to express these constructs as library code instead of being baked into the language. Of course, the library experience definitely can be improved -- I don't argue with that. Some language changes to make library solutions more powerful would definitely be welcome. Documentation needs improvement, and ecosystem definitely needs work. But I don't see library solutions as a failure; I see it rather as a success that libraries are able to express such things, whereas in languages like Java the language doesn't let you express them, so you have no choice except to bake it into the language. T -- Stop staring at me like that! It's offens... no, you'll hurt your eyes!
https://forum.dlang.org/thread/cjrkpawgqquetjbttbdh@forum.dlang.org?page=11
CC-MAIN-2022-27
refinedweb
1,219
69.92
. Today’s I’ll consider a real estate inspired example: let’s say I have list of homes for sale and their corresponding characteristics:",E2:E6,"yes",F2:F6,">1999",F2:F6,"<2004") which returns $ 312,500. To build a corresponding PivotTable, one can use several filters: Advantages of PivotTables: Advantages of using functions:. Today’s author, Monica Poinescu, a Software Developer in Test on the Excel team, gives an overview of some new functions in Excel 2007 and along the way shows us how to do some simple expense tracking.. Let’s assume I entered the expenses in a table: The solution below uses the new Excel 2007 feature structured references; see 'Tables Part 3: Using Formulas with).. In visual terms, I think of each pair (range_to_apply_criteria1, criteria1) as a punch card with ) =SUMIFS( Table1[Amount], Table1[Category], H$1, Table1[Date], $F2 ) this will evaluate the ‘food’ expenses for January . And in I2 enter: =SUMIFS( Table1[Amount], Table1[Category], I$1, Table1[Date], $F2 ) =AVERAGEIFS( Table1[Amount], Table1[Category], "home", Table1[Date], "January" ) - this returns 117.675 A few months back I wrote several posts about the improvements that we made to PivotTables in Excel 2007. I even showed how summarizing data in different ways is now just a right click away on the “Summarize Data By...” menu. What I didn’t show was that in addition to these standard ways of summarizing data (sum, count, max, min, average, etc.), Excel already supports some more complex summary views for items contained in a PivotTable. For instance, by selecting “More Options,” you can choose to show the data as a “Running total” or “% of Total.” So, given the data below in a PivotTable ... ...you can choose to “Summarize Data By... > More Options” and then show the values as the “% of total”.... .... and Excel will automatically perform the calculation for you in the PivotTable. We’ve gotten a few pieces of feedback about this functionality, usually that (a) it’s useful but hard to find, or (b) it would be more useful if there were additional options for how the data could be shown in addition to the ones listed in the dialog above. We have someone on the team starting to look at this as part of our planning for future releases (the version after 2007), so we’d like to hear what you think. Here are some specific questions we would love to hear your answers to, but feel free to add additional commentary too. Please post your answers using comments, as it is easier for everyone on the Excel team to read comments (as opposed to the email link which sends email just to me). Thanks for your help. OK, I am freshly back from a fascinating couple weeks of visiting a number of customers (thanks to all you that spent time with us over the last few weeks), so it is time to get back to talking about Excel 12 features. We’ve already talked about using Pivot Tables to bring OLAP data from SQL Server Analysis Services into Excel. In cases where you want to explore the data and look for interesting facts within the data by “slicing and dicing” it, PivotTables are the perfect tool. You can change the fields that are being displayed, drill into the data, change the filtering and sorting that has been applied, and in the case of OLAP data from SQL Server Analysis Services, you can use all the other features I have covered to look at the data your way. There are other scenarios that involve bringing OLAP data from SQL Server Analysis Services into Excel, though, that are not as well suited to using a PivotTable. While PivotTables are an ideal tool for quickly exploring your data and finding a wide variety of answers in an ad hoc manner, they are not as well suited for building fixed reports with irregular or custom layouts. Here are a few quick examples: To address those needs (and others), we wanted to provide a way to place OLAP data from SQL Server Analysis Services directly into specific spreadsheet cells without being constrained in any way by what might be in the adjacent cells. This would provide users with the power of a multi-dimensional data store in conjunction with the power of the Excel formula language and calculation engine. Let’s take a look. Here is an example of an asymmetric report that was built using the Excel 12 beta build and the Adventure Works sample database that ships with SQL Server 2005 Analysis Services. Note that the fields across the top axis (on columns) do not come from the same dimension. The sales reasons (‘On Promotion’ and ‘Price’) and the countries (‘Canada’ and ‘United States’) are members from two completely distinct dimensions. Also note that while all the values are based on the items in Column A, this report contains blank “spacer” columns in columns B and E. Finally, you can see the formula for cell C2 which fetches the ‘On Promotion’ member from the ‘Sales Reason’ cube dimension. This formula uses the CUBEMEMBER function (which is one of seven new CUBE functions) to place OLAP data from SQL Server Analysis Services into Excel spreadsheet cells. What are the new CUBE functions?We have implemented seven new CUBE functions that can be used in Excel formulas just like any other function in Excel. These functions permit Excel to fetch data from SQL Server Analysis Services (2000 & 2005), including any member, set, aggregated value, property, or KPI (Key Performance Indicator) from the OLAP cube. This data can then be placed anywhere in the spreadsheet, intermingled with other local calculations and/or within other formulas. Here are the seven new CUBE functions: CUBEMEMBER (connection, member_expression,[caption])This function will fetch the member or tuple defined by the member_expression. For example, (from the illustration above,) the formula: =CUBEMEMBER ("Adventure Works", "[Sales Reason].[On Promotion]") returns the member named “On Promotion” from the “Sales Reason” dimension of the Adventure Works cube. CUBEVALUE (connection, [member_expression_1], [member_expression_2], …)This function will fetch the aggregated value from the cube filtered by the various member_expression arguments. For example, the formula: =CUBEVALUE ("Adventure Works","[Measures].[Gross Profit]","[Product].[Category].[Bikes]","[Date].[Fiscal Year].[FY 2004]") returns the value $5,035,271.22 which is the aggregated amount in the Adventure Works cube for Gross Profit for Bikes in Fiscal 2004. CUBESET (connection, set_expression, [caption], [sort_order], [sort_by])This function will fetch the set that is defined by the set_expression parameter. Optional parameters allow you to specify the ordering of the set as well as the caption to be displayed in the Excel cell that contains this formula. (Note that the set itself won’t have a display value.) For example, the formula: =CUBESET ("Adventure Works","[Customer].[Customer Geography].[All Customers].children","Countries") returns the set of countries in the Customer Geography hierarchy and shows “Countries” as the cell’s display value. CUBESETCOUNT (set)This function returns the number of items in a set. Typically the argument to this function will be a CUBESET function or a reference to a CUBESET function. CUBERANKEDMEMBER (connection, set_expression, rank, [caption])This function returns the Nth item from a set. This can be very useful when building a Top N (or Bottom N) report in Excel. CUBEMEMBERPROPERTY (connection, member_expression, property)This function returns a property of a member in the OLAP cube. CUBEKPIMEMBER (connection, kpi_name, kpi_property, [caption])This function returns a KPI (Key Performance Indicator) from the OLAP cube. CUBE functions provide MDX to other CUBE functionsThere is one way in which the CUBE functions are significantly different from any other Excel functions. This is in the way that they behave when they are passed in as arguments to other CUBE functions. Functions that are not CUBE functions return a value which is displayed in the Excel spreadsheet cell. For example, the result of a SUM function will be a number that is displayed in the cell. CUBE functions (except for CUBESETCOUNT) return a result which is more complex than this. CUBE functions return two distinct values. One is the value that is displayed in the cell. But there is also a second hidden value which can be thought of as an MDX expression (MDX is the Multi-Dimensional eXpression language used by SQL Server Analysis Services) defining the result. When one CUBE function uses another CUBE function as its argument, the argument takes on the MDX value rather than the display value. Here’s an illustration that I hope will help to make this clearer. Here is the asymmetric report that we looked at earlier. Cell C2 actually contains two separate values. The first is the display value that you see in the cell, namely “On Promotion”. But when the formula in cell C3 uses cell C2 as an argument, the value that it obtains from cell C2 is actually “[Sales Reason].[Sales Reasons].[Sales Reason].&[2]” which is the MDX unique name for the “On Promotion” member. You can find this hidden value behind the CUBE function using Excel’s object model by selecting cell C2 and then typing “?Activecell.MDX” into the immediate window in the Visual Basic Editor. And that’s the overview. In my next post, I will provide some examples that illustrate how to use these functions in your reports. Thanks. “What if our sales for New York increased by 10%?” “What if the total number of product orders fell by 25%?” These are examples of questions that PivotTable What-If Analysis is aimed at helping the user answer. Let. Thanks: Binomial distribution BINOMDIST, CRITBINOM Chi squared distribution CHIDIST, CHIINV Exponential distribution EXPONDIST F distribution FDIST, FINV Gamma distribution GAMMADIST, GAMMAINV Hypergeometric distribution HYPGEOMDIST Lognormal distribution LOGNORMDIST, LOGINV Negative Binomial distribution NEGBINOMDIST Normal distribution NORMDIST, NORMINV Standard Normal distribution NORMSDIST, NORMSINV Poisson distribution POISSON Student's t distribution TDIST,TINV Weibull distribution WEIBULL The following financial functions have improved accuracy: Cumulative interest paid on a loan CUMIPMT Cumulative principal paid on a loan CUMPRINC Interest payment for an investment IPMT Internal rate of return for a series of cash flows IRR Payment for a loan PMT Payment on principal for an investment PPMT The accuracy of these additional functions has been improved: Hyperbolic arcsine ASINH Ceiling function CEILING Convert function CONVERT Error function ERF Complementary error function ERFC Floor function FLOOR Natural logarithm of the gamma function GAMMALN Geometric mean GEOMEAN MOD function MOD Random number function RAND Sample standard deviation STDEVS Sample variation VARS. A few posts ago when I described the work we did in the area of “great looking documents”, I mentioned charting. I am going to spend the next week or two covering charting in detail. For this first two posts, I want to cover how we have used the ribbon to make it possible, with no more than 3-4 clicks, to create a wide variety of professional-looking charts. When talking to customers about charting in Excel, one of the big pieces of feedback we hear is how hard it is to make a chart that looks ready to publish. Generally, users aren’t graphic designers or experts in information visualization, yet they still want a result that looks professional and communicates their information effectively. With advent of the ribbon, we have a new UI design approach – results-oriented design (which is discussed in a blog post here). In a nutshell, the idea is to give users a couple of reasonable choices for professional designs, then allow them to mix and match those choices into a professional document. While we’ll still give users access to the detailed features that make their documents look good, they should be able to get close to a final result in just a few clicks. To that end, chart creation in Office 2007 can be as simple as making four straightforward choices that give users access to a vast range of possibilities. The four choices are: what type of chart they want, how they want the elements on that chart laid out, how they want their chart formatted, and what document theme they would like to use. I’ll talk about two of these choices in this post, and the other two choices in the next post. Chart Types In current versions of Excel, when a user creates a chart, the first thing they need to do is select the type of chart - column, line, scatter, pie, surface, and etc. In Excel 2007, we’ve made the variety of chart types available a lot more visible, and we have offered help for users to choose between them. To insert a chart, a user would start with the Insert tab. Excel 2007 has an insert chart type “group” (7 related controls) on the ribbon’s insert tab. This makes it easy to pick a chart type, with large icons and tooltips that describe when to use a particular type. Note that we have provided galleries for the most common chart types – column, line, pie, bar, area, and scatter – with the remaining chart types surfaced in a 7th gallery. For those who want to browse through the full list of chart types, or change the type of an existing chart, the Create Chart dialog makes it easier to explore the list of chart types and pick the one you want. And for those who love shortcut keys, Alt+F1 will now create a chart object with the default chart type, while F11 still creates a chart sheet with the default chart type. Although we do hear many customer requests for new chart types, unfortunately we weren’t able to add any in Office 2007. We’re not yet planning the next version of Office in depth, but no doubt that will be considered again, as this is another area where we hear a lot of feedback. Chart Layouts Once a user has chosen a chart type, there are a variety of charting features that can help the user communicate their data effectively. In previous versions of Excel, these are scattered around through a variety of dialog boxes, making it hard for all but the most diligent users to take advantage of the settings. For Office 2007, we studied a massive number of charts that we found in publications, books, and Excel spreadsheets to determine the most common combinations of chart elements such as titles, legend, data table, etc. From this, we created a gallery of predefined chart layouts (e.g. combinations of chart elements) that can be applied with one click. Here is what the gallery looks like for a bar chart And here is what the galleries look like for a few other chart types. Note that each chart type has its own unique set of chart layouts. Line Quick Layouts Pie Quick Layouts Scatter Quick Layouts I have not included the pictures of the chart layouts for all the chart types, but I’ve tried to include those for most of the more popular chart types. We have tried to included layouts for the sorts of charts we are commonly asked about. For example, there’s a chart layout designed for making histograms - the third choice in the second row of the column chart layouts. There’s a chart layout designed for making sparklines – the first choice in the third row of the line chart layouts. There’s a chart layout designed for making pie charts with labelled slices instead of a legend. Each chart layout is a useful high-quality chart which presents data in a different way. We are still refining the set of chart layouts and their icons, so expect some changes before Office 2007 is done. The team that builds the drawing tools in Office (sometimes referred to as OfficeArt) is interested in understanding all the different ways people are using the OfficeArt drawing tools, images, and audio/video with Excel. While a lot of the usage is well-understood (on charts as callouts, as controls on the grid, as backgrouds in an application, as navigational items, etc.), we run into people doing all sorts of interesting things, so we thought it would be interesting to hear from blog readers on all the ways they use the drawing tools, images, etc. We are also interested in how people are using VBA with drawing shapes. For those of you that are game, please give us a brief description of what you’re doing, and let us know if it’s ok to contact you with follow-up questions sometime in the future. Files are welcome too – you can send them to xlfiles@microsoft.com. One other thing that is also interesting is anything that you cannot do today that you would like to be able to do (i.e. extending support for formulas, more object model, etc.). In this blog post I’ll walk through some of the ways you can use sparklines in Excel 2010 using sample sparklines from the book store demo file:. Here I’ve: In this example, mystery has traditionally had a lot more sales than history, but now they are about the same. To create something like this isn’t too hard in Excel: Here you can see that the line sparklines and win / loss sparklines are just one cell above the other and their points line up. One other thing to note here is that I’ve … and the last example shows the original table with the sparklines embedded in line with the data. And on that note I’ll wrap up the sparkline post for today, still a couple more coming this week, stay tuned! Previously when discussing CUBE functions, I showed a couple of examples of reports based on OLAP data that could be built using CUBE functions. Now I’d like to explain how we’ve done something very special with Formula AutoComplete to make it easy to navigate the OLAP namespace while authoring CUBE functions. Formula Auto-Complete for CUBE function argumentsFormula AutoComplete for CUBE function arguments has some special behaviours relative to the other functions in Excel. As a brief refresher, Formula AutoComplete is a feature that provides a list of values from which to choose as you write formulas … here is a blog post that describes this in detail. In most Formula AutoComplete scenarios, Excel knows the list of values (formulas, named ranges, table names) that it should display because those values are part of the Excel application. For example, when you start typing a function name, Excel can give you a list of all the other functions that start with the same character(s), as is shown in this screenshot. In this case, Excel already knows what all the possible function names are that begin with “s”, so it can easily display a list of function names that begin with the specified character(s). Ditto named ranges, UDFs, table names, etc. For many arguments to the new CUBE functions, however, we have a different scenario. Excel does not inherently know about the multi-dimensional database (OLAP cube) from which data is being fetched. In order to provide an auto-complete dropdown, it is necessary for Excel to query the multi-dimensional database or OLAP cube to find out what the set of valid items will be. Here’s an illustration of how this works. In this example, I have already created a connection named “Adventure Works” to the Adventure Works database on SQL Server 2005 Analysis Services. I will start by entering a CUBEMEMBER function that uses the Adventure Works connection, and when I get to the second argument, (which calls for a member_expression,) I will only enter the opening quotation marks that tell Excel I am planning to enter a string. The list of possible values that appear in the dropdown did not come directly from Excel. How’d that work? Excel issued a query to the Adventure Works OLAP cube and displays a list of dimension names from that cube. Let’s say that I choose the Dimension named “Customer” and then enter a period (which is used as a separator by the MDX language). I see that there are several hierarchies in the Customer dimension. Using the arrow and tab keys, I will select the “Customer Geography” hierarchy and enter another period. The auto-complete drop down shows me that there is a single member at the top of the Customer Geography hierarchy, and that item is “All Customers”. By choosing this item and entering another period, I will see an auto-complete drop down of the children of “All Customers” (which are the countries in which the customers are located). At any point, I can finish the argument by entering the closing quotation marks. The key point that I want to make here is that the Formula AutoComplete feature is providing a mechanism for users to navigate the hierarchies in the multi-dimensional database. Even if you have no prior knowledge of the multi-dimensional database to which you are connecting, Excel’s Formula AutoComplete feature will show you the dimensions in the cube, the hierarchies in each dimension, and the members (and their children and grandchildren, etc.) that are contained in each hierarchy. Also, it can be much faster to use auto-complete to enter CUBE functions into Excel formulas because you only need to identify the item you want from a drop-down list and then hit the Tab key, as opposed to typing the full MDX name for each function parameter. The name that you get for a member using Excel’s auto-complete will be a fully qualified name because you make a selection at each level of the hierarchy. It is not the only name that could be used, nor is it the special “member unique name” for a member in the cube. When you know that a shorter MDX expression will resolve to the same member, you are free to enter the shorter expression. It’s just that Excel will help you to navigate the namespace of your database when you’re not already familiar with that data. The list of items that is displayed in each case is the list of the first fifty (50) items which match the characters that have been entered so far. As you enter more characters, the auto-complete drop down list is automatically updated. This is a feature I love to demonstrate – for folks that use Analysis Services cubes, it really is going to be a very helpful feature. Next time, I’ll talk a bit about the work we’ve done in Excel 12 to make connection management easier..! In this blog article, we’ll: Selecting the ‘Load & Prepare Data’ button launches the PowerPivot client window: As you would expect from any modern tool, the ‘From Database’ button launches a wizard to step you through getting data from a database. More information about data import process and functionality is available on the PowerPivot blog here. For this article, we’ll bring in following tables:’ve imported data only from a single source. You can, of course, combine data from a variety of data sources – databases, text files, ATOM data feeds, as well as just Copying/Pasting data directly – and create calculations and/or relationships as if they were a table imported from a single database. Once you have the data, PowerPivot enhances the Excel experience by providing quick templates for frequently used layouts: Selecting ‘Four Charts’, –: Within a matter of seconds a quick view is created… …: The ‘Slicers Vertical’ and ‘Slicers Horizontal’ areas create zones on the left and top of the Pivot controls that help layout, align and resize slicers easily: The combination of usability of Slicers and the performance of PowerPivot engine provides a very interactive set of views that one could easily mistake for a rich custom application built by IT after weeks of effort. This – Self Service Business Intelligence – is the key value that Gemini provides end users. This completes a quick run through of PivotTable for Excel 2010. In the next article, we’ll dig in to PowerPivot for SharePoint to see how it enhances the SharePoint collaboration experience. Eric “chunks” –’t I just show you the “super tooltip”. – see here for a brief overview.) The feature has not changed in Excel 2007, but it is now included in all versions of Office (in Office 2003, it was only included in Office 2003 Professional, not the Standard edition). Thanks Missile Command Tower Defense To play, you'll need - · Download games here. Today’s’s image is that a lot of commands use the same button image (a green circle). For more information about adding missing built-in commands to the QAT or Ribbon see: Right-click on the QAT in the upper right corner of the Excel 2007 window, and then click Customize Quick Access Toolbar::\Application Data\Microsoft\OFFICE\Excel.qat In Vista you can find it here: C:\Users\<username>\AppData\Local\Microsoft\Office\Excel.qat Note: The Excel.qat file will not exist if you have not customized your QAT. Tip: You can right-click on the green circle button for the Add-ins command, and then click Remove from Quick Access Toolbar to delete it.: <mso:customUI xmlns: <mso:ribbon> <mso:qat> <mso:documentControls> <mso:control </mso:documentControls> </mso:qat> </mso:ribbon> </mso:customUI> You can change this line: <mso:control To this: <mso:control Change the ribbon in Excel 2007 There are additional links in the More Information part of that page. There is a bug in SP2 when you add a button for one workbook. I have a few notes and a workaround on this page: Today we have a guest author from the SQL Server Analysis Services team, Ashvini Sharma, to tell us about the PowerPivot (né. PivotTables continue to be indispensible for allowing users to analyze their data flexibly and interactively. If you’re a subscriber of this blog, you’ve’re shortcomings in technology available: Lets take a step back to make a few key observations: The PowerPivot functionality is delivered by SQL Server’s Analysis Services team in collaboration with the Excel team and is based on our experience delivering the Microsoft Business Intelligence platform over the last decade. There’re two components of PowerPivot: PowerPivot for Excel 2010 and PowerPivot for SharePoint 2010. Designed for business users, PowerPivot for Excel 2010 is a data analysis tool that delivers unmatched computational power directly within the application users already know and love — Excel. Leveraging familiar Excel features, users can transform enormous quantities of data from virtually any source with incredible speed into meaningful information to get the answers they need in seconds. PowerPivot for Excel consists of the following components:: We’ll drill into these features in the next few blogs. Stay tuned! Today’s. For the next few posts, we have a “guest post” from Danny Khen, a program manager on the Excel Services team. Danny is going to talk about UDFs in Excel and Excel Services. Enjoy. UDFs are user-defined worksheet functions – custom functions that you create to supplement Excel’s set of intrinsic worksheet functions. UDFs are used to create calculation libraries, or to import data into Excel sheets in custom ways. In Excel 2007, we’ve made a number of key investments around UDFs. They revolve around two main areas: allowing UDFs to take advantage of important Excel improvements, and extending UDF-based Excel solutions to the server side with Excel Services. Updated XLLs A while back Dave mentioned that we updated XLLs (Excel’s addins based on the C-API) to give developers access to new Excel functionality. As that post explained, one of the common things that developers do in XLLs is to implement UDFs. We wanted to make sure that XLL authors can make use of some great new features of Excel 2007 itself in the UDFs they create. To recap, XLLs have support in Excel 2007 for: There are many more detailed about those improvements in that other post. Server-side UDFs Dave has also posted a number of entries about Excel Services – the new feature in the Office SharePoint Server 2007 that enables calculation, display, and exploration of Excel workbooks on the server. These posts cover many aspects of Excel Services. Much like Excel’s ability to be extended by writing UDFs in Excel addins, Excel Services also has an extensibility mechanism for writing UDFs. I’d like to use the rest of this post to explain and demonstrate Excel Services UDFs. In a follow-up couple of posts, I will show how you can create Excel solutions that use UDFs and can run both on a client machine using Excel 2007 and in a server environment using Excel Services. They’re managed Server-side UDFs are implemented as methods .NET 2.0 assemblies. That is to say, Excel Services directly supports only managed code UDFs. Existing native function libraries and Excel UDFs can be used with Excel Services by “wrapping” them with the new style of server managed UDFs; I will show how in the follow-up posts. But why did we actually “go managed”? Excellent question. Managed code for enterprise-level solutions is becoming more and more popular, because of the many advantages that .NET code has to offer. Robustness and security are among the important advantages. Some of you may already be engaged in developing managed UDFs or other types of managed solutions. With Excel Services, we focused specifically on server stability, and we felt that using .NET as the basis for our extensibility would be the right thing to do in this respect. They’re part of a V1 feature In Office SharePoint Server 2007 we introduce the first implementation of Excel Services and of its extensibility mechanism. To start with, we simply had to prioritize the support for various features in Excel Services (even regardless of UDFs), and not everything made it for this first version. Moreover, we know that going forward we will be doing a lot of thinking around managed interfaces and extensibility for Excel – both on the client side and on the server. We want to make sure that customers' initial investment in managed UDFs is secured, and that at the same time we are not constrained in any way when we design the best possible infrastructure in the future. For those reasons, there are certain restrictions with the first version of server UDFs: We believe that lots of useful solutions can be created under these restrictions; in fact we see many existing Excel UDF-based solutions that could comply. They need to be thread-safe Excel Services is a server feature, and its calculation engine runs as a multi-threaded backend service. We have to require (and assume) that all UDFs are thread safe. Security A couple of things to mention about the way a server administrator can control the security of Excel Services UDFs. First, Excel Services will not load and run just any old method in any old .NET assembly. An admin needs to register the assembly on a server list of trusted UDF assemblies. On top of that, since these are .NET assemblies, an admin can make use of .NET’s CAS (Code Access Security) infrastructure to restrict UDF access to resources. For example, if a UDF package is simply a collection of math calculation functions, an admin can turn off its ability to access web services, external data, native code etc – and make the server environment safer for everyone. So what does this thing look like? Very simple, actually. All you need to know about (assuming you speak some .NET dialect) is two new attributes. Both of them are defined in the Microsoft.Office.Excel.Server.Udf namespace, and you need to reference an assembly that is shipped with Excel Services (Microsoft.Office.Excel.Server.Udf.dll) to get them. The two attributes are UdfClass, which you use to mark a class where server UDFs are defined, and UdfMethod, with which you mark each individual public method to be considered a server UDF. The UdfMethod also has a boolean property – IsVolatile – used to declare the UDF as volatile, if you want the server to call it each time it recalculates the workbook, regardless of any change in its dependencies. The default is false, which means that the method is non-volatile; it gets called only when a value changes somewhere down the dependency chain of the formula that calls the UDF. That’s really it. A typical UDF class will look something like this: using Microsoft.Office.Excel.Server.Udf; namespace YourNamespace{ [UdfClass] public class YourClass { [UdfMethod] public <return-type> NonVolatileMethod(<arguments>) { ... } [UdfMethod(IsVolatile=true)] public <return-type> VolatileMethod(<arguments>) { ... } }} Show us the goods! Well, alright… Attached to this blog post is a fully developed code sample. It shows a UDF package by the name of WishExcelHad (because it implements a couple of functions that we wish Excel had…). The package has two method to manipulate text strings with words. The first method, WehWordM, takes the string, a required word position, and a delimiter string, and returns the word in that position after parsing the text with the given delimiter. The other method, WehWordcountM, takes a string and a delimiter, and returns the number of words in that string, when it is parsed with the given delimiter. You can use the attached Excel workbook as an example that calls these two methods in formulas. You’ll need to save it to Excel Services as an XLSX file. Why the weird “M” as the suffix for those method names? It designates “Managed” – these UDFs are implemented purely with managed code, and are intended to run with Excel Services. Stay tuned to the blog and look for the following posts, where I will show versions of the same UDFs, that can run across Excel 2007 and Excel Services. Today’s author, “Show Developer tab in the Ribbon”. PivotTables are designed to help users make sense of large amounts of data by providing an easy way to build a summarized report. In addition, PivotTables can be rearranged easily, so that once you have some summary data in a PivotTable, you can look at the same information in many different ways with only a few mouse clicks (the name “PivotTable” is derived from the fact that the process of rearranging your data is known as “pivoting” your data). To illustrate the core capability of PivotTables, let’s imagine you have sales records listed in a worksheet something like this. To see a sales summary, all you have to do is to click anywhere inside this range of data, create a PivotTable, and specify how you would like your data summarized. For example, if you wanted to see Sales Amount organized by Product Category and SubCategory, it would look like this (UI is our Beta 1 build, in which the PivotTable UI is not final and in some areas not yet complete). Without a PivotTable, summaries like these are typically built using formulas like SUBTOTAL, VLOOKUP etc. However, in cases where you want to build more complicated reports, or where you want to look at the data in numerous different ways, or where the data itself changes quite frequently (i.e. Categories and Subcategories show up or disappear frequently), PivotTables are a great tool. I deliberately chose a small data set for the example above (and I demonstrated a fraction of what PivotTables can do), but as soon as you have even a few dozen rows of data that you want to summarize, PivotTables can deliver magical results (I love showing PivotTables to customers for the first time and watching their eyes light up). For this reason, the PivotTable feature has been a very popular tool for quite some time, at least with those people who have learned to use it. Unfortunately, there are a large number of users who are not yet aware of this feature, or have not figured out how to use it. While planning for Excel 12, we did a lot of customer research and we found a couple of things. First, we found that many users need the summary capabilities that PivotTables offer, but some currently consider PivotTables “too advanced” and don’t use them regularly. Second, we found that users that did use PivotTables regularly had lots of requests to make them more powerful and more capable. Finally, we found that customers that had adopted SQL Server Analysis Services as their business intelligence platform wanted great support for Analysis Services in Excel. Essentially, it became clear that there was still a lot of additional capability that we could add in this area that would benefit all sorts of users, so we set out to improve the feature in a number of ways. Specifically, we set out to: These goals translated in to the following work: This is a pretty big, exciting area of work for our team. Over the next two weeks or so, I am going to review all this in detail. Starting today, those of you that are interested can download the public Office 2007 Beta from the Office preview site using this link:. For those that do download and check things out, please let us know what you think.
http://blogs.msdn.com/themes/blogs/generic/postlist.aspx?WeblogApp=excel&PageIndex=5&PostSortBy=MostViewed
CC-MAIN-2016-26
refinedweb
6,237
57.71
Write Your Own Freenet-based Game 55 lhdentra writes "Linux Journal is carrying an article by Brandon Wiley of the Everything Over Freenet project explaining how you can create your very own turn-based game, running over Freenet. He claims it's faster than playing chess by post." Re:Jesus (Score:2) Don Negro If only Chessmaster Hex from Cowboy Bebop's... (Score:1) s ion14.txt [genkiland.net] Besides that, I really can't think of a practical use for this, besides reworking FreeNet's topology and such. In any case, it's interesting. Optional Pseudonymity for reliable interaction (Score:2) Now really, the EOF project is cool, as it gets more and more diverse developers to come play in the freenet world. Some applications will be just silly, but some will provide useful functions where freenet's caching, security, anonymity, or pseudonymity (or a combination of the above) can add some really cool features. Freenet has some webpages published within it (images and everything are distributed around the freenet network) already, and I believe there's a webcam project as well. Re:Turn based? Hahaha (Score:2) Turn-based pen-and-paper RPGs are as fun as they've always been. And have the advantage that you see your friends in real life, and can throw popcorn at the DM when you encounter a beholder. Interesting, but is it really feasible? (Score:2) I think this is a very clever design, and nicely illustrates how to use Freenet's signed-subspace keys to avoid interference from a third party. I do believe, however, that it suffers from a couple problems inherent in the design of Freenet--- although only the first looks like a showstopper to me. Perhaps a better algorithm for searching could help (for example, finding the "next" number on game creation by doing a search for 1, 2, 4, 8, etc., and then searching in the partially-used interval you find.) But--- I don't see any way of making it faster to find games that have been created but not replied to. Random search doesn't seem promising either unless many more games are created than actually get played--- which may well be feasible. I don't fully understand the mechanisms by which Freenet prevents duplicate keys, but I believe it is vulnerable to network partitioning (or just insufficient TTLs). In any case, heavy contention on a small portion of the namespace could quickly bring to light any flaws in the protocol or implementation. :) A natural idea is to have an indexing service which keeps track of which games have been started but not replied to yet. But once you introduce such a mechanism, you might as well use that instead for game setup. Games may also appear in retrospect to contain illegal moves if a move is lost by the system and and replaced--- but this is not a big problem, since the "cheating" can only be done by the player who would stand accused. (I realize that the article was only meant as a sketch--- and that the author admits Freenet isn't reliable--- but the protocol can and should address how to handle the unreliability.) Re:But (Score:1) But how about Chess over Slashdot? (Score:2) Ehh.. I don't even know the terms. Gaute Re:balloons and honey pots (Score:1) I didn't say that there wasn't any content, just that all the content is built on top of a model where the only two actions are putting something in, and taking it out again (I mean requesting, not removing). The same thing goes for all of the various more advanced protocols. Also that we are loosing a lot data from the network at the moment, which is true, but I am hopeful that I will be able to improve that by the end of the summer. && oskar balloons and honey pots (Score:3) Brandon's creative ways of adding any service on top of this limited base are fun, but they aren't really specific to Freenet as equivalent protocols would work over any system that provides a secure way to put things in and take things out. In fact, it is pretty easy to see how TCP could be implemented over any such system be enumerating each packets name (it would be faster than rfc1149 anyways...) && oskar sandberg But (Score:2) Quote (Score:3) -- Quake - Type (Score:1) -- microsoft, it's what's for dinner bq--3b7y4vyll6xi5x2rnrj7q.com Re:Turn based? Hahaha (Score:1) Turn based definetly slows the pace down, but it allows many people (100's) to play in the same game. Its not quake, netrek, or even nethack, but it has its place. -- Re:Faster than playing chess by post? (Score:1) Re:technology (Score:2) Technology is driven by two factors: 1. Its ability to enable sex. 2. Its ability to enable game playing. So the ultimate way to develop technology is to find ways to apply it to sex based games! (Making InterSextions (basically a sex based Monopoly game) one of the most important programs of the 20th Century) --Ty Re:Nice, but... (Score:1) The good points of a distributed system like this is: 1) no sentral server 2) no snooping parties or middle-man attacks 3) anonymity, you don't have to worry about getting cracked, DOSed or pinged to death. The bad news is 1) high latency 2) more complex and unreliable 3) need for a trust-model. As a final point, if every inventor on earth listened to negative talk like this, we'd still be smashing rocks together. - Steeltoe I can see it now... (Score:4) Found [1,103,038] hits for chess. Displaying 1 - 5 1. Chess_Christina_Ass_Chess_Porn_Britney_MP3_Wares_ 2. Christina_Ass_Porn_Chess_Britney_MP3_Wares_games 3. Christina_Chess_Ass_Porn_Britney_MP3_Wares_games 4. Christina_Ass_Porn_Britney_Chess_MP3_Wares_games 5. Christina_Ass_Porn_Britney_MP3_Wares_games_Chess_ G.H. And of course (Score:1) Re:Interesting but useless (Score:1) Re:Nice, but... (Score:1) This implementation may be just proof of concept, but the possibility is there for some really interesting interactive applications of Freenet. Re:Nice, but... (Score:1) Re:Nice, but... (Score:2) Also from EOF (Score:2) Various other pieces of software have been developed, notably freeweb [sourceforge.net] and Snarfzilla [sourceforge.net], to help with freesite insertion and/or browsing for stuff. HTH Re:balloons and honey pots (Score:2) That doesn't sound like the Freenet I know. There is actual content floating around, and I don't just mean porn. Take Snarfoo [127.0.0.1] and Content of EVIL [127.0.0.1] for example, to name but two. You will have to be running fproxy for those links to work, btw. Re:Namespace corruption? (Score:3) Re:But (Score:3) Go left. Aim up. Select rocket launcher. Fire. Until next week, Joe Fragger. Re:Namespace corruption? (Score:1) e.g.: When Microsoft put out their Active Accessibility API to make it easier for us to make Win32 applications that can be accessed by people with disabilities, I doubt any one of them thought some jackass (me) would use it to turn AOL's Instant Messenger into a magic hate ball (think magic 8 ball but this one answers your questions with rage & spite instead of vagueness). The easier way to do it of course would be to just create a quick plugin for TiK (tik.sourceforge.net), but nooooooooooooooo, not me. I see a cool new technology (shut up, AA API was new to me...) and I decide to abuse it. This freenet game thingee is the same thing... Peace, Amit ICQ 77863057 technology (Score:5) 1. Its ability to enable sex. 2. Its ability to enable game playing. With anonymous porn, freenet clearly had the first all set up, but now that it has the second, there are no more obstacles to its widespread adoption. Thank you for reading Peace, Amit ICQ 77863057 Re:Namespace corruption? (Score:1) I don't know if anyone actually has these goals. I think most people would prefer to play at a reasonable speed. But the actual point was to teach people how to write applications for Freenet. I figured it was more fun to show how to write chess than to show how to write, say, an Enterprise Application Server. Re:Faster than playing chess by post? (Score:1) Every few months the mail would arrive by plane with the other guy's next move. Then, one month, the guy at the North Pole doesn't get the expected letter. He figures the guy at the South Pole didn't mail it in time, and it'll be in the next batch of mail. A few months go by, and the letter isn't in the next batch of mail, either. A few more months, nothing. Six months go by, and finally a letter arrives from the South Pole. Excited, he tears the letter open and reads: "J'adoube." (I adjust.) (In tournament chess there's something known as the "touch move rule" which means that if you touch a piece, you have to move that piece. You can nudge a piece only if you first announce that you're just adjusting it by saying, "I adjust," or, in French, "J'adoube." Classy chess players prefer to say it in French.) I don't know if Freenet would be that bad, but if you wanted a more secure game of chess it would be cheaper to just run some other protocol through SSL. Dave Conrad aka Dr. A. van Code Well a friend of a friend of a friend told me What is the point? (Score:2) Is there some government somewhere that is repressing chess play? Who would gain from anonymously playing chess?!? If you want to play chess remotely with high lag, just play by postal mail. It may cost a buck or two, but it is private, and if someone decides to read your mail, you will know about it. Nice, but... (Score:2) There is absolutely no way I would ever play chess online on a truly anonymous system. Cheating (the use of chess programs to boost a fragile ego - yes, some people view online chess as a "get the highest score by whatever means" type of game and, like they're UO/Diablo/Whathaveyou counterparts, are utterly baffled that there are people who don't) is already a problem on systems like ICC and USChessLive with registrations and moderation and sophisitcated detection systems. The only people I'd play over freenet are people I know in real life and then... what's the point? Re:Nice, but... (Score:2) I've heard one-time boxers positively gloat over the fact that they got crushed by the world champion. I've heard a local Chess IM fondly recall when he got trounced by Mikhail Tal. People pay good money for the chance to get beaten by Grandmasters they've not even heard of. Getting beaten in a test of skill by a person who is much better than you - even repeatedly and without sign of end - is an honor (well... except maybe in the boxing thing, where it'd probably involve death eventually). Getting beaten by a twirp with a computer isn't. I don't need to know who my opponant is - I've played hundereds of people I don't know on ICC. I just need reasonable assurances that I'm playing another person when that is what I'm choosing to do. If I want to play a computer, I can (and do) do that as well. And the trust model doesn't work at all. If only people you had past experience with or reliable sources vouching for were allowed to play you, that's not really all that anonymous, is it? You know them possibly better than I know the guys I played at the Chicago open a few weeks ago. If you don't require that, it's not at all difficult to keep coming back as a different random string of characters. I do agree that there are strong possiblities for the technology. Chess is not one of them. I can think of no non-masochistic reason why any tournement player would take part - and while that's far from the majority of people who play the game, it's the vast majority of people who are at all decent at it. Re:Nice, but... (Score:3) And you enforce "The point" how? Are Freenet users going to somehow be more honorable than everyone else? Is this like Marxism's "point" that absolute power, if just in the hands of a different group of people, would be a wonderful thing? Games are, by the nature of most of them, competative. The more anonymous they get, the more they get dominated by those who don't wish to play fairly by the rules - because on the one hand you have lusers who just want to feel the momentary thrill of having "won" (even if, in the case of Chess, it's Fritz or Crafty or Junior who won) and on the other hand you have people actually interested in the game who don't want to deal with the former, so the only one's left are the lusers and the naive. In RL situations, cheating is rarely a viable option - the ways to cheat are fewer and the chance of getting caught are higher. Go into a digital world - be it the equivilant of Chess or Paintball - and all of a sudden it's both easier to cheat and harder to get caught. You can't have your laptop next to you in over the board chess, and you can't use a dupe bug on your pellets in paintball. You can on ICC or in any of the myriad of FPSs and the like. And you're much less likely to get caught with much less effort to hide yourself. And what happens? People cheat more. Golly, what a surprise. So this is somehow going to get better in a totally anonymous environment? Never happen. Well, barely ever happen. What will happen is the owner of the freesite will make it known that he wants to play chess and dozens of adolescents (maturity-wise) will flock to his site and test out CM8000 against him. Or, for a slight decrease in anonymity - the operaters of the site know who you are, but none of the other players do - the owner of the freesite can play on ICC or USChess live or any of a number of other sites, and have reasonable cause to believe that the people who just beat the crap out of him were, in fact, better than him, and not just fronts for a chess engine he could play without logging on at all. Complete anonymity and playing competative games that require a LOT of work to become even marginally skilled at for real just don't go together well. Someone else mentioned the idea of proof of concept - and, indeed, the people behind this don't seem to see it as a particularly serious endeavour. As a way to see what can be done on Freenet, great. Looks cool, and maybe there are some games that will fit nicely on it (turn based strategy-war games spring to mind). As a way to play a game like Chess online, however, it's a complete wash. So? (Score:2) Just my $.02 (but these are mine, mine, mine) Re:Nice, but... (Score:1) I can't imagine never being willing to play a game because someone else beat me at it. If anything, by playing against a better player, it's a chance to be exposed to better strategies, to at least better your own playing abilities. Faster than playing chess by post? (Score:2) Re:Turn based? Hahaha (Score:1) Good point, however (Score:2) IMHO Freenet is worse than post. It doesn't let you send secret decoder rings in the envelope, you can't include photos of your cat balancing on a high tension wire, and it's not possible to put a whole mess of glitter inside Freenet as you can with a well-designed postal envelope. Some of us used to give away nifty badges, fake coinage, and various artifacts via post, so Freenet is definitely not even close in the end-user experience as a good snail-mail based game. Even if it is used for chess. Impossible (Score:1) Mail might be a good application to run over Freenet: simple and fast enough. I don't know how they handle the fact that Freenet is an unreliable network by design (basically the documents you insert into Freenet are not supposed to stay forever), but EOF seems like a neat project. Turn based? Hahaha (Score:1) No one has either the time or the attention span to wait for another human being to make a move. This is the future, baby, and if you don't move quickly, you are dead. Games that are based on waiting are dead. There's no time to strategy. Strategy is formed at the business end of a gun. Read and react. There's no time for deep thinking. Think too long and the game is over. Kinda like fp'ing on Dancin Santa Coming next week: (Score:1) Freesites (Score:1) Perhaps... (Score:2) Are you gonna do this every day? (Score:1) That way, when it happens, you will be able to prove your prediction? Only about 30 years too late. (Score:1) I get it, it's spy code sent to your spymasters in Tajikistan. What's next I wonder? BTW, Louis Armstrong died on July 6, 1971 at his home in Flushing Queens. I don't believe he and his last wife Lucielle had any children. Interestingly enough, he celebrated his 71st birthday on the 4th of July two days earlier. However, Gary Giddings, noted jazz critic and author discovered that Louis was actually born in August 1901, which made him 70 when he died. As Duke Ellington once said "Louis Armstrong was born poor, died rich, and never hurt anyone along the way". Yes, That's it (Score:2) Re:Stephen King, author, dead at 54 (Score:1) Re:Protect the Chess players (Score:1) * Patent Pending, (c)2001 TikkaMassala. Re:The breakdown of freenet traffic is now (Score:1) there is hardly any warez at all and very few mp3s. Go look on or Snarfoo to see keys posted daily for evidence. Re:So? (Score:2) Really the only thing about the Freenet system is that it guarantees privacy, at least as good a guarantee as one can get on the Internet. Now I can't come up with too many valid reasons for this level of protection, we're all better off if there's accountability at some level. This game is just a first step in developing somewhat realtime applications that use the Freenet engine. One could imagine future versions of Freenet being optimized to the point that they could create a virtual socket between computers. You could realtime chat with people without anybody having a hope of tracking you down. But as I said before, I'm not sure this is a good thing. neat! (Score:2) Good move! That's the way to promote! (Score:1) - Yuioup "I could think of an interesting quote, but I couldn't be bothered right now - Yuioup" Interesting but useless (Score:2) Namespace corruption? (Score:4)
http://developers.slashdot.org/story/01/06/21/182226/write-your-own-freenet-based-game?sdsrc=prev
CC-MAIN-2015-11
refinedweb
3,269
71.14
I Love Python: ReSTful DB CRUD dispatching using CherryPyApril 19th, 2009 by CherryPy has been one of my favorite Python tools for several years. It should be mentioned here that a ReSTful dispatcher could easily be written in web.py, or pylons as well, and even comes for free in the latest TurboGears implementation. But if you’re looking for a small, easily manageable and extremely dynamic ReST dispatching solution without the heft of an entire web framework, I’m about to show you how CherryPy can help you in three different ways, depending on your model. Assuming this mapping: HTTP GET or HEAD = DB Read HTTP POST = DB update HTTP PUT = DB insert HTTP DELETE = DB delete Let’s also standardize on one common method across all examples, for determining the HTTP request type, and matching it to the function of the same name. Here is the full code snippet for accomplishing this task: methods = ('OPTIONS','GET','HEAD','POST', 'PUT','DELETE','TRACE','CONNECT') if cherrypy.request.method not in self.methods: raise cherrypy.HTTPError(400,'Bad Request') # If request method is HEAD, return the page handler # for GET, and let CherryPy take care of dropping # the response body method = cherrypy.request.method if cherrypy.request.method == "HEAD": method = "GET" http_method = getattr(self,method) #print "HTTP Method: %s" % method result=(http_method)(args,kwargs) In our examples, we’re going to shorten this to: http_method = getattr(self.m,cherrypy.request.method) return (http_method)(args,kwargs) All of this essentially determines how HTTP was called (GET/PUT/POST/DELETE), and calls the method in a class which exactly matches this name (self.GET(), self.PUT(), etc) When you see this code, know that it’s just the HTTP method resolving code. Now for the fun. Let’s look at the dispatcher options we have. Way 1: A hard-coded URL pointing to fixed resources: CherryPy can be used in a manner similar to this to establish a fixed URL, and corresponding resources, driven from predefined classes instantiated in the ‘root’ hierarchy: import cherrypy class ReSTPaths1: @cherrypy.expose def index(self): http_method = getattr(self,cherrypy.request.method) return (http_method)() def GET(self): return "In GET 1.." class ReSTPaths2: @cherrypy.expose def index(self): http_method = getattr(self,cherrypy.request.method) return (http_method)() def GET(self): return "In GET 2.." class ReSTPaths3: @cherrypy.expose def index(self,client_id=None): http_method = getattr(self,cherrypy.request.method) return (http_method)(client_id) def GET(self,client_id=None): return "IN Get 3, your client_id is %s\n" % (client_id) cherrypy.server.socket_port=8081 root=ReSTPaths1() root.client = ReSTPaths2() root.client.address = ReSTPaths3() cherrypy.quickstart(root) Once this is running, the URL to invoke it looks like this: Output looks something like this: In GET 1.. In GET 2.. IN Get 3, your client_id is None If you’re new to CherryPy or Python in general, I’ll reiterate for you how we are calling the GET method in our class. When we issue this request, we’re issuing what HTTP calls a GET request: The CherryPy service above, listening on port 8081, calls the index() method on the root class. The root class was set to: root=ReSTPaths1() at the bottom of that file. The index() method from the ReSTPaths1 Class looks like this, at the top of that file: def index(self): http_method = getattr(self,cherrypy.request.method) return (http_method)() If we were to insert a print cherrypy.request.method statement before the return, we would see it set to “GET”. getattr simply says: “get me the function name in self, matching the string “GET”. it returns a reference to self.GET(), which is set directly below the index: def GET(self): return "In GET 1.." Notice that the index() method has a @cherrrypy.expose decorator above it. This makes the index method callable by the public. The GET method does not have it, which means we could never invoke the GET method by typing: If you try this, you’ll get a 404 Not Found error, because it’s not visible through the CherryPy interface. GET() has to be invoked through index(), which means GET can only be called if an HTTP GET request is issued. If we posted form data to this same URL from, say, a form entry asking people for data input, we would need to add a POST method to this ReSTPaths1() class, to receive the POST data entered in the form fields. Now back to our example: In this example, no part of the URL or associated resources are dynamic, in either initialization or run time. This is fine, and suits the needs of most ReSTful CRUD interfaces. Way 2: URL paths and associated components dynamically set once, upon dispatcher init/startup: Now let’s say we want to determine the contents of the root, and therefore the URLs and associated resources for our ReSTful interface, dynamically during initialization/startup. We can assign the root setting by using a Python metaclass to generate classes in our CherryPy startup code, and set the root components to each generated class. This goes beyond the average needs for CRUD access, but it’s such a nice implementation that I must show it off: import cherrypy class MetaCRUD(type): @cherrypy.expose def index(cls): http_method = getattr(cls,cherrypy.request.method) return (http_method)() def GET(cls): return "In class ", cls.__name__, ', received a GET request.' def PUT(cls): return "In class ", cls.__name__, ', received a PUT request.' def POST(cls): return "In class ", cls.__name__, ', received a POST request.' def DELETE(cls): return "In class ", cls.__name__, ', received a DELETE request.' baseCRUD = MetaCRUD('baseCRUD',(),{}) root = baseCRUD dynamic_class = {} for d in ['legacy_dbi','new_dbi','some_other_dbi']: dynamic_class[d] = MetaCRUD(d,(),{}) setattr(root,d,dynamic_class[d]) cherrypy.server.socket_port=8081 cherrypy.quickstart(root) Here we’re using a metaclass, with CherryPy exposed methods, to generate a dictionary of dynamic classes. We set the root.classname = the_new_class by using the setattr() method. After initialization, URL components and resources are fixed in this model. But wow, the awesome power we have during initialization, in 28 lines really rocks. I wrote this in 30 minutes, and realized again why I am so head-over-heels in love with this language. When we hit these URLs: We see this output: In class baseCRUD, received a GET request. In class legacy_dbi, received a GET request. In class new_dbi, received a GET request. In class some_other_dbi, received a GET request. Let’s issue a POST request via curl, on the command line. The response is returned: [gloriajw@g-monster ~]$ curl -d "" In class some_other_dbi, received a POST request. This model could be used for, say, reading the contents of the Postgres template1 databases list or the mysql ’show databases’ command, and auto-generating a ReSTful CRUD interface for each. Access of each resources can be controlled via HTTP Auth methods. This is a great solution to providing, and restricting, legacy database access for new processes through a standard interface. Way 3: Live, ever-dynamic determination of URL and associated component: Some ReSTful URL models may need to be ‘run-time dynamic’, especially in the case where databases are dynamically created, and the associated resources per new database could vary. There is a simple example of a dynamic URL and resource model: import cherrypy import pprint class ReSTPaths: @cherrypy.expose def __init__(self): pass @cherrypy.expose def client(self,*args,**kwargs): return "Your HTTP method was %s. Your args are: %s and your kwargs are: %s\n" \ % (cherrypy.request.method, pprint.pformat(args), pprint.pformat(kwargs)) @cherrypy.expose def address(self,*args,**kwargs): return "Your HTTP method was %s. Your args are: %s and your kwargs are: %s\n" \ % (cherrypy.request.method, pprint.pformat(args), pprint.pformat(kwargs)) cherrypy.quickstart(ReSTPaths()) This allows for dynamic URLs such as: The output from this code looks like this: Your HTTP method was GET. Your args are: ('address', '34567') and your kwargs are: {} Your HTTP method was GET. Your args are: ('address',) and your kwargs are: {'client_id': '34567'} Your HTTP method was GET. Your args are: ('client',) and your kwargs are: {'client_id': '34567'} Your HTTP method was GET. Your args are: ('client', '34567') and your kwargs are: {} Your HTTP method was GET. Your args are: ('anything', 'anything_else') and your kwargs are: {} Notice that we only have keyword args (kwargs) when we pass a named parameter, such as client_id=34567 Let’s try a POST request from curl, on the command line: [gloriajw@g-monster ~]$ curl -d "something_else=whatever_i_want" Your HTTP method was POST. Your args are: ('anything', 'anything_else') and your kwargs are: {'something_else': 'whatever_i_want'} In this code, the sky is the limit. You can place whatever code you like in these methods, dynamically creating classes and resources as needed, letting them only persist until the result is returned. This may add some inefficiency, but in exchange offer more secure network resources. Code is attached, Enjoy! Gloria
http://www.devchix.com/category/reviews/book/
crawl-002
refinedweb
1,483
65.22
I get confused with relative import paths literally all the time. It's annoying and can really take you out of the "zone" when solving a problem. Luckily this morning I stumbled across a great solution, it's fairly simple and can be implemented in a webpack setup with just a few extra lines. By adding some options to webpack's resolve configuration object, we can define aliases for specific directories. For example: We could define the alias Components so that instead of having to do stuff like this: import MyComponent from '../../../../components/MyComponent.js' We could do just do: import MyComponent from 'Components/MyComponent.js' Quite nice eh? I definitely think so! Implementation Head over to your webpack config file and add the following: const path = require('path'); module.exports = { // configuration options for how webpack resolves modules resolve: { alias: { // add as many aliases as you like! Components: path.resolve(__dirname, 'path/to/your/components/dir') } } // ... rest of your config } Once you have added whatever aliases you need to the resolve object you should be good to go 🔥 Note: you can find the official webpack docs for resolve here: Hopefully some folks find this useful and thanks for reading! Discussion (0)
https://practicaldev-herokuapp-com.global.ssl.fastly.net/georgedoescode/simplify-your-imports-with-webpack-aliases-59f
CC-MAIN-2021-25
refinedweb
201
54.32
NOTE: This article presents another solution that does not depend on JSON.net. Doing interop with an ASP.NET ScriptService in JavaScript is simple, just deserialize the payload, e.g. result.d. But if you are consuming with managed code it gets a bit tricky. The 3.5 stack wraps the payload in a 'd' container making deserialization to a similarly shaped type or a type in a shared library (if you are using a shared library, why use JSON? There are reasons... ) impossible using any of the ms serializers. My solution is to use Newtonsoft's JSON.NET with a simple generic helper class to unwrap the payload.. public class AjaxWrapper<T> { public T d; } var response = HttpRequestHelper.AjaxApp([get some json from an asp.net 3.5 scriptservice]); // response = "{"d":{"__type":"MyNamespace.MyType","Assertions":0,....." AjaxWrapper<MyNamespace.MyType> result = Newtonsoft.Json.JsonConvert.DeserializeObject<AjaxWrapper<MyNamespace.MyType>>(response); Easy..... In the example, the typenames are the same for clarity but the type specified in the json is ignored by JSON.NET. As long as the client-side type is similarly shaped you are golden. Note: this applies to web services, not webhttp wcf services as there are attributes to get them to server POJO JSON that can be directly consumed. This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
http://www.codeproject.com/Tips/72638/Strongly-typed-deserialization-of-ASP-NET-3-5-Scri.aspx
CC-MAIN-2014-42
refinedweb
230
50.94